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

/* Large Tablets and Small Desktops */
@media screen and (max-width: 1024px) {
  .hero__container {
    gap: var(--space-12);
  }
  
  .hero__title {
    font-size: var(--font-size-4xl);
  }
  
  .illustration-placeholder {
    width: 350px;
    height: 250px;
  }
  
  .shape-1 {
    width: 180px;
    height: 180px;
  }
  
  .shape-2 {
    width: 130px;
    height: 130px;
    top: 40px;
    left: 80px;
  }
  
  .shape-3 {
    width: 80px;
    height: 80px;
    top: 15px;
    right: 40px;
  }
  
  .products__grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--space-6);
  }
}

/* Tablets */
@media screen and (max-width: 768px) {
  :root {
    --container-padding: 1.5rem;
    --section-padding: 4rem 0;
  }
  
  /* Navigation */
  .nav__menu {
    position: fixed;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    border-top: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    transition: top var(--transition-normal);
    z-index: 999;
  }
  
  .nav__menu.show {
    top: 100%;
  }
  
  .nav__list {
    flex-direction: column;
    padding: var(--space-6) var(--container-padding);
    gap: var(--space-4);
  }
  
  .nav__toggle {
    display: flex;
  }
  
  .nav__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav__toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  /* Hero Section */
  .hero {
    padding-top: calc(var(--space-16) + 60px);
    padding-bottom: var(--space-16);
  }
  
  .hero__container {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    text-align: center;
  }
  
  .hero__title {
    font-size: var(--font-size-3xl);
  }
  
  .hero__buttons {
    justify-content: center;
  }
  
  .illustration-placeholder {
    width: 300px;
    height: 200px;
  }
  
  .shape-1 {
    width: 150px;
    height: 150px;
  }
  
  .shape-2 {
    width: 100px;
    height: 100px;
    top: 30px;
    left: 60px;
  }
  
  .shape-3 {
    width: 60px;
    height: 60px;
    top: 10px;
    right: 30px;
  }
  
  /* About Section */
  .about__content {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    text-align: center;
  }
  
  .about__logo {
    order: -1;
    margin-bottom: var(--space-8);
  }
  
  .about__logo-img {
    max-height: 150px;
  }
  
  .about__stats {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .stat {
    flex: 1;
    min-width: 120px;
  }
  
  /* Products Section */
  .products__grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
    max-width: 500px;
  }
  
  .product-card__preview {
    height: 250px;
  }
  
  /* Features Section */
  .features__grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
  
  /* Personal Google responsive styles */
  .personal-google-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  .personal-google-features {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  /* Getting Started responsive styles */
  .getting-started-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  /* Contact Section */
  .contact__content {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
  
  /* Footer */
  .footer__content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }
  
  .footer__links {
    justify-content: center;
    gap: var(--space-8);
  }
}

/* Mobile Phones */
@media screen and (max-width: 480px) {
  :root {
    --container-padding: 1rem;
    --section-padding: 3rem 0;
    --font-size-5xl: 2.25rem;
    --font-size-4xl: 1.875rem;
    --font-size-3xl: 1.5rem;
    --font-size-2xl: 1.25rem;
  }
  
  /* Navigation */
  .nav {
    padding: var(--space-3) var(--container-padding);
  }
  
  .nav__logo-img {
    height: 32px;
  }
  
  /* Hero Section */
  .hero {
    padding-top: calc(var(--space-12) + 60px);
    padding-bottom: var(--space-12);
  }
  
  .hero__title {
    font-size: var(--font-size-2xl);
    line-height: 1.2;
  }
  
  .hero__description {
    font-size: var(--font-size-base);
  }
  
  .hero__buttons {
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .illustration-placeholder {
    width: 250px;
    height: 150px;
  }
  
  .shape-1 {
    width: 120px;
    height: 120px;
  }
  
  .shape-2 {
    width: 80px;
    height: 80px;
    top: 20px;
    left: 40px;
  }
  
  .shape-3 {
    width: 50px;
    height: 50px;
    top: 5px;
    right: 20px;
  }
  
  /* Section Headers */
  .section__header {
    margin-bottom: var(--space-12);
  }
  
  .section__title {
    font-size: var(--font-size-2xl);
  }
  
  .section__subtitle {
    font-size: var(--font-size-base);
  }
  
  /* About Section */
  .about__stats {
    flex-direction: column;
    gap: var(--space-4);
  }
  
  .stat {
    padding: var(--space-4);
  }
  
  .stat__number {
    font-size: var(--font-size-2xl);
  }
  
  /* Product Cards */
  .product-card {
    padding: var(--space-5);
  }
  
  .product-card__header {
    margin-bottom: var(--space-4);
  }
  
  .product-card__icon {
    width: 48px;
    height: 48px;
  }
  
  .icon-placeholder {
    font-size: 0.875rem;
  }
  
  .product-card__title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-2);
  }
  
  .product-card__description {
    margin-bottom: var(--space-4);
  }
  
  .product-card__features {
    margin-bottom: var(--space-5);
  }
  
  .product-card__features li {
    font-size: 0.75rem;
    padding: var(--space-1) 0;
  }
  
  /* Feature Cards */
  .feature-card {
    padding: var(--space-6);
  }
  
  .icon-circle {
    width: 60px;
    height: 60px;
  }
  
  .feature-card__title {
    font-size: var(--font-size-xl);
  }
  
  /* Contact Form */
  .contact__form {
    padding: var(--space-6);
  }
  
  .form__group {
    margin-bottom: var(--space-4);
  }
  
  /* Footer */
  .footer {
    padding: var(--space-12) 0 var(--space-6);
  }
  
  .footer__content {
    margin-bottom: var(--space-8);
  }
  
  .footer__links {
    flex-direction: column;
    gap: var(--space-6);
  }
  
  .footer__bottom {
    padding-top: var(--space-6);
  }
  
  /* 404 Error Page responsive styles */
  .error-hero {
    padding-top: calc(var(--space-12) + 60px);
    padding-bottom: var(--space-12);
  }
  
  .error-code {
    font-size: 4rem;
  }
  
  .error-title {
    font-size: var(--font-size-2xl);
  }
  
  .error-buttons {
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
  }
  
  .error-suggestions {
    padding: var(--space-4);
  }
  
  .suggestions-title {
    font-size: var(--font-size-base);
  }
  
  .error-illustration {
    width: 250px;
    height: 150px;
  }
  
  .error-icon {
    width: 80px;
    height: 80px;
  }
  
  .quick-link-card {
    padding: var(--space-6);
  }
  
  .quick-link-icon {
    width: 60px;
    height: 60px;
  }
  
  .quick-link-title {
    font-size: var(--font-size-lg);
  }
}

/* Extra Small Devices */
@media screen and (max-width: 320px) {
  :root {
    --container-padding: 0.75rem;
  }
  
  .hero__title {
    font-size: var(--font-size-xl);
  }
  
  .section__title {
    font-size: var(--font-size-xl);
  }
  
  .illustration-placeholder {
    width: 200px;
    height: 120px;
  }
  
  .shape-1 {
    width: 100px;
    height: 100px;
  }
  
  .shape-2 {
    width: 60px;
    height: 60px;
    top: 15px;
    left: 30px;
  }
  
  .shape-3 {
    width: 40px;
    height: 40px;
    top: 5px;
    right: 15px;
  }
  
  .product-card,
  .contact__form,
  .feature-card {
    padding: var(--space-4);
  }
  
  /* Product page responsive styles */
  .visual-stats {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
  
  .sources-grid {
    grid-template-columns: 1fr;
  }
  
  .media-types-grid {
    grid-template-columns: 1fr;
  }
  
  .screenshots-grid {
    grid-template-columns: 1fr;
  }
  
  .tech-features-grid {
    grid-template-columns: 1fr;
  }
  
  .getting-started-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  /* Personal Google responsive styles */
  .personal-google-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  .personal-google-features {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .search-demo-box {
    max-width: 100%;
  }
  
  /* Hero logo responsive styles */
  .hero-logo {
    max-height: 200px;
  }
  
  .hero-features-preview {
    gap: var(--space-3);
  }
  
  .feature-preview {
    min-width: 100px;
    padding: var(--space-3);
  }
  
  /* Carousel responsive styles */
  .carousel-slides {
    height: 500px;
  }
  
  .carousel-btn {
    width: 40px;
    height: 40px;
  }
  
  .carousel-btn--prev {
    left: var(--space-2);
  }
  
  .carousel-btn--next {
    right: var(--space-2);
  }
  
  .slide-info {
    padding: var(--space-4);
  }
  
  .slide-title {
    font-size: var(--font-size-lg);
  }
  
  .slide-description {
    font-size: var(--font-size-sm);
  }
  
  /* Personal Google responsive styles */
  .personal-google-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  .personal-google-features {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  /* Getting Started responsive styles */
  .getting-started-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  /* 404 Error Page responsive styles */
  .error-hero__container {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    text-align: center;
  }
  
  .error-code {
    font-size: 6rem;
  }
  
  .error-title {
    font-size: var(--font-size-3xl);
  }
  
  .error-buttons {
    justify-content: center;
  }
  
  .error-illustration {
    width: 300px;
    height: 200px;
  }
  
  .error-icon {
    width: 100px;
    height: 100px;
  }
  
  .quick-links__grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* High DPI Displays */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Landscape Orientation on Mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding-top: calc(var(--space-8) + 60px);
    padding-bottom: var(--space-8);
  }
  
  .hero__container {
    gap: var(--space-8);
  }
  
  .illustration-placeholder {
    width: 200px;
    height: 120px;
  }
  
  .section {
    padding: var(--space-12) 0;
  }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .illustration-shape {
    animation: none;
  }
}

/* Dark Mode Support (if user prefers) */
@media (prefers-color-scheme: dark) {
  /* This is optional - keeping light theme for now but structure is here */
  /* 
  :root {
    --white: #0f172a;
    --gray-50: #1e293b;
    --gray-900: #f8fafc;
    // ... other dark mode variables
  }
  */
}

/* Print Styles */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .header,
  .nav__toggle,
  .hero__buttons,
  .contact__form,
  .footer {
    display: none;
  }
  
  .hero {
    padding-top: var(--space-8);
  }
  
  .section {
    padding: var(--space-8) 0;
    page-break-inside: avoid;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
  
  .product-card,
  .feature-card {
    page-break-inside: avoid;
  }
}

/* Focus Styles for Accessibility */
@media (prefers-reduced-motion: no-preference) {
  .btn:focus,
  .nav__link:focus,
  .form__input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .btn--primary {
    border: 2px solid var(--white);
  }
  
  .btn--secondary {
    border-width: 3px;
  }
  
  .product-card,
  .feature-card,
  .contact__form {
    border-width: 2px;
  }
}
