/* styles.css - V3: Calm Command Center Design */

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Warm, calming colors */
    --color-bg: #fafaf8;
    --color-surface: #ffffff;
    --color-text: #2d2d2d;
    --color-text-muted: #666666;
    --color-accent: #4a90e2;
    --color-accent-hover: #357abd;
    --color-border: #e5e5e5;
    --color-highlight: #fff8dc;
    --color-success: #52c41a;
    --color-success-light: #e8f5e9;
    --color-warning: #f4a261;
    --color-warning-light: #fff3e0;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Typography */
    --font-serif: "Georgia", "Cambria", "Times New Roman", serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

body {
    font-family: var(--font-serif);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    font-size: 19px;
    -webkit-font-smoothing: antialiased;
}

/* === LAYOUT === */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.main-content {
    padding: var(--spacing-xl) 0;
    min-height: 60vh;
}

/* === HEADER === */
.site-header {
    background: var(--color-surface);
    border-bottom: 2px solid var(--color-border);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.brand {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-sans);
}

.brand:hover {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    font-family: var(--font-sans);
}

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--color-accent);
}

/* === BUTTONS === */
.btn-primary,
.btn-secondary,
.btn-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-primary.btn-large {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

.btn-primary.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(74, 144, 226, 0); }
}

.btn-secondary {
    background: transparent;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
}

.btn-secondary:hover {
    background: var(--color-accent);
    color: white;
}

.btn-link {
    background: none;
    color: var(--color-accent);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-link:hover {
    background: var(--color-highlight);
}

/* === PRIVACY BADGE === */
.privacy-badge {
    position: fixed;
    top: 80px;
    right: var(--spacing-lg);
    background: var(--color-success-light);
    border: 1px solid var(--color-success);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    color: var(--color-text);
    cursor: pointer;
    z-index: 90;
    transition: background 0.2s;
}

.privacy-badge:hover {
    background: #d4edda;
}

.privacy-popover {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 91;
}

.privacy-popover.show {
    display: block;
}

.privacy-popover h4 {
    font-family: var(--font-sans);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.privacy-popover p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

/* === TRIAGE PAGE === */
.hero-triage {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--spacing-xxl);
}

.hero-triage h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    font-weight: 700;
    line-height: 1.2;
}

.triage-intro {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.triage-question {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    font-family: var(--font-sans);
}

.triage-cards {
    display: grid;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xxl);
}

.triage-card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    cursor: pointer;
    transition: all 0.3s;
}

.triage-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-sans);
}

.card-arrow {
    font-size: 1.5rem;
    color: var(--color-accent);
    transition: transform 0.3s;
}

.triage-card:hover .card-arrow {
    transform: translateX(4px);
}

.card-description {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
}

.card-meta {
    display: flex;
    gap: var(--spacing-md);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    color: var(--color-text-muted);
}

.time-estimate::before {
    content: "⏱ ";
}

.step-count::before {
    content: "→ ";
}

/* === BROWSE SECTION === */
.browse-section {
    text-align: center;
    padding: var(--spacing-xl) 0;
    border-top: 1px solid var(--color-border);
}

.browse-section h3 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    font-family: var(--font-sans);
    color: var(--color-text-muted);
}

.resource-links {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.resource-link {
    color: var(--color-accent);
    text-decoration: none;
    font-family: var(--font-sans);
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.resource-link:hover {
    background: var(--color-accent);
    color: white;
}

/* === PROGRESS BANNER === */
.progress-banner {
    background: var(--color-surface);
    border: 2px solid var(--color-success);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-sans);
}

.progress-label {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
}

.progress-stats {
    font-weight: 600;
    color: var(--color-success);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.progress-fill {
    height: 100%;
    background: var(--color-success);
    transition: width 0.5s ease;
}

.next-step {
    padding: var(--spacing-sm);
    background: var(--color-highlight);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
}

.next-label {
    font-weight: 600;
    margin-right: 0.5rem;
    color: var(--color-text-muted);
}

.next-link {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
}

.next-link:hover {
    text-decoration: underline;
}

.time-estimate {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-left: 0.5rem;
}

.journey-complete {
    text-align: center;
    padding: var(--spacing-sm);
    color: var(--color-success);
    font-weight: 600;
}

.journey-time {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: var(--spacing-sm);
}

/* === STEP PAGES === */
.step-header {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--color-border);
}

.step-badge {
    display: inline-block;
    background: var(--color-warning-light);
    color: var(--color-text);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.step-header h1 {
    font-size: 2.2rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.step-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
}

.step-meta {
    display: flex;
    gap: var(--spacing-md);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.difficulty {
    background: var(--color-highlight);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

/* === STEP CONTENT === */
.step-content {
    max-width: 640px;
}

.step-intro {
    background: var(--color-highlight);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-xl);
    border-left: 4px solid var(--color-warning);
}

.step-intro p {
    margin-bottom: 0.75rem;
}

.step-intro p:last-child {
    margin-bottom: 0;
}

.section-divider {
    border: none;
    border-top: 2px solid var(--color-border);
    margin: var(--spacing-xl) 0;
}

.step-content h2 {
    font-size: 1.5rem;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    font-weight: 700;
    font-family: var(--font-sans);
}

/* === ACTION BLOCKS === */
.action-block {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.action-header {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.action-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--color-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-sans);
    font-size: 1.1rem;
}

.action-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    font-family: var(--font-sans);
    margin: 0;
}

.action-block p {
    margin-bottom: var(--spacing-md);
}

.action-block ul {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.action-block li {
    margin-bottom: 0.5rem;
}

.action-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-checklist label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-sans);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.action-checklist label:hover {
    background: var(--color-highlight);
}

.action-checklist input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.action-note {
    background: var(--color-highlight);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    margin-top: var(--spacing-md);
}

/* === STEP SUMMARY === */
.step-summary {
    background: var(--color-success-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin: var(--spacing-xl) 0;
    border-left: 4px solid var(--color-success);
}

.step-summary h2 {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: var(--spacing-sm);
}

.step-summary p {
    margin-bottom: 0.75rem;
}

.step-summary p:last-child {
    margin-bottom: 0;
}

/* === STEP NAVIGATION === */
.step-navigation {
    display: flex;
    gap: var(--spacing-md);
    justify-content: space-between;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--color-border);
}

/* === FOOTER === */
.site-footer {
    background: var(--color-surface);
    border-top: 2px solid var(--color-border);
    padding: var(--spacing-xl) 0;
    text-align: center;
    font-family: var(--font-sans);
}

.site-footer p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-muted);
}

.footer-meta {
    font-size: 0.85rem;
}

.site-footer a {
    color: var(--color-accent);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* === RETURNING USER DASHBOARD === */
.welcome-back-section h1 {
    font-size: 2rem;
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

/* === COMPLETION NOTIFICATION === */
.completion-notification {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    background: var(--color-success);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 1000;
}

.completion-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* === CONTENT GRID (Resources) === */
.page-header {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

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

.page-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

.content-grid {
    display: grid;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xxl);
}

.content-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.3s;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--color-accent);
}

.content-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

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

.category-badge,
.date-badge {
    display: inline-block;
    background: var(--color-highlight);
    color: var(--color-text);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-family: var(--font-sans);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    margin-right: 0.5rem;
}

.date-badge {
    background: var(--color-success-light);
}

.content-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-sans);
    font-weight: 600;
}

.content-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    body {
        font-size: 17px;
    }

    .hero-triage h1 {
        font-size: 2rem;
    }

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

    .triage-cards {
        gap: var(--spacing-md);
    }

    .card-header h2 {
        font-size: 1.2rem;
    }

    .privacy-badge {
        top: auto;
        bottom: var(--spacing-lg);
        right: var(--spacing-md);
    }

    .privacy-popover {
        width: calc(100vw - 4rem);
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .step-navigation {
        flex-direction: column;
    }

    .nav-links {
        gap: var(--spacing-sm);
        font-size: 0.85rem;
    }

    .resource-links {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-md);
    }

    .action-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-primary.btn-large {
        width: 100%;
    }
}
