/* ===== RESPONSIVE DESIGN ===== */

/* Large devices (desktops, 1200px and up) */
@media screen and (min-width: 1200px) {
  .container {
    margin-left: auto;
    margin-right: auto;
  }
  
  .home__container {
    gap: 4rem;
  }
  
  .features__container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Medium devices (tablets, 768px and up) */
@media screen and (max-width: 1024px) {
  :root {
    --h1-font-size: 2.5rem;
    --h2-font-size: 2rem;
    --h3-font-size: 1.25rem;
  }
  
  .container {
    margin-left: var(--mb-1-5);
    margin-right: var(--mb-1-5);
  }
  
  .home__container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .home__image {
    order: -1;
  }
  
  .home__stats {
    justify-content: center;
  }
  
  .about-preview__container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .about-preview__image {
    order: -1;
  }
  
  .features__container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer__content {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small devices (landscape phones, 576px and up) */
@media screen and (max-width: 768px) {
  :root {
    --h1-font-size: 2rem;
    --h2-font-size: 1.75rem;
    --h3-font-size: 1.125rem;
    --section-padding: 3rem 0;
  }
  
  .container {
    margin-left: var(--mb-1);
    margin-right: var(--mb-1);
  }
  
  /* Navigation */
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--white);
    padding: 6rem 2rem 2rem;
    transition: var(--transition);
    z-index: 100;
  }
  
  .nav__menu.show-menu {
    right: 0;
  }
  
  .nav__list {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
  
  .nav__link {
    font-size: 1.125rem;
  }
  
  .nav__close {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
  }
  
  .nav__toggle {
    display: block;
  }
  
  .nav__actions .btn {
    display: none;
  }
  
  /* Dropdown for mobile */
  .dropdown__menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background-color: var(--light-bg);
    margin-top: 1rem;
    border-radius: var(--border-radius);
  }
  
  /* Home section */
  .home {
    padding-top: calc(var(--header-height) + 1rem);
  }
  
  .home__buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .home__buttons .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .home__stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  /* Features */
  .features__container {
    grid-template-columns: 1fr;
  }
  
  .feature__card {
    padding: 1.5rem;
  }
  
  /* About preview */
  .about-preview__features {
    align-items: center;
  }
  
  /* Footer */
  .footer__content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .footer__legal {
    justify-content: center;
  }
}

/* Extra small devices (portrait phones, less than 576px) */
@media screen and (max-width: 480px) {
  :root {
    --h1-font-size: 1.75rem;
    --h2-font-size: 1.5rem;
    --container-margin: 0 1rem;
  }
  
  .home__title {
    line-height: 1.2;
  }
  
  .home__description {
    font-size: 1rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
  
  .feature__card {
    padding: 1.25rem;
  }
  
  .feature__icon {
    width: 60px;
    height: 60px;
  }
  
  .feature__icon img {
    width: 30px;
    height: 30px;
  }
  
  .stat__number {
    font-size: 2rem;
  }
  
  .nav__logo-img {
    height: 2rem;
  }
  
  .footer__logo-img {
    height: 2.5rem;
  }
}

/* ===== UTILITY CLASSES FOR RESPONSIVE ===== */
.hide-mobile {
  display: block;
}

.show-mobile {
  display: none;
}

@media screen and (max-width: 768px) {
  .hide-mobile {
    display: none;
  }
  
  .show-mobile {
    display: block;
  }
}

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

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
  .feature__card:hover {
    transform: none;
  }
  
  .btn--primary:hover {
    transform: none;
  }
  
  .feature__link:hover {
    transform: none;
  }
  
  .footer__link:hover {
    transform: none;
  }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .home__img,
  .about-preview__img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .header,
  .nav__toggle,
  .nav__close,
  .btn,
  .footer {
    display: none;
  }
  
  .home {
    padding-top: 0;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
    background: #fff;
  }
  
  .section {
    page-break-inside: avoid;
    padding: 1rem 0;
  }
  
  .home__title,
  .section__title {
    color: #000;
    page-break-after: avoid;
  }
}

