/* Responsive Design for BiotyaLett */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .hero h1 {
        font-size: 4rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop and Laptop (992px - 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 1100px;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
}

/* Tablet Landscape (768px - 991px) */
@media (max-width: 991px) {
    .container {
        padding: 0 15px;
    }
    
    /* Header adjustments */
    .header-content {
        padding: 0.75rem 0;
    }
    
    .nav-list {
        gap: 1.5rem;
    }
    
    .nav-list a {
        padding: 0.4rem 0.8rem;
        font-size: 0.95rem;
    }
    
    /* Hero section */
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        gap: 0.75rem;
    }
    
    /* Services grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    /* About section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    /* Contact section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 1.5rem;
    }
    
    /* Blog */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Tables */
    .comparison-table {
        font-size: 0.9rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem;
    }
}

/* Tablet Portrait (576px - 767px) */
@media (max-width: 767px) {
    /* Typography adjustments */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.4rem;
    }
    
    /* Header - Mobile menu */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
    }
    
    .nav-list.active {
        display: flex;
    }
    
    .nav-list a {
        padding: 0.75rem 2rem;
    }
    
    /* Hero section */
    .hero {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn-large {
        padding: 14px 28px;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
    }
    
    /* Sections */
    section {
        padding: 3rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    /* About section */
    .about-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    /* Newsletter */
    .form-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Contact */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Blog */
    .blog-header {
        padding: 6rem 0 3rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-posts {
        padding: 3rem 0;
    }
    
    /* Blog article */
    .blog-article {
        padding: 4rem 0 3rem;
    }
    
    .article-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .article-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Cookie banner */
    .cookie-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cookie-modal {
        padding: 1rem;
    }
    
    .cookie-modal-content {
        padding: 1.5rem;
    }
    
    .cookie-modal-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Legal pages */
    .legal-page {
        padding: 4rem 0 3rem;
    }
    
    /* Thank you page */
    .thank-you {
        padding: 6rem 0 3rem;
    }
    
    .thank-you-actions {
        flex-direction: column;
        align-items: center;
    }
    
    /* Tables responsive */
    .comparison-table,
    .cookie-table {
        font-size: 0.8rem;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
    
    .comparison-table thead,
    .comparison-table tbody,
    .comparison-table th,
    .comparison-table td,
    .comparison-table tr,
    .cookie-table thead,
    .cookie-table tbody,
    .cookie-table th,
    .cookie-table td,
    .cookie-table tr {
        display: block;
    }
    
    .comparison-table thead tr,
    .cookie-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .comparison-table tr,
    .cookie-table tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 10px;
        border-radius: 8px;
        background: white;
    }
    
    .comparison-table td,
    .cookie-table td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        padding-right: 10px;
        padding-top: 10px;
        padding-bottom: 10px;
        white-space: normal;
    }
    
    .comparison-table td:before,
    .cookie-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        color: #27ae60;
    }
}

/* Mobile (up to 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 10px;
    }
    
    /* Typography */
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Hero */
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-content {
        padding-top: 60px;
    }
    
    /* Buttons */
    .btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    
    .btn-large {
        font-size: 1rem;
        padding: 12px 24px;
    }
    
    /* Sections */
    section {
        padding: 2.5rem 0;
    }
    
    /* Service cards */
    .service-card {
        padding: 1.5rem 1rem;
    }
    
    /* About stats */
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    /* Forms */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Cookie banner */
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-content h3 {
        font-size: 1.1rem;
    }
    
    .cookie-content p {
        font-size: 0.9rem;
    }
    
    /* Blog header */
    .blog-header {
        padding: 5rem 0 2.5rem;
    }
    
    .blog-header h1 {
        font-size: 1.8rem;
    }
    
    /* Article content */
    .article-content {
        font-size: 0.95rem;
    }
    
    .article-intro {
        font-size: 1.1rem;
        padding-left: 1rem;
    }
    
    /* Highlight boxes */
    .highlight-box,
    .warning-box,
    .cta-box {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    /* Thank you page */
    .thank-you {
        padding: 4rem 0 2rem;
    }
    
    .thank-you-details {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
}

/* Very small devices (320px and below) */
@media (max-width: 320px) {
    .container {
        padding: 0 8px;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 8px 16px;
    }
    
    .service-card {
        padding: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card h3 {
        font-size: 1.8rem;
    }
    
    .testimonial-card {
        padding: 1rem;
    }
    
    .contact-form {
        padding: 1rem;
    }
    
    .highlight-box,
    .warning-box,
    .cta-box {
        padding: 0.75rem;
    }
    
    .thank-you-details {
        padding: 1rem;
    }
}

/* Landscape orientation adjustments for phones */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 60vh;
        padding: 1rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .hero-buttons {
        gap: 0.5rem;
    }
    
    .btn-large {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .blog-header {
        padding: 3rem 0 2rem;
    }
    
    .thank-you {
        padding: 3rem 0 2rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp text rendering on high DPI displays */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Dark mode support (if user prefers dark mode) */
@media (prefers-color-scheme: dark) {
    /* This would be implemented if dark mode support is desired */
    /* Currently maintaining light theme for consistency */
}

/* Animation performance optimization for mobile */
@media (max-width: 767px) {
    * {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    .service-card:hover,
    .blog-card:hover {
        transform: none; /* Disable hover animations on mobile for better performance */
    }
}

/* Accessibility: Respect user's reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .service-card,
    .blog-card,
    .btn {
        transition: none;
    }
    
    .service-card:hover,
    .blog-card:hover {
        transform: none;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .service-card:hover,
    .blog-card:hover,
    .testimonial-card:hover {
        transform: none;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }
    
    /* Increase touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-list a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .social-links a {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
