:root{
  --topOffset: 700px; /* თუ სათაურები მაინც იფარება: გაზარდე 260-320px */
}

html{
  scroll-behavior: smooth;
}

body{
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  background: #f5f7fa;
  color: #222;
  line-height: 1.6;
}

/* ===== FIXED HEADER+NAV ===== */
.top-fixed{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
}

/* HEADER */
header{
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: white;
  padding: 40px 20px;
  text-align: center;
  position: relative; /* რომ lang-switch სწორად დადგეს */
}

header h1{
  margin: 0 0 15px 0;
  font-size: 2.2rem;
}

header p{
  margin: 0 auto;
  max-width: 1200px;
  font-size: 1.05rem;
  text-align: center;
  line-height: 1.6;
  white-space: nowrap;
}

/* NAV */
nav{
  background: #111;
  padding: 12px 20px;
  text-align: center;
}

nav a{
  color: #fff;
  margin-right: 18px;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover{
  text-decoration: underline;
}

/* ===== CONTENT ===== */
section{
  padding: 40px 20px;
  max-width: 1100px;
  margin: auto;
}

/* პირველი სექცია ქუდის ქვეშ რომ არ მოექცეს */
section:first-of-type{
  margin-top: var(--topOffset);
}

/* CARD */
.card{
  background: white;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* FOOTER */
footer{
  background: #111;
  color: #ccc;
  padding: 30px 20px;
  text-align: center;
}

/* ===== Anchor system (THIS is the key) ===== */
/* ეს არის ის “უხილავი წერტილი”, რომელზეც მენიუ ხტება */
.anchor{
  position: relative;
  top: calc(-1 * var(--topOffset));
  height: 0;
}

/* Language switch (flags) */
.lang-switch{
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

.lang-switch img{
  width: 28px;
  height: auto;
  margin-left: 8px;
  cursor: pointer;
  border-radius: 4px;
}
/* ===== FORCE FIX: place at VERY BOTTOM of style.css ===== */
:root { --topOffset: 300px !important; }  /* დროებით 700px რომ აშკარად იმოქმედოს */

.top-fixed { 
  position: fixed !important; 
}

.anchor{
  position: relative !important;
  top: calc(-1 * var(--topOffset)) !important;
  height: 0 !important;
}

section:first-of-type{
  margin-top: var(--topOffset) !important;
}

/* თუ შენს HTML-ში id section-ზეა (მაგ: <section id="concept">), ამითაც ვაზღვევ */
section[id]{
  scroll-margin-top: var(--topOffset) !important;
}
@media (max-width: 768px){

  header{
    padding: 20px 10px;
  }

  header h1{
    font-size: 1.4rem;
  }

  nav a{
    display:block;
    margin:10px 0;
  }

  .top-fixed{
    position: relative;
  }

  section:first-of-type{
    margin-top:0;
  }

}

/* ===== Mobile Menu ===== */
.menu-toggle{
  display:none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color:#fff;
  font-size: 22px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor:pointer;
}

.menu-links{
  display:flex;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
}

/* Mobile layout */
@media (max-width: 768px){

  /* fixed header on mobile becomes normal flow */
  .top-fixed{
    position: relative;
  }

  /* avoid big top gap on first section when header isn't fixed */
  section:first-of-type{
    margin-top: 0;
  }

  header{
    padding: 20px 12px;
  }

  header h1{
    font-size: 1.4rem;
  }

  header p{
    white-space: normal; /* IMPORTANT: allow wrapping on mobile */
  }

  nav{
    text-align: left;
  }

  .menu-toggle{
    display:inline-block;
    margin: 6px 0;
  }

  .menu-links{
    display:none;          /* hidden by default */
    flex-direction:column;
    align-items:flex-start;
    gap: 10px;
    padding-top: 10px;
  }

  .menu-links.open{
    display:flex;          /* show when open */
  }

  nav a{
    margin: 0;
    display:block;
    width: 100%;
    padding: 8px 0;
  }
}
