/* ============================================
   Adrian Rusnák — Zemné práce
   Bold & Editorial | Earth Tones | Slide From Sides
   ============================================ */

:root {
  --primary: #C17817;
  --secondary: #1C1C1C;
  --accent: #D4943A;
  --dark: #111111;
  --light: #F5F0EB;
  --text: #2A2A2A;
  --text-light: #7A7A7A;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

::selection {
  background: var(--primary);
  color: #fff;
}

/* ---- Navbar ---- */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(28, 28, 28, 0.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

#navbar.scrolled #nav-logo {
  color: #fff;
}

.nav-link {
  color: rgba(255,255,255,0.7);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  transition: color 0.3s ease;
  padding: 4px 0;
}

.nav-link:hover {
  color: #fff;
}

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

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

.mobile-nav-link {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  font-weight: 500;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.mobile-nav-link:hover {
  color: var(--primary);
  padding-left: 8px;
}

/* ---- Hero ---- */
#hero_1 h1 .highlight {
  color: var(--primary);
}

/* ---- Service item (numbered list) ---- */
.service-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  cursor: default;
  transition: background 0.4s ease;
  min-height: 200px;
}

.service-item:first-child {
  border-top: 1px solid rgba(255,255,255,0.08);
}

.service-item:hover {
  background: rgba(255,255,255,0.03);
}

.service-number {
  font-family: 'Archivo', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.5;
  transition: opacity 0.3s ease;
  line-height: 1;
}

.service-item:hover .service-number {
  opacity: 1;
}

.service-content h3 {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.service-item:hover .service-content h3 {
  color: var(--primary);
}

.service-content p {
  color: rgba(255,255,255,0.45);
  font-size: 0.95rem;
  line-height: 1.65;
}

.service-image {
  display: none;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-item:hover .service-image img {
  transform: scale(1.06);
}

@media (max-width: 1024px) {
  .service-item {
    grid-template-columns: 50px 1fr;
    gap: 1rem;
  }
  .service-image {
    display: none;
  }
  .service-number {
    font-size: 1.75rem;
  }
}

@media (max-width: 640px) {
  .service-item {
    grid-template-columns: 1fr;
    padding: 1.5rem 0;
  }
  .service-number {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
  }
}

/* ---- Equipment zigzag ---- */
.equip-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.equip-row:nth-child(even) .equip-img {
  order: 2;
}

.equip-row:nth-child(even) .equip-text {
  order: 1;
}

.equip-img {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.equip-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.equip-img:hover img {
  transform: scale(1.05);
}

.equip-text h3 {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.equip-text p {
  color: var(--text-light);
  line-height: 1.75;
  font-size: 1rem;
}

.equip-text .equip-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: #fff;
}

@media (max-width: 768px) {
  .equip-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .equip-row:nth-child(even) .equip-img,
  .equip-row:nth-child(even) .equip-text {
    order: unset;
  }
}

/* ---- Gallery masonry ---- */
.gallery-item {
  break-inside: avoid;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}

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

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.25rem 1.25rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

.gallery-category {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 6px;
}

/* ---- CTA ---- */
.cta-phone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

/* ---- Contact form ---- */
#contact-form input:invalid:not(:placeholder-shown),
#contact-form textarea:invalid:not(:placeholder-shown) {
  border-color: #e74c3c;
}

/* ---- Scroll to top ---- */
#scroll-top.show {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Smooth scroll fallback handled in JS ---- */

/* ---- Decorative accent lines ---- */
.accent-line {
  width: 48px;
  height: 3px;
  background: var(--primary);
  display: block;
}

/* ---- Stat card in hero ---- */
.hero-stat {
  text-align: center;
  padding: 0.5rem;
}

.hero-stat .stat-value {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.hero-stat .stat-label {
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
}

/* ---- Overflow containment for GSAP slide animations ---- */
#about_1,
#services_1,
#equipment_1,
#gallery_1,
#contact_1,
#cta_1 {
  overflow-x: hidden;
}

/* ---- GLightbox custom ---- */
.glightbox-clean .gslide-title {
  font-family: 'DM Sans', sans-serif;
}

/* ========================================
   RESPONSIVE FIXES
   ======================================== */

/* ---- Tablets & small desktops ---- */
@media (max-width: 768px) {
  #contact_1 .grid {
    grid-template-columns: 1fr;
  }

  #contact_1 .grid > div {
    padding: 2.5rem 1.5rem;
  }

  #contact-map-container {
    height: 200px;
  }
}

/* ---- Small phones ≤ 480px ---- */
@media (max-width: 480px) {
  /* Hero stats */
  #hero-stats .grid {
    padding: 0.75rem;
    gap: 0.25rem;
  }

  .hero-stat .stat-value {
    font-size: 1.5rem;
  }

  .hero-stat .stat-label {
    font-size: 0.65rem;
    letter-spacing: 1px;
  }

  /* Service items */
  .service-item {
    padding: 1.25rem 0;
    min-height: auto;
    gap: 0.75rem;
  }

  .service-content h3 {
    font-size: 1.1rem;
  }

  .service-content p {
    font-size: 0.85rem;
  }

  /* Equipment */
  .equip-text h3 {
    font-size: 1.25rem;
  }

  .equip-text p {
    font-size: 0.9rem;
  }

  .equip-text .equip-icon {
    width: 40px;
    height: 40px;
  }

  /* Gallery columns */
  #gallery-grid {
    columns: 1 !important;
  }
}

/* ---- Very small screens < 350px ---- */
@media (max-width: 350px) {
  /* Container padding */
  .max-w-7xl,
  .max-w-5xl,
  .max-w-4xl,
  .max-w-3xl {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Navbar */
  #navbar .h-20 {
    height: 3.5rem;
  }

  #nav-logo {
    font-size: 0.95rem !important;
  }

  /* Hero */
  #hero_1 h1 {
    font-size: 1.75rem !important;
    line-height: 1.15 !important;
  }

  #hero_1 p {
    font-size: 0.95rem !important;
  }

  /* Hero CTAs — stack vertically, full width */
  #hero_1 .flex.flex-col.sm\\:flex-row {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  #hero-cta,
  #hero-cta-secondary {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
  }

  /* Hero stats — single column */
  #hero-stats .grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 0.5rem !important;
  }

  .hero-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.35rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  .hero-stat:first-child {
    border-top: none;
  }

  .hero-stat .stat-value {
    font-size: 1.25rem;
  }

  .hero-stat .stat-label {
    font-size: 0.6rem;
  }

  /* About section images */
  #about_1 img {
    max-width: 240px;
  }

  #about_1 .absolute.-bottom-8.-left-8 {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    margin-top: 1rem;
    width: 160px !important;
    height: 160px !important;
  }

  /* Service items */
  .service-item {
    padding: 1rem 0;
  }

  .service-content h3 {
    font-size: 1rem;
  }

  .service-number {
    font-size: 1rem;
  }

  /* Contact section */
  #contact_1 .grid > div {
    padding: 1.5rem 1rem !important;
  }

  #contact-phone,
  #contact_1 [data-field="address"] {
    word-break: break-all;
  }

  /* CTA banner */
  #cta_1 h2 {
    font-size: 1.5rem !important;
  }

  /* Floating buttons — closer to edge */
  #scroll-top {
    bottom: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
  }

  #phone-float {
    bottom: 0.75rem;
    left: 0.75rem;
    width: 2.75rem;
    height: 2.75rem;
  }

  /* Section headings */
  h2 {
    font-size: 1.5rem !important;
  }

  /* Section padding */
  section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  #hero_1 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}
