﻿/* =========================================================
   Coral Coven — Master Stylesheet
   COMPLETE: Fixed Card Padding, Specs Layout & Mobile Nav
========================================================= */

/* =========================
   1. Variables & Fonts
========================= */
:root {
    /* Colors */
    --bg: #000000;
    --fg: #f4ecd8;
    --muted: #b9b2a2;
    --accent: #ed5c4c;
    --reef: #2aa9b0;
    --reef-light: #6ccfe0;
    /* Layout Dimensions */
    --site-width: 1200px;
    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Lato', sans-serif;
}

/* =========================
   2. Reset & Base
========================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    background-color: var(--bg);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    background-color: transparent;
    color: var(--fg);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("/Images/spaceinvader.jpg");
    background-size: cover;
    background-position: center;
    filter: blur(2px) grayscale(0.45) brightness(0.3);
    opacity: 0.25;
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    margin-top: 0;
/*    text-transform: uppercase;*/
    letter-spacing: 0.05em;
}

a {
    color: var(--fg);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================
   3. Header & Navigation
========================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0,0,0,0.85);
    border-bottom: 1px solid rgba(244,236,216,0.08);
    backdrop-filter: blur(8px);
    width: 100%;
}

.site-header-inner {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-shrink: 0;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #fff;
    white-space: nowrap;
}

/* Nav */
.site-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    -webkit-user-select: none;
    user-select: none;
}

    .site-nav a, .nav-link, .nav-dropdown .nav-link {
        font-family: var(--font-heading);
        font-size: 0.85rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        color: rgba(244,236,216,0.7);
        text-transform: uppercase;
        cursor: pointer;
        transition: all 0.2s ease;
        position: relative;
    }

        .site-nav a:hover, .nav-link:hover, .nav-dropdown:hover .nav-link {
            color: #fff;
            text-shadow: 0 0 12px rgba(108, 207, 224, 0.8);
            transform: translateY(-1px);
        }

/* Dropdown */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

.nav-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    margin-top: 0.5rem;
    min-width: 280px;
    background: #080808;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 0.5rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 15px 50px rgba(0,0,0,0.9);
    z-index: 1000;
}

.nav-dropdown:hover .nav-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 1rem;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0;
    text-transform: none;
    width: 100%;
}

    .nav-menu a:hover {
        background: rgba(255,255,255,0.08);
        color: #fff;
        text-shadow: none;
        transform: none;
    }

.nav-menu img {
    width: 100px;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.1);
}

/* =========================
   4. Layouts (Hero & Sections)
========================= */
.coven-hero {
    position: relative;
    max-width: var(--site-width);
    margin: 2rem auto 4rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    background: #000;
}

    .coven-hero img {
        width: 100%;
        animation: covenZoom 1.5s ease-out forwards;
    }

    .coven-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.5) 70%, rgba(0,0,0,0.95) 100%);
        pointer-events: none;
    }

.coven-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem 3rem;
    z-index: 2;
}

    .coven-hero-content h1 {
        font-size: clamp(2rem, 5vw, 2.8rem);
        font-weight: 700;
        color: #fff;
        margin-bottom: 0.5rem;
        text-shadow: 0 4px 15px rgba(0,0,0,0.6);
    }

.coven-badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    color: rgba(255,255,255,0.9);
}

.coven-hero.slim {
    height: 400px;
}

    .coven-hero.slim img {
        height: 100%;
        width: 100%;
        object-fit: cover;
        object-position: center 25%;
    }

    .coven-hero.slim .coven-hero-content {
        left: auto;
        right: 0;
        text-align: right;
        padding-bottom: 1.5rem;
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    }

    .coven-hero.slim h1 {
        font-size: 2.2rem;
        margin-bottom: 0;
    }

    .coven-hero.slim .coven-badge {
        margin-bottom: 0.5rem;
        display: inline-block;
    }

.coven-section {
    max-width: 900px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

    .coven-section h2 {
        color: var(--reef-light);
        font-size: 1rem;
        letter-spacing: 0.2em;
        border-bottom: 1px solid rgba(108, 207, 224, 0.3);
        padding-bottom: 1rem;
        margin-bottom: 2rem;
        font-weight: bold;
    }

    .coven-section p {
        font-size: 1.05rem;
        color: rgba(244, 236, 216, 0.9);
        margin-bottom: 1.5rem;
    }

/* --- SECTION HEADER --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Align bottom */
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}

    .section-header h2 {
        border: none;
        margin: 0;
        padding: 0;
        font-size: 1.5rem;
        color: #fff;
    }

    .section-header span {
        font-size: 0.8rem;
        color: var(--muted);
    }

.view-all-link {
    font-size: 0.75rem;
    color: var(--reef-light);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(108, 207, 224, 0.3);
    border-radius: 50px;
    transition: all 0.2s;
    background: rgba(108, 207, 224, 0.05);
}

    .view-all-link:hover {
        background: rgba(108, 207, 224, 0.15);
        color: #fff;
        border-color: var(--reef-light);
        transform: translateX(3px);
    }

/* --- SPECS LISTS (FIXED) --- */
.coven-list {
    list-style: none;
    padding: 0;
}

    .coven-list li {
        display: flex; /* Default Desktop: Side by Side */
        justify-content: space-between;
        padding: 0.85rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        line-height: 1.6;    }

    .coven-list li, .coven-list p {
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        margin: 0px;
        color: var(--muted);
    }

    .coven-list span {
        color: #fffffff2;
        font-weight: 500;
    }

    /* --- INHABITANTS GRID --- */
    .coven-inhabitants-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
        width: 100%;
    }

    .coven-inhabitants-grid figure {
        margin: 0;
        background: rgba(255,255,255,0.03);
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 12px;
        overflow: hidden;
        transition: transform 0.2s ease;
    }

        .coven-inhabitants-grid figure:hover {
            transform: translateY(-5px);
            border-color: rgba(255,255,255,0.2);
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        }

    .coven-inhabitants-grid img {
        width: 100%;
        object-fit: cover;
    }

    .coven-inhabitants-grid figcaption {
        padding: 1rem;
    }

    .coven-inhabitants-grid strong {
        display: block;
        font-family: var(--font-heading);
        font-size: 0.9rem;
        color: #fff;
        margin-bottom: 0.2rem;
    }

    .coven-inhabitants-grid em {
        display: block;
        font-style: italic;
        font-size: 0.8rem;
        color: var(--reef);
        margin-bottom: 0.5rem;
    }

    .coven-inhabitants-grid span {
        font-size: 0.7rem;
        opacity: 0.6;
    }

/* --- CARD SYSTEM (FIXED PADDING) --- */
.coven-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    width: 100%;
}

.coven-card {
    background: #080808;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 2rem; /* RESTORED PADDING FOR TEXT CARDS */
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .coven-card:hover {
        transform: translateY(-5px);
        border-color: var(--reef-light);
    }

/* SPECIAL CARDS (Images) - Remove padding */
.system-card, .article-card {
    padding: 0 !important;
}

.card-img-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    height: 200px;
}

    .card-img-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

.coven-card:hover .card-img-container img {
    transform: scale(1.05);
}

.system-card .card-img-container {
    height: 180px;
}

.article-thumb {
    height: 160px;
}

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
    background: linear-gradient(to bottom, #101010, #050505);
}

    .card-body h3 {
        margin-top: 0;
        margin-bottom: 0.5rem;
        font-size: 1.1rem;
        color: #fff;
    }

    .card-body p {
        font-size: 0.9rem;
        color: var(--muted);
        line-height: 1.5;
        margin: 0;
    }

/* --- BADGES --- */
.mini-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: inline-block !important;
    width: fit-content !important;
    height: auto !important;
    padding: 0.3rem 0.6rem;
    font-size: 0.6rem;
    font-weight: 800;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    color: #fff;
}

.disease {
    background: #ed5c4c;
}

.build {
    background: #2aa9b0;
}

.protocol {
    background: #ed5c4c;
}

.case-study {
    background: #d4a017;
    color: #000 !important;
}

/* =========================
   5. Home Splash (Index)
========================= */
.hero-full {
    min-height: 94vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: url("/Images/main.jpg") center / cover no-repeat;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 100%;
}

.hero-logo {
    width: 130px;
    height: 130px;
    background: rgba(0,0,0,0.4);
    border-radius: 50%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    opacity: 0;
    transform: scale(0.8);
    animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: 0.2s;
}

.hero-glass {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    max-width: 650px;
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s ease-out forwards;
    animation-delay: 0.4s;
}

.hero-title {
    font-size: 3rem;
    color: var(--fg);
    text-shadow: 0 5px 20px rgba(0,0,0,0.8);
    margin: 0;
    word-wrap: break-word;
}

.hero-divider {
    margin: 1.5rem auto;
    width: 140px;
    height: 1px;
    border: none;
    background: linear-gradient(90deg, transparent 0%, var(--reef-light) 50%, transparent 100%);
    box-shadow: 0 0 12px rgba(108, 207, 224, 0.6);
}

.hero-tagline {
    font-size: 1.1rem;
    font-weight: 300;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

.social-area {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(10px);
    animation: slideUp 0.8s ease-out forwards;
    animation-delay: 0.6s;
    width: 100%;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50px;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .social-btn svg {
        width: 18px;
        height: 18px;
        fill: currentColor;
    }

    .social-btn:hover {
        background: #fff;
        color: #000;
        transform: translateY(-3px);
        box-shadow: 0 0 20px rgba(255,255,255,0.4);
    }

@keyframes covenZoom {
    from {
        transform: scale(1.05);
    }

    to {
        transform: scale(1);
    }
}

@keyframes popIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* =======================================
   6. Mobile Optimization
======================================= */
@media (max-width: 900px) {
    .site-header-inner {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem;
    }

    .site-nav {
        width: 100%;
        justify-content: center;
        gap: 1.25rem;
        flex-wrap: wrap;
    }

    .nav-link {
        font-size: 0.75rem;
    }

    .hero-full {
        min-height: auto !important;
        padding-top: 8vh;
        padding-bottom: 8vh;
    }

    .hero-glass {
        padding: 1.5rem;
        width: 90%;
        max-width: 100%;
        margin-top: -1rem;
    }

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

    .hero-tagline {
        font-size: 0.9rem;
    }

    .coven-section {
        padding: 0 1rem;
        max-width: 100vw;
    }

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

    .coven-hero-content h1 {
        font-size: 1.5rem !important;
        line-height: 1.1;
    }

    .coven-badge {
        font-size: .65rem !important;
    }

    /* LIST FIX FOR MOBILE: Stacked Layout */
    .coven-list li {
        display: block;
    }

        .coven-list li strong {
            display: block;
            margin-bottom: 0.2rem;
            color: var(--reef-light);
        }
}

/* =========================
   7. Footer
========================= */
.site-footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: .5rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: auto;
    width: 100%;
}

    .site-footer a {
        color: #ccc;
        text-decoration: none;
        margin: 0 0.5rem;
    }

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

/* ... (Contact Modal) ... */
.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
}

    .contact-modal[aria-hidden="false"] {
        display: block;
    }

.contact-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
}

.contact-panel {
    position: relative;
    max-width: 500px;
    margin: 10vh auto;
    padding: 2.5rem;
    background: #0b0b0b;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.9);
}

    .contact-panel input, .contact-panel textarea {
        width: 100%;
        margin: 0.5rem 0 1.5rem;
        padding: 0.8rem;
        background: rgba(255,255,255,0.03);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 8px;
        color: #fff;
        font-family: var(--font-body);
    }

.contact-submit {
    width: 100%;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .contact-submit:hover {
        background: rgba(255,255,255,0.1);
        border-color: var(--reef-light);
    }

.contact-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================
   8. The Grimoire (Article Styles)
========================= */
.article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    max-width: var(--site-width); /* USES VARIABLE */
    margin: 0 auto 6rem;
    padding: 0 1.5rem;
    position: relative;
    width: 100%;
}

@media (min-width: 1024px) {
    .article-layout {
        grid-template-columns: minmax(0, 1fr) 340px;
        align-items: start;
    }
}

.article-content {
    min-width: 0;
    width: 100%;
}

    .article-content h2 {
        color: var(--reef-light);
        border-bottom: 1px solid rgba(108, 207, 224, 0.2);
        padding-bottom: 0.8rem;
        margin-top: 4rem;
        margin-bottom: 2rem;
        font-size: 1.5rem;
        letter-spacing: 0.1em;
    }

    .article-content h3 {
        color: #fff;
        margin-top: 3rem;
        margin-bottom: 1rem;
        font-size: 1.2rem;
    }

.lead {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.95);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    border-left: 4px solid var(--accent);
    padding-left: 2rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.85);
}

.spec-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin: 1.5rem 0;
    align-items: baseline;
    width: 100%;
}

.spec-label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--reef-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    margin-top: 1rem;
}

.spec-content {
    color: #fff;
    line-height: 1.6;
}

@media (min-width: 900px) {
    .spec-grid {
        grid-template-columns: 110px 1fr;
        gap: 1.5rem;
    }

    .spec-label {
        text-align: right;
        margin-top: 0;
        color: var(--muted);
    }
}

.calc-widget {
    background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
    width: 100%;
}

.calc-row {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

    .calc-row label {
        font-size: 0.8rem;
        color: var(--muted);
        margin-bottom: 0.5rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }

    .calc-row input, .calc-row select {
        background: #050505;
        border: 1px solid #333;
        color: #fff;
        padding: 1rem;
        border-radius: 8px;
        font-family: var(--font-body);
        font-size: 1rem;
        outline: none;
        width: 100%;
    }

.calc-result {
    background: rgba(0,0,0,0.3);
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--reef);
    margin-top: 1rem;
}

.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding-right: 1rem;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--reef) rgba(0,0,0,0.3);
    width: 100%;
}

    .article-sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .article-sidebar::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.1);
        border-radius: 4px;
    }

    .article-sidebar::-webkit-scrollbar-thumb {
        background-color: var(--reef);
        border-radius: 4px;
    }

.sidebar-widget {
    background: #080808;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    width: 100%;
}

    .sidebar-widget h4 {
        color: var(--muted);
        font-size: 0.75rem;
        font-weight: 800;
        margin-bottom: 1.5rem;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 1rem;
    }

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2rem 0;
    width: 100%;
}

@media (min-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.comparison-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.15);
    width: 100%;
}

    .comparison-card img, .comparison-card video {
        width: 100%;
        height: 250px;
        object-fit: cover;
        display: block;
    }

.comparison-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
    padding: 0.8rem 1.2rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.supply-link {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    margin-bottom: 0.8rem;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s;
    width: 100%;
}

    .supply-link:hover {
        background: rgba(255,255,255,0.08);
        border-color: var(--reef-light);
        transform: translateX(5px);
    }

    .supply-link img {
        width: 45px;
        height: 45px;
        object-fit: contain;
        background: #fff;
        border-radius: 6px;
        padding: 4px;
    }

/* ======================================================
   SURGICAL MOBILE FIXES (Safe to Add at Bottom)
   ====================================================== */

/* 1. FIX SQUISHED TEXT IN LISTS */


/* 2. FIX HORIZONTAL SCROLL (The Grid) */
/* Forces cards to fit the screen width on phones */
@media (max-width: 768px) {
    .coven-card-grid {
        /* Force 1 column so cards don't push off screen */
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* Reduce side padding so content fits */
    .coven-section {
        padding: 0 1rem !important;
        max-width: 100vw;
        overflow-x: hidden; /* Safety net just for sections */
    }

    /* Fix Header Width causing scroll */
    .site-header-inner {
        padding: 1rem !important;
        width: 100%;
    }

    .coven-inhabitants-grid {
        display: block;
    }
}
/* ======================================================
   9. CONTACT MODAL (NEW)
   ====================================================== */

/* The dark background overlay */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 9999;
    /* Center the modal */
    display: flex;
    align-items: center;
    justify-content: center;
    /* Hidden state (default) */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

    /* The "Show" state - Triggered by JS */
    .modal-backdrop[aria-hidden="false"] {
        opacity: 1;
        pointer-events: auto;
    }

/* The actual box containing the form */
.modal-content {
    background: #0a0a0a;
    border: 1px solid #333;
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    position: relative;
    max-height: 90vh; /* Prevents cut-off on small screens */
    overflow-y: auto; /* Adds scroll if form is too tall */
}

/* Header row with Close button */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #222;
    padding-bottom: 1rem;
}

    .modal-header h3 {
        margin: 0;
        font-family: var(--font-heading);
        color: var(--reef-light);
        font-size: 1.2rem;
    }

.close-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}

    .close-btn:hover {
        color: #fff;
    }

/* Form inputs */
.form-group {
    margin-bottom: 1.25rem;
}

    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        color: #aaa;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid #333;
        color: #fff;
        border-radius: 4px;
        font-family: inherit;
        outline: none;
        transition: border-color 0.2s;
    }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            border-color: var(--reef);
        }
/* FIX FOR INVISIBLE DROPDOWN OPTIONS */
#contact-topic option {
    background-color: #111; /* Dark background for the list */
    color: #fff; /* White text */
    padding: 10px;
}

/* CONTACT SUBMIT BUTTON STYLING */
#contact-submit {
    background: var(--reef); /* Teal background */
    color: #000; /* Black text for contrast */
    font-family: var(--font-heading); /* Cinzel Font */
    font-weight: bold;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

    /* Hover State - Clean Lift (No Neon Glow) */
    #contact-submit:hover {
        background: #fff; /* Turns white */
        color: #000; /* Black text */
        transform: translateY(-2px); /* Slight lift */
        box-shadow: 0 5px 15px rgba(0,0,0,0.3); /* Soft shadow for depth, not glow */
    }

    /* Active/Click State */
    #contact-submit:active {
        transform: translateY(0);
    }

    /* Disabled State (While Sending) */
    #contact-submit:disabled {
        background: #333;
        color: #777;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

/* --- NEW DETACHED HERO STYLES --- */
.hero-showcase {
    display: flex;
    flex-direction: column;
    margin: 0 auto 3rem auto;
    max-width: 1000px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    /* Removed solid background so the glass blur works */
}

.hero-showcase-img {
    width: 100%;
    height: auto;
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;
    display: block;
}

.hero-showcase-text {
    background: rgba(0, 0, 0, 0.3); /* Dark semi-transparent base */
    backdrop-filter: blur(10px); /* The glassmorphism blur */
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0 0 12px 12px;
    padding: 2rem 1rem;
    text-align: center;
}

    .hero-showcase-text h1 {
        color: #fff;
        margin: 0 0 0.8rem 0;
        font-size: 2.1rem;
        text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    }