/* BabyQ Mobile-First CSS */
/* Clean, simple, bulletproof mobile styles */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    overflow-x: hidden;
}

/* Container */
.container {
    padding: 0 20px;
    max-width: 100%;
}

/* Header - Simple and Bulletproof */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    height: 60px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

/* Logo */
.logo {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

/* Menu Button */
.menu-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Menu active state */
.menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
}

.mobile-nav.active {
    transform: translateY(0);
}

.nav-container {
    padding: 20px;
}

.mobile-nav a {
    display: block;
    padding: 15px 0;
    color: #333;
    text-decoration: none;
    font-size: 18px;
    border-bottom: 1px solid #eee;
}

.nav-cta {
    background: #ff6b6b;
    color: #fff !important;
    text-align: center;
    border-radius: 50px;
    margin-bottom: 10px;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.nav-auth {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.nav-auth a {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    border: none;
}

/* Main Content */
main {
    margin-top: 60px;
}

/* Sections */
section {
    padding: 40px 0;
}

/* Typography */
h1 {
    font-size: 28px;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #333;
}

h2 {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 16px;
    color: #333;
}

h3 {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 12px;
    color: #333;
}

p {
    margin-bottom: 16px;
    color: #666;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.btn-primary {
    background: #ff6b6b;
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: #fff;
    color: #ff6b6b;
    border: 2px solid #ff6b6b;
}

.btn-secondary:hover {
    background: #ff6b6b;
    color: #fff;
}

.btn-large {
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
}

button.btn-primary,
button.btn-secondary {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
    padding: 60px 0;
    color: white;
}

.hero h1 {
    color: white;
    margin-bottom: 16px;
    font-size: 2.5em;
    font-weight: 700;
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: white;
    opacity: 0.9;
}

/* About Section */
.about {
    background: #fff;
}

.about h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 700;
}

/* Benefit Cards */
.benefit-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border-left: 6px solid #ff6b6b;
}

.benefit-card:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.benefit-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Make benefit card links look like regular cards */
a.benefit-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

a.benefit-card:hover {
    background: #f0ebff;
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

/* About BabyQ Section */
.about-babyq {
    background: #fff;
    padding: 60px 0;
}

.about-babyq h2 {
    color: #8b5cf6;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
}

.story-card {
    max-width: 800px;
    margin: 0 auto;
    background: #f8f6ff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.story-card p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
}

.story-card .signature {
    font-style: italic;
    color: #8b5cf6;
    font-weight: 600;
    margin-top: 30px;
    text-align: right;
}

@media (max-width: 768px) {
    .story-card {
        padding: 20px;
    }
    
    .about-babyq {
        padding: 40px 0;
    }
}

/* CTA Section */
.cta {
    background: #ff6b6b;
    color: #fff;
    text-align: center;
    padding: 50px 0;
    border-radius: 0;
}

.cta h2 {
    color: #fff;
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta p {
    color: #fff;
    opacity: 0.95;
    margin-bottom: 30px;
    font-size: 1.2em;
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 30px 0;
}

footer p {
    color: #fff;
    margin-bottom: 8px;
}

footer small {
    opacity: 0.8;
}

/* Auth Pages */
.auth-section {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    padding: 40px 0;
}

.auth-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 32px;
    text-align: center;
}

.auth-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 16px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #8b5cf6;
}

.form-group input[type="date"] {
    min-height: 54px;
}

.form-group select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 48px;
}

.form-hint {
    display: block;
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

/* Password wrapper and toggle */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #666;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #8b5cf6;
}

.password-toggle svg {
    display: block;
    width: 24px;
    height: 24px;
}

.password-wrapper input {
    padding-right: 56px;
}

.form-error {
    background: #fee;
    color: #c00;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.info-message {
    background: #e7f3ff;
    color: #1a5fb4;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
}

.auth-footer p {
    color: #666;
}

.auth-footer a {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
}

/* User navigation state */
.user-name {
    display: inline-block;
    padding: 12px;
    color: #8b5cf6;
    font-weight: 600;
}

/* Dashboard */
.dashboard {
    padding: 40px 0;
}

.dashboard h1 {
    text-align: center;
    color: #8b5cf6;
    margin-bottom: 32px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: #f8f6ff;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #8b5cf6;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.dashboard-actions {
    margin-bottom: 40px;
}

.assessment-history h2 {
    color: #333;
    margin-bottom: 20px;
}

.no-assessments {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    background: #f8f6ff;
    border-radius: 12px;
}

.assessment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.assessment-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
}

.assessment-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

.assessment-score {
    font-size: 36px;
    font-weight: bold;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f6ff;
}

.score-excellent {
    background: #e7f5e7;
    color: #0d7a0d;
}

.score-good {
    background: #e7f3ff;
    color: #1a5fb4;
}

.score-fair {
    background: #fff4e6;
    color: #e67e22;
}

.score-needs-improvement {
    background: #ffe6e6;
    color: #c00;
}

.assessment-info {
    flex: 1;
}

.assessment-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.assessment-category {
    font-weight: 600;
    color: #333;
}

.assessment-details {
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.category-scores {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.category-scores li {
    font-size: 14px;
    color: #666;
    padding: 4px 0;
}

.view-details {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
}

.pregnancy-info {
    margin-top: 40px;
}

.pregnancy-info h2 {
    color: #333;
    margin-bottom: 20px;
}

.info-card {
    background: #f8f6ff;
    padding: 24px;
    border-radius: 12px;
}

.info-card p {
    margin-bottom: 12px;
    color: #333;
}

.info-card strong {
    color: #8b5cf6;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Epigenetics Section */
.epigenetics-section {
    background: white;
    padding: 80px 0;
    border-top: 4px solid #ff6b6b;
}

.epigenetics-hero {
    text-align: center;
    margin-bottom: 50px;
}

.epigenetics-hero h2 {
    font-size: 2.2em;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 700;
}

.epigenetics-hero .subtitle {
    font-size: 1.3em;
    color: #e74c3c;
    font-weight: 600;
    margin-bottom: 30px;
}

.gene-switch {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px auto;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 900px;
}

.gene-card {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    flex: 1;
    max-width: 350px;
    min-width: 280px;
}

.gene-card:hover {
    transform: translateY(-5px);
}

.gene-card.good {
    border-left: 6px solid #27ae60;
}

.gene-card.bad {
    border-left: 6px solid #e74c3c;
}

.gene-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.gene-card h3 {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #2c3e50;
}

.gene-card p {
    color: #7f8c8d;
    line-height: 1.6;
}

.switch-arrow {
    font-size: 2.5em;
    color: #ff6b6b;
    display: none;
    align-items: center;
}

.explanation {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 40px;
    border-radius: 20px;
    margin-top: 50px;
    text-align: center;
}

.explanation h3 {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

.explanation p {
    font-size: 1.1em;
    color: #34495e;
    line-height: 1.8;
    margin-bottom: 15px;
}

.key-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.key-point {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #ff6b6b;
}

.key-point h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}

.key-point p {
    color: #7f8c8d;
    font-size: 0.95em;
}

.score-callout {
    background: #ff6b6b;
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    margin-top: 50px;
}

.score-callout h3 {
    font-size: 2em;
    margin-bottom: 20px;
    font-weight: 700;
}

.score-callout p {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.95;
}

.score-callout .btn-secondary {
    background: white;
    color: #ff6b6b;
    border: none;
}

@media (max-width: 768px) {
    .epigenetics-hero h2 {
        font-size: 1.8em;
    }
    
    .gene-switch {
        flex-direction: column;
        gap: 20px;
    }
    
    .switch-arrow {
        display: flex;
        transform: rotate(90deg);
    }
    
    .gene-card {
        max-width: 100%;
        min-width: 100%;
    }
    
    .explanation {
        padding: 25px;
    }
    
    .key-points {
        grid-template-columns: 1fr;
    }
}