/* Bible Reading Planner Generator - Styles */

:root {
    --primary-color: #5A9F7E;
    --primary-hover: #4a8a6a;
    --text-primary: #1A1D21;
    --text-secondary: #4A5568;
    --text-light: #718096;
    --background: #F7FAFC;
    --surface: #FFFFFF;
    --border: #E2E8F0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    /* Unsplash: Aaron Burden - Open Bible with warm candlelight */
    background:
        linear-gradient(
            to bottom,
            rgba(26, 29, 33, 0.6) 0%,
            rgba(26, 29, 33, 0.7) 100%
        ),
        url('https://images.unsplash.com/photo-1504052434569-70ad5836ab65?w=1920&q=80') center/cover no-repeat;
    color: white;
    padding: 8rem 2rem;
    text-align: center;
    margin-bottom: 0;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
    font-size: 1.375rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 15px rgba(0, 0, 0, 0.3);
}

.btn-hero {
    display: inline-block;
    padding: 1.125rem 3rem;
    font-size: 1.125rem;
    font-weight: 600;
    background: white;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
    border-bottom: 3px solid var(--primary-color);
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .hero {
        padding: 5rem 1.5rem;
        min-height: 75vh;
    }

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

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

/* ============================================
   IMAGE DIVIDERS
   ============================================ */

.image-divider {
    height: 50vh;
    min-height: 300px;
    max-height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

/* Subtle vignette overlay */
.image-divider::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.15) 100%);
    pointer-events: none;
}

/* Disable parallax on mobile (performance) */
@media (max-width: 768px) {
    .image-divider {
        background-attachment: scroll;
        height: 35vh;
        min-height: 220px;
        max-height: 350px;
    }
}

/* Unsplash: Priscilla Du Preez - Open book with coffee, warm morning light */
.image-divider--bible {
    background-image: url('https://images.unsplash.com/photo-1456513080510-7bf3a84b82f8?w=1920&q=80');
    background-position: center 40%;
}

/* Unsplash: Simon Wilkes - Tree reflected in still water at dawn */
.image-divider--tree {
    background-image: url('https://images.unsplash.com/photo-1502082553048-f009c37129b9?w=1920&q=80');
}

/* Unsplash: Kelly Sikkema - Hands writing in journal with pen */
.image-divider--journal {
    background-image: url('https://images.unsplash.com/photo-1517842645767-c639042777db?w=1920&q=80');
    background-position: center 60%;
}

/* ============================================
   BENEFITS SECTION
   ============================================ */

.benefits {
    padding: 5rem 2rem;
    background: var(--surface);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.benefit-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    background: var(--background);
    transition: all 0.3s ease;
}

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

.benefit-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    color: var(--primary-color);
    background: rgba(90, 159, 126, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-icon svg {
    width: 28px;
    height: 28px;
}

.benefit-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.benefit-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .benefits {
        padding: 3rem 1.5rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ============================================
   HOW IT WORKS SECTION
   ============================================ */

.how-it-works {
    padding: 5rem 2rem;
    background: var(--background);
}

.section-heading {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 3rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

/* Connecting line between steps */
.steps-grid::before {
    content: '';
    position: absolute;
    top: 32px;
    left: calc(16.67% + 32px);
    right: calc(16.67% + 32px);
    height: 2px;
    background: repeating-linear-gradient(
        to right,
        var(--border) 0,
        var(--border) 8px,
        transparent 8px,
        transparent 16px
    );
}

.step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 64px;
    height: 64px;
    background: var(--primary-color);
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    position: relative;
    box-shadow: 0 0 0 6px var(--background);
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.step-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .how-it-works {
        padding: 3rem 1.5rem;
    }

    .section-heading {
        font-size: 1.875rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .steps-grid::before {
        display: none;
    }

    .step-number {
        box-shadow: none;
    }
}

/* ============================================
   GENERATOR SECTION
   ============================================ */

.generator-section {
    padding: 5rem 2rem;
    background: var(--surface);
}

.section-intro {
    text-align: center;
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .generator-section {
        padding: 3rem 1.5rem;
    }
}

/* Old header styles removed - now using hero section */

form {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
}

.form-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.section-note {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(90, 159, 126, 0.15);
}

select {
    cursor: pointer;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.readings-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
}

.readings-group .checkbox-label {
    margin: 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--text-primary);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkbox-label:hover .checkmark {
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

input[type="color"] {
    width: 48px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
    background: var(--surface);
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-value {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-actions {
    padding: 1.5rem;
    background: var(--background);
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ============================================
   ADVANCED OPTIONS COLLAPSIBLE
   ============================================ */

.advanced-options {
    margin-top: 1rem;
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.advanced-options summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.advanced-options summary::-webkit-details-marker {
    display: none;
}

.advanced-options summary::before {
    content: '';
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%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='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%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='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E") center/contain no-repeat;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.advanced-options[open] summary::before {
    transform: rotate(90deg);
}

.advanced-options summary:hover {
    color: var(--text-primary);
}

.advanced-options .form-section {
    border-top: 1px solid var(--border);
}

.advanced-options .form-section:first-of-type {
    border-top: 1px solid var(--border);
}

.advanced-options .form-actions {
    border-top: 1px solid var(--border);
}

.btn-primary,
.btn-secondary {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    min-width: 160px;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--background);
    color: var(--text-primary);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: var(--text-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 4px solid var(--primary-color);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(90, 159, 126, 0.3), transparent);
}

.footer-text {
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.footer-copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Loading state */
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Error state */
.error-message {
    background: #FEE2E2;
    color: #DC2626;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 1.5rem;
    font-size: 0.875rem;
}

/* Field notes */
.field-note {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* Date input styling */
input[type="date"] {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(90, 159, 126, 0.15);
}

/* Reading info collapsible */
.reading-info {
    margin-top: 1rem;
}

.reading-info details {
    background: var(--background);
    border-radius: 8px;
    padding: 0;
}

.reading-info summary {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    user-select: none;
    list-style: none;
}

.reading-info summary::-webkit-details-marker {
    display: none;
}

.reading-info summary::before {
    content: '▶';
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.reading-info details[open] summary::before {
    transform: rotate(90deg);
}

.reading-info .info-content {
    padding: 0 1rem 1rem 1rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.reading-info .info-content p {
    margin-bottom: 0.5rem;
}

.reading-info .info-content ul {
    margin: 0.5rem 0 1rem 1.25rem;
}

.reading-info .info-content li {
    margin-bottom: 0.25rem;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about {
    padding: 4rem 2rem;
    background: var(--surface);
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-lead {
    font-size: 1.375rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.about-content p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.about-offline {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--background);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    text-align: left;
}

@media (max-width: 768px) {
    .about {
        padding: 3rem 1.5rem;
    }

    .about-lead {
        font-size: 1.25rem;
    }
}

/* ============================================
   READING PLANS SECTION
   ============================================ */

.reading-plans {
    padding: 5rem 2rem;
    background: var(--surface);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.plan-card {
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--background);
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.plan-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.plan-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .reading-plans {
        padding: 3rem 1.5rem;
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   QUOTE SECTION
   ============================================ */

.quote-section {
    padding: 6rem 2rem;
    /* Subtle blurred nature background for Psalm 1 (tree by water) */
    background:
        linear-gradient(
            to bottom,
            rgba(247, 250, 252, 0.92) 0%,
            rgba(247, 250, 252, 0.88) 100%
        ),
        url('https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=1920&q=80') center/cover no-repeat fixed;
    position: relative;
}

.featured-quote {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.featured-quote p {
    font-size: 1.5rem;
    font-style: italic;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.featured-quote cite {
    font-size: 1.0625rem;
    font-style: normal;
    color: var(--primary-color);
    font-weight: 500;
}

.featured-quote cite em {
    font-style: italic;
}

@media (max-width: 768px) {
    .quote-section {
        padding: 4rem 1.5rem;
        background-attachment: scroll;
    }

    .featured-quote {
        padding: 1.5rem 1rem;
    }

    .featured-quote p {
        font-size: 1.125rem;
    }
}
