/* ============================================
   MAIN STYLES - Pregnancy Checker
   ============================================ */

/* CSS Variables */
:root {
    /* Colors */
    --primary: #FF6B9D;
    --primary-dark: #C44569;
    --primary-light: #FFC1CC;
    --secondary: #A29BFE;
    --success: #00B894;
    --warning: #FDCB6E;
    --text-dark: #2D3436;
    --text-gray: #636E72;
    --text-light: #DFE6E9;
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    
    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-xxl: 64px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 30px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    opacity: 1;
    visibility: visible;
    display: block;
}

body.loaded {
    opacity: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 32px;
    font-weight: 600;
}

h3 {
    font-size: 24px;
    font-weight: 600;
}

h4 {
    font-size: 20px;
    font-weight: 500;
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

a:focus {
    outline: 3px solid rgba(255, 107, 157, 0.3);
    outline-offset: 2px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
}

/* Skip Link (Accessibility) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: var(--spacing-sm);
    z-index: 1000;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Header */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow var(--transition-base);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
    min-height: 70px;
}

.navbar-brand a {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.navbar-brand i {
    font-size: 28px;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    align-items: center;
}

.navbar-menu li a {
    font-weight: 500;
    color: var(--text-dark);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.navbar-menu li a:hover {
    background: var(--bg-light);
    color: var(--primary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    width: 32px;
    height: 32px;
    justify-content: center;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    padding: var(--spacing-xxl) 0;
    text-align: center;
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 42px;
    color: white;
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.6s ease;
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
    animation: fadeInUp 0.8s ease;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: rgba(255, 255, 255, 0.2);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-xl);
    font-size: 14px;
    animation: fadeInUp 1s ease;
}

/* Features Section */
.features-section {
    padding: var(--spacing-xxl) 0;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    font-size: 32px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.feature-card {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-md);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: var(--spacing-sm);
}

.feature-card p {
    font-size: 15px;
    color: var(--text-gray);
    margin-bottom: 0;
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: white;
    padding: var(--spacing-xxl) 0 var(--spacing-lg);
    margin-top: var(--spacing-xxl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
    color: white;
    margin-bottom: var(--spacing-md);
    font-size: 18px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    transition: color var(--transition-fast);
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-lg);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: var(--spacing-sm);
}

.medical-notice {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 800px;
    margin: 0 auto;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

/* Responsive Typography */
@media (max-width: 767px) {
    h1 {
        font-size: 32px;
    }
    
    h2 {
        font-size: 26px;
    }
    
    h3 {
        font-size: 20px;
    }
    
    body {
        font-size: 16px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
}



/* ===== bundled separator ===== */

/* ============================================
   COMPONENT STYLES
   ============================================ */

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-xl);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.badge-success {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(253, 203, 110, 0.2);
    color: #E17055;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--text-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: var(--spacing-lg) auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Alert Messages */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.alert-info {
    background: rgba(162, 155, 254, 0.1);
    color: var(--secondary);
    border-left: 4px solid var(--secondary);
}

.alert-success {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-warning {
    background: rgba(253, 203, 110, 0.2);
    color: #E17055;
    border-left: 4px solid var(--warning);
}

.alert-error {
    background: rgba(255, 107, 157, 0.1);
    color: var(--primary-dark);
    border-left: 4px solid var(--primary-dark);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--text-light);
    border-radius: 4px;
    overflow: hidden;
    margin: var(--spacing-md) 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    transition: width var(--transition-base);
    border-radius: 4px;
}

/* Trimester Progress */
.trimester-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin: var(--spacing-lg) 0;
}

.trimester-item {
    text-align: center;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    background: var(--bg-light);
    transition: all var(--transition-base);
}

.trimester-item.active {
    background: var(--primary-light);
    border: 2px solid var(--primary);
}

.trimester-item h4 {
    font-size: 16px;
    margin-bottom: var(--spacing-xs);
}

.trimester-item p {
    font-size: 14px;
    color: var(--text-gray);
    margin: 0;
}

/* Baby Size Comparison */
.baby-size {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin: var(--spacing-lg) 0;
}

.baby-size-icon {
    font-size: 64px;
    margin-bottom: var(--spacing-md);
}

.baby-size-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--spacing-xs);
}

.baby-size-details {
    font-size: 14px;
    color: var(--text-gray);
}

/* Countdown Timer */
.countdown {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.countdown-item {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    min-width: 80px;
}

.countdown-number {
    font-size: 32px;
    font-weight: 700;
    color: white;
    display: block;
}

.countdown-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Blog Post Card */
.blog-card {
    background: var(--bg-white);
    border: 1px solid var(--text-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-light);
}

.blog-card-content {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-category {
    display: inline-block;
    margin-bottom: var(--spacing-sm);
}

.blog-card-title {
    font-size: 20px;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.blog-card-excerpt {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: var(--spacing-md);
    flex: 1;
}

.blog-card-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* Affiliate Product Card */
.product-card {
    background: var(--bg-white);
    border: 1px solid var(--text-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-dark);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
    font-size: 14px;
    color: var(--text-gray);
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.product-link {
    display: block;
    text-align: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background var(--transition-fast);
}

.product-link:hover {
    background: var(--primary-dark);
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-lg) 0;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.comparison-table th {
    background: var(--primary);
    color: white;
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
}

.comparison-table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--text-light);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover {
    background: var(--bg-light);
}

/* FAQ Accordion */
.faq-item {
    border-bottom: 1px solid var(--text-light);
    margin-bottom: var(--spacing-md);
}

.faq-question {
    width: 100%;
    padding: var(--spacing-md);
    background: none;
    border: none;
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color var(--transition-fast);
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question i {
    transition: transform var(--transition-base);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
    padding: 0 var(--spacing-md);
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    padding: var(--spacing-md);
}

/* Social Share Buttons */
.social-share {
    display: flex;
    gap: var(--spacing-sm);
    margin: var(--spacing-lg) 0;
}

.social-share a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--text-dark);
    transition: all var(--transition-fast);
}

.social-share a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
    font-size: 14px;
    color: var(--text-gray);
}

.breadcrumbs a {
    color: var(--text-gray);
    transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs span {
    color: var(--text-light);
}

/* Week Article Styles */
.week-article {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-xl) 0;
}

.week-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--text-light);
}

.week-subtitle {
    color: var(--text-gray);
    font-size: 18px;
    margin-top: var(--spacing-sm);
}

.week-section {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.week-section h2 {
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.week-section h3 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    font-size: 20px;
}

.week-section ul {
    list-style: none;
    padding-left: 0;
}

.week-section ul li {
    padding: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
    position: relative;
}

.week-section ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.week-navigation {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--text-light);
}

.week-navigation .btn {
    width: auto;
    min-width: 150px;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .checker-tabs,
    .btn,
    .email-capture {
        display: none;
    }
    
    .results-card {
        background: white;
        color: var(--text-dark);
        box-shadow: none;
        border: 1px solid var(--text-light);
    }
}



/* ===== bundled separator ===== */

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Mobile First Approach */

/* Small Mobile (320px - 479px) */
@media (max-width: 479px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-section {
        padding: var(--spacing-xl) 0;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .checker-card {
        padding: var(--spacing-sm);
    }
    
    .results-due-date {
        font-size: 28px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Mobile (480px - 767px) */
@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .navbar-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: var(--spacing-lg);
        box-shadow: var(--shadow-md);
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        z-index: 99;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .navbar-menu.active {
        transform: translateX(0);
    }
    
    .navbar-menu li {
        width: 100%;
    }
    
    .navbar-menu li a {
        display: block;
        padding: var(--spacing-md);
        width: 100%;
    }
    
    .checker-tabs {
        padding-bottom: var(--spacing-sm);
    }
    
    .tab-button {
        font-size: 14px;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .tab-button span {
        display: none;
    }
    
    .tab-button i {
        font-size: 20px;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .results-actions .btn {
        width: 100%;
    }
    
    .countdown {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
    
    .countdown-item {
        min-width: 60px;
        padding: var(--spacing-sm);
    }
    
    .countdown-number {
        font-size: 24px;
    }
    
    .trimester-progress {
        grid-template-columns: 1fr;
    }
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .checker-card {
        padding: var(--spacing-lg);
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .navbar-menu {
        display: flex;
    }
    
    .checker-tabs {
        justify-content: center;
    }
    
    .tab-button {
        flex: 0 1 auto;
    }
}

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: 1440px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .tab-button,
    .week-pill,
    .faq-question {
        min-height: 48px;
        min-width: 48px;
    }
    
    .form-input,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Landscape Mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        padding: var(--spacing-lg) 0;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .navbar-menu {
        max-height: calc(100vh - 70px);
    }
}

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    /* Can be implemented later if needed */
}

/* Print Styles */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .site-header,
    .site-footer,
    .checker-tabs,
    .btn,
    .email-capture,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .checker-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .results-card {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* =========================================================
   Mobile homepage: keep search visible near top
   (mobile-only reorder; scoped to homepage main container)
   ========================================================= */
@media (max-width: 768px) {
    /* Make homepage main container flexbox so we can reorder */
    main#main-content.container {
        display: flex;
        flex-direction: column;
    }

    /* Default order for all direct children */
    main#main-content.container > * {
        order: 0;
    }

    /* Keep heading at very top */
    main#main-content.container > h1 { order: -20; }
    main#main-content.container > h2 { order: -19; }
    main#main-content.container > p:first-of-type { order: -18; }

    /* Move search to top */
    #food-search.food-search-container {
        order: -10;
        margin-top: 20px;
    }

    /* Trust signals after search */
    main#main-content.container .trust-badge,
    main#main-content.container > div[style*="background:#E8F5E9"] {
        order: -5;
    }

    /* Popular chips after search */
    main#main-content.container .popular-chips {
        order: -4;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    main#main-content.container .popular-chips::-webkit-scrollbar {
        display: none;
    }

    main#main-content.container .popular-chip {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Safety legend after chips */
    main#main-content.container .safety-legend {
        order: -3;
    }
}

@media (max-width: 768px) {
    /* Blog post content sections */
    .content-section {
        padding: 20px 15px;
        margin-bottom: 25px;
    }

    .content-section h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .content-section p,
    .content-section ul,
    .content-section ol {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 15px;
    }

    /* Product recommendations */
    .product-recommendation {
        padding: 15px;
        margin-bottom: 15px;
    }

    /* Related articles grid */
    .related-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .popular-chip,
    .product-link,
    .cta-button,
    .email-signup button,
    .safety-chip,
    button,
    a.button {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

