/* E:\Lightstab Website\assets\css\styles.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    /* Color Palette */
    --bg-dark: #0d1117;
    --bg-card: rgba(22, 27, 34, 0.7);
    --bg-nav: rgba(13, 17, 23, 0.8);
    --border-color: rgba(48, 54, 61, 0.8);
    
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #58a6ff;
    
    --accent-teal: #0df;
    --accent-teal-glow: rgba(0, 221, 255, 0.15);
    --accent-green: #3fb950;
    --accent-red: #f85149;
    
    /* Font Families */
    --font-header: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-book: 'Playfair Display', Georgia, serif;
    
    /* Reader Custom Themes */
    --reader-bg-light: #fcfbfa;
    --reader-text-light: #1c1917;
    --reader-bg-sepia: #f4ecd8;
    --reader-text-sepia: #433422;
    --reader-bg-dark: #151b23;
    --reader-text-dark: #ecf2f8;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Gradients */
body::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(0, 221, 255, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(63, 185, 80, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-family: var(--font-header);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(45deg, #fff, var(--accent-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    font-size: 1.6rem;
    background: none;
    -webkit-text-fill-color: initial;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.btn-lang {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.btn-lang:hover {
    background: var(--accent-teal);
    color: var(--bg-dark);
    box-shadow: 0 0 15px var(--accent-teal-glow);
}

/* Hero Section */
.hero {
    padding: 8rem 2rem 4rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-family: var(--font-header);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #ffffff; /* Solid white across all pages */
}

.hero p.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Home Layout and Cards */
main.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.grid-two-cols {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 4rem;
}

@media (max-width: 900px) {
    .grid-two-cols {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.story-content h2 {
    font-family: var(--font-header);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.story-content p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    color: var(--text-primary);
    opacity: 0.9;
}

.book-promo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(22, 27, 34, 0.9) 0%, rgba(13, 17, 23, 0.9) 100%);
    position: relative;
    overflow: hidden;
}

.book-promo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-teal), var(--accent-green));
}

.book-cover-container {
    margin-bottom: 2rem;
    perspective: 1000px;
}

.book-cover {
    width: 200px;
    height: 300px;
    object-fit: cover;
    border-radius: 4px 12px 12px 4px;
    box-shadow: 10px 10px 25px rgba(0, 0, 0, 0.6), -2px 0 5px rgba(255, 255, 255, 0.1) inset;
    transition: var(--transition-smooth);
    transform: rotateY(-10deg);
}

.book-promo-card:hover .book-cover {
    transform: rotateY(0deg) scale(1.03);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-dark);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
    margin-bottom: 1rem;
    width: 100%;
    justify-content: center;
}

.btn-primary:hover {
    background: var(--accent-teal);
    box-shadow: 0 0 20px var(--accent-teal-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
    width: 100%;
    justify-content: center;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-primary);
}

/* Helpline Banner / Footer */
.helplines {
    margin-top: 4rem;
    background: rgba(248, 81, 73, 0.05);
    border: 1px solid rgba(248, 81, 73, 0.2);
}

.helplines h3 {
    font-family: var(--font-header);
    color: #ff7b72;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

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

.helpline-item {
    background: rgba(20, 20, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.2rem;
}

.helpline-name {
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.helpline-phone {
    font-family: var(--font-header);
    color: var(--accent-teal);
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    display: block;
    margin-bottom: 0.3rem;
}

.helpline-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

footer {
    text-align: center;
    padding: 4rem 2rem 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 6rem;
}

/* ========================================================
   BOOK READER INTERFACE STYLES
   ======================================================== */

.reader-body {
    padding-top: 5rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.reader-controls {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 4.5rem;
    z-index: 900;
    padding: 0.75rem 2rem;
}

.controls-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.control-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font-body);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-smooth);
}

.control-btn:hover, .control-btn.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-primary);
}

.control-select {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font-body);
    width: 280px; /* Perfectly sized to fit longest chapters */
    outline: none;
    transition: var(--transition-smooth);
}

#font-size-select {
    width: 185px; /* Sized perfectly to fit "Standaard Tekst" / "Standard Text" without clipping */
}

/* Reader Main Workspace */
.reader-workspace {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    width: 100%;
}

/* HTML Scroll Mode Container */
.book-container-scroll {
    max-width: 800px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    padding: 4rem 3rem;
    margin-bottom: 2rem;
    transition: var(--transition-smooth);
}


/* Reader Theme Styling Classes */
.theme-light {
    background-color: var(--reader-bg-light) !important;
    color: var(--reader-text-light) !important;
}

.theme-sepia {
    background-color: var(--reader-bg-sepia) !important;
    color: var(--reader-text-sepia) !important;
}

.theme-dark {
    background-color: var(--reader-bg-dark) !important;
    color: var(--reader-text-dark) !important;
}

/* Book Content Typography */
.book-content h2.chapter-title {
    font-family: var(--font-header);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1rem;
}

.theme-dark .book-content h2.chapter-title {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.book-content p {
    font-family: var(--font-book);
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    text-indent: 2rem;
    text-align: justify;
    line-height: 1.8;
}

.book-content p:first-of-type {
    text-indent: 0;
}

/* Navigation buttons inside reader */
.reader-nav-footer {
    display: flex;
    justify-content: center; /* Centered under the book */
    gap: 2rem;
    width: 100%;
    max-width: 800px;
    margin: 1rem auto 3rem; /* Centered on the screen */
    align-self: center; /* Force horizontal centering inside flex column body */
}

.reader-nav-footer-flip {
    max-width: 1100px;
}

/* Reading Progress Bar */
.progress-bar-container {
    width: 100%;
    max-width: 800px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-teal);
    transition: width 0.2s ease;
}

/* Font Size Modifiers */
.font-size-sm p { font-size: 1rem !important; }
.font-size-md p { font-size: 1.15rem !important; }
.font-size-lg p { font-size: 1.3rem !important; }
.font-size-xl p { font-size: 1.45rem !important; }

/* Clean-time Counter Widget */
.counter-card {
    background: linear-gradient(135deg, rgba(22, 27, 34, 0.9) 0%, rgba(13, 17, 23, 0.9) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem; /* Make it a lot smaller */
    margin: 3rem auto 0;
    max-width: 600px; /* Reduced width */
    text-align: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.counter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-teal), var(--accent-green));
}

.counter-title {
    font-family: var(--font-header);
    font-size: 0.9rem; /* Much smaller */
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
}

.counter-grid {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.counter-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.5rem 1rem; /* Highly compact padding */
    min-width: 90px;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.counter-item:hover {
    border-color: rgba(0, 221, 255, 0.2);
    transform: translateY(-2px);
}

.counter-value {
    font-family: var(--font-header);
    font-size: 1.8rem; /* Reduced from 3rem */
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
    text-shadow: 0 0 10px rgba(0, 221, 255, 0.3);
}

.counter-label {
    font-size: 0.75rem; /* Reduced text scale */
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contact Form Styling */
.contact-container {
    max-width: 600px;
    width: 100%;
    margin: 8rem auto 4rem auto;
    padding: 0 1.5rem;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
}

.contact-title {
    font-family: var(--font-header);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-align: center;
}

.contact-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.5;
}

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

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-label span {
    color: var(--text-secondary);
    text-transform: none;
    font-size: 0.8rem;
    font-weight: 400;
}

.form-control {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

.form-control:focus {
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px var(--accent-teal-glow);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

.char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.char-counter.limit-near {
    color: var(--accent-red);
}

.contact-btn {
    width: 100%;
    background: var(--text-primary);
    color: var(--bg-dark);
    border: none;
    padding: 0.85rem;
    border-radius: 8px;
    font-family: var(--font-header);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 0.5rem;
}

.contact-btn:hover {
    background: var(--accent-teal);
    color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(0, 221, 255, 0.4);
    transform: translateY(-1px);
}

.contact-btn:disabled {
    background: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-status {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(63, 185, 80, 0.15);
    border: 1px solid var(--accent-green);
    color: #56d364;
}

.form-status.error {
    display: block;
    background: rgba(248, 81, 73, 0.15);
    border: 1px solid var(--accent-red);
    color: #ff7b72;
}

