/* ===== RESPONSIVE STYLES - MirrorG Premium ===== */
/* Comprehensive device support: iPhone, iPad, Samsung Z Fold, Desktop */

/* ===== MOBILE FIRST - Base styles are mobile ===== */

/* ===== EXTRA SMALL PHONES (320px - iPhone SE) ===== */
@media (max-width: 375px) {
  .mobile-nav__container {
    padding: 70px 16px 30px;
  }

  .mobile-nav__logo {
    height: 40px;
  }

  .mobile-nav__header {
    margin-bottom: 24px;
  }

  .mobile-nav__menu {
    gap: 6px;
  }

  .mobile-nav__link {
    font-size: 1.1rem;
    padding: 12px 20px;
    min-width: auto;
  }

  .mobile-nav__link--sub {
    font-size: 0.9rem;
    padding: 8px 16px;
    min-width: auto;
  }

  .mobile-nav__footer {
    gap: 16px;
    padding-top: 20px;
  }

  .mobile-nav__contact-item {
    font-size: 0.85rem;
    padding: 6px 12px;
  }

  .mobile-nav__social-link {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  /* Process section for small phones */
  .horizon__steps {
    gap: 20px;
  }

  .horizon__sphere {
    width: 70px;
    height: 70px;
  }

  .horizon__number {
    font-size: 0.7rem;
  }
}

/* ===== SMALL PHONES (376px - 575px) ===== */
@media (min-width: 376px) and (max-width: 575px) {
  .mobile-nav__container {
    padding: 75px 20px 35px;
  }

  .mobile-nav__logo {
    height: 45px;
  }

  .mobile-nav__link {
    font-size: 1.15rem;
    padding: 13px 28px;
    min-width: 190px;
  }
}

/* ===== SMALL PHONES (576px+) ===== */
@media (min-width: 576px) {
  :root {
    --section-padding-y: 5rem;
  }

  .container {
    padding: 0 var(--space-lg);
  }

  /* Better card padding on small screens */
  .card__content {
    padding: var(--space-lg);
  }

  /* Mobile nav adjustments */
  .mobile-nav__container {
    padding: 80px 32px 40px;
  }

  .mobile-nav__logo {
    height: 55px;
  }

  .mobile-nav__link {
    font-size: 1.3rem;
    padding: 16px 36px;
    min-width: 220px;
  }

  .mobile-nav__link--sub {
    font-size: 1.05rem;
    padding: 12px 28px;
    min-width: 200px;
  }
}

/* ===== TABLETS (768px+) - iPad Mini, iPad ===== */
@media (min-width: 768px) {
  :root {
    --section-padding-y: 6rem;
  }

  /* Navigation - show main nav */
  .nav--main {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  /* Hero adjustments */
  .hero__content {
    padding: var(--space-3xl);
  }

  /* Better testimonial layout */
  .testimonial {
    padding: var(--space-2xl);
  }

  /* Footer grid */
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
  }

  /* Better button group layout */
  .footer__social-buttons {
    gap: var(--space-lg);
  }

  /* Process step improvements */
  .process-step {
    padding: var(--space-xl) var(--space-2xl);
  }
}

/* ===== SAMSUNG GALAXY Z FOLD (Unfolded: 884px inner screen) ===== */
@media (min-width: 820px) and (max-width: 920px) {
  /* Mobile nav for Z Fold tablet mode */
  .mobile-nav__container {
    padding: 100px 48px 50px;
  }

  .mobile-nav__logo {
    height: 60px;
  }

  .mobile-nav__header {
    margin-bottom: 48px;
  }

  .mobile-nav__menu {
    gap: 12px;
  }

  .mobile-nav__link {
    font-size: 1.4rem;
    padding: 18px 40px;
    min-width: 260px;
  }

  .mobile-nav__link--sub {
    font-size: 1.1rem;
    padding: 14px 32px;
    min-width: 240px;
  }

  .mobile-nav__footer {
    gap: 24px;
    padding-top: 32px;
  }

  .mobile-nav__contact {
    flex-direction: row;
    gap: 24px;
  }

  .mobile-nav__social-link {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }

  /* Process section - centered for Z Fold */
  .process-alt--ascending .container {
    max-width: 100%;
    padding: 0 24px;
  }

  .horizon--ascending {
    justify-content: center;
  }

  .horizon__steps {
    justify-content: center;
  }
}

/* ===== SMALL LAPTOPS (992px+) ===== */
@media (min-width: 992px) {
  :root {
    --section-padding-y: 7rem;
  }

  /* Footer - 4 columns */
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-3xl);
  }

  /* Better card spacing */
  .grid {
    gap: var(--space-2xl);
  }

  /* Enhanced section headers */
  .section-header {
    margin-bottom: var(--space-4xl);
  }
}

/* ===== DESKTOPS (1200px+) ===== */
@media (min-width: 1200px) {
  :root {
    --section-padding-y: 8rem;
  }

  .container {
    padding: 0 var(--space-2xl);
  }

  .hero {
    min-height: 100vh;
  }

  /* Larger cards on desktop */
  .card__content {
    padding: var(--space-xl);
  }

  /* Enhanced testimonials */
  .testimonial {
    padding: var(--space-2xl) var(--space-3xl);
  }

  .testimonial__quote {
    font-size: var(--font-size-lg);
  }
}

/* ===== NON-MOBILE: Lower sentence 20px ===== */
@media (min-width: 769px) {
  .hero__text-container {
    top: auto;
  }
}

/* ===== LARGE DESKTOPS (1400px+) ===== */
@media (min-width: 1400px) {
  .container--wide {
    max-width: var(--container-wide);
  }

  .container--full {
    max-width: var(--container-full);
  }

  /* Even more generous spacing */
  .section-header__title {
    font-size: var(--font-size-3xl);
  }
}

/* ===== MOBILE NAVIGATION (below 768px) ===== */
@media (max-width: 768px) {
  /* Hide desktop nav, show hamburger */
  .nav--desktop {
    display: none !important;
  }

  .hamburger {
    display: flex !important;
  }

  .header__inner {
    justify-content: space-between !important;
    padding: 0 20px !important;
  }

  .header__logo {
    position: relative !important;
    right: auto !important;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .header__logo.visible {
    opacity: 1;
  }

  .header {
    padding: 12px 0 !important;
  }

  /* Simple nav - hide on mobile */
  .nav--simple {
    display: none !important;
  }

  /* Hero adjustments - more compact on mobile */
  .hero {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    padding: var(--space-3xl) 0 var(--space-2xl);
  }

  .hero::before,
  .hero::after {
    display: none; /* Hide decorative orbs on mobile */
  }

  .hero__logo-wrapper {
    transform: scale(1.3) translateY(-20px); /* 30% larger + 20px up */
  }

  .hero__text-container {
    transform: translateY(-90px); /* Raise title up 90px */
  }

  .hero__title {
    font-size: clamp(1.2rem, 4.2vw, 1.68rem); /* 20% larger */
  }

  .hero__frame-line {
    width: clamp(300px, 85vw, 500px);
  }

  /* Section headers - more compact */
  .section-header {
    margin-bottom: var(--space-2xl);
  }

  .section-header__title::after {
    margin-top: var(--space-md);
    width: 40px;
    height: 3px;
  }

  /* Footer - Clean compact mobile design */
  .footer {
    padding: var(--space-lg) 0 var(--space-sm);
  }

  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-md);
  }

  /* Hide navigation and services sections on mobile - they're in the menu */
  .footer__nav,
  .footer__services {
    display: none;
  }

  /* Brand section - compact and centered */
  .footer__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: none;
    margin: 0 auto;
  }

  .footer__logo {
    height: 35px;
    margin-bottom: var(--space-xs);
  }

  .footer__about {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-sm);
    max-width: 280px;
    line-height: 1.4;
  }

  .footer__social {
    justify-content: center;
    gap: var(--space-sm);
  }

  .footer__social-link {
    width: 36px;
    height: 36px;
  }

  /* Contact section - horizontal inline */
  .footer__contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs) var(--space-lg);
  }

  .footer__contact .footer__title {
    display: none;
  }

  .footer__contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
  }

  .footer__contact-item a {
    font-size: var(--font-size-sm);
  }

  /* Footer titles */
  .footer__title::after {
    display: none;
  }

  .footer__link::before {
    display: none;
  }

  .footer__link:hover {
    transform: none;
  }

  /* Bottom section - compact */
  .footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
  }

  .footer__copyright {
    font-size: var(--font-size-xs);
    opacity: 0.8;
  }

  .footer__legal {
    justify-content: center;
    gap: var(--space-sm);
  }

  .footer__legal .footer__link {
    font-size: var(--font-size-xs);
  }

  /* Social buttons - stack and center on mobile */
  .footer__social-buttons {
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
  }

  .footer__social-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* Two column layouts */
  .two-col {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  /* Cards - better mobile styling */
  .card {
    border-radius: var(--border-radius-lg);
  }

  .card__content {
    padding: var(--space-lg);
  }

  .card:hover {
    transform: none; /* Disable hover transform on touch */
  }

  /* Service cards */
  .service-card .card__content {
    padding: var(--space-lg);
  }

  /* Testimonials */
  .testimonial {
    padding: var(--space-lg);
    border-radius: var(--border-radius-lg);
  }

  .testimonial::before {
    width: 60px;
    height: 60px;
  }

  .testimonial__quote {
    font-size: var(--font-size-base);
    padding-right: var(--space-2xl);
  }

  .testimonial__quote::before {
    font-size: 3rem;
  }

  .testimonial:hover {
    transform: none;
  }

  /* Process steps */
  .process-step {
    padding: var(--space-lg);
  }

  .process-step:hover {
    transform: none;
  }

  .process-step__number {
    width: 48px;
    height: 48px;
    min-width: 48px;
  }

  /* Buttons - full width on mobile */
  .btn--lg {
    width: 100%;
    justify-content: center;
  }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .btn {
    min-height: 48px;
    min-width: 48px;
  }

  .nav__link {
    padding: var(--space-md);
    min-height: 44px;
  }

  .footer__social-link {
    width: 48px;
    height: 48px;
  }

  /* Remove hover effects on touch - but NOT for service cards */
  .card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }

  .card:hover::before {
    opacity: 0;
  }

  .hover-lift:hover {
    transform: none;
  }

  .hover-scale:hover {
    transform: none;
  }

  .btn:hover::before {
    transform: translateX(-100%);
  }

  .btn--primary:hover {
    transform: none;
  }

  .testimonial:hover {
    transform: none;
  }

  .process-step:hover {
    transform: none;
  }

  .process-step:hover .process-step__number {
    transform: none;
  }

  /* Active states for touch feedback */
  .btn:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
  }

  .card:active {
    transform: scale(0.99);
    transition-duration: 0.1s;
  }

  /* KEEP service card hover effects on touch devices */
  #services .service-card:hover {
    transform: translateY(-8px) scale(1.01) !important;
  }

  #services .service-card:hover .service-card__btn {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .header,
  .footer,
  .a11y-widget,
  .hero__cta,
  .hero__scroll,
  .nav,
  .nav-toggle,
  .cta {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  .section {
    padding: 1rem 0;
  }
}

/* ===== HIGH DPI / RETINA ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Use 2x images where needed via srcset in HTML */
}

/* ===== DARK MODE SUPPORT (Optional) ===== */
@media (prefers-color-scheme: dark) {
  /*
   * Uncomment to enable automatic dark mode
   * For now, we use the accessibility widget for manual control
   */
  /*
  :root {
    --color-white: #1a1a1a;
    --color-bg-light: #2a2a2a;
    --color-bg-section: #222222;
    --color-text-primary: #ffffff;
    --color-text-secondary: #cccccc;
    --color-border: #444444;
    --color-border-light: #333333;
  }
  */
}
