/* ============================================
   KONING AANNEMERSBEDRIJF - Responsive Styles
   Mobile-First Media Queries
   ============================================ */

/* --- Mobile Only (< 1024px) --- */
@media (max-width: 1023px) {
  /* Sağ kenar beyaz şeridini önle */
  .header,
  main,
  .hero,
  .hero__slides,
  .hero__overlay {
    max-width: 100%;
  }

  /* Header / Navigation */
  .hamburger {
    display: flex;
  }

  /* Mobile Nav - Full screen overlay */
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background-color: var(--color-primary);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: var(--header-height);
    padding-bottom: var(--space-xl);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: right var(--transition-base);
    z-index: 1000;
  }

  .nav--open {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
    padding: 0 var(--space-xl);
    margin-top: auto;
  }

  .nav__link {
    font-size: var(--fs-lg);
    color: var(--color-white) !important;
  }

  /* Dropdown in mobile menu */
  .nav__item--dropdown {
    width: 100%;
    position: static;
    text-align: center;
  }

  .nav__item--dropdown .nav__dropdown,
  .nav__item--dropdown:hover .nav__dropdown {
    position: static;
    transform: none;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    border-radius: 0;
    min-width: 0;
    width: 100%;
    padding: 0;
    left: auto;
    top: auto;
    list-style: none;
    z-index: auto;
  }

  .nav__item--dropdown.dropdown--open .nav__dropdown,
  .nav__item--dropdown.dropdown--open:hover .nav__dropdown {
    max-height: 600px;
    padding: var(--space-sm) 0;
  }

  .nav__dropdown li {
    text-align: center;
    list-style: none;
  }

  .nav__item--dropdown .nav__dropdown .nav__dropdown-link,
  .nav__item--dropdown .nav__dropdown .nav__dropdown-link:hover {
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    font-size: var(--fs-sm);
    padding: 8px 16px;
    display: block;
    transition: color var(--transition-fast);
    background: transparent;
  }

  .nav__item--dropdown .nav__dropdown .nav__dropdown-link:hover {
    color: var(--color-secondary);
  }

  .header__cta {
    display: none;
  }

  .nav__mobile-cta {
    display: block;
    margin-top: var(--space-xl);
    margin-bottom: auto;
  }

  /* Force correct colors, always white on mobile nav */
  .nav__link--active,
  .nav__link:hover {
    color: var(--color-secondary) !important;
  }

  /* Hamburger X stays white when menu is open */
  .header--scrolled .hamburger--active .hamburger__line {
    background-color: var(--color-white) !important;
  }

  /* Logo stays visible when menu is open */
  .header--menu-open .header__logo-img {
    filter: brightness(1) !important;
  }

  /* Header matches menu bg when open + scrolled */
  .header--menu-open,
  .header--menu-open.header--scrolled {
    background-color: var(--color-primary) !important;
    box-shadow: none !important;
  }

  /* Hero */
  .hero__title {
    font-size: var(--fs-2xl);
  }

  .hero__description {
    font-size: var(--fs-sm);
  }

  .hero__badge-text {
    font-size: 0.65rem;
    letter-spacing: 1px;
  }

  .hero__buttons {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .hero__buttons .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .hero__indicators {
    justify-content: center;
    margin-top: var(--space-lg);
  }

  .hero__stats {
    flex-direction: column;
    gap: var(--space-lg);
    align-items: flex-start;
  }

  .hero__stat {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    text-align: left;
  }
}

/* --- Mobile Styles (Default / < 768px) --- */
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }

.section {
  padding: var(--space-2xl) 0;
}

.container {
  padding: 0 var(--space-md);
}

/* Services Grid */
.services-grid {
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

/* About Home */
.about-home {
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.about-home__image {
  height: 300px;
}

.about-home__badge {
  width: 100px;
  height: 100px;
  bottom: -10px;
  right: -10px;
}

.about-home__badge-number {
  font-size: var(--fs-xl);
}

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

/* Testimonials */
.testimonials-grid {
  grid-template-columns: 1fr;
}

/* Why Choose */
.why-grid {
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* Service Layout */
.service-layout {
  grid-template-columns: 1fr;
  padding: var(--space-2xl) 0;
}

.service-sidebar {
  position: static;
  order: 2;
}

.service-features {
  grid-template-columns: 1fr;
}

/* Gallery */
.gallery__grid {
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.gallery__grid--featured .gallery__item:first-child {
  grid-column: 1 / -1;
  grid-row: auto;
  aspect-ratio: 16 / 9;
}

.service-content__images-row {
  grid-template-columns: 1fr;
}

/* Contact */
.contact-grid {
  grid-template-columns: 1fr;
}

/* Footer */
.footer__grid {
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.footer__bottom {
  flex-direction: column;
  gap: var(--space-md);
  text-align: center;
}

/* About Page */
.about-intro__grid {
  grid-template-columns: 1fr;
}

.about-intro__image {
  min-height: 280px;
}

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

/* Process Steps */
.process-steps {
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* Page Hero */
.page-hero {
  min-height: 240px;
  padding: calc(var(--header-height) + var(--space-2xl)) 0 var(--space-2xl);
}

.page-hero__title {
  font-size: var(--fs-2xl);
}

/* CTA */
.cta__title {
  font-size: var(--fs-xl);
}

/* --- Tablet (768px and up) --- */
@media (min-width: 768px) {
  h1 { font-size: var(--fs-3xl); }
  h2 { font-size: var(--fs-2xl); }

  .container {
    padding: 0 var(--space-xl);
  }

  .section {
    padding: var(--space-3xl) 0;
  }

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

  .hero__title {
    font-size: var(--fs-3xl);
  }

  .hero__stats {
    flex-direction: row;
    gap: var(--space-2xl);
  }

  .hero__stat {
    flex-direction: column;
    text-align: center;
  }

  .about-home__image {
    height: 400px;
  }

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

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

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

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

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

  .about-intro__image {
    min-height: 350px;
  }

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

  .page-hero__title {
    font-size: var(--fs-3xl);
  }
}

/* --- Desktop (1024px and up) --- */
@media (min-width: 1024px) {
  h1 { font-size: var(--fs-4xl); }
  h2 { font-size: var(--fs-3xl); }

  .section {
    padding: var(--space-4xl) 0;
  }

  /* Header */
  .hamburger {
    display: none;
  }

  .nav {
    position: static;
    width: auto;
    height: auto;
    background-color: transparent;
    flex-direction: row;
  }

  .nav__list {
    flex-direction: row;
    gap: var(--space-xl);
  }

  .nav__link {
    font-size: var(--fs-sm);
  }

  .nav__item--dropdown .nav__dropdown {
    position: absolute;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--color-white);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    max-height: none;
    overflow: visible;
    padding: var(--space-md) 0;
  }

  .nav__item--dropdown:hover .nav__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  .nav__dropdown-link {
    color: var(--color-text);
    text-align: left;
  }

  .header__cta {
    display: inline-flex;
  }

  .nav__mobile-cta {
    display: none;
  }

  /* Hero */
  .hero__title {
    font-size: var(--fs-5xl);
  }

  .hero__stats {
    gap: var(--space-3xl);
  }

  /* Grids */
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-home {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
  }

  .about-home__image {
    height: 500px;
  }

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

  .why-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Service Layout */
  .service-layout {
    grid-template-columns: 280px 1fr;
    padding: var(--space-4xl) 0;
  }

  .service-sidebar {
    position: sticky;
    order: 0;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .footer__bottom {
    flex-direction: row;
  }

  /* About */
  .about-intro__grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-intro__image {
    min-height: 400px;
  }

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

  /* Process */
  .process-steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .page-hero {
    min-height: 320px;
    padding: calc(var(--header-height) + var(--space-4xl)) 0 var(--space-4xl);
  }

  .page-hero__title {
    font-size: var(--fs-4xl);
  }
}

/* --- Large Desktop (1280px and up) --- */
@media (min-width: 1280px) {
  .hero__title {
    font-size: 4rem;
  }

  .container {
    padding: 0 var(--space-xl);
  }
}
