/* ==========================================================================
   Tsageri City Public School — Stylesheet
   ========================================================================== */

:root {
  --color-primary: #b5654a;
  --color-primary-dark: #8f4a35;
  --color-primary-light: #e8a98c;
  --color-cream: #fbf4ee;
  --color-text: #2c2320;
  --color-text-light: #6b5c54;
  --color-white: #ffffff;
  --color-border: #ece0d6;
  --shadow-sm: 0 2px 8px rgba(44, 35, 32, 0.08);
  --shadow-md: 0 8px 24px rgba(44, 35, 32, 0.12);
  --shadow-lg: 0 16px 48px rgba(44, 35, 32, 0.18);
  --radius: 14px;
  --font-ge: 'Noto Sans Georgian', 'Poppins', sans-serif;
  --font-en: 'Poppins', 'Noto Sans Georgian', sans-serif;
  --header-height: 76px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-ge);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Language toggle visibility ---- */
body.lang-ge .lang-en { display: none; }
body.lang-en .lang-ge { display: none; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-primary-dark);
}

.logo-badge {
  display: block;
  width: 64px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.25s ease;
}

.nav-link:hover {
  color: var(--color-primary-dark);
}

.nav-link:hover::after {
  width: 100%;
}

.lang-toggle {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lang-toggle:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-primary-dark);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-outline:hover {
  background: #fff;
  color: var(--color-primary-dark);
  transform: translateY(-2px);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(44, 28, 22, 0.55) 0%, rgba(44, 28, 22, 0.7) 55%, rgba(30, 18, 14, 0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding-top: var(--header-height);
  max-width: 760px;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-light);
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: rgba(255, 255, 255, 0.92);
  max-width: 600px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  z-index: 2;
}

.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
  animation: scrollDown 1.8s ease infinite;
}

@keyframes scrollDown {
  0% { opacity: 1; top: 8px; }
  70% { opacity: 0; top: 26px; }
  100% { opacity: 0; top: 26px; }
}

/* ==========================================================================
   Section shared styles
   ========================================================================== */

section {
  padding: 100px 0;
}

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 24px;
  line-height: 1.3;
}

.center {
  text-align: center;
}

/* ==========================================================================
   About
   ========================================================================== */

.about {
  background: var(--color-cream);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.about-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

.about-text p {
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.highlight {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
}

.highlight-icon {
  font-size: 1.5rem;
}

/* ==========================================================================
   Gallery
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.gallery-item {
  position: relative;
  border: none;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item::after {
  content: '\002B';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #fff;
  background: rgba(44, 28, 22, 0);
  transition: background 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.gallery-item:hover::after {
  background: rgba(44, 28, 22, 0.45);
  opacity: 1;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 10, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 40px;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 28px;
  right: 32px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-lead {
  color: var(--color-text-light);
  margin-bottom: 32px;
  max-width: 480px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-list strong {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary-dark);
  margin-bottom: 4px;
}

.contact-list a {
  color: var(--color-text);
  font-weight: 500;
  transition: color 0.2s ease;
}

.contact-list a:hover {
  color: var(--color-primary);
}

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-height: 380px;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
}

/* ==========================================================================
   Messenger floating button
   ========================================================================== */

.messenger-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0084ff;
  color: #fff;
  padding: 12px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 132, 255, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
  animation: fabPulse 2.6s ease-in-out infinite;
}

.messenger-fab svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: block;
}

.messenger-fab-label {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 0.92rem;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 0.3s ease, opacity 0.3s ease;
}

.messenger-fab:hover,
.messenger-fab:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 132, 255, 0.55);
  padding: 12px 20px 12px 12px;
  animation-play-state: paused;
}

.messenger-fab:hover .messenger-fab-label,
.messenger-fab:focus-visible .messenger-fab-label {
  max-width: 160px;
  opacity: 1;
}

@keyframes fabPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(0, 132, 255, 0.45); }
  50% { box-shadow: 0 8px 30px rgba(0, 132, 255, 0.7); }
}

@media (max-width: 560px) {
  .messenger-fab {
    right: 16px;
    bottom: 16px;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: #241812;
  color: rgba(255, 255, 255, 0.85);
  padding-top: 56px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-title {
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.footer-sub {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--color-primary-light);
}

.footer-contact {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
  text-align: right;
}

.footer-contact a:hover {
  color: var(--color-primary-light);
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.footer-social:hover {
  background: var(--color-primary);
  transform: translateY(-2px);
}

.footer-bottom {
  padding: 24px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    order: -1;
  }

  .about-image img {
    aspect-ratio: 16 / 9;
  }

  .footer-contact {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 24px 24px;
    box-shadow: var(--shadow-md);
    transform: translateY(-140%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav.active {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-link {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .lang-toggle {
    margin-top: 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  section {
    padding: 72px 0;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-contact {
    text-align: left;
  }
}
