/* =================================
   BABYLY WEBSITE - RESPONSIVE STYLES
   ================================= */

/* === Tablet & Below (max-width: 992px) === */
@media (max-width: 992px) {
    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-features {
        justify-content: center;
    }

    .download-buttons {
        justify-content: center;
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    /* Contact Wrapper */
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    /* Legal Wrapper */
    .legal-wrapper {
        grid-template-columns: 1fr;
    }

    .legal-sidebar {
        position: static;
        display: none; /* Hide sidebar on mobile, show table of contents at top instead */
    }

    /* Screenshots Carousel */
    .screenshots-slider {
        padding: 40px 0;
        min-height: 600px;
    }

    .screenshot-card {
        width: 260px;
        height: 550px;
    }

    .screenshot-card.center {
        transform: translateX(0) scale(1.1) translateZ(0);
    }

    .screenshot-card.left-1 {
        transform: translateX(-300px) scale(0.85) translateZ(-100px);
    }

    .screenshot-card.right-1 {
        transform: translateX(300px) scale(0.85) translateZ(-100px);
    }

    .screenshot-card.left-2,
    .screenshot-card.right-2 {
        transform: scale(0.6);
        opacity: 0.2;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    /* Blog Grid */
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* === Mobile & Below (max-width: 768px) === */
@media (max-width: 768px) {
    /* Typography */
    html {
        font-size: 14px;
    }

    /* Spacing */
    :root {
        --spacing-xl: 2rem;
        --spacing-xxl: 3rem;
    }

    /* Container */
    .container {
        padding: 0 var(--spacing-sm);
    }

    /* Navigation */
    .navbar {
        padding: var(--spacing-xs) 0;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: var(--bg-white);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--spacing-lg);
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        z-index: 999;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        width: 100%;
        padding: var(--spacing-sm) var(--spacing-md);
        margin-bottom: var(--spacing-xs);
    }

    .language-switcher {
        width: 100%;
        justify-content: flex-start;
        margin-top: var(--spacing-md);
        padding-top: var(--spacing-md);
        border-top: 1px solid var(--bg-light);
    }

    .mobile-toggle {
        display: block;
    }

    /* Logo */
    .logo {
        font-size: 1.3rem;
    }

    .logo img {
        width: 35px;
        height: 35px;
    }

    /* Hero Section */
    .hero {
        padding: var(--spacing-xl) 0;
    }

    .hero-text h1 {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

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

    .hero-feature {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

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

    .btn-download {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    /* Section Headers */
    .section-header h2 {
        font-size: 2rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    /* Page Header */
    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    /* Stats Section */
    .stats {
        padding: var(--spacing-lg) 0;
    }

    .stat-card {
        padding: var(--spacing-md);
    }

    .stat-number {
        font-size: 2rem;
    }

    /* Features Section */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .feature-card {
        padding: var(--spacing-md);
    }

    /* Screenshots Carousel - Mobile */
    .screenshots-slider {
        padding: 30px 0;
        min-height: 550px;
    }

    .screenshots-wrapper {
        padding: var(--spacing-sm) 0;
        min-height: 500px;
    }

    .screenshot-card {
        width: 240px;
        height: 500px;
    }

    .screenshot-card.center {
        transform: translateX(0) scale(1) translateZ(0);
    }

    .screenshot-card.left-1 {
        transform: translateX(-270px) scale(0.75) translateZ(-50px);
        opacity: 0.5;
    }

    .screenshot-card.right-1 {
        transform: translateX(270px) scale(0.75) translateZ(-50px);
        opacity: 0.5;
    }

    .screenshot-card.left-2,
    .screenshot-card.right-2,
    .screenshot-card.hidden {
        transform: scale(0.5);
        opacity: 0;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Custom Select - Mobile */
    .custom-select-trigger {
        padding: 12px;
        min-height: 48px;
    }

    .custom-option {
        padding: 12px 14px;
    }

    .option-icon {
        font-size: 1rem;
    }

    /* CTA Section */
    .cta-content h2 {
        font-size: 1.8rem;
    }

    .cta-content p {
        font-size: 1rem;
    }

    /* Footer */
    .footer {
        padding: var(--spacing-xl) 0 var(--spacing-md);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .footer-section {
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-downloads {
        align-items: center;
    }

    /* Blog Filter */
    .filter-buttons {
        gap: var(--spacing-xs);
    }

    .filter-btn {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: 0.9rem;
    }

    /* Blog Grid */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .blog-image {
        height: 180px;
    }

    .blog-content {
        padding: var(--spacing-md);
    }

    .blog-card h3 {
        font-size: 1.2rem;
    }

    /* Contact Form */
    .contact-form-wrapper {
        padding: var(--spacing-lg);
    }

    .contact-info h2 {
        font-size: 1.6rem;
        text-align: center;
    }

    .contact-info p {
        text-align: center;
    }

    .contact-info-items {
        gap: var(--spacing-md);
    }

    .social-links-large {
        justify-content: center;
    }

    /* Legal Content */
    .legal-text {
        padding: var(--spacing-lg);
    }

    .legal-text h2 {
        font-size: 1.5rem;
    }

    .legal-text h3 {
        font-size: 1.2rem;
    }
}

/* === Small Mobile (max-width: 480px) === */
@media (max-width: 480px) {
    /* Typography */
    html {
        font-size: 13px;
    }

    /* Hero */
    .hero-text h1 {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    /* Features */
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    /* Screenshots Carousel - Small Mobile */
    .screenshots-slider {
        padding: 20px 0;
        min-height: 480px;
    }

    .screenshots-wrapper {
        min-height: 450px;
    }

    .screenshot-card {
        width: 200px;
        height: 420px;
    }

    .screenshot-card.center {
        transform: translateX(0) scale(1) translateZ(0);
    }

    .screenshot-card.left-1 {
        transform: translateX(-220px) scale(0.7) translateZ(-30px);
        opacity: 0.4;
    }

    .screenshot-card.right-1 {
        transform: translateX(220px) scale(0.7) translateZ(-30px);
        opacity: 0.4;
    }

    .slider-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    /* Custom Select - Small Mobile */
    .custom-select-trigger {
        padding: 10px;
        min-height: 46px;
    }

    .custom-select-text {
        font-size: 0.95rem;
    }

    .custom-option {
        padding: 10px 12px;
    }

    .custom-option span {
        font-size: 0.95rem;
    }

    .option-icon {
        font-size: 0.95rem;
        width: 18px;
    }

    .screenshot-placeholder i {
        font-size: 3rem;
    }

    .screenshot-placeholder p {
        font-size: 1rem;
    }

    /* Section Headers */
    .section-header h2 {
        font-size: 1.8rem;
    }

    /* Page Header */
    .page-header {
        padding: var(--spacing-xl) 0 var(--spacing-lg);
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    /* CTA */
    .cta-content h2 {
        font-size: 1.6rem;
    }

    /* Download Buttons */
    .btn-download {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .btn-download i {
        font-size: 1.5rem;
    }

    /* Contact Info */
    .contact-info-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .contact-icon {
        width: 45px;
        height: 45px;
    }

    /* Social Links */
    .social-links-large a {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    /* Legal Content */
    .legal-text {
        padding: var(--spacing-md);
    }

    .legal-text ul {
        padding-left: var(--spacing-md);
    }

    /* Filter Buttons */
    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn {
        width: 100%;
    }

    /* Form */
    .contact-form-wrapper {
        padding: var(--spacing-md);
    }

    .btn-submit {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: 1rem;
    }

    /* Blog Meta */
    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }

    /* Footer Logo */
    .footer-logo {
        font-size: 1.3rem;
    }

    .footer-logo img {
        width: 35px;
        height: 35px;
    }
}

/* === Large Desktop (min-width: 1400px) === */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero-text h1 {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .section-header h2 {
        font-size: 3rem;
    }

    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* === Print Styles === */
@media print {
    .navbar,
    .hero,
    .cta,
    .footer,
    .download-buttons,
    .slider-btn,
    .mobile-toggle,
    .language-switcher,
    .social-links,
    .contact-form {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.6;
        color: #000;
    }

    .legal-text,
    .blog-content {
        background: #fff;
        box-shadow: none;
    }

    .page-header {
        background: #fff;
        color: #000;
        border-bottom: 2px solid #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .legal-wrapper {
        grid-template-columns: 1fr;
    }
}

/* === Accessibility - Reduced Motion === */
@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;
    }
}

/* === Dark Mode Support (Optional) === */
@media (prefers-color-scheme: dark) {
    /* This is placeholder for potential dark mode support */
    /* Uncomment and customize if dark mode is needed */

    /*
    :root {
        --bg-white: #1a1a1a;
        --bg-light: #2a2a2a;
        --text-primary: #e0e0e0;
        --text-secondary: #b0b0b0;
    }
    */
}

/* === High Contrast Mode === */
@media (prefers-contrast: high) {
    :root {
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    }

    .btn-download,
    .btn-submit,
    .filter-btn {
        border-width: 3px;
    }
}

/* === Landscape Orientation on Mobile === */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: var(--spacing-lg) 0;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .page-header {
        padding: var(--spacing-lg) 0;
    }

    .nav-menu {
        height: calc(100vh - 50px);
        overflow-y: auto;
    }
}
