/* ========================================
   49 Cipher – Master Stylesheet
   Open Source · Freedom · Shadow & Shake
   ======================================== */

/* ----- Smooth Scroll for ALL Anchor Links ----- */
html {
    scroll-behavior: smooth;
}

/* ========================================
   1. BASE & RESET
   ======================================== */

/* ----- 1. BASE ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #151517;
    font-family: 'Segoe UI', 'Roboto', 'Noto Sans', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #e6edf3;
    padding-top: 80px; /* Space for fixed header */
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: #151517;
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid #2d3a4a;
}

/* For pages that don't need the container padding on mobile */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
}


/* ========================================
   2. TYPOGRAPHY
   ======================================== */

h1, h2, h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #f0f4fa;
}

h1 {
    font-size: 2.2rem;
    border-left: 4px solid #f59e0b;
    margin-top: 0.5em;
}

h1.no-border {
    border-left: none;
}

h2 {
    font-size: 1.6rem;
    border-bottom: 1px solid #2d3a4a;
    padding-bottom: 0.3rem;
}

h3 {
    font-size: 1.3rem;
    color: #cbd5e6;
}

p, li {
    margin-bottom: 0.8rem;
    color: #e2e8f0;
}

ul, ol {
    margin-left: 1.8rem;
    margin-bottom: 1rem;
}

/* ----- Typography with scroll offset ----- */
h1, h2, h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #f0f4fa;
    scroll-margin-top: 80px; /* Space for fixed header */
}

/* ----- Mobile ----- */
@media (max-width: 768px) {
    h1, h2, h3 {
        scroll-margin-top: 65px; /* Smaller header on mobile */
    }
}

/* ========================================
   3. LINKS
   ======================================== */

a {
    color: #90caf9;
    text-decoration: none;
}


/* ========================================
   4. UTILITY CLASSES
   ======================================== */

.text-gold {
    color: #f59e0b;
}

.text-muted {
    color: #7f8ea3;
}

.text-light {
    color: #f0f4fa;
}

.highlight-gold {
    color: #f59e0b;
}

.icon-large {
    font-size: 1.2rem;
}


/* ========================================
   5. QUOTES & DIVIDERS
   ======================================== */

.quote {
    font-style: italic;
    background: #121214;
    padding: 1rem;
    border-radius: 12px;
    margin: 1rem 0;
    color: #cbd5e6;
}

.pull-quote {
    background: #1e2a3a;
    border-left: 4px solid #f59e0b;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    margin: 1.2rem 0;
    font-size: 1.1rem;
    color: #f0f4fa;
}

.pull-quote strong {
    color: #f59e0b;
}

hr {
    border: none;
    height: 1px;
    background: #2d3a4a;
    margin: 1.5rem 0;
}


/* ========================================
   6. HERO (Standard)
   ======================================== */

.hero {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid #2d3a4a;
    margin-bottom: 2rem;
}

.hero .badge-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.badge {
    display: inline-block;
    background: #f59e0b22;
    border: 1px solid #f59e0b44;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #f59e0b;
    letter-spacing: 0.5px;
}

.hero-desc {
    color: #9aaebf;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0.5rem auto;
}

.hero-meta {
    color: #7f8ea3;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}


/* ========================================
   7. TABLES
   ======================================== */

table {
    width: 100%;
    border-collapse: collapse;
    background: #151517;
    margin: 1.2rem 0;
    border-radius: 12px;
    overflow: hidden;
}

th, td {
    border: 1px solid #2d3a4a;
    padding: 0.75rem;
    text-align: left;
    vertical-align: top;
    color: #e2e8f0;
}

th {
    background: #1e293b;
    font-weight: 600;
}

.pattern-table {
    width: 100%;
    border-collapse: collapse;
    background: #151517;
    margin: 0.8rem 0;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.9rem;
}

.pattern-table th,
.pattern-table td {
    border: 1px solid #2d3a4a;
    padding: 0.5rem 0.7rem;
    text-align: left;
    vertical-align: top;
    color: #e2e8f0;
}

.pattern-table th {
    background: #1e293b;
    font-weight: 600;
    color: #f59e0b;
}


/* ========================================
   8. BOXES & CONTAINERS
   ======================================== */

.note {
    background: #1e2a3a;
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    border-radius: 12px;
    margin: 1.2rem 0;
    color: #f1f5f9;
}

.example-box {
    background: #0d1f2c;
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin: 1.2rem 0;
    border: 1px solid #2d3a4a;
}

.example-box h4 {
    color: #f59e0b;
    margin-bottom: 0.5rem;
}

.section-pause {
    background: #1e2a3a;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin: 1.5rem 0;
}

.info-box {
    background: #1e2a3a;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin: 1.2rem 0;
}

.info-box-title {
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #f0f4fa;
}

.info-box-title a {
    color: #f59e0b;
    text-decoration: none;
}

.info-box-title a:hover {
    text-decoration: underline;
}

.info-box-desc {
    color: #9aaebf;
    margin-bottom: 0;
}


/* ========================================
   9. USE CASE GRID
   ======================================== */

.use-case-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.2rem 0;
}

.use-case-item {
    background: #1e2a3a;
    padding: 1rem;
    border-radius: 12px;
    border-left: 3px solid #f59e0b;
}

.use-case-item h4 {
    color: #f59e0b;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}


/* ========================================
   10. CONTACT & FOOTER
   ======================================== */

.contact-links {
    background: #1e2a3a;
    padding: 1rem;
    border-radius: 16px;
    margin: 2rem 0 1rem 0;
}

.contact-links p {
    margin: 0.5rem 0;
}

.footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    font-size: 0.9rem;
    color: #7f8ea3;
    border-top: 1px solid #2d3a4a;
}


/* ========================================
   11. TABLE OF CONTENTS
   ======================================== */

.toc a {
    color: #e2e8f0;
    text-decoration: none;
}

.toc a:hover {
    color: #f59e0b;
    text-decoration: underline;
}

.toc-epic {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 2rem;
    padding: 0;
    list-style: none;
}

.toc-epic li {
    padding: 0.4rem 0;
    border-bottom: 1px solid #1e2a3a;
}

.toc-epic a {
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.toc-epic a:hover {
    color: #f59e0b;
}


/* ========================================
   12. CONVERSATION STYLES (Showcase Pages)
   ======================================== */

.conversation {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

/* ----- User Message ----- */
.message-user {
    align-self: flex-end;
    background: #1e2a3a;
    border-left: 4px solid #f59e0b;
    border-radius: 16px;
    padding: 1rem 1.4rem;
    max-width: 92%;
    color: #f1f5f9;
}

.message-user .sender {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #f59e0b;
    margin-bottom: 0.3rem;
}

.message-user .content {
    font-size: 0.98rem;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* ----- BR9 / AI Message ----- */
.ds-message {
    align-self: flex-start;
    max-width: 92%;
    width: 100%;
}

.ds-message .think-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    color: #7f8ea3;
    font-size: 0.85rem;
    cursor: pointer;
}

.ds-message .think-header .label {
    font-weight: 500;
}

.ds-message .think-header .arrow {
    font-size: 14px;
}

.ds-message .think-content {
    background: #0d1f2c;
    border-left: 2px solid #4b5563;
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    margin: 0.3rem 0 0.8rem 0;
    color: #c4b5d4;
    font-style: italic;
    font-size: 0.92rem;
    line-height: 1.6;
}

.ds-message .main-response {
    background: #0d1f2c;
    border-left: 4px solid #3b82f6;
    border-radius: 16px;
    padding: 1rem 1.4rem;
    color: #e2e8f0;
    font-size: 0.98rem;
    line-height: 1.7;
}

.ds-message .main-response .sender-label {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #60a5fa;
    margin-bottom: 0.3rem;
}

.ds-message .main-response table {
    margin: 0.8rem 0;
}

.ds-message .main-response blockquote {
    border-left: 3px solid #4b5563;
    padding-left: 1rem;
    margin: 0.5rem 0;
    color: #9aaebf;
    font-style: italic;
}

.ds-message .main-response code {
    background: #1e293b;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #fcd34d;
}

.ds-message .main-response h2 {
    font-size: 1.3rem;
    color: #f0f4fa;
    margin: 1rem 0 0.5rem 0;
    border-bottom: none;
}

.ds-message .main-response h3 {
    font-size: 1.1rem;
    color: #cbd5e6;
    margin: 0.8rem 0 0.4rem 0;
}

.ds-message .main-response h4 {
    font-size: 1rem;
    color: #f0f4fa;
    margin: 0.8rem 0 0.3rem 0;
}

.ds-message .main-response hr {
    border: none;
    height: 1px;
    background: #2d3a4a;
    margin: 0.8rem 0;
}


/* ========================================
   13. TAKEAWAYS
   ======================================== */

.takeaways {
    background: #121214;
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid #2d3a4a;
}

.takeaways h2 {
    color: #f0f4fa;
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid #2d3a4a;
    padding-bottom: 0.5rem;
}

.takeaways ul {
    list-style: none;
    padding: 0;
}

.takeaways ul li {
    padding: 0.6rem 0;
    border-bottom: 1px solid #1e2a3a;
    color: #e2e8f0;
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.takeaways ul li:last-child {
    border-bottom: none;
}

.takeaways .icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.takeaways .label {
    font-weight: 600;
    color: #f59e0b;
}

.takeaways-footer {
    color: #9aaebf;
    margin-top: 1.2rem;
    font-style: italic;
}


/* ========================================
   14. KHADER STORY SPECIFIC STYLES
   ======================================== */

.story-intro {
    background: #0d1f2c;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.intro-headline {
    font-size: 1.2rem;
    font-weight: bold;
    color: #f59e0b;
    margin-bottom: 0.5rem;
}

.intro-quote {
    border-left: 3px solid #f59e0b;
    padding-left: 1rem;
    margin: 0.5rem 0;
    color: #9aaebf;
    font-style: italic;
}

.intro-body {
    color: #e2e8f0;
    margin-top: 0.5rem;
}

.term-definition {
    margin-bottom: 1.2rem;
}

.term-definition em {
    color: #9aaebf;
}

.event-heading {
    font-size: 1.3rem;
    color: #cbd5e6;
    margin-top: 1em;
}

.answer-item {
    margin-bottom: 1rem;
}

.answer-item em {
    color: #9aaebf;
}

.imam-quote {
    background: #0d1f2c;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin: 1.2rem 0;
}

.imam-quote p {
    color: #e2e8f0;
    margin: 0.5rem 0;
}

.imam-quote em {
    color: #9aaebf;
}

.pattern-analysis {
    margin: 1rem 0;
}

.pattern-analysis p {
    margin-bottom: 0.8rem;
    color: #e2e8f0;
}

.verses-block {
    background: #0d1f2c;
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin: 1.2rem 0;
    border: 1px solid #2d3a4a;
}

.verses-block p {
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}


/* ========================================
   15. BACK BUTTONS
   ======================================== */

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #f59e0b;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.4rem 0;
    position: relative;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.btn-back .arrow {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn-back::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #f59e0b;
    transition: width 0.3s ease;
}

.btn-back:hover::after {
    width: 100%;
}

.btn-back:hover .arrow {
    transform: translateX(-4px);
}

.btn-back:hover {
    color: #fcd34d;
}


/* ========================================
   16. FANCY BUTTONS
   ======================================== */

/* ----- Gold Glow Button ----- */
.btn-gold {
    display: inline-block;
    padding: 0.7rem 2rem;
    background: transparent;
    color: #f59e0b;
    border: 2px solid #f59e0b;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-gold:hover {
    background: #f59e0b;
    color: #151517;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
}

.btn-gold:active {
    transform: scale(0.97);
}

.btn-gold .icon {
    margin-right: 0.5rem;
}


/* ========================================
   17. SHOWCASE GRID
   ======================================== */

.showcase-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.showcase-card {
    background: #0d1f2c;
    border: 1px solid #2d3a4a;
    border-radius: 12px;
    padding: 1.5rem 1.8rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.showcase-card:hover {
    border-color: #f59e0b44;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.05);
}

.showcase-card .btn-gold {
    width: 100%;
    text-align: center;
}

.showcase-desc {
    color: #9aaebf;
    font-size: 0.92rem;
    margin-top: 0.6rem;
    margin-bottom: 0;
    text-align: center;
    line-height: 1.5;
}

.showcase-desc::before {
    content: '▸ ';
    color: #f59e0b;
    opacity: 0.6;
}


/* ========================================
   18. EPIC STYLES – Grand & Cinematic
   ======================================== */

/* ----- Epic Hero ----- */
.epic-hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(ellipse at 50% 50%, #1a1208 0%, #0d0d0f 70%);
    overflow: hidden;
    padding: 4rem 2rem;
    border-radius: 24px;
    margin-bottom: 3rem;
    border: 1px solid #f59e0b11;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: #f59e0b22;
    border: 1px solid #f59e0b44;
    padding: 0.3rem 1.2rem;
    border-radius: 30px;
    font-size: 0.7rem;
    color: #f59e0b;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    animation: fade-in-down 0.8s ease forwards;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    color: #f0f4fa;
    margin: 0;
    letter-spacing: -0.03em;
    line-height: 1.1;
    animation: fade-in-up 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-title .gold {
    color: #f59e0b;
    text-shadow: 0 0 40px rgba(245, 158, 11, 0.3);
}

.hero-subtitle {
    font-size: 1.6rem;
    color: #9aaebf;
    margin-top: 0.5rem;
    font-weight: 300;
    animation: fade-in-up 0.8s ease 0.4s forwards;
    opacity: 0;
}

.hero-subtitle .gold {
    color: #f59e0b;
}

.hero-desc {
    font-size: 1.15rem;
    color: #9aaebf;
    max-width: 600px;
    margin: 1.5rem auto;
    line-height: 1.8;
    animation: fade-in-up 0.8s ease 0.6s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    animation: fade-in-up 0.8s ease 0.8s forwards;
    opacity: 0;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    animation: bounce 2s infinite;
    color: #7f8ea3;
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-scroll .arrow {
    font-size: 1.2rem;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-down {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ----- Epic Buttons ----- */
.btn-epic {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 2.5rem;
    background: #f59e0b;
    color: #151517;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.4s ease;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.2);
    cursor: pointer;
}

.btn-epic:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 50px rgba(245, 158, 11, 0.4);
    color: #151517;
    text-decoration: none;
}

.btn-epic .arrow {
    transition: transform 0.3s ease;
}

.btn-epic:hover .arrow {
    transform: translateX(5px);
}

.btn-epic-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    background: transparent;
    color: #f59e0b;
    border: 2px solid #f59e0b44;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s ease;
    cursor: pointer;
}

.btn-epic-outline:hover {
    border-color: #f59e0b;
    background: #f59e0b22;
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.1);
    text-decoration: none;
}

/* ----- Section Dividers ----- */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0 2rem 0;
    color: #7f8ea3;
}

.section-divider .line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #f59e0b33, transparent);
}

.section-divider .ornament {
    color: #f59e0b44;
    font-size: 1.2rem;
    letter-spacing: 0.5rem;
}

/* ----- Glass Cards ----- */
.glass-card {
    background: rgba(13, 31, 44, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid #2d3a4a55;
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.4s ease;
}

.glass-card:hover {
    border-color: #f59e0b44;
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.06);
    transform: translateY(-4px);
}

/* ----- Gold Accent Underline ----- */
.gold-underline {
    position: relative;
    display: inline-block;
}

.gold-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 60px;
    height: 3px;
    background: #f59e0b;
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}


/* ========================================
   19. SITE HEADER – Fixed Navigation
   ======================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(180deg, #0d0d0f 0%, #151517 100%);
    border-bottom: 1px solid #f59e0b22;
    padding: 0.8rem 2rem;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    border-bottom-color: #f59e0b44;
    box-shadow: 0 4px 30px rgba(245, 158, 11, 0.05);
}

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

/* ----- Logo ----- */
.header-logo a {
    display: flex;
    align-items: center;
    gap: 0rem;
    text-decoration: none;
}

.header-logo-img {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}

.header-logo a:hover .header-logo-img {
    transform: scale(1.05);
}

.header-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f0f4fa;
    letter-spacing: -0.02em;
}

.header-logo-text .gold {
    color: #f59e0b;
}

/* ----- Navigation Links ----- */
.header-links {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-links li {
    position: relative;
}

.header-links a {
    display: block;
    padding: 0.5rem 1rem;
    color: #9aaebf;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.header-links a:hover {
    color: #f59e0b;
    background: #f59e0b11;
}

/* ----- Dropdown ----- */
.header-dropdown .dropdown-arrow {
    font-size: 0.7rem;
    margin-left: 0.2rem;
    transition: transform 0.3s ease;
}

.header-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #1e2a3a;
    border: 1px solid #f59e0b33;
    border-radius: 12px;
    padding: 0.5rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    color: #e2e8f0;
    border-radius: 0;
}

.dropdown-menu a:hover {
    background: #f59e0b22;
    color: #f59e0b;
}

/* ----- Mobile Toggle ----- */
.header-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
}

.header-toggle span {
    display: block;
    width: 28px;
    height: 2.5px;
    background: #e2e8f0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.header-toggle:hover span {
    background: #f59e0b;
}


/* ========================================
   20. BACK TO TOP BUTTON
   ======================================== */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: #1e2a3a;
    border: 1px solid #f59e0b44;
    border-radius: 50%;
    color: #f59e0b;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.back-to-top:hover {
    background: #f59e0b;
    color: #151517;
    border-color: #f59e0b;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}


/* ========================================
   21. RESPONSIVE
   ======================================== */

/* ----- Tablet & Small Screens ----- */
@media (max-width: 768px) {
    body {
        padding-top: 65px;
    }

    .site-header {
        padding: 0.6rem 1rem;
    }

    .header-logo-text {
        font-size: 1.1rem;
    }

    .header-logo-img {
        height: 35px;
    }

    .header-toggle {
        display: flex;
    }

    .header-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #0d0d0f;
        border-bottom: 1px solid #f59e0b33;
        padding: 1rem;
        gap: 0.2rem;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .header-links.active {
        display: flex;
    }

    .header-links a {
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
        width: 100%;
    }

    .header-dropdown .dropdown-menu {
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-left: 1rem;
        display: none;
    }

    .header-dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* ----- Mobile ----- */
@media (max-width: 700px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 1.8rem;
    }

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

    .hero-title.epic {
        font-size: 2.8rem;
    }

    .use-case-grid {
        grid-template-columns: 1fr;
    }

    .pattern-table {
        font-size: 0.8rem;
    }

    .toc-epic {
        grid-template-columns: 1fr;
    }

    .epic-hero {
        min-height: 70vh;
        padding: 3rem 1rem;
        border-radius: 16px;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-epic,
    .btn-epic-outline {
        width: 100%;
        justify-content: center;
    }

    .back-to-top {
        bottom: 1.2rem;
        right: 1.2rem;
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
}

/* ========================================
   22. SITE FOOTER – Full Width (No Scroll Bar)
   ======================================== */

.site-footer {
    width: 100%;
    background: #0d0d0f;
    border-top: 1px solid #2d3a4a;
    margin-top: 3rem;
    padding: 2.5rem 0 1.5rem;
    transition: all 0.3s ease;
    overflow-x: hidden;
}

.site-footer:hover {
    border-top-color: #f59e0b33;
}

/* ----- Footer Inner (Centered Content) ----- */
.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ----- Footer Top ----- */
.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}

/* Brand */
.footer-brand {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.footer-logo {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.footer-brand:hover .footer-logo {
    transform: scale(1.05);
}

.footer-brand-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f0f4fa;
    letter-spacing: -0.02em;
}

.footer-brand-name .gold {
    color: #f59e0b;
}

.footer-brand-desc {
    font-size: 0.85rem;
    color: #7f8ea3;
    margin: 0.2rem 0 0;
    max-width: 280px;
    line-height: 1.5;
}

/* Footer Links */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
}

.footer-links-col h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #f59e0b;
    margin: 0 0 0.6rem 0;
    font-weight: 600;
}

.footer-links-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-col ul li {
    margin-bottom: 0.4rem;
    padding: 0; /* Remove any padding on list items */
}

.footer-links-col ul li a {
    color: #9aaebf;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block; /* Prevents layout shift */
}

.footer-links-col ul li a:hover {
    color: #f59e0b;
    transform: translateX(4px); /* Smooth shift without layout shift */
}

/* ----- Footer Divider ----- */
.footer-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.8rem 0 1.2rem;
}

.footer-ornament {
    color: #f59e0b33;
    font-size: 1rem;
    letter-spacing: 0.5rem;
}

/* ----- Footer Bottom ----- */
.footer-bottom {
    text-align: center;
}

.footer-copy {
    font-size: 0.95rem;
    color: #e2e8f0;
    margin: 0 0 0.3rem;
}

.footer-copy strong {
    color: #f59e0b;
}

.footer-ethos {
    font-size: 0.9rem;
    color: #7f8ea3;
    margin: 0 0 0.3rem;
}

.footer-meta {
    font-size: 0.8rem;
    color: #5f6f7f;
    margin: 0;
}


/* ----- Responsive Footer ----- */
@media (max-width: 768px) {
    .site-footer {
        padding: 1.5rem 0 1rem;
        margin-top: 2rem;
    }

    .footer-inner {
        padding: 0 1.2rem;
    }

    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-brand {
        flex-direction: column;
        text-align: center;
    }

    .footer-brand-desc {
        max-width: 100%;
    }

    .footer-links {
        justify-content: center;
        gap: 1.5rem;
        width: 100%;
    }

    .footer-links-col {
        text-align: center;
        min-width: 100px;
    }

    .footer-links-col ul li a:hover {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .footer-links-col {
        min-width: auto;
    }

    .footer-logo {
        height: 40px;
    }

    .footer-brand-name {
        font-size: 1.2rem;
    }
}

/* ----- Footer Brand / Logo ----- */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

.footer-logo-link {
    display: flex;
    align-items: center;
    gap: 0rem;
    text-decoration: none;
}

.footer-logo-img {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.footer-logo-link:hover .footer-logo-img {
    transform: scale(1.05);
}

.footer-logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f0f4fa;
    letter-spacing: -0.02em;
}

.footer-logo-text .gold {
    color: #f59e0b;
}

.footer-brand-desc {
    font-size: 0.85rem;
    color: #7f8ea3;
    margin: 0;
    max-width: 280px;
    line-height: 1.5;
}

/* ----- Responsive Footer ----- */
@media (max-width: 768px) {
    .site-footer {
        padding: 1.5rem 0 1rem;
        margin-top: 2rem;
    }

    .footer-inner {
        padding: 0 1.2rem;
    }

    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    /* ----- Center the logo on mobile ----- */
    .footer-brand {
        align-items: center;
        text-align: center;
    }

    .footer-brand-desc {
        max-width: 100%;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        gap: 1.5rem;
        width: 100%;
    }

    .footer-links-col {
        text-align: center;
        min-width: 100px;
    }

    .footer-links-col ul li a:hover {
        padding-left: 0;
    }
}