/* ============================================================
   GILULA SPORT — main stylesheet
   Palette: black (primary) + green (accent)
   ============================================================ */

/* ---------- 1. Variables ---------- */
/* Dark is the default theme. The light theme (below) only re-declares the
   colours — every rule in this file reads them through var(), so nothing
   else has to be written twice.

   js/theme.js puts data-theme="light" on <html> and remembers the choice. */
:root {
  color-scheme: dark;

  --black:        #0a0a0a;   /* page background */
  --black-soft:   #121212;
  --surface:      #171717;
  --surface-2:    #1f1f1f;
  --border:       #2a2a2a;

  --green:        #00e05a;   /* the vivid brand green — badges, buttons, borders */
  --green-dark:   #00a844;
  --green-text:   #00e05a;   /* green used as text on the page background */
  --on-green:     #04180c;   /* text printed on top of the vivid green */
  --yellow:       #ffd21e;

  --text:         #f2f2f2;
  --text-strong:  #ffffff;
  --content:      #dcdcdc;   /* article body text */
  --muted:        #9b9b9b;

  --header-bg:    rgba(10, 10, 10, .95);
  --photo-bg:     linear-gradient(135deg, #0d3d24, #0a0a0a);
  --thumb-veil:   linear-gradient(to top, rgba(10, 10, 10, .9) 0%, rgba(10, 10, 10, .1) 55%);
  --arrow-bg:     rgba(0, 0, 0, .5);
  --dot:          #444;

  --shadow-photo: 0 20px 50px rgba(0, 0, 0, .6), 0 0 0 4px rgba(0, 224, 90, .12);
  --shadow-badge: 0 8px 20px rgba(0, 0, 0, .5);
  --slider-glow:  0 0 0 6px rgba(255, 210, 30, .08), 0 0 45px rgba(255, 210, 30, .18);

  --btn-hover-bg:   #ffffff;
  --btn-hover-text: #04180c;

  --slide-1: radial-gradient(900px 500px at 80% 40%, #0c4a29 0%, #0a0a0a 65%);
  --slide-2: radial-gradient(900px 500px at 80% 40%, #0a4033 0%, #0a0a0a 65%);
  --slide-3: radial-gradient(900px 500px at 80% 40%, #14512b 0%, #0a0a0a 65%);
  --slide-4: radial-gradient(900px 500px at 80% 40%, #073d24 0%, #0a0a0a 65%);
  --slide-5: radial-gradient(900px 500px at 80% 40%, #10462c 0%, #0a0a0a 65%);

  --radius:       12px;
  --container:    1240px;
  --header-h:     72px;

  --font: "Ubuntu", "Noto Sans Georgian", "Segoe UI", Arial, sans-serif;
}

/* ---------- 1b. Light theme ---------- */
/* The green stays the same on badges and buttons; where green is used as
   plain text it darkens (--green-text), otherwise it would be unreadable
   on a white background. */
:root[data-theme="light"] {
  color-scheme: light;

  --black:        #f4f5f7;
  --black-soft:   #eaecf0;
  --surface:      #ffffff;
  --surface-2:    #f1f3f6;
  --border:       #dcdfe4;

  --green:        #00c853;
  --green-dark:   #00a844;
  --green-text:   #04803c;
  --on-green:     #04180c;
  --yellow:       #e6a900;

  --text:         #14181d;
  --text-strong:  #000000;
  --content:      #333a42;
  --muted:        #5f6975;

  --header-bg:    rgba(255, 255, 255, .92);
  --photo-bg:     linear-gradient(135deg, #dcf5e6, #eef0f3);
  --thumb-veil:   linear-gradient(to top, rgba(10, 10, 10, .78) 0%, rgba(10, 10, 10, 0) 60%);
  --arrow-bg:     rgba(255, 255, 255, .85);
  --dot:          #c4cad2;

  --shadow-photo: 0 18px 40px rgba(20, 30, 45, .16), 0 0 0 4px rgba(0, 200, 83, .16);
  --shadow-badge: 0 8px 20px rgba(20, 30, 45, .28);
  --slider-glow:  0 0 0 6px rgba(230, 169, 0, .1), 0 14px 40px rgba(20, 30, 45, .12);

  --btn-hover-bg:   #14181d;
  --btn-hover-text: #ffffff;

  --slide-1: radial-gradient(900px 500px at 80% 40%, #d7f4e2 0%, #ffffff 65%);
  --slide-2: radial-gradient(900px 500px at 80% 40%, #d3f1ea 0%, #ffffff 65%);
  --slide-3: radial-gradient(900px 500px at 80% 40%, #ddf5df 0%, #ffffff 65%);
  --slide-4: radial-gradient(900px 500px at 80% 40%, #d2f2e0 0%, #ffffff 65%);
  --slide-5: radial-gradient(900px 500px at 80% 40%, #d9f3e3 0%, #ffffff 65%);
}

/* ---------- 2. Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}

[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.accent { color: var(--green-text); }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--green);
  color: var(--on-green);
  font-weight: 700;
  font-size: 15px;
  border-radius: 999px;
  transition: background .25s, color .25s, transform .25s;
}
.btn:hover {
  background: var(--btn-hover-bg);
  color: var(--btn-hover-text);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--green-text);
  border: 2px solid var(--green);
  padding: 12px 40px;
}
.btn--outline:hover { background: var(--green); color: var(--on-green); }

/* ---------- 4. Header / Navbar ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo__img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.logo__text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .5px;
}

.nav__list { display: flex; gap: 4px; }

.nav__link {
  display: block;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__link.is-active { color: var(--green-text); }

/* language switcher (Georgian / English flags) */
.header__right { display: flex; align-items: center; gap: 10px; }

.lang { display: flex; gap: 6px; }

.lang__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 32px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  opacity: .5;
  transition: opacity .2s, border-color .2s, transform .2s;
}
.lang__btn:hover { opacity: 1; transform: translateY(-1px); }
.lang__btn.is-active { opacity: 1; border-color: var(--green); }
.lang__btn svg { width: 24px; height: 16px; border-radius: 2px; }

/* dark / light switch — see js/theme.js */
.theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 32px;
  padding: 0;
  color: var(--green-text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .2s, transform .2s, color .2s;
}
.theme:hover { border-color: var(--green); transform: translateY(-1px); }
.theme svg { width: 18px; height: 18px; fill: currentColor; }

/* the moon offers the dark theme, the sun the light one —
   so each page shows the icon of the theme you would switch to */
.theme__sun  { display: block; }
.theme__moon { display: none; }
:root[data-theme="light"] .theme__sun  { display: none; }
:root[data-theme="light"] .theme__moon { display: block; }

/* Google Translate does the actual translating, but we drive it from the
   flag buttons above — so its own toolbar and tooltips stay hidden. */
#google_translate_element { display: none; }
.goog-te-banner-frame,
.goog-te-gadget,
#goog-gt-tt,
iframe.skiptranslate { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* On English the menu and the section headings go all-caps.
   Scoped to .lang-en on purpose: Georgian has no capitals, and
   text-transform would turn Mkhedruli into Mtavruli. */
.lang-en .nav__link {
  text-transform: uppercase;
  letter-spacing: .4px;
  font-size: 14px;
}
.lang-en .section__title {
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* burger (mobile only) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--green-text);
  transition: transform .25s, opacity .25s;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. Slider ---------- */
/* the slider sits in a yellow frame so it stands apart from the other sections */
.slider {
  position: relative;
  overflow: hidden;
  background: var(--black-soft);
  width: calc(100% - 40px);
  max-width: var(--container);
  margin: 24px auto;
  border: 2px solid var(--yellow);
  border-radius: 18px;
  box-shadow: var(--slider-glow);
}

.slider__track {
  display: flex;
  transition: transform .6s ease;
}

.slide {
  flex: 0 0 100%;
  min-height: 460px;
  display: flex;
  align-items: center;
  position: relative;
}

/* every slide gets its own green gradient (dark or pale, per theme) */
.slide--1 { background: var(--slide-1); }
.slide--2 { background: var(--slide-2); }
.slide--3 { background: var(--slide-3); }
.slide--4 { background: var(--slide-4); }
.slide--5 { background: var(--slide-5); }

.slide__inner {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: 40px;
  padding: 60px 76px; /* wide side padding so the arrows never cover the text */
}

.badge {
  display: inline-block;
  padding: 5px 14px;
  margin-bottom: 16px;
  background: var(--green);
  color: var(--on-green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 999px;
}

/* the slider now carries news headlines, so the type is a little smaller
   and long titles are cut off after three lines */
.slide__title {
  font-size: clamp(24px, 3.2vw, 40px);
  line-height: 1.2;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.slide__role {
  margin-top: 10px;
  color: var(--green-text);
  font-weight: 500;
  font-size: 15px;
}
.slide__desc {
  margin: 14px 0 26px;
  max-width: 520px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* news photo + position number badge */
.slide__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.slide__photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--photo-bg);
  box-shadow: var(--shadow-photo);
}
.slide__photo--contain { object-fit: contain; padding: 16px; }

/* if a photo is missing, a green ball watermark is shown instead */
.slide__visual.no-photo {
  min-height: 260px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300e05a' stroke-width='.7'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6.5l4.2 3-1.6 5h-5.2l-1.6-5z'/%3E%3Cpath d='M12 2v4.5M2.4 9.2l5 1.3M21.6 9.2l-5 1.3M6 21l3.4-6.5M18 21l-3.4-6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.slide__number {
  position: absolute;
  right: 8px;
  bottom: 14px;
  min-width: 58px;
  padding: 6px 12px;
  background: var(--green);
  color: var(--on-green);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  border-radius: 10px;
  box-shadow: var(--shadow-badge);
}
.slide__visual.no-photo .slide__number { position: static; }

/* arrows */
.slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--arrow-bg);
  border: 1px solid var(--border);
  color: var(--green-text);
  font-size: 18px;
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.slider__arrow:hover { background: var(--green); color: var(--on-green); }
.slider__arrow--prev { left: 16px; }
.slider__arrow--next { right: 16px; }

/* dots */
.slider__dots {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.dot {
  width: 10px;
  height: 10px;
  background: var(--dot);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s, width .2s;
}
.dot.is-active { background: var(--green); width: 28px; border-radius: 999px; }

/* ---------- 6. Sections ---------- */
.section { padding: 70px 0; }

.section__head { text-align: center; margin-bottom: 40px; }
.section__title { font-size: clamp(26px, 4vw, 36px); font-weight: 700; }
.section__subtitle { margin-top: 8px; color: var(--muted); }
.section__foot { margin-top: 45px; text-align: center; }

/* ---------- 7. News grid ---------- */
.news__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 per row → 3 rows of 12 */
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s, border-color .25s;
}
.card:hover { transform: translateY(-6px); border-color: var(--green); }

.card__thumb {
  position: relative;
  height: 180px;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  overflow: hidden;
  background: var(--photo-bg);
}

/* the article photo */
.card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform .4s;
}
.card__img--contain { object-fit: contain; padding: 18px; }
.card:hover .card__img { transform: scale(1.06); }

/* dark gradient so the badge stays readable on top of the photo
   (it stays dark in the light theme too — it sits over a photo) */
.card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--thumb-veil);
}

.card__badge {
  position: relative;
  z-index: 1;
  padding: 4px 12px;
  background: var(--green);
  color: var(--on-green);
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
}

.card__body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.card__title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  transition: color .2s;
}
.card:hover .card__title { color: var(--green-text); }
.card__excerpt {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
  flex: 1;
}
/* "ავტორი: სახელი გვარი" on the news card */
.card__author {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.card__author span { color: var(--text-strong); font-weight: 500; }

.card__meta {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.news__grid--3 { grid-template-columns: repeat(3, 1fr); }

/* message shown while loading, or when there is nothing to show */
.notice {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ---------- 7b. Single article page ---------- */
.container--narrow { max-width: 820px; }

.article__head { margin-bottom: 24px; }
.article__title {
  margin-top: 6px;
  font-size: clamp(26px, 4.5vw, 42px);
  font-weight: 700;
  line-height: 1.2;
}
.article__meta {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.article__figure {
  margin: 0 0 26px;
  background: var(--photo-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.article__image {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  object-position: center top;
}
.article__image--contain { object-fit: contain; padding: 20px; }

/* "ავტორი: სახელი გვარი" — sits right under the featured image */
.article__author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15px;
}
.article__author-label { color: var(--muted); }
.article__author-name  { color: var(--green-text); font-weight: 700; }

.article__lead {
  margin-bottom: 22px;
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--yellow);
}

.article__content { color: var(--content); font-size: 17px; }
.article__content > * + * { margin-top: 16px; }
.article__content h2 { font-size: 24px; color: var(--text); }
.article__content h3 { font-size: 20px; color: var(--text); }
.article__content a  { color: var(--green-text); text-decoration: underline; }
.article__content ul,
.article__content ol { padding-left: 22px; }
.article__content li { list-style: inherit; margin-top: 6px; }
.article__content ul { list-style: disc; }
.article__content ol { list-style: decimal; }
.article__content img { border-radius: var(--radius); margin-inline: auto; }
.article__content blockquote {
  padding: 12px 18px;
  border-left: 3px solid var(--green);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
}

.article__back { margin-top: 36px; }

a.badge { transition: background .2s, color .2s; }
a.badge:hover { background: var(--btn-hover-bg); color: var(--btn-hover-text); }

/* ---------- 8. Contact ---------- */
.contact { background: var(--black-soft); border-top: 1px solid var(--border); }

.contact__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* Facebook, Instagram, YouTube, WhatsApp, Email */
  gap: 20px;
}

.contact__value { word-break: break-word; }

.contact__card {
  padding: 30px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .25s, border-color .25s, background .25s;
}
.contact__card:hover { transform: translateY(-6px); border-color: var(--green); background: var(--surface-2); }

.contact__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  background: rgba(0, 224, 90, .1);
  border: 1px solid rgba(0, 224, 90, .3);
  border-radius: 50%;
  transition: background .25s;
}
.contact__icon svg { width: 28px; height: 28px; fill: var(--green-text); transition: fill .25s; }
.contact__card:hover .contact__icon { background: var(--green); }
.contact__card:hover .contact__icon svg { fill: var(--on-green); }

.contact__name { display: block; font-weight: 700; font-size: 17px; }
.contact__value { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }

/* ---------- 9. Footer ---------- */
.footer {
  padding: 24px 0;
  background: var(--black);
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer .logo__text { font-size: 17px; }
.footer__admin { color: var(--green-text); }
.footer__admin:hover { text-decoration: underline; }

/* ============================================================
   10. Responsive
   ============================================================ */

/* laptop: 3 cards per row */
@media (max-width: 1100px) {
  .news__grid,
  .news__grid--3,
  .contact__grid { grid-template-columns: repeat(3, 1fr); }
}

/* tablet: burger menu, 2 cards per row */
@media (max-width: 900px) {
  .burger { display: flex; }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--black-soft);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav.is-open { max-height: 420px; }
  .nav__list { flex-direction: column; gap: 0; padding: 10px 20px 20px; }
  .nav__link { padding: 12px 0; border-bottom: 1px solid var(--border); border-radius: 0; }

  .slide__inner { grid-template-columns: 1fr; text-align: center; padding: 50px 66px 70px; }
  .slide__desc { margin-inline: auto; }
  .slide__visual { order: -1; max-width: 320px; }
  .slide__number { font-size: 20px; min-width: 46px; }

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

/* phone: single column */
@media (max-width: 560px) {
  .section { padding: 50px 0; }
  .logo__text { font-size: 17px; }

  /* theme + two flags + burger must still fit next to the logo */
  .header__right { gap: 6px; }
  .lang { gap: 4px; }
  .theme,
  .lang__btn { width: 34px; height: 30px; }
  .lang__btn svg { width: 20px; height: 14px; }
  .theme svg { width: 16px; height: 16px; }

  .slide { min-height: 420px; }
  .slider__arrow { display: none; }
  .slide__inner { padding: 45px 20px 70px; } /* arrows are hidden here, so no extra padding */
  .slider {
    width: calc(100% - 24px);
    margin: 16px auto;
    border-radius: 14px;
    box-shadow: 0 0 0 4px rgba(255, 210, 30, .08);
  }

  .news__grid,
  .news__grid--3,
  .contact__grid { grid-template-columns: 1fr; }

  .footer__inner { justify-content: center; text-align: center; }
}
