/* The Liquid Fortress - Master Style */

:root {
    --sand: #F5E6C8;
    /* Warm cream/aged parchment */
    --teal: #2D5A6B;
    /* Coherence/Water/Flow */
    --crimson: #8B3535;
    /* Entropy/Fire/Danger */
    --gold: #C9A227;
    /* Sacred/Light/Value */
    --black: #1A1A18;
    /* Primary Outlines/Text */
    --green: #3D5C3D;
    /* Nature/Growth */
    --parchment-glass: rgba(245, 230, 200, 0.85);
}

body {
    font-family: 'Georgia', serif;
    line-height: 1.8;
    color: var(--black);
    background-color: #fff;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 100%;
    padding: 80px 40px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
}

.container > * {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Typography */
h1 {
    font-family: 'Helvetica Neue', sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 2.8em;
    color: var(--black);
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--gold);
}

h2 {
    font-family: 'Helvetica Neue', sans-serif;
    color: var(--teal);
    margin-top: 50px;
    font-weight: 300;
    font-size: 1.8em;
    border-bottom: 1px solid var(--sand);
    padding-bottom: 10px;
}

p {
    margin-bottom: 28px;
    font-size: 1.15em;
    text-align: justify;
}

/* Bullet Points */
ul {
    list-style-type: none;
    padding-left: 20px;
    margin-bottom: 25px;
}

ul li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
    font-size: 1.1em;
}

ul li::before {
    content: "❖";
    color: var(--gold);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 0.8em;
    top: 5px;
}

/* Images */
.img-container {
    width: 100%;
    margin: 50px 0;
    border: none;
    background: var(--sand);
    padding: 10px;
}

img {
    width: 100%;
    display: block;
    border: none;
}

.caption {
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 0.95em;
    color: var(--crimson);
    margin-top: 15px;
    text-align: center;
    font-style: italic;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Special Text */
.dropcap {
    float: left;
    font-size: 4.5em;
    line-height: 0.85;
    margin-right: 12px;
    color: var(--gold);
    font-family: 'Times New Roman', serif;
}

/* Navigation */
.nav-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid var(--gold);
    display: flex;
    justify-content: space-between;
}

.nav-btn {
    text-decoration: none;
    color: var(--teal);
    font-weight: bold;
    font-family: sans-serif;
    border: 2px solid var(--teal);
    padding: 12px 25px;
    border-radius: 4px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9em;
}

.nav-btn:hover {
    background-color: var(--teal);
    color: #F5E6C8;
}

/* Resources Box */
.resource-box {
    margin-top: 60px;
    padding: 25px;
    background-color: rgba(245, 230, 200, 0.3);
    /* Subtle Sand */
    border: 1px solid var(--gold);
    border-radius: 4px;
}

.resource-header {
    font-family: 'Helvetica Neue', sans-serif;
    text-transform: uppercase;
    color: var(--crimson);
    font-size: 0.9em;
    letter-spacing: 2px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--gold);
    padding-bottom: 5px;
}

.resource-list {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.resource-col {
    flex: 1;
    min-width: 200px;
}

.resource-col h4 {
    margin: 0 0 10px 0;
    font-size: 1em;
    color: var(--teal);
}

.resource-col ul {
    margin: 0;
    padding: 0;
}

.resource-col ul li {
    font-size: 0.9em;
    margin-bottom: 5px;
    padding-left: 15px;
}

.resource-col ul li::before {
    content: "›";
    /* Minimal arrow instead of diamond */
    color: var(--crimson);
}

.resource-link {
    text-decoration: none;
    color: var(--black);
    transition: color 0.2s;
}

.resource-link:hover {
    color: var(--crimson);
}

/* Multimedia Console */
.media-console {
    background: #f9f9f9;
    border: 1px solid var(--teal);
    border-radius: 4px;
    margin-bottom: 40px;
    overflow: hidden;
}

.media-tabs {
    display: flex;
    background: var(--teal);
}

.media-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    color: #fff;
    cursor: pointer;
    font-family: sans-serif;
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 1px;
    transition: background 0.2s;
}

.media-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.media-tab.active {
    background: var(--gold);
    color: var(--black);
    font-weight: bold;
}

.media-content {
    padding: 20px;
    text-align: center;
    display: none;
    /* Hidden by default */
}

.media-content.active {
    display: block;
}

.media-placeholder {
    padding: 20px;
    border: 2px dashed #ccc;
    color: #666;
    font-family: sans-serif;
    font-style: italic;
}

/* Language Switcher */
.lang-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Cinzel', serif;
}

.lang-switcher select {
    background: rgba(45, 90, 107, 0.9);
    /* Deep teal */
    color: var(--sand);
    border: 1px solid var(--gold);
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9em;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.lang-switcher select:hover {
    background: var(--crimson);
}


/* Persian Glass & Animation Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(201, 162, 39, 0.4);
    /* Gold tint */
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* === SHABRANG ENGINE ADDITIONS === */

/**
 * Shabrang Base Styles
 * Core typography and layout
 */

/* =============================================================================
   CSS RESET
   ============================================================================= */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body, 'Georgia', serif);
    font-size: 18px;
    line-height: 1.8;
    color: var(--text, #1A1A18);
    background-color: #fff;
    overflow-x: hidden;
}

/* =============================================================================
   CONTAINER
   ============================================================================= */

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 100px 40px 80px;
    background: #fff;
    min-height: 100vh;
}

.container > * {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 900px) {
    .container {
        padding: 80px 20px 60px;
    }
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading, 'Helvetica Neue', sans-serif);
    color: var(--heading, var(--text));
    margin-top: 0;
}

h1 {
    font-size: 2.5em;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--gold, #C9A227);
}

h2 {
    font-size: 1.6em;
    font-weight: 300;
    color: var(--accent1, #2D5A6B);
    margin-top: 50px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--background, #F5E6C8);
}

h3 {
    font-size: 1.3em;
    color: var(--accent2, #8B3535);
    margin-top: 40px;
}

p {
    margin-bottom: 1.5em;
    text-align: justify;
    hyphens: auto;
}

/* Drop Cap */
.dropcap {
    float: left;
    font-size: 4em;
    line-height: 0.85;
    margin-right: 12px;
    margin-top: 5px;
    color: var(--gold, #C9A227);
    font-family: 'Times New Roman', serif;
}

/* Links */
a {
    color: var(--accent1, #2D5A6B);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent2, #8B3535);
}

/* =============================================================================
   LISTS
   ============================================================================= */

ul, ol {
    padding-left: 20px;
    margin-bottom: 25px;
}

ul {
    list-style-type: none;
}

ul li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
}

ul li::before {
    content: "❖";
    color: var(--gold, #C9A227);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 0.8em;
    top: 4px;
}

ol li {
    margin-bottom: 10px;
}

/* =============================================================================
   IMAGES
   ============================================================================= */

.img-container {
    width: 100%;
    margin: 40px 0;
    background: var(--background, #F5E6C8);
    padding: 10px;
    border-radius: 8px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border: none;
    border-radius: 4px;
}

.chapter-content img {
    margin: 20px auto;
}

.caption {
    font-family: var(--font-heading, 'Helvetica Neue', sans-serif);
    font-size: 0.9em;
    color: var(--accent2, #8B3535);
    margin-top: 15px;
    text-align: center;
    font-style: italic;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =============================================================================
   BLOCKQUOTES
   ============================================================================= */

blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    border-left: 4px solid var(--gold, #C9A227);
    background: rgba(201, 162, 39, 0.05);
    font-style: italic;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* =============================================================================
   TABLES
   ============================================================================= */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--background, #F5E6C8);
}

th {
    font-family: var(--font-heading, 'Helvetica Neue', sans-serif);
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 1px;
    color: var(--accent1, #2D5A6B);
    border-bottom: 2px solid var(--gold, #C9A227);
}

/* =============================================================================
   STICKY HEADER
   ============================================================================= */

.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gold, #C9A227);
    z-index: 1000;
    padding: 10px 20px;
}

.header-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-home {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-home .icon {
    font-size: 20px;
    color: var(--gold, #C9A227);
}

.header-title {
    font-family: var(--font-heading);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text);
    opacity: 0.8;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.nav-arrow {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent1, #2D5A6B);
    border-radius: 50%;
    font-size: 18px;
    transition: all 0.2s;
}

.nav-arrow:hover {
    background: var(--accent1, #2D5A6B);
    color: white;
}

/* =============================================================================
   CHAPTER HEADER
   ============================================================================= */

.chapter-header {
    text-align: center;
    margin-bottom: 40px;
}

.home-icon {
    display: inline-block;
    font-size: 2em;
    color: var(--gold, #C9A227);
    margin-bottom: 20px;
}

/* =============================================================================
   MEDIA CONSOLE
   ============================================================================= */

.media-console {
    background: #f9f9f9;
    border: 1px solid var(--accent1, #2D5A6B);
    border-radius: 8px;
    margin-bottom: 40px;
    overflow: hidden;
}

.media-tabs {
    display: flex;
    background: var(--accent1, #2D5A6B);
}

.media-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.media-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.media-tab.active {
    background: var(--gold, #C9A227);
    color: var(--text, #1A1A18);
    font-weight: bold;
}

.tab-icon {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}

.media-panels {
    padding: 20px;
}

.media-panel {
    display: none;
}

.media-panel.active {
    display: block;
}

.media-hint {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin: 0;
}

.audio-player audio {
    width: 100%;
    margin-bottom: 10px;
}

.video-embed, .slides-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-embed iframe, .slides-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =============================================================================
   RESOURCE BOX
   ============================================================================= */

.resource-box {
    margin-top: 60px;
    padding: 25px;
    background: rgba(245, 230, 200, 0.3);
    border: 1px solid var(--gold, #C9A227);
    border-radius: 8px;
}

.resource-header {
    font-family: var(--font-heading);
    text-transform: uppercase;
    color: var(--accent2, #8B3535);
    font-size: 0.85em;
    letter-spacing: 2px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--gold, #C9A227);
}

.resource-list {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.resource-col {
    flex: 1;
    min-width: 200px;
}

.resource-col h4 {
    margin: 0 0 10px 0;
    font-size: 0.95em;
    color: var(--accent1, #2D5A6B);
}

.resource-col ul {
    margin: 0;
    padding: 0;
}

.resource-col ul li {
    font-size: 0.9em;
    margin-bottom: 5px;
    padding-left: 15px;
}

.resource-col ul li::before {
    content: "›";
    color: var(--accent2, #8B3535);
}

.resource-link {
    color: var(--text, #1A1A18);
}

.resource-link:hover {
    color: var(--accent2, #8B3535);
}

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

.nav-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid var(--gold, #C9A227);
    display: flex;
    justify-content: space-between;
}

.nav-btn {
    display: inline-block;
    padding: 12px 25px;
    border: 2px solid var(--accent1, #2D5A6B);
    border-radius: 4px;
    color: var(--accent1, #2D5A6B);
    font-family: var(--font-heading);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85em;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--accent1, #2D5A6B);
    color: white;
}

/* =============================================================================
   PAYWALL OVERLAY
   ============================================================================= */

.paywall-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.paywall-content {
    background: white;
    padding: 50px;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
}

.paywall-content h2 {
    margin-top: 0;
    border: none;
}

.paywall-btn {
    display: inline-block;
    background: var(--gold, #C9A227);
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 20px 0;
    transition: all 0.2s;
}

.paywall-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(201, 162, 39, 0.4);
    color: white;
}

.paywall-note {
    font-size: 14px;
    color: #666;
}

/* Preview content with fade */
.chapter-preview {
    position: relative;
}

.chapter-preview .preview-content {
    position: relative;
}

.chapter-preview .preview-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
}

/* Paywall section (inline, not overlay) */
.paywall-section {
    margin-top: 40px;
    padding: 50px 30px;
    text-align: center;
    background: linear-gradient(135deg, rgba(245, 230, 200, 0.5), rgba(201, 162, 39, 0.1));
    border: 2px solid var(--gold, #C9A227);
    border-radius: 16px;
}

/* =============================================================================
   RTL SUPPORT
   ============================================================================= */

[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .dropcap {
    float: right;
    margin-left: 12px;
    margin-right: 0;
}

[dir="rtl"] ul li {
    padding-left: 0;
    padding-right: 25px;
}

[dir="rtl"] ul li::before {
    left: auto;
    right: 0;
}

[dir="rtl"] blockquote {
    border-left: none;
    border-right: 4px solid var(--gold, #C9A227);
}

/* =============================================================================
   MOBILE RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 1.8em;
        letter-spacing: 1px;
    }

    h2 {
        font-size: 1.3em;
    }

    .dropcap {
        font-size: 3em;
    }

    .sticky-header {
        padding: 8px 15px;
    }

    .header-title {
        display: none;
    }

    .resource-list {
        flex-direction: column;
    }

    .nav-footer {
        flex-direction: column;
        gap: 15px;
    }

    .nav-btn {
        text-align: center;
    }
}
