:root {
    /* Visual Signals - Nocturnal "End of Night" Palette (Sovereign Identity) */
    --color-bg: #05070A;
    /* True Night */
    --color-primary: #97864B;
    /* Olive Gold Square */
    --color-secondary: #3D5174;
    /* Nocturnal Blue from FAJR Text */
    --color-accent: #6B8E23;
    /* Brighter Olive for glow */
    --color-text-light: #E2E8F0;
    /* Off-white for dark bg */
    --color-text-dim: #94A3B8;
    /* Muted gray */
    --color-white: #FFFFFF;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --container-max-width: 1200px;
    --header-height: 105px;
    --logo-boundary-nudge: -44px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

h1,
h2,
h3,
h4,
.font-heading {
    font-family: var(--font-heading);
    font-weight: 700;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Dual Language Typography --- */
.lang-dual {
    display: flex;
    flex-direction: column;
    align-items: inherit;
    line-height: 1.1;
}

.ar-main {
    font-family: 'ANefelBotan', serif;
    display: block;
    font-size: 2.2rem;
    /* Increased base scale */
}

.en-sub {
    font-family: 'Outfit', sans-serif;
    font-size: 0.5rem;
    /* Even smaller English */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.6;
    display: block;
    margin-top: -1px;
}

/* Nav specific bilingual scale */
nav .lang-dual {
    align-items: center;
}

nav .ar-main {
    font-size: 1.5rem;
    /* Magnified Nav Arabic */
}

nav .en-sub {
    font-size: 0.7rem;
    /* Magnified Nav English */
    opacity: 0.6;
}

/* Specific scaling for the Hero bundle */
.hero-title-bundle .ar-main {
    font-size: 7.5rem;
    /* Slightly Scaled Up */
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.hero-title-bundle .en-sub {
    font-size: 1.5rem;
    /* Slightly Scaled Up */
    letter-spacing: 5px;
    opacity: 0.8;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-heading);
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 4px;
    /* Slightly softened for the olive theme */
    font-weight: 700;
}

.btn-primary:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 93, 35, 0.3);
}

.btn-outline {
    border: 2px solid var(--color-white);
    color: var(--color-white);
}

.btn-outline:hover {
    background-color: var(--color-white);
    color: var(--color-secondary);
}

/* --- Core Structure (Emulating FIDF) --- */

/* Alert Bar Removed for Identity */

header {
    height: var(--header-height);
    background-color: #000000;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9000;
    transition: var(--transition-smooth);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    position: relative;
    padding: 0 2rem;
}


.nav-container {
    margin-left: auto;
    padding-right: 2rem;
    z-index: 9100;
}

.logo-horizon-wrap {
    position: absolute;
    left: 10px;
    bottom: var(--logo-boundary-nudge);
    z-index: 9200;
}

.horizon-logo-img {
    height: 134px;
    width: auto;
    display: block;
    filter: brightness(1.1);
}



nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav ul a {
    text-decoration: none;
    color: var(--color-text-light);
    font-weight: 500;
    transition: var(--transition-smooth);
}

nav ul a:hover {
    color: var(--color-primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    background-color: #05070A;
    /* True Night */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    position: relative;
    padding-top: calc(var(--header-height) + 120px);
    /* Lowered altitude */
    overflow: hidden;
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 2.5rem;
    line-height: 1.1;
    z-index: 10;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

/* Cards Section */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: #0D1117;
    /* Brighter Night Blue for Cards */
    padding: 40px;
    border: 1px solid rgba(151, 134, 75, 0.1);
    text-align: center;
    border-top: 5px solid var(--color-primary);
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    box-shadow: 0 0 30px rgba(151, 134, 75, 0.15);
}

.card h3 {
    margin-bottom: 20px;
    color: var(--color-secondary);
}

.card h3 .ar-main {
    font-size: 2.8rem;
    /* Magnified card Arabic */
    line-height: 1.2;
    margin-bottom: 10px;
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid rgba(151, 134, 75, 0.2);
}

.card p {
    margin-bottom: 30px;
    color: #94A3B8;
    font-size: 0.9rem;
}

section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 3.5rem;
    /* Bigger Section Headers */
    color: var(--color-secondary);
    position: relative;
    padding-bottom: 15px;
}

.section-title h2 .ar-main {
    font-size: 3.8rem;
}

/* Specific Hero CTA override */
.hero-cta-wrap {
    font-size: 2rem !important;
    /* Magnified CTA */
    letter-spacing: 6px !important;
    transition: var(--transition-smooth);
}

.hero-cta-wrap:hover {
    color: var(--color-white) !important;
    text-shadow: 0 0 15px rgba(151, 134, 75, 0.5);
}

.section-title h2 .en-sub {
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--color-primary);
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.stat-item p {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Management UI (Content List) --- */
.mgmt-container {
    padding-top: 120px;
    padding-bottom: 100px;
}

.mgmt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.search-bar {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(151, 134, 75, 0.2);
    border-radius: 8px;
    padding: 12px 20px;
    color: var(--color-white);
    font-family: var(--font-body);
    width: 100%;
    max-width: 400px;
    transition: var(--transition-smooth);
}

.search-bar:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(151, 134, 75, 0.05);
}

/* Fix for system-default 'white-on-white' select options in dark mode */
select.search-bar option {
    background-color: #161B22;
    color: var(--color-white);
}

.content-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mgmt-card {
    background: #0D1117 !important;
    border: 1px solid rgba(151, 134, 75, 0.1);
    border-radius: 12px;
    padding: 25px;
    display: grid;
    grid-template-columns: 80px 1fr 300px;
    gap: 25px;
    align-items: start;
    transition: var(--transition-smooth);
    text-align: left !important;
    max-width: 100%;
    overflow: hidden;
}

@media (max-width: 900px) {
    .mgmt-card {
        grid-template-columns: 80px 1fr;
    }

    .mgmt-actions {
        grid-column: span 2;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
    }

    .mgmt-input-group {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 600px) {
    .mgmt-card {
        grid-template-columns: 1fr;
        text-align: center !important;
    }

    .mgmt-img {
        margin: 0 auto;
    }

    .mgmt-actions {
        grid-column: span 1;
    }
}

.mgmt-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mgmt-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(151, 134, 75, 0.2);
}

.mgmt-info h3 {
    color: var(--color-primary);
    margin-bottom: 5px;
    font-size: 1.25rem;
}

.mgmt-info .bid {
    font-family: monospace;
    color: var(--color-text-dim);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: block;
}

.mgmt-contact {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.wa-link {
    color: #25D366;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
}

.wa-link:hover {
    text-decoration: underline;
}

.mgmt-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mgmt-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mgmt-input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mgmt-input {
    background: #161B22;
    border: 1px solid rgba(139, 148, 158, 0.2);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--color-white);
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}

.mgmt-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.copy-btn {
    background: var(--color-secondary);
    color: var(--color-white);
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    font-family: var(--font-heading);
}

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

.field-copy {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 148, 158, 0.2);
    color: var(--color-primary);
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    text-transform: uppercase;
    transition: all 0.2s;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.field-copy:hover {
    background: var(--color-primary);
    color: #000;
}

.field-copy:active {
    transform: scale(0.92);
}

.status-chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 10px;
}

.status-verified {
    background: rgba(74, 144, 226, 0.1);
    color: #4A90E2;
    border: 1px solid rgba(74, 144, 226, 0.3);
}

.status-pending {
    background: rgba(245, 166, 35, 0.1);
    color: #F5A623;
    border: 1px solid rgba(245, 166, 35, 0.3);
}

.card h3 .en-sub {
    display: block;
    font-size: 13px;
    opacity: 0.7;
    margin-top: 5px;
    font-weight: 400;
}

.token-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.word-token {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.word-token:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-primary);
}

.word-token.selected {
    background: var(--color-primary);
    color: #000;
    border-color: var(--color-primary);
    font-weight: bold;
}

/* Character Counter Styles */
.char-count {
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.char-count.ok {
    color: #32BF55;
}

.char-count.warning {
    color: #F5A623;
    background: rgba(245, 166, 35, 0.1);
}

.char-count.danger {
    color: #FF4B2B;
    background: rgba(255, 75, 43, 0.1);
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-2px);
    }

    75% {
        transform: translateX(2px);
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    background-color: #05070A;
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--color-primary);
    width: 90%;
    max-width: 800px;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(151, 134, 75, 0.2);
    position: relative;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(151, 134, 75, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-primary);
}

.modal-body {
    padding: 40px;
    text-align: center;
}

.close {
    color: var(--color-text-dim);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.close:hover {
    color: var(--color-primary);
}

.shahada-img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 10px rgba(151, 134, 75, 0.3));
}

.shahada-text {
    font-family: 'ANefelBotan', serif;
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.shahada-phonetic {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    opacity: 0.8;
    font-style: italic;
    letter-spacing: 1px;
}