/* ============================================
   Marek Benus - Stavebné práce
   Design: Sharp & Corporate
   Colors: Slate + Amber/Rust
   Typography: Archivo + DM Sans
   Animation: Slide From Sides (GSAP)
   ============================================ */

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

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

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

#navbar .nav-logo {
  color: #ffffff;
  transition: color 0.3s ease;
}

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

#navbar .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 2px;
}

#navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #B45309;
  transition: width 0.3s ease;
}

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

#navbar.scrolled .nav-link {
  color: #334155;
}

#navbar.scrolled .nav-link:hover {
  color: #B45309;
}

#navbar #mobile-menu-btn {
  color: #ffffff;
  transition: color 0.3s ease;
}

#navbar.scrolled #mobile-menu-btn {
  color: #1E293B;
}

.nav-link-mobile {
  display: block;
  padding: 0.75rem 0;
  color: #334155;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 1px solid #f1f5f9;
  transition: color 0.2s ease;
}

.nav-link-mobile:hover {
  color: #B45309;
}

/* --- Hero --- */
#hero_1 {
  min-height: 100vh;
}

.hero-image-side img {
  transition: transform 8s ease;
}

#hero_1:hover .hero-image-side img {
  transform: scale(1.03);
}

/* --- Section Labels --- */
.section-label {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #B45309;
  margin-bottom: 1rem;
}

/* --- Service Cards (zigzag) --- */
.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.service-row.reverse {
  direction: rtl;
}

.service-row.reverse > * {
  direction: ltr;
}

.service-number {
  font-family: 'Archivo', sans-serif;
  font-size: 6rem;
  font-weight: 900;
  color: #B45309;
  opacity: 0.1;
  line-height: 1;
  position: absolute;
  top: -1.5rem;
  left: -0.5rem;
}

.service-image {
  overflow: hidden;
  border-radius: 1rem;
}

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

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

@media (max-width: 768px) {
  .service-row,
  .service-row.reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
    direction: ltr;
  }

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

/* --- Gallery --- */
.gallery-item {
  overflow: hidden;
  border-radius: 0.75rem;
  cursor: pointer;
  position: relative;
}

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

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

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.5) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 1;
}

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

/* --- Feature Cards --- */
.feature-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(180, 83, 9, 0.3);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(180, 83, 9, 0.15);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-icon i,
.feature-icon svg {
  color: #D97706;
  width: 22px;
  height: 22px;
}

/* --- Pricing Cards --- */
.pricing-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.pricing-card:first-child {
  border-color: #B45309;
  box-shadow: 0 4px 24px rgba(180, 83, 9, 0.1);
}

.pricing-card:first-child::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #B45309;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.pricing-price {
  font-family: 'Archivo', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: #1E293B;
  line-height: 1;
}

.pricing-unit {
  font-size: 1rem;
  font-weight: 500;
  color: #94A3B8;
}

.pricing-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  color: #334155;
  font-size: 0.95rem;
}

.pricing-feature i,
.pricing-feature svg {
  color: #B45309;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --- Contact Info Items --- */
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: rgba(180, 83, 9, 0.15);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-info-icon i,
.contact-info-icon svg {
  color: #D97706;
  width: 20px;
  height: 20px;
}

/* --- Contact Form --- */
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid #E2E8F0;
  border-radius: 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: #334155;
  background: #F8FAFC;
  transition: all 0.2s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #B45309;
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.1);
  background: #ffffff;
}

.form-group input.error,
.form-group textarea.error {
  border-color: #EF4444;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit-btn {
  width: 100%;
  padding: 1rem;
  background: #B45309;
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.form-submit-btn:hover {
  background: #D97706;
  transform: translateY(-1px);
}

.form-submit-btn:active {
  transform: translateY(0);
}

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}

.form-success.show {
  display: block;
}

/* --- Footer --- */
.footer-link {
  color: #94A3B8;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #D97706;
}

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

/* --- Stat Card --- */
.stat-card {
  text-align: center;
  padding: 1.25rem;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.stat-value {
  font-family: 'Archivo', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #B45309;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: #94A3B8;
  margin-top: 0.25rem;
}

/* --- 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;
  }

  .slide-left, .slide-right, .fade-up, .scale-in,
  .blur-in, .rotate-in, .reveal-circle, .clip-rect {
    opacity: 1 !important;
    transform: none !important;
    -webkit-filter: none !important;
    filter: none !important;
    -webkit-clip-path: none !important;
    clip-path: none !important;
  }
}

/* --- Button general hover --- */
a[class*="bg-primary"]:hover {
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.2);
}

/* --- Map Container --- */
#contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0.75rem;
}

/* --- Decorative Accent Lines --- */
.accent-line {
  width: 3rem;
  height: 3px;
  background: #B45309;
  border-radius: 2px;
}

/* --- Custom Scrollbar (webkit) --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #F8FAFC;
}

::-webkit-scrollbar-thumb {
  background: #94A3B8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748B;
}

/* ============================================
   RESPONSIVENESS FIXES
   ============================================ */

/* --- 1. Contain GSAP slide animations within sections --- */
#about_1,
#services_1,
#features_1,
#contact_1 {
  overflow-x: hidden;
}

/* --- 2. Small phones ≤ 480px --- */
@media (max-width: 480px) {
  /* About stats */
  #about-stats {
    gap: 0.75rem;
  }

  .stat-card {
    padding: 0.75rem 0.5rem;
  }

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

  .stat-label {
    font-size: 0.7rem;
  }

  /* Service rows */
  .service-row > div {
    padding: 0;
  }

  /* Service images */
  .service-image img {
    height: 220px;
  }

  /* Gallery items */
  .gallery-item img {
    height: 150px;
  }

  /* Pricing */
  .pricing-price {
    font-size: 2rem;
  }

  .pricing-card {
    padding: 1.5rem 1.25rem;
  }

  /* Hero CTAs */
  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas a {
    width: 100%;
    justify-content: center;
  }

  /* Contact padding */
  #contact_1 .bg-secondary,
  #contact_1 .bg-white {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

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

  /* Nav */
  #navbar > div {
    height: 3.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  #navbar .nav-logo {
    font-size: 1rem;
  }

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

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

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas a {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .hero-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
  }

  /* About stats: stack to single column */
  #about-stats {
    grid-template-columns: 1fr !important;
    gap: 0.5rem;
  }

  .stat-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    text-align: left;
  }

  .stat-value {
    font-size: 1.3rem;
  }

  .stat-label {
    font-size: 0.75rem;
    margin-top: 0;
  }

  /* About image */
  #about_1 img {
    height: 240px !important;
  }

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

  /* Service rows */
  .service-row {
    gap: 1rem;
  }

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

  .service-image img {
    height: 180px;
  }

  h3 {
    font-size: 1.1rem;
  }

  /* Contact */
  #contact_1 .bg-secondary,
  #contact_1 .bg-white {
    padding: 1rem 0.75rem !important;
  }

  .contact-info-item a,
  .contact-info-item span {
    word-break: break-all;
    font-size: 0.85rem;
  }

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

  /* Feature cards */
  .feature-card {
    padding: 1.25rem;
  }

  /* Pricing */
  .pricing-price {
    font-size: 1.75rem;
  }

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

  #whatsapp-btn {
    right: 0.75rem;
    bottom: 3.75rem;
    width: 3rem;
    height: 3rem;
  }

  #whatsapp-btn svg {
    width: 22px;
    height: 22px;
  }

  /* Footer */
  #footer_1 .grid {
    gap: 1.5rem;
  }

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

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

/* --- 4. General mobile ≤ 768px --- */
@media (max-width: 768px) {
  /* Section padding reduce */
  section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

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

  /* About image height */
  #about_1 img {
    height: 300px !important;
  }

  /* About stats: 2 cols on tablet-ish, keeps 3 on wider */
  #about-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Contact map */
  #contact-map {
    height: 12rem;
  }

  /* Gallery: 2 cols */
  #gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Pricing cards stack */
  #pricing-cards {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  /* Features: 1 col */
  #features-grid {
    grid-template-columns: 1fr !important;
  }

  /* Footer: single column */
  #footer_1 .grid {
    grid-template-columns: 1fr !important;
  }

  /* Contact split: stack */
  #contact_1 .grid {
    grid-template-columns: 1fr !important;
  }
}
