/* =============================================================
   Author CMS Pro - Consolidated & Fixed Stylesheet
   Version: v5.1 - Fixed & Optimized
   ============================================================= */

/* ═══════════════════════════════════════════════════════════
   CSS RESET & BASE STYLES
   ═══════════════════════════════════════════════════════════ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ── Full palette — every one of these is independently overridable
       per admin choice in Admin -> Settings -> Appearance. Defaults here
       match the original "Navy & Mustard" look exactly, so nothing
       changes visually until an admin picks something different. ── */
    --bg-color: #0A2342;             /* page background */
    --surface-color: #071b33;        /* elevated surfaces: sidebars, drawers, toasts, dropdowns */
    --text-color: #ffffff;           /* body text */
    --accent-color: #D4AF37;         /* buttons, links, highlights */
    --accent-text-color: #0A2342;    /* text/icons drawn ON an accent-colored background */
    --secondary-accent-color: #D4AF37; /* secondary buttons/badges/hover states — defaults to the accent color until set separately */

    /* Legacy variable names kept as aliases so the ~1000 existing rules
       in this file that reference them keep working unchanged. */
    --dark-blue: var(--bg-color);
    --gold: var(--accent-color);
    --gold-text: var(--accent-text-color);
    --white: var(--text-color);
    --black: #000000;
    --primary-color: var(--bg-color);
    --secondary-color: var(--accent-color);
    --navbar-height: 72px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--primary-color);
    color: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   NAVIGATION - Fixed and Optimized
   ═══════════════════════════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    height: var(--navbar-height);
}

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

.nav-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.5rem;
}

.nav-logo {
    height: 40px;
    max-width: 150px;
    object-fit: contain;
}

.nav-title {
    color: var(--white);
    font-weight: 600;
    font-size: 1.25rem;
}

/* Hamburger Button */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    z-index: 1070;
    flex-shrink: 0;
    touch-action: manipulation;
    pointer-events: auto;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Desktop Navigation */
.nav-links-desktop {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-wrap: nowrap;
    overflow: visible;
}

.nav-links-desktop .nav-link {
    font-size: 0.855rem;
    padding: 0.4rem 0.5rem;
    white-space: nowrap;
    border-radius: 0.35rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s, background 0.2s;
    padding: 0.4rem 0.5rem;
    border-radius: 0.35rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

/* Mobile Drawer */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 1050;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: min(300px, 82vw);
    height: 100vh;
    height: 100dvh; /* recalculates when the on-screen keyboard opens (e.g.
        tapping the newsletter email field below), so the drawer's own
        scroll area stays correctly sized instead of the keyboard just
        covering the bottom of a stale 100vh box */
    background: var(--surface-color);
    border-right: 1px solid rgba(212,175,55,.2);
    z-index: 1060;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.nav-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(212,175,55,.2);
    flex-shrink: 0;
    /* Pinned to the top of the drawer's own scroll area — previously this
       scrolled away with the rest of the menu, so once a visitor scrolled
       down toward the newsletter form the Close (×) button scrolled out
       of view with it, along with everything above the fold. */
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface-color);
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 0.4rem 0;
    flex: 1;
}

.drawer-link {
    display: block;
    padding: 0.8rem 1.25rem;
    color: rgba(255,255,255,.82);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    border-left: 3px solid transparent;
}

.drawer-link:hover {
    background: rgba(212,175,55,.1);
    color: var(--gold);
    border-left-color: var(--gold);
}

.drawer-active {
    background: rgba(212,175,55,.15);
    color: var(--gold);
    border-left-color: var(--gold);
    font-weight: 600;
}

.drawer-divider {
    height: 1px;
    background: rgba(255,255,255,.07);
    margin: 0.4rem 0;
}

.drawer-newsletter {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.07);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   ADMIN NAVIGATION
   ═══════════════════════════════════════════════════════════ */
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212,175,55,.2);
}

.admin-topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: var(--surface-color);
    border-right: 1px solid rgba(212,175,55,.15);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-sidebar.open {
    transform: translateX(0);
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    color: rgba(255,255,255,.78);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.2s, color 0.2s;
    border-left: 3px solid transparent;
}

.admin-nav-link:hover {
    background: rgba(212,175,55,.1);
    color: var(--gold);
    border-left-color: var(--gold);
}

.admin-nav-active {
    background: rgba(212,175,55,.15);
    color: var(--gold);
    border-left-color: var(--gold);
    font-weight: 600;
}

.admin-nav-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════════════════════════ */
.main-content {
    padding-top: var(--navbar-height);
    /* Announcement bar adds ~36px — JS handles dynamic offset via CSS var */
    /* No min-height here on purpose: a forced 100vh minimum used to leave
       a large empty gap before the footer on any page whose actual content
       (slider + sections) was shorter than a full viewport — most visible
       once the hero slider itself got shorter on mobile. Content now
       simply sizes to its own height. */
}

.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.page-header {
    text-align: center;
    padding: 2rem 1rem;
}

.page-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
}

/* ═══════════════════════════════════════════════════════════
   ANNOUNCEMENT BAR
   ═══════════════════════════════════════════════════════════ */
#announcementBar {
    background: var(--gold);
    color: var(--gold-text, #0A2342);
    text-align: center;
    padding: 0.5rem 3rem;
    font-size: 0.875rem;
    font-weight: 600;
    position: relative;
    z-index: 1002; /* above navbar z-index:1000 */
}

/* ═══════════════════════════════════════════════════════════
   CARDS & GRID
   ═══════════════════════════════════════════════════════════ */
.card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
    border-color: rgba(212,175,55,0.4);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 1.75rem;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */
.btn-gold {
    display: inline-block;
    background: var(--gold);
    color: var(--gold-text, #0A2342);
    font-weight: 700;
    padding: 0.65rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap;
}

.btn-gold:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.btn-gold:active {
    transform: translateY(0);
}

.btn-gold:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════
   FORM INPUTS
   ═══════════════════════════════════════════════════════════ */
.form-input {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 0.5rem;
    color: #fff;
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: 2px solid var(--gold);
    outline-offset: 0;
    border-color: var(--gold);
    background: rgba(255,255,255,0.12);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

textarea.form-input {
    resize: vertical;
}

select.form-input option {
    background: var(--bg-color);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    color: rgba(255,255,255,.8);
    margin-bottom: 0.35rem;
}

/* ═══════════════════════════════════════════════════════════
   SLIDER STYLES
   ═══════════════════════════════════════════════════════════ */
.slider-container {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh; /* mobile browsers: excludes the address bar, so content
                       doesn't jump/get clipped as it shows or hides on scroll —
                       ignored by browsers that don't support svh, which then
                       just keep the 100vh value above */
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

/* Vertical slide mode (admin-selectable in Home Content settings): slides
   rise into place instead of a flat crossfade, and — per dir-horizontal
   above — the left/right arrows aren't rendered at all in this mode
   (dots remain for manual navigation either way). */
.slider-container.dir-vertical .slide {
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    transform: translateY(3.5rem);
}
.slider-container.dir-vertical .slide.active {
    transform: translateY(0);
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.slide-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.slide-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
}

.content-container {
    max-width: 48rem;
    margin: 0 auto;
    text-align: center;
    padding: 0 1rem;
}

/* ── Slide Content Alignment (Center vs Left) ── */
.slide-content.align-center,
.slide-content.text-align-center {
    justify-content: center;
}
.slide-content.align-center .content-container,
.slide-content.text-align-center .content-container {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}
.slide-content.align-center .slide-title,
.slide-content.align-center .slide-desc,
.slide-content.align-center .slide-text3,
.slide-content.text-align-center .slide-title,
.slide-content.text-align-center .slide-desc,
.slide-content.text-align-center .slide-text3 {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.slide-content.align-left,
.slide-content.text-align-left {
    justify-content: flex-start;
    padding-left: clamp(2rem, 8vw, 8rem);
    padding-right: 2rem;
}
.slide-content.align-left .content-container,
.slide-content.text-align-left .content-container {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
    padding-left: 0;
}
.slide-content.align-left .slide-title,
.slide-content.align-left .slide-desc,
.slide-content.align-left .slide-text3,
.slide-content.text-align-left .slide-title,
.slide-content.text-align-left .slide-desc,
.slide-content.text-align-left .slide-text3 {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
}

/* ── Button Alignment (Decoupled from Text) ── */
.slide-content.align-center .slide-btn-wrap,
.slide-content.btn-align-center .slide-btn-wrap,
.slide-btn-wrap.btn-align-center {
    display: flex;
    justify-content: center;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.slide-content.align-left .slide-btn-wrap,
.slide-content.btn-align-left .slide-btn-wrap,
.slide-btn-wrap.btn-align-left {
    display: flex;
    justify-content: flex-start;
    text-align: left;
    margin-left: 0;
    margin-right: auto;
}

/* Font family/weight/size for all three lines come from admin's picks in
   Admin -> Home Content (Slide Typography), rendered as CSS variables by
   slideTypographyStyleTag() in includes/db.php. The var() fallbacks below
   only matter if that tag somehow didn't run — normal rendering always
   has real values. Desktop size is the default; the mobile breakpoint
   further down overrides each to its own admin-chosen mobile size. */
.slide-title {
    font-family: var(--slide-line1-font, inherit);
    font-weight: var(--slide-line1-weight, 700);
    font-size: var(--slide-line1-size-desktop, clamp(1.75rem, 4.5vw, 3.25rem));
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,.5);
}

.slide-desc {
    font-family: var(--slide-line2-font, inherit);
    font-weight: var(--slide-line2-weight, 700);
    font-size: var(--slide-line2-size-desktop, clamp(0.9rem, 2vw, 1.15rem));
    color: rgba(255,255,255,.88);
    margin-bottom: 1.5rem;
    max-width: 600px;
    text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

.slide-text3 {
    font-family: var(--slide-line3-font, inherit);
    font-weight: var(--slide-line3-weight, 500);
    font-size: var(--slide-line3-size-desktop, clamp(0.78rem, 1.6vw, 0.95rem));
    color: rgba(255,255,255,.72);
    margin-top: -0.75rem;
    margin-bottom: 1.25rem;
    max-width: 600px;
    text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

.slide-navigation {
    position: absolute; /* relative to .slider-container, not the viewport —
        it was "fixed" before, pinned to 50% of the whole viewport height;
        that happened to line up with the slide on desktop (where the
        slider fills the full viewport) but left the dots stranded below
        a much shorter mobile slide once the hero got its own aspect-ratio
        height instead of matching the viewport. */
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5; /* lower than navbar/drawer */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.slide-indicator {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.slide-indicator.active {
    background-color: var(--gold);
    width: 1rem;
    height: 1rem;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.site-footer {
    background: rgba(0,0,0,0.5);
    border-top: 1px solid rgba(212,175,55,0.3);
    margin-top: 4rem;
    padding: 3rem 0 1.5rem;
    color: rgba(255,255,255,0.75);
}

.footer-inner {
    max-width: 1200px;
    margin: auto;
    padding: 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

/* Footer Brand Wrapper - Logo + Name Side by Side */
.footer-brand-col {
    display: flex;
    flex-direction: column;
}

.footer-brand-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.footer-logo-img {
    height: 40px;
    max-width: 150px;
    width: auto;
    object-fit: contain;
    flex-shrink: 1;
}

.footer-brand-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
}

.footer-tagline {
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Drawer Brand - Logo + Name */
.drawer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex: 1;
    min-width: 0;
}

.drawer-logo {
    height: 40px;
    max-width: 100px;
    object-fit: contain;
    flex-shrink: 0;
}

.drawer-site-name {
    display: block;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--gold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.9rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--gold);
}

/* Quick Links Two Column Layout */
.footer-links-two-col .footer-heading {
    margin-bottom: 0.5rem;
}

.footer-links-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.footer-links-wrapper .footer-links {
    flex: 1;
}

@media (max-width: 480px) {
    .footer-links-wrapper {
        gap: 0.75rem 1rem;
    }
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.footer-socials a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 1.25rem;
    transition: color 0.2s;
}

.footer-socials a:hover {
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(212,175,55,0.2);
    padding-top: 1.25rem;
    font-size: 0.85rem;
}

.footer-bottom p {
    margin: 0.2rem 0;
}

.footer-dev-credit-link {
    color: var(--gold) !important;
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.footer-dev-credit-link:hover {
    color: #FFFFFF !important;
    text-decoration: underline !important;
}

/* ═══════════════════════════════════════════════════════════
   SOCIAL ICONS
   ═══════════════════════════════════════════════════════════ */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
}

.social-icon:hover {
    background: var(--gold);
    color: var(--gold-text, #0A2342);
}

/* ═══════════════════════════════════════════════════════════
   READING PROGRESS BAR
   ═══════════════════════════════════════════════════════════ */
#readingProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gold);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slide-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes zoom-in {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fade-in 1s ease-out forwards;
}

.animate-slide-up {
    animation: slide-up 1s ease-out forwards;
    animation-delay: 0.5s;
}

.animate-zoom-in {
    animation: zoom-in 1s ease-out forwards;
    animation-delay: 1s;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: none;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll,
    .animate-fade-in,
    .animate-slide-up,
    .animate-zoom-in,
    .slide,
    .nav-drawer,
    .admin-sidebar,
    .drawer-overlay {
        transition: none !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   BLOG CONTENT RESPONSIVE VIDEOS
   ═══════════════════════════════════════════════════════════ */
.blog-content [style*="padding-bottom:56.25%"],
.blog-content [style*="padding-bottom: 56.25%"],
.blog-content .video-embed-wrap {
    position: relative !important;
    width: 100% !important;
    padding-bottom: 56.25% !important;
    height: 0 !important;
    overflow: hidden;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.blog-content [style*="padding-bottom:56.25%"] iframe,
.blog-content [style*="padding-bottom: 56.25%"] iframe,
.blog-content .video-embed-wrap iframe {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
}

.blog-content iframe {
    max-width: 100%;
}

/* ═══════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════ */
.bg-dark-blue {
    background-color: var(--primary-color);
}

.text-gold {
    color: var(--gold);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE DESIGN - TABLETS & MOBILE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .page-title {
        font-size: 2.5rem;
    }

    .slide-navigation {
        right: 1rem;
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .nav-toggle {
        display: flex !important;
    }

    .nav-links-desktop {
        display: none !important;
    }

    /* Hero slider on phones: sized by aspect ratio (not viewport height)
       so it always reads as a landscape banner — height noticeably less
       than width — rather than a tall portrait block. The image/video
       itself stays "cover" (fills the frame, crops rather than
       stretches/distorts) at whatever height that ends up being — no
       separate object-fit rule needed for mobile specifically, since
       .slide-bg/.slide-video already use cover at every screen size. */
    .slider-container {
        height: auto;
        aspect-ratio: 4 / 3;
        min-height: 22rem;
        max-height: 75vh;
        max-height: 75svh;
        margin-top: 2rem; /* generous margin between header and slider on mobile devices so first line of text is fully visible */
        border-radius: 0.75rem;
    }
    .slide-content {
        padding: 1.5rem 1.25rem;
    }
    .slide-content.align-left,
    .slide-content.text-align-left {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .slide-content.align-left .content-container,
    .slide-content.text-align-left .content-container {
        padding-left: 0;
        padding-right: 0;
    }
    .slide-content.align-center,
    .slide-content.text-align-center {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .slide-title {
        font-size: var(--slide-line1-size-mobile, clamp(1.25rem, 5vw, 1.75rem));
        margin-bottom: 0.5rem;
    }
    .slide-desc {
        font-size: var(--slide-line2-size-mobile, 0.9rem);
    }
    .slide-text3 {
        font-size: var(--slide-line3-size-mobile, 0.85rem);
    }
    .slide-desc,
    .slide-text3 {
        max-width: 100%;
        margin-bottom: 0.6rem;
    }
    .site-footer {
        margin-top: 1.5rem; /* was 4rem — felt like a big gap once the hero shrank to its own aspect ratio */
    }

    /* Footer newsletter stacks on mobile */
    .drawer-newsletter form,
    .site-footer form[action$="newsletter-subscribe.php"] {
        flex-direction: column;
    }
    .site-footer form[action$="newsletter-subscribe.php"] input[type="email"] {
        max-width: 100% !important;
    }

    /* The site name is shown next to the logo on mobile too — it was
       previously hidden here entirely, leaving only the logo icon.
       Truncated with an ellipsis (rather than a fixed cutoff) so a long
       site name never overlaps the hamburger button on narrow screens. */
    .nav-brand {
        min-width: 0;
        flex-shrink: 1;
    }
    .nav-title {
        display: inline-block;
        font-size: 1rem;
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Mobile drawer - always show site name */
    .drawer-brand {
        display: flex !important;
    }

    .drawer-site-name {
        display: block !important;
    }

    /* Mobile footer - logo and name side by side */
    .footer-brand-wrapper {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }

    .footer-logo-img {
        height: 36px;
        max-width: 100px;
        width: auto;
    }

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

    .footer-brand-col {
        min-width: 0;
    }

    .nav-menu {
        position: fixed;
        top: var(--navbar-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--navbar-height));
        background-color: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: left 0.3s;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    /* Layout */
    .main-content {
        padding-top: calc(var(--navbar-height) + 0.5rem);
    }

    .page-container {
        padding: 1.25rem 0.85rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

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

    /* Typography */
    .page-title {
        font-size: 1.6rem;
    }

    /* Cards */
    .card {
        padding: 1.25rem 1rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Tables — horizontal scroll instead of overflow clip */
    .table-responsive,
    .card:has(table),
    div[style*="overflow-x: auto"],
    div[style*="overflow-x:auto"] {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        max-width: 100% !important;
    }
    table {
        font-size: 0.85rem;
        min-width: 500px;
    }

    th, td {
        padding: 0.65rem 0.75rem !important;
        white-space: nowrap;
    }

    .blog-content th,
    .blog-content td {
        white-space: normal !important;
        word-break: break-word !important;
        min-width: 0 !important;
    }

    /* Forms & grids */
    .form-row,
    .field-row,
    form > div[style*="grid"],
    .modal-box div[style*="grid"],
    .blog-modal-box div[style*="grid"],
    #modal div[style*="grid"] {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    /* Buttons */
    .btn-gold {
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
    }

    /* Modals across admin & roles */
    .modal-box,
    .blog-modal-box,
    .editor-modal-box,
    .link-picker-box,
    #modal > div,
    #priceModal > div,
    #postModal > div,
    #addModal .modal-box,
    #editModal .modal-box {
        margin: 1rem auto !important;
        padding: 1.25rem 1rem !important;
        width: 95% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .modal-bg,
    .blog-modal-overlay,
    .editor-modal,
    .modal-overlay,
    .link-picker-overlay {
        padding: 0.5rem !important;
    }

    /* Role dashboards responsive */
    .dash-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
    .analytics-grid,
    .media-grid,
    .stats-grid,
    div[style*="grid-template-columns: repeat(auto-fit, minmax(200px"],
    div[style*="grid-template-columns: repeat(auto-fit, minmax(250px"],
    div[style*="grid-template-columns:repeat(auto-fit,minmax(200px"],
    div[style*="grid-template-columns:repeat(auto-fit,minmax(250px"],
    div[style*="grid-template-columns:repeat(auto-fit,minmax(160px"],
    div[style*="grid-template-columns:repeat(4,1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .tabs,
    .tab-nav,
    .tab-container {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 0.25rem !important;
    }
    .tab,
    .tab-btn {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .link-box {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.5rem !important;
    }
    .link-box button {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    .nav-menu {
        width: 90%;
        padding: 4.5rem 1.5rem 2rem;
    }

    .page-container {
        padding-left: 0.6rem !important;
        padding-right: 0.6rem !important;
        padding-bottom: 1rem !important;
    }

    .page-title {
        font-size: 1.4rem !important;
    }

    .card {
        padding: 1rem 0.75rem !important;
    }

    .form-input {
        font-size: 0.95rem;
        padding: 0.55rem 0.75rem;
    }

    /* Only submit/block buttons stretch; table, pagination and toolbars stay auto */
    .btn-block,
    .btn-full,
    form:not(.filter-bar):not(.search-bar):not(.rate-form):not([style*="display:inline"]):not([style*="display: inline"]) > button[type="submit"]:not(.btn-small):not(.btn-sm):not([style*="padding:.3rem"]):not([style*="padding: 0.3rem"]) {
        width: 100%;
        text-align: center;
    }

    table .btn-gold,
    .table-responsive .btn-gold,
    td .btn-gold,
    .pagination .btn-gold,
    .blog-pagination .btn-gold,
    nav[aria-label="Blog pagination"] .btn-gold,
    .post-card-footer .btn-gold,
    .btn-inline,
    div[style*="justify-content: center"] > .btn-gold,
    div[style*="justify-content:center"] > .btn-gold,
    div[style*="display: flex"] > .btn-gold,
    div[style*="display:flex"] > .btn-gold,
    .action-btns .btn-gold,
    .action-btns a,
    .search-bar .btn-gold,
    .filter-bar .btn-gold,
    .btn-small {
        width: auto !important;
    }

    /* Stats grid on very small screens */
    .card-grid,
    .analytics-grid,
    .media-grid,
    .stats-grid,
    div[style*="grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))"],
    div[style*="grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))"],
    div[style*="grid-template-columns:repeat(auto-fit,minmax(200px"],
    div[style*="grid-template-columns:repeat(auto-fit,minmax(250px"],
    div[style*="grid-template-columns:repeat(auto-fit,minmax(160px"],
    div[style*="grid-template-columns:repeat(4,1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 0.65rem !important;
    }

    /* Filter & search bars stack vertically */
    .filter-bar,
    .search-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.5rem !important;
    }
    .filter-bar input,
    .filter-bar select,
    .filter-bar button,
    .search-bar input,
    .search-bar button {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .filter-bar span[style*="margin-left:auto"] {
        margin-left: 0 !important;
        text-align: right;
    }

    /* Table display */
    th, td {
        font-size: 0.75rem;
        padding: 0.45rem 0.5rem !important;
    }

    /* Pagination buttons compact on mobile */
    div[style*="justify-content: center"] a.btn-gold,
    div[style*="justify-content: center"] span {
        padding: 0.4rem 0.7rem !important;
        font-size: 0.8rem !important;
    }

    /* Modal full width on small screens */
    .modal-box,
    .blog-modal-box,
    .editor-modal-box,
    .link-picker-box,
    #modal > div,
    #priceModal > div,
    #postModal > div,
    #addModal .modal-box,
    #editModal .modal-box {
        margin: 0.25rem auto !important;
        padding: 1rem 0.75rem !important;
        width: 98% !important;
    }

    /* Slide indicators */
    .slide-navigation {
        right: 0.5rem;
        gap: 0.5rem;
    }

    .slide-indicator {
        width: 0.5rem;
        height: 0.5rem;
    }

    .slide-indicator.active {
        width: 0.75rem;
        height: 0.75rem;
    }

    /* Footer logo responsive for very small screens */
    .footer-brand-wrapper {
        gap: 0.5rem;
    }

    .footer-logo-img {
        height: 32px;
        max-width: 80px;
    }

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

/* ═══════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════ */
@media print {
    .navbar,
    .slide-navigation,
    .btn-gold,
    #backToTop,
    #cookieBanner {
        display: none !important;
    }

    .main-content {
        padding-top: 0;
    }

    body {
        background: white;
        color: black;
    }

    .card {
        border: 1px solid #ccc;
        background: white;
    }
}
/* ═══════════════════════════════════════════════════════════
   BACK TO TOP — clear of cookie banner when banner visible
   ═══════════════════════════════════════════════════════════ */
body.cookie-banner-visible #backToTop {
    bottom: 5.5rem;
}

/* ═══════════════════════════════════════════════════════════
   TABLE RESPONSIVE WRAPPER (applied via JS below)
   ═══════════════════════════════════════════════════════════ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════
   SKIP TO CONTENT — accessibility
   ═══════════════════════════════════════════════════════════ */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--gold);
    color: var(--gold-text, #0A2342);
    padding: 0.5rem 1rem;
    border-radius: 0 0 0.4rem 0.4rem;
    font-weight: 700;
    z-index: 9999;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-to-content:focus {
    top: 0;
}

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    background: var(--surface-color);
    border-left: 4px solid var(--gold);
    color: #fff;
    padding: 0.85rem 1.2rem;
    border-radius: 0.45rem;
    font-size: 0.875rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
    pointer-events: all;
    animation: toast-in 0.3s ease forwards;
    max-width: 320px;
}

.toast.toast-error  { border-left-color: #ef4444; }
.toast.toast-success{ border-left-color: #22c55e; }

@keyframes toast-in {
    from { opacity:0; transform: translateX(1rem); }
    to   { opacity:1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════════════════════
   LOADING SPINNER
   ═══════════════════════════════════════════════════════════ */
.spinner {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
    vertical-align: middle;
    margin-right: 0.4rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════
   BADGE UTILITIES
   ═══════════════════════════════════════════════════════════ */
.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.badge-success { background: rgba(34,197,94,.15);  color: #22c55e; }
.badge-warning { background: rgba(234,179,8,.15);  color: #eab308; }
.badge-danger  { background: rgba(239,68,68,.15);  color: #ef4444; }
.badge-info    { background: rgba(59,130,246,.15); color: #60a5fa; }
.badge-gold    { background: rgba(212,175,55,.15); color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   AD BANNER (pre-footer / in-content advertising slot)
   ═══════════════════════════════════════════════════════════ */
.ad-banner {
    max-width: 970px;
    margin: 2.5rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
}
.ad-banner-label {
    text-align: center;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 0.5rem;
}
.ad-banner-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 90px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    background: rgba(212,175,55,0.05);
    overflow: hidden;
    padding: 1rem;
    box-sizing: border-box;
}
.ad-banner-inner ins.adsbygoogle,
.ad-banner-inner > *:first-child {
    width: 100%;
}
@media (max-width: 600px) {
    .ad-banner { margin: 1.5rem auto; padding: 0 0.75rem; }
    .ad-banner-inner { min-height: 60px; padding: 0.75rem; }
}

/* ═══════════════════════════════════════════════════════════
   DATATABLE PAGINATION & TOOLBAR
   ═══════════════════════════════════════════════════════════ */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold);
    padding: 0.75rem 1rem;
    text-align: left;
}
.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}
.datatable-wrapper {
    margin-top: 0.5rem;
}
.datatable-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.datatable-per-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
}
.datatable-per-page select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 0.25rem 0.6rem;
    border-radius: 0.35rem;
    font-size: 0.82rem;
    cursor: pointer;
    outline: none;
}
.datatable-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.datatable-search input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 0.35rem 0.75rem;
    border-radius: 0.35rem;
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.2s;
    min-width: 170px;
}
.datatable-search input:focus {
    border-color: var(--gold, #D4AF37);
}
.datatable-pagination-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 0.75rem;
}
.datatable-info {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
}
.datatable-pagination-btns {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.datatable-page-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.75);
    padding: 0.3rem 0.65rem;
    border-radius: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}
.datatable-page-btn:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.2);
    color: #ffffff;
    border-color: var(--gold, #D4AF37);
}
.datatable-page-btn.active {
    background: var(--gold, #D4AF37) !important;
    color: #0A2342 !important;
    border-color: var(--gold, #D4AF37) !important;
    font-weight: 700;
}
.datatable-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.datatable-ellipsis {
    color: rgba(255, 255, 255, 0.4);
    padding: 0 0.25rem;
    font-size: 0.8rem;
}

/* ═══════════════════════════════════════════════════════════
   UNIVERSAL SOCIAL SHARING BUTTONS
   ═══════════════════════════════════════════════════════════ */
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    color: #ffffff !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1.2;
}
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    color: #ffffff !important;
}
.share-pinterest { background: #E60023; }
.share-pinterest:hover { background: #cc001f; }
.share-facebook { background: #1877F2; }
.share-facebook:hover { background: #1464cc; }
.share-whatsapp { background: #25D366; }
.share-whatsapp:hover { background: #20ba5a; }
.share-twitter { background: #000000; border-color: rgba(255,255,255,0.25); }
.share-twitter:hover { background: #1a1a1a; }
.share-linkedin { background: #0A66C2; }
.share-linkedin:hover { background: #08539e; }
.share-copy {
    background: rgba(212, 175, 55, 0.18);
    border-color: rgba(212, 175, 55, 0.45);
    color: var(--gold) !important;
}
.share-copy:hover {
    background: rgba(212, 175, 55, 0.32);
    color: #ffffff !important;
}
.btn-share-icon {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--gold);
    padding: 0.5rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.btn-share-icon:hover {
    background: rgba(212, 175, 55, 0.25);
    border-color: var(--gold);
    color: #ffffff;
    transform: translateY(-1px);
}

