/* ==========================================================================
   TK Chromos-Savica — stilovi
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@400;500;600;700;800&display=swap');

:root {
  --green-dark: #125c13;
  --green-mid: #1c7a1e;
  --green-light: #b4dfb4;
  --green-pale: #e7f5e3;
  --orange: #ee8b22;
  --text: #1b1b1b;
  --white: #ffffff;
  --header-h: 84px;
  --header-h-mobile: 66px;
  --max-width: 1200px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

#rezervacija,
#sporty,
#radnovrijeme,
#kontakt {
  scroll-margin-top: var(--header-h);
}

@media (max-width: 900px) {
  #rezervacija,
  #sporty,
  #radnovrijeme,
  #kontakt {
    scroll-margin-top: var(--header-h-mobile);
  }
}

body {
  margin: 0;
  font-family: 'Heebo', Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

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

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

h1, h2, h3 { margin: 0; font-family: 'Heebo', Arial, sans-serif; }

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

.divider {
  width: 70px;
  height: 4px;
  background: var(--white);
  margin: 18px auto;
  border-radius: 2px;
}

.divider.dark {
  background: var(--green-dark);
}

/* ---- Gumbi ---- */
.btn {
  display: inline-block;
  padding: 16px 38px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  border: 2px solid transparent;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.btn-white {
  background: var(--white);
  color: var(--green-dark);
}

.btn-white:hover {
  background: var(--green-dark);
  color: var(--white);
}

.btn-green {
  background: var(--green-dark);
  color: var(--white);
}

.btn-green:hover {
  background: var(--white);
  color: var(--green-dark);
  border-color: var(--green-dark);
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
  padding: 14px 0;
}

.site-header .header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .logo {
  display: flex;
  align-items: center;
  height: 56px;
}

.site-header .logo img {
  height: 100%;
  width: auto;
}

.site-header.scrolled {
  background: var(--white);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
  padding: 6px 0;
}

.main-nav {
  display: flex;
  gap: 36px;
}

.main-nav a {
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--white);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.site-header.scrolled .main-nav a,
.site-header.menu-open .main-nav a {
  color: var(--green-dark);
}

.main-nav a:hover {
  border-color: var(--orange);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.site-header.scrolled .hamburger span,
.site-header.menu-open .hamburger span {
  background: var(--green-dark);
}

.site-header.menu-open .hamburger span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.site-header.menu-open .hamburger span:nth-child(2) {
  opacity: 0;
}

.site-header.menu-open .hamburger span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

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

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, #5b2c0f, #a04a1a) center/cover no-repeat;
  background-image: url('assets/images/tk-chromos-savica.jpg');
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.hero-content h1 {
  color: var(--white);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  max-width: 700px;
}

.hero-content .divider {
  margin: 22px 0;
}

/* ==========================================================================
   Features (Rezervacija terena)
   ========================================================================== */

.features {
  padding: 110px 0 80px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 70px;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.feature {
  width: 220px;
}

.feature-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto 22px;
  object-fit: contain;
}

.feature h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

/* ==========================================================================
   Galerija
   ========================================================================== */

.gallery {
  padding: 0 0 90px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: pointer;
  background: #eee;
}

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

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

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(18, 92, 19, 0);
  transition: background 0.3s ease;
}

.gallery-item:hover::after {
  background: rgba(18, 92, 19, 0.15);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] { display: none; }

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

.lightbox button {
  position: absolute;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 2.2rem;
  line-height: 1;
  padding: 10px;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.lightbox button:hover { opacity: 1; }

.lightbox-close { top: 18px; right: 24px; font-size: 2.6rem; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   Radno vrijeme / Sporty Plus (zeleni valoviti odjeljci)
   ========================================================================== */

.worktime,
.sporty {
  position: relative;
  text-align: center;
  padding: 100px 24px;
  background: var(--green-pale);
}

.worktime {
  clip-path: polygon(0 6%, 100% 0, 100% 100%, 0 100%);
  margin-top: -60px;
  padding-top: 150px;
}

.sporty {
  background: var(--green-light);
  clip-path: polygon(0 0, 100% 6%, 100% 100%, 0 100%);
  margin-top: -40px;
  padding-bottom: 130px;
}

.worktime h2,
.sporty h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.worktime-text {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--green-dark);
  margin: 0;
}

.sporty .btn { margin-bottom: 40px; }

.socials {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.socials a {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.socials a:hover {
  background: var(--orange);
  transform: translateY(-3px);
}

.socials svg {
  width: 26px;
  height: 26px;
  fill: var(--white);
}

/* ==========================================================================
   Kontakt
   ========================================================================== */

.contact {
  text-align: center;
  padding: 110px 24px 100px;
}

.contact h2 {
  font-size: 2rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 26px;
  font-size: 1.1rem;
}

.contact-info a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s ease;
}

.contact-info a:hover { color: var(--green-dark); }

.contact-info svg {
  width: 20px;
  height: 20px;
  fill: var(--green-dark);
}

.contact-info .sep {
  color: #bbb;
}

.contact .btn-mail {
  margin-top: 34px;
}

.map-wrap {
  max-width: 900px;
  margin: 46px auto 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  aspect-ratio: 4 / 3;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
}

@media (min-width: 640px) {
  .map-wrap {
    aspect-ratio: 16 / 9;
  }
}

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

.site-footer {
  background: #23282d;
  color: #cfd6cf;
  text-align: center;
  padding: 26px 24px;
  font-size: 0.85rem;
}

.site-footer p {
  margin: 4px 0;
}

.site-footer .credit {
  font-size: 0.8rem;
  color: #8a938c;
}

.site-footer .credit a {
  color: #b4dfb4;
  font-weight: 600;
}

.site-footer .credit a:hover {
  color: #ffffff;
}

#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, background 0.2s ease;
  z-index: 900;
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

#back-to-top:hover {
  background: var(--green-dark);
  color: var(--white);
}

/* ==========================================================================
   Mobilna verzija
   ========================================================================== */

@media (max-width: 900px) {
  .hamburger { display: flex; }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 80vw);
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 110px 32px 32px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
  }

  .main-nav a {
    color: var(--text);
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
  }

  .site-header.menu-open .main-nav {
    transform: translateX(0);
  }

  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .nav-overlay.visible {
    opacity: 1;
    pointer-events: auto;
  }

  .features {
    gap: 46px;
    padding: 90px 24px 60px;
  }

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

  .worktime, .sporty {
    padding: 70px 20px;
  }

  .worktime { padding-top: 110px; }

  .contact { padding: 80px 20px 70px; }

  .lightbox-prev, .lightbox-next { font-size: 1.8rem; padding: 6px; }
}

@media (max-width: 560px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-info {
    flex-direction: column;
    gap: 10px;
  }

  .contact-info .sep { display: none; }

  .site-header .logo { height: 44px; }

  .site-footer {
    padding-right: 74px;
  }
}
