/* ============================================
   EstHus.lv - Responsive Styles
   ============================================ */

/* ---------- Tablet (max-width: 1024px) ---------- */
@media (max-width: 1024px) {
  :root {
    --container-padding: var(--space-4);
  }

  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }

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

  .intro__title {
    font-size: var(--text-4xl);
  }

  .intro__shape {
    width: 100px;
    height: 200px;
  }

  .features__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

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

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

  .video-section__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .contact-section__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .contact-page__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

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

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

  .steps__grid {
    flex-wrap: wrap;
    gap: var(--space-6);
  }

  .step {
    flex: 0 0 calc(33.333% - var(--space-4));
  }
}

/* ---------- Mobile Large (max-width: 768px) ---------- */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }

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

  /* Header Mobile */
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-bg-dark);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-8);
    gap: var(--space-2);
    transform: translateX(100%);
    transition: transform var(--transition-base);
  }

  .nav--open {
    transform: translateX(0);
  }

  .nav__link {
    padding: var(--space-4);
    font-size: var(--text-lg);
    border-bottom: 1px solid var(--color-border);
  }

  .nav__link::after {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .lang-switcher {
    order: -1;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
    width: 100%;
    justify-content: flex-start;
  }

  .lang-switcher__dropdown {
    left: 0;
    right: auto;
  }

  /* Hero */
  .hero {
    min-height: 80vh;
  }

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

  .hero__subtitle {
    font-size: var(--text-base);
  }

  /* Intro */
  .intro {
    padding: var(--space-16) 0;
  }

  .intro__shape {
    display: none;
  }

  .intro__title {
    font-size: var(--text-3xl);
  }

  /* Features */
  .features__grid {
    grid-template-columns: 1fr;
  }

  .features__title {
    font-size: var(--text-2xl);
  }

  .feature-card {
    padding: var(--space-6);
  }

  /* Cards */
  .cards__grid {
    grid-template-columns: 1fr;
  }

  .cards__title {
    font-size: var(--text-2xl);
  }

  /* Projects */
  .projects__grid {
    grid-template-columns: 1fr;
  }

  .projects__title {
    font-size: var(--text-2xl);
  }

  /* Comparison */
  .comparison__row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .comparison__ratings {
    flex-direction: column;
    gap: var(--space-2);
    width: 100%;
  }

  .comparison__title {
    font-size: var(--text-2xl);
  }

  /* Testimonials */
  .testimonial__quote {
    font-size: var(--text-base);
  }

  .testimonial__quote::before {
    font-size: 60px;
    top: -10px;
    left: -20px;
  }

  /* Video */
  .video-section__content h2 {
    font-size: var(--text-2xl);
  }

  /* Certifications */
  .certifications__grid {
    gap: var(--space-6);
  }

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

  .certification__logo {
    height: 50px;
  }

  /* Contact */
  .contact-info__logo {
    font-size: var(--text-4xl);
  }

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

  /* Footer */
  .footer__links {
    flex-direction: column;
    gap: var(--space-3);
  }

  /* Product Pages */
  .product-hero {
    min-height: 60vh;
  }

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

  .steps__grid {
    flex-direction: column;
    align-items: center;
  }

  .step {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
  }

  /* Gallery */
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery__filters {
    flex-wrap: wrap;
  }

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

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

  /* Contact Page */
  .contact-map {
    height: 300px;
  }

  /* Lightbox */
  .lightbox__nav {
    width: 40px;
    height: 40px;
  }

  .lightbox__prev {
    left: var(--space-2);
  }

  .lightbox__next {
    right: var(--space-2);
  }
}

/* ---------- Mobile Small (max-width: 480px) ---------- */
@media (max-width: 480px) {
  :root {
    --container-padding: var(--space-4);
  }

  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }

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

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

  .hero__content {
    padding: var(--space-4);
  }

  .btn {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
  }

  .btn--large {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
  }

  .intro__title {
    font-size: var(--text-2xl);
  }

  .intro__text {
    font-size: var(--text-base);
  }

  .feature-card__title {
    font-size: var(--text-xl);
  }

  .card__title {
    font-size: var(--text-lg);
  }

  .testimonial {
    padding: var(--space-4);
  }

  .gallery__grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .gallery__filter {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
  }

  .step__number {
    width: 50px;
    height: 50px;
    font-size: var(--text-lg);
  }

  .contact-info__social a,
  .footer__social a {
    width: 36px;
    height: 36px;
  }

  .page-header {
    padding: calc(var(--header-height) + var(--space-10)) 0 var(--space-10);
  }

  .page-header__title {
    font-size: var(--text-3xl);
  }
}

/* ---------- Landscape Mode Adjustments ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + var(--space-8)) 0 var(--space-8);
  }

  .hero__title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
  }

  .product-hero {
    min-height: auto;
    padding: calc(var(--header-height) + var(--space-8)) 0 var(--space-8);
  }
}

/* ---------- High DPI Screens ---------- */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .certification__logo {
    image-rendering: -webkit-optimize-contrast;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}

/* ---------- Print Styles ---------- */
@media print {
  .header,
  .footer,
  .nav,
  .btn,
  .contact-form,
  .lightbox {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .section {
    padding: 1rem 0;
  }

  a {
    text-decoration: underline;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .hero__bg {
    display: none;
  }
}
