/* BirthPlan.net - Responsive Styles */
/* =================================== */

/* Tablet Styles - 768px to 1024px */
@media screen and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }

    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }

    .hero-title {
        font-size: 2.5rem;
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tool-card.featured {
        grid-column: span 2;
    }

    .article-list {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .ad-placeholder[data-ad-size="728x90"] {
        width: 100%;
        max-width: 728px;
    }
}

/* Mobile Styles - 481px to 767px */
@media screen and (max-width: 767px) {
    /* Navigation */
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 30px 30px;
        gap: 1rem;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        overflow-y: auto;
        z-index: 1000;
    }

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

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu a::after {
        display: none;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        box-shadow: none;
        background: var(--light-color);
        margin: 0;
        margin-left: 1rem;
        display: none;
    }

    .has-dropdown.active .dropdown-menu {
        display: block;
    }

    .has-dropdown .arrow {
        float: right;
    }

    /* Hero Section */
    .hero-section {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .hero-stats {
        gap: 2rem;
    }

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

    /* Sections */
    .intro-section,
    .tools-section,
    .articles-section,
    .why-section,
    .faq-section,
    .cta-section,
    .newsletter-section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 2rem;
    }

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

    /* Tools Grid */
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .tool-card.featured {
        grid-column: span 1;
    }

    /* Articles */
    .article-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* CTA Buttons */
    .hero-cta,
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-large {
        width: 100%;
        max-width: 300px;
    }

    /* Newsletter Form */
    .newsletter-form .form-group {
        flex-direction: column;
    }

    .newsletter-box {
        padding: 2rem 1.5rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    /* Cookie Consent */
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }

    /* Ad Containers */
    .ad-placeholder[data-ad-size="728x90"],
    .ad-placeholder[data-ad-size="336x280"] {
        width: 100%;
        max-width: 336px;
        height: auto;
        aspect-ratio: 336/280;
    }

    .ad-placeholder[data-ad-size="728x90"] {
        aspect-ratio: 728/90;
    }

    /* FAQ */
    .faq-question {
        font-size: 1rem;
        padding: 1.25rem;
    }
}

/* Small Mobile Styles - up to 480px */
@media screen and (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .container {
        padding: 0 15px;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

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

    .hero-section {
        padding: 2rem 0;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat {
        width: 100%;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    /* Sections Padding */
    .intro-section,
    .tools-section,
    .articles-section,
    .why-section,
    .faq-section,
    .cta-section,
    .newsletter-section {
        padding: 2.5rem 0;
    }

    /* Cards */
    .tool-card,
    .article-card {
        padding: 1.5rem;
    }

    .article-content {
        padding: 1.25rem;
    }

    /* Forms */
    input,
    textarea,
    select {
        padding: 0.65rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    /* Buttons */
    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }

    .btn-large {
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
    }

    /* Newsletter */
    .newsletter-box {
        padding: 1.5rem 1rem;
    }

    .newsletter-box h3 {
        font-size: 1.25rem;
    }

    /* Footer */
    .site-footer {
        padding: 2rem 0 1rem;
    }

    .footer-section {
        margin-bottom: 1.5rem;
    }

    .footer-bottom {
        padding-top: 1.5rem;
        font-size: 0.85rem;
    }

    /* Back to Top Button */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    /* FAQ */
    .faq-question {
        padding: 1rem;
        padding-right: 3rem;
    }

    .faq-question::after {
        right: 1rem;
    }

    .faq-answer {
        padding: 0 1rem 1rem;
    }

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

    .logo svg {
        width: 32px;
        height: 32px;
    }
}

/* Landscape Mobile */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-stats {
        flex-direction: row;
        justify-content: space-around;
    }

    .tools-grid,
    .article-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Very Small Screens */
@media screen and (max-width: 360px) {
    .container {
        padding: 0 10px;
    }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.35rem; }
    h3 { font-size: 1.15rem; }

    .hero-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .tool-card,
    .article-card {
        padding: 1.25rem;
    }
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .nav-menu a::after {
        display: none;
    }

    .tool-card:hover,
    .article-card:hover,
    .btn:hover {
        transform: none;
    }

    /* Make touch targets larger */
    .btn {
        min-height: 44px;
    }

    input,
    select,
    textarea {
        min-height: 44px;
    }

    .nav-menu a {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}

/* High Resolution Displays */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
    /* Use higher resolution images for retina displays */
    .logo svg,
    .tool-icon svg,
    .feature-icon svg {
        image-rendering: crisp-edges;
    }
}

/* Print-specific responsive adjustments */
@media print and (max-width: 767px) {
    .container {
        width: 100%;
        max-width: none;
    }

    .tools-grid,
    .article-list,
    .features-grid {
        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;
    }

    .hero-section,
    .tool-card,
    .article-card {
        transition: none;
    }
}

/* Dark Mode Support (System Preference) */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles if needed */
    /* Currently keeping light theme as default for pregnancy/birth content */
}

/* Orientation Lock Message */
.orientation-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    color: white;
    z-index: 10000;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

@media screen and (max-width: 767px) and (orientation: portrait) and (max-aspect-ratio: 3/4) {
    /* Show message for extremely narrow viewports */
    .orientation-message {
        display: none; /* Disabled by default, can be enabled if needed */
    }
}