﻿:root {
    --bg: #070f1b;
    --bg-soft: #101a2b;
    --text: #e8eef5;
    --muted: #9eb0c7;
    --border: rgba(255, 255, 255, 0.12);
    --card: rgba(11, 23, 38, 0.82);
    --shadow: 0 20px 40px rgba(1, 5, 12, 0.45);
    --primary: #0EA5A4;
    --accent: #F59E0B;
    --success: #2dd4bf;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: Cairo, sans-serif;
    background:
        radial-gradient(1200px 600px at 90% -20%, rgba(14, 165, 164, 0.2), transparent 60%),
        radial-gradient(1000px 500px at -10% 40%, rgba(245, 158, 11, 0.12), transparent 55%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.container {
    width: min(1180px, calc(100% - 2rem));
    margin-inline: auto;
}

.glass {
    background: linear-gradient(160deg, rgba(17, 28, 47, 0.88), rgba(7, 15, 27, 0.82));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.bg-orb {
    position: fixed;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.35;
    z-index: -1;
    animation: float 8s ease-in-out infinite;
}

.orb-1 {
    background: var(--primary);
    top: 8%;
    left: -70px;
}

.orb-2 {
    background: var(--accent);
    bottom: 12%;
    right: -80px;
    animation-delay: 1.5s;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1002;
    margin-top: 1rem;
    border-radius: 14px;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
}

.brand strong {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.3px;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(120deg, var(--primary), var(--accent));
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: #0b1220;
}

.hamburger {
    display: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.nav-links a,
.link-btn {
    color: var(--text);
    text-decoration: none;
    border: 1px solid transparent;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    font-size: 0.9rem;
    background: transparent;
    cursor: pointer;
}

.nav-links a:hover,
.link-btn:hover,
.nav-links a.is-active {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.inline-form {
    margin: 0;
}

.page-content {
    padding-top: 1.3rem;
    padding-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.footer {
    color: var(--muted);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 0 2rem;
    font-size: 0.86rem;
}

.hero {
    border-radius: 18px;
    padding: 1.4rem;
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 1.2rem;
    animation: fadeUp 0.6s ease;
}

.hero h1 {
    margin: 0.4rem 0;
    font-size: clamp(1.7rem, 2.8vw, 2.6rem);
    line-height: 1.24;
}

.hero p {
    margin: 0;
    color: var(--muted);
}

.hero-subline {
    margin-top: 0.8rem;
    font-size: 0.95rem;
    color: var(--text);
    opacity: 0.9;
    font-weight: 500;
    border-right: 3px solid var(--primary);
    padding-right: 1rem;
}

.pill {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.4px;
    color: #051a20;
    background: linear-gradient(120deg, var(--primary), #7dd3fc);
    font-family: 'Space Grotesk', sans-serif;
}

.hero-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    gap: 0.75rem;
}

.hero-stats article {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(9, 17, 30, 0.75);
    padding: 0.9rem;
}

.hero-stats strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    display: block;
}

.hero-stats small {
    color: var(--muted);
}

.section-grid,
.tutorial-grid,
.banner-grid,
.metrics-grid {
    display: grid;
    gap: 0.9rem;
}

.section-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tutorial-grid,
.banner-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.banner-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
}

.card h3,
.card h2,
.banner-card h3 {
    margin-top: 0;
}

.banner-list h2,
.page-head h1 {
    margin: 0;
}

.page-head p,
.muted {
    color: var(--muted);
}

.banner-list {
    display: grid;
    gap: 0.8rem;
}

.auth-wrap {
    width: min(530px, 100%);
    margin-inline: auto;
    border-radius: 16px;
    padding: 1.2rem;
}

.stack-form {
    display: grid;
    gap: 0.75rem;
}

label {
    font-size: 0.92rem;
    color: var(--muted);
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(4, 9, 19, 0.86);
    color: var(--text);
    border-radius: 11px;
    padding: 0.65rem 0.75rem;
    outline: none;
    font-family: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent);
}

.btn {
    border: none;
    border-radius: 10px;
    padding: 0.62rem 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.btn-primary {
    color: #04232a;
    background: linear-gradient(120deg, var(--primary), #6ee7b7);
}

.btn-secondary {
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.btn-accent {
    color: #2f1400;
    background: linear-gradient(120deg, var(--accent), #facc15);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text);
    background: transparent;
}

.btn-danger {
    color: #fff;
    background: linear-gradient(120deg, #ef4444, #f97316);
}

.btn-sm {
    font-size: 0.78rem;
    padding: 0.42rem 0.65rem;
}

.alert {
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    border: 1px solid transparent;
}

.alert-success {
    border-color: rgba(45, 212, 191, 0.4);
    background: rgba(45, 212, 191, 0.12);
}

.alert-error {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.12);
}

.tip-box {
    margin-top: 1rem;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 0.7rem;
    display: grid;
    gap: 0.25rem;
}

.tip-box span {
    font-family: 'Space Grotesk', sans-serif;
    color: #7dd3fc;
}

.table-card {
    overflow: hidden;
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 660px;
}

/* Mobile-friendly table as stacked cards */
@media (max-width: 780px) {
    table.responsive-table {
        min-width: 0;
    }
    table.responsive-table thead {
        display: none;
    }
    table.responsive-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 1rem;
    }
    table.responsive-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.4rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        font-size: 0.9rem;
    }
    table.responsive-table tbody td:last-child {
        border-bottom: none;
    }
    table.responsive-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #a3f5f3;
        margin-left: 1rem;
        flex-shrink: 0;
    }
}

th,
td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: right;
    padding: 0.7rem 0.55rem;
    font-size: 0.9rem;
    vertical-align: top;
}

thead th {
    color: #a3f5f3;
    font-family: 'Space Grotesk', sans-serif;
}

.status-badge {
    border-radius: 999px;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    display: inline-block;
}

.status-badge.ok {
    background: rgba(45, 212, 191, 0.16);
    color: #6ee7b7;
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.workspace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.mods-grid {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 0.7rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.mods-grid legend {
    color: #a5b4fc;
    padding: 0 0.4rem;
}

.mod-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text);
}

.mod-item input {
    width: auto;
}

.hidden {
    display: none;
}

.text-error {
    color: #fca5a5;
}

.inline-grid {
    display: grid;
    gap: 0.7rem;
    align-items: center;
}

.inline-grid.two-col {
    grid-template-columns: 1fr 1fr;
}

.actions-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text);
}

.check-label input {
    width: auto;
}

.admin-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1rem;
    width: min(1320px, calc(100% - 2rem));
    margin: 1rem auto;
}

.admin-sidebar {
    border-radius: 16px;
    padding: 1rem;
    height: fit-content;
    position: sticky;
    top: 1rem;
}

.admin-nav {
    display: grid;
    gap: 0.45rem;
    margin: 1rem 0;
}

.admin-nav a {
    color: var(--text);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    background: rgba(255, 255, 255, 0.03);
}

.admin-nav a:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
}

.logout-form {
    margin-top: 1rem;
}

.admin-main {
    display: grid;
    gap: 0.8rem;
}

.admin-header {
    border-radius: 14px;
    padding: 0.8rem 1rem;
}

.admin-content {
    display: grid;
    gap: 0.8rem;
}

.metric-card {
    background: rgba(7, 18, 33, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 14px;
    padding: 0.9rem;
}

.metric-card span {
    color: var(--muted);
    display: block;
}

.metric-card strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.9rem;
}

.form-card {
    display: grid;
    gap: 0.85rem;
}

.btn:active {
    transform: translateY(1px);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -14px, 0);
    }
}

@media (max-width: 1100px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .section-grid {
        grid-template-columns: 1fr;
    }

    .tutorial-grid,
    .banner-grid {
        grid-template-columns: 1fr;
    }

    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }
}

@media (max-width: 780px) {
    .container {
        width: min(1180px, calc(100% - 1.2rem));
    }

    .topbar {
        margin-top: 0.6rem;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 32px;
        height: 24px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001; /* Above the nav drawer */
        transition: all 0.3s ease;
        position: relative;
    }

    .hamburger span {
        width: 100%;
        height: 3px;
        background: var(--text);
        border-radius: 10px;
        transition: all 0.3s cubic-bezier(0.8, -0.6, 0.2, 1.5);
        position: relative;
        transform-origin: center center;
    }

    .hamburger.active span {
        background: var(--accent) !important;
    }
    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translateY(7px); }
    .hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translateY(-7px); }

    .topbar-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0.8rem 1rem;
        position: relative;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        background: rgba(11, 18, 32, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        flex-direction: column;
        align-items: stretch;
        padding: 5rem 1.5rem 2rem;
        gap: 1.2rem;
        border-bottom: none;
        border-left: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 0;
        box-shadow: -15px 0 40px rgba(0,0,0,0.8);
        
        transform: translateX(100%);
        pointer-events: none;
        visibility: hidden;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.4s;
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-links.show {
        transform: translateX(0);
        pointer-events: auto;
        visibility: visible;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0s;
    }

    /* Backdrop overlay - handled globally below */

    .nav-links a,
    .link-btn {
        font-size: 1.1rem;
        width: 100%;
        text-align: right;
        padding: 1rem 1.5rem;
        border-radius: 12px;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.03);
        transition: all 0.3s ease;
        display: block; /* Ensure full width clicking */
    }
    
    .nav-links a:hover,
    .link-btn:hover,
    .nav-links a.is-active {
        background: rgba(255, 255, 255, 0.08);
        border-color: var(--accent);
    }

    /* Keep body from scrolling when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    .button-grid,
    .mods-grid,
    .inline-grid.two-col {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 1rem;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
    }

    .hero-stats article {
        padding: 0.7rem;
    }

    .hero-stats article .stat-num {
        font-size: 1.5rem;
    }

    .cms-section-hero {
        padding: 2rem 0;
    }

    .cms-section-hero h2 {
        font-size: 1.4rem;
    }
}

/* â”€â”€ Mobile Nav Overlay â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 999;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.nav-overlay.show {
    display: block;
}

/* â”€â”€ CMS Admin Editor â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cms-section-card {
    margin-bottom: 1rem;
}
.cms-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .75rem;
}
.cms-section-header h3 {
    margin: 0;
    font-size: 1rem;
}
.cms-section-actions {
    display: flex;
    gap: .3rem;
    flex-wrap: wrap;
}
.cms-details {
    margin-top: .5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .5rem;
}
.cms-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary, #0EA5A4);
    user-select: none;
}
.cms-details[open] summary {
    margin-bottom: .5rem;
}
.cms-blocks-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: .75rem;
}
.cms-block-item {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .5rem .75rem;
    background: rgba(255,255,255,.02);
}
.cms-block-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.cms-block-preview {
    font-size: .8rem;
}
.cms-block-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}
.cms-block-form-actions {
    display: flex;
    gap: .5rem;
}
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: .75rem;
    background: rgba(14,165,164,.15);
    color: #2dd4bf;
}
.badge-success {
    background: rgba(45,212,191,.15);
    color: #2dd4bf;
}
.badge-muted {
    background: rgba(158,176,199,.12);
    color: var(--muted);
}
.badge-warning {
    background: rgba(245,158,11,.15);
    color: #F59E0B;
}
.inline-grid.three-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}
.inline-grid.four-col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
}
.actions-cell {
    display: flex;
    gap: .3rem;
    flex-wrap: wrap;
}
.btn-warning {
    background: #F59E0B;
    color: #000;
}
.btn-success {
    background: #2dd4bf;
    color: #000;
}

/* â”€â”€ CMS Frontend Rendering â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cms-section {
    padding: 2.5rem 0;
}
.cms-section-title {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
}
.cms-grid {
    display: grid;
    gap: 1.5rem;
}
.cms-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cms-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cms-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cms-col {
    min-width: 0;
}
.cms-block {
    margin-bottom: 1rem;
}
.cms-text {
    line-height: 1.8;
    font-size: 1.05rem;
}
.cms-html {
    line-height: 1.7;
}
.cms-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.cms-video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}
.cms-video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.cms-btn {
    display: inline-block;
    margin-top: .5rem;
}
.cms-spacer {
    height: 2rem;
}
.cms-section-hero {
    text-align: center;
    padding: 3.5rem 0;
}
.cms-section-cards .cms-grid > .cms-col {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
}
.cms-section-cta {
    text-align: center;
}
@media (max-width: 700px) {
    .cms-grid-2,
    .cms-grid-3,
    .cms-grid-4 {
        grid-template-columns: 1fr;
    }
    .inline-grid.three-col,
    .inline-grid.four-col {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════════════
   TUTORIALS  —  Modern, Compact, Mobile-First
   ══════════════════════════════════════════════════════ */

:root {
    --tut-radius: 14px;
    --tut-radius-sm: 10px;
    --tut-shadow: 0 8px 32px rgba(0, 0, 0, .25);
    --tut-shadow-hover: 0 16px 48px rgba(14, 165, 164, .18);
    --tut-card-bg: rgba(255, 255, 255, .03);
    --tut-card-border: rgba(255, 255, 255, .08);
}

/* ── Hero ─────────────────────────────────────────── */
.tut-hero {
    border-radius: var(--tut-radius);
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 1.5rem);
    text-align: center;
    background: linear-gradient(135deg, rgba(14, 165, 164, .15), rgba(245, 158, 11, .08));
    border: 1px solid var(--tut-card-border);
    margin-bottom: 1rem;
}
.tut-hero .pill {
    display: inline-block;
    padding: .25rem .75rem;
    border-radius: 999px;
    background: rgba(14, 165, 164, .15);
    color: var(--primary);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .5px;
    margin-bottom: .5rem;
}
.tut-hero h1 {
    margin: 0 0 .35rem;
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
    font-weight: 700;
    line-height: 1.3;
}
.tut-hero p {
    color: var(--muted);
    max-width: 580px;
    margin: 0 auto;
    font-size: clamp(.78rem, 1.4vw, .9rem);
    line-height: 1.55;
}

/* ── Filter Bar ───────────────────────────────────── */
.tut-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .5rem 0;
    justify-content: center;
    margin-bottom: 1rem;
}
.tut-filter-chip {
    padding: .35rem .85rem;
    border-radius: 999px;
    border: 1px solid var(--tut-card-border);
    background: var(--tut-card-bg);
    color: var(--text);
    text-decoration: none;
    font-size: .8rem;
    transition: all .2s ease;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    line-height: 1.4;
}
.tut-filter-chip:hover {
    border-color: var(--primary);
    background: rgba(14, 165, 164, .1);
    transform: translateY(-1px);
}
.tut-filter-chip.active {
    background: linear-gradient(120deg, var(--primary), #6ee7b7);
    color: #04232a;
    border-color: transparent;
    font-weight: 700;
}
.tut-filter-count {
    background: rgba(0, 0, 0, .25);
    padding: 1px 7px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 600;
}
.tut-filter-chip.active .tut-filter-count {
    background: rgba(255, 255, 255, .35);
}

/* ── Cards Grid ───────────────────────────────────── */
.tut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: .9rem;
}

/* ── Tutorial Card ────────────────────────────────── */
.tut-card {
    background: var(--tut-card-bg);
    border: 1px solid var(--tut-card-border);
    border-radius: var(--tut-radius-sm);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    position: relative;
}
.tut-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--tut-shadow-hover);
    border-color: rgba(14, 165, 164, .4);
}

.tut-card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(14, 165, 164, .1), rgba(245, 158, 11, .06));
}
.tut-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.tut-card:hover .tut-card-cover img {
    transform: scale(1.04);
}
.tut-card-cover-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 2.2rem;
    opacity: .55;
}

/* Badges over cover */
.tut-card-badge {
    position: absolute;
    top: .5rem;
    inset-inline-end: .5rem;
    background: linear-gradient(120deg, var(--accent), #facc15);
    color: #2f1400;
    padding: .15rem .5rem;
    border-radius: 6px;
    font-size: .68rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(245, 158, 11, .3);
}
.tut-card-type-badge {
    position: absolute;
    bottom: .5rem;
    inset-inline-start: .5rem;
    background: rgba(7, 15, 27, .85);
    backdrop-filter: blur(8px);
    padding: .2rem .5rem;
    border-radius: 5px;
    font-size: .68rem;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

/* Card body */
.tut-card-body {
    padding: .65rem .8rem .8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.tut-card-category {
    font-size: .65rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.tut-card-body h3 {
    margin: 0;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}
.tut-card-body p {
    color: var(--muted);
    font-size: .76rem;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.tut-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .68rem;
    color: var(--muted);
    padding-top: .45rem;
    border-top: 1px solid var(--tut-card-border);
    margin-top: .35rem;
}

/* ── Detail Page ──────────────────────────────────── */

/* Breadcrumb */
.tut-breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    font-size: .82rem;
    padding: .4rem 0 .8rem;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}
.tut-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    padding: .2rem .5rem;
    border-radius: 6px;
    transition: background .2s ease;
}
.tut-breadcrumb a:hover {
    background: rgba(14, 165, 164, .1);
}
.tut-breadcrumb-sep {
    color: var(--muted);
    opacity: .5;
}

/* Article container — clean, no glass effect distraction */
.tut-article {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

/* Header */
.tut-article-header {
    text-align: center;
    margin-bottom: 1.2rem;
    padding: 0 .5rem 1rem;
    border-bottom: 1px solid var(--tut-card-border);
}
.tut-article-tags {
    display: flex;
    justify-content: center;
    gap: .4rem;
    flex-wrap: wrap;
    margin-bottom: .65rem;
}
.tut-article-category {
    display: inline-block;
    padding: .2rem .65rem;
    border-radius: 999px;
    background: rgba(14, 165, 164, .12);
    color: var(--primary);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .3px;
}
.tut-article-header h1 {
    margin: .35rem 0 .5rem;
    font-size: clamp(1.25rem, 3vw, 1.85rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.02em;
}
.tut-article-excerpt {
    color: var(--muted);
    font-size: clamp(.85rem, 1.5vw, .95rem);
    max-width: 620px;
    margin: 0 auto .75rem;
    line-height: 1.65;
}
.tut-article-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .78rem;
    color: var(--muted);
}
.tut-article-meta span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.tut-article-meta svg {
    opacity: .7;
}

/* ── Media (video) ───────────────────────────────── */
.tut-media {
    margin-bottom: 1.5rem;
}
.tut-media > * + * {
    margin-top: 1rem;
}

/* YouTube/Vimeo iframe */
.tut-video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--tut-radius-sm);
    background: #000;
    max-width: 100%;
    box-shadow: var(--tut-shadow);
    isolation: isolate;
}
.tut-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}
/* Block clicks on "Watch on YouTube" watermark (bottom-right) */
.tut-video-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    inset-inline-end: 0;
    width: 200px;
    height: 42px;
    z-index: 1;
    cursor: default;
}
.tut-video-wrap iframe:fullscreen,
.tut-video-wrap iframe:-webkit-full-screen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
}

/* HTML5 video */
.tut-video-player-wrap {
    border-radius: var(--tut-radius-sm);
    overflow: hidden;
    background: #000;
    box-shadow: var(--tut-shadow);
    aspect-ratio: 16 / 9;
    max-width: 100%;
    display: block;
}
.tut-video-player-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}
.tut-video-player-wrap video:fullscreen,
.tut-video-player-wrap video:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
}
.tut-video-player-wrap video::backdrop,
.tut-video-player-wrap video::-webkit-backdrop {
    background: #000;
}

/* Admin video preview (in edit page) */
.tut-video-current {
    margin-top: .5rem;
    padding: .5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(0, 0, 0, .3);
}
.tut-video-current video {
    width: 100%;
    max-height: 200px;
    border-radius: 6px;
    display: block;
}

/* ── Article Content ─────────────────────────────── */
.tut-article-content {
    line-height: 1.85;
    font-size: .95rem;
    color: var(--text);
}
.tut-article-content > *:first-child { margin-top: 0; }
.tut-article-content > *:last-child { margin-bottom: 0; }
.tut-article-content h2 {
    margin: 1.6rem 0 .65rem;
    padding-bottom: .35rem;
    border-bottom: 2px solid rgba(14, 165, 164, .2);
    font-size: 1.2rem;
    font-weight: 700;
}
.tut-article-content h3 {
    margin: 1.2rem 0 .5rem;
    color: var(--primary);
    font-size: 1.05rem;
    font-weight: 700;
}
.tut-article-content p {
    margin: .75rem 0;
}
.tut-article-content img,
.tut-content-img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem auto;
    display: block;
    border: 1px solid var(--tut-card-border);
}
.tut-article-content blockquote {
    border-inline-start: 4px solid var(--primary);
    padding: .75rem 1.2rem;
    margin: 1rem 0;
    background: rgba(14, 165, 164, .06);
    border-radius: 0 8px 8px 0;
    color: var(--muted);
    font-style: italic;
}
.tut-article-content code {
    background: rgba(255, 255, 255, .08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .9em;
    font-family: 'Space Grotesk', monospace;
}
.tut-article-content pre {
    background: rgba(4, 9, 19, .9);
    border: 1px solid var(--tut-card-border);
    border-radius: 10px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}
.tut-article-content ul,
.tut-article-content ol {
    padding-inline-start: 1.5rem;
    margin: .75rem 0;
}
.tut-article-content li {
    margin-bottom: .35rem;
}
.tut-article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(14, 165, 164, .4);
    text-underline-offset: 3px;
}

/* ── Article Gallery ─────────────────────────────── */
.tut-article-gallery {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--tut-card-border);
}
.tut-article-gallery h2 {
    margin: 0 0 .85rem;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.tut-article-gallery h2::before {
    content: '📸';
}
.tut-article-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
    gap: .55rem;
}
.tut-gallery-figure {
    margin: 0;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--tut-card-border);
    transition: transform .25s ease, box-shadow .25s ease;
    background: var(--tut-card-bg);
}
.tut-gallery-figure:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(14, 165, 164, .2);
    border-color: var(--primary);
}
.tut-gallery-figure img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}
.tut-gallery-figure figcaption {
    padding: .35rem .55rem;
    font-size: .7rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.4;
}

/* ── Lightbox ────────────────────────────────────── */
.tut-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    backdrop-filter: blur(10px);
    animation: fadeIn .2s ease;
}
.tut-lightbox.hidden { display: none; }
.tut-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.tut-lightbox-close {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1.5rem;
    background: rgba(255, 255, 255, .12);
    border: none;
    color: #fff;
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background .2s ease;
}
.tut-lightbox-close:hover {
    background: rgba(255, 255, 255, .25);
}

/* ── Related ──────────────────────────────────────── */
.tut-related {
    width: 100%;
    max-width: 820px;
    margin: 2rem auto 0;
    padding: 1.2rem 0 0;
    border-top: 1px solid var(--tut-card-border);
}
.tut-related h2 {
    margin: 0 0 .9rem;
    font-size: 1.05rem;
    font-weight: 700;
}
.tut-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
    gap: .65rem;
}
.tut-related-card {
    background: var(--tut-card-bg);
    border: 1px solid var(--tut-card-border);
    border-radius: var(--tut-radius-sm);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, border-color .2s ease;
}
.tut-related-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}
.tut-related-cover {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(14, 165, 164, .1), rgba(245, 158, 11, .06));
}
.tut-related-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tut-related-cover-placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    font-size: 1.6rem;
    opacity: .5;
}
.tut-related-body {
    padding: .55rem .65rem .65rem;
}
.tut-related-body h4 {
    margin: 0;
    font-size: .82rem;
    line-height: 1.4;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════
   ADMIN PANEL  —  Tutorials
   ══════════════════════════════════════════════════════ */
.tut-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    display: block;
}
.tut-thumb-placeholder {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 6px;
    background: rgba(14, 165, 164, .08);
    font-size: 1.1rem;
}
.tut-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .65rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .03);
    font-size: .78rem;
}
.tut-cat-chip-name {
    font-weight: 600;
}

.page-admin-tutorials .table-card table th,
.page-admin-tutorials .table-card table td {
    padding: .5rem .45rem;
    font-size: .82rem;
}

/* Editor */
.tut-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    padding: .4rem;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    background: rgba(4, 9, 19, .6);
}
.tut-editor-area {
    border-radius: 0 0 10px 10px !important;
    font-family: 'Space Grotesk', monospace;
    font-size: .88rem;
    line-height: 1.6;
    min-height: 280px;
}
.tut-preview {
    border: 1px solid var(--border);
    border-radius: 0 0 10px 10px;
    padding: 1rem;
    background: rgba(4, 9, 19, .4);
    line-height: 1.7;
    min-height: 280px;
}

/* Admin gallery */
.tut-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .55rem;
}
.tut-gallery-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    padding: .4rem;
    background: rgba(255, 255, 255, .02);
}
.tut-gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 5px;
    display: block;
}

/* Compact admin form fields */
.page-admin-tutorial-edit label,
.page-admin-tutorials label {
    font-size: .82rem;
    margin-bottom: .15rem;
    display: block;
}
.page-admin-tutorial-edit input,
.page-admin-tutorial-edit textarea,
.page-admin-tutorial-edit select,
.page-admin-tutorials input,
.page-admin-tutorials textarea,
.page-admin-tutorials select {
    padding: .5rem .65rem;
    font-size: .88rem;
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE — mobile-first refinement
   ══════════════════════════════════════════════════════ */
@media (max-width: 980px) {
    .tut-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
        gap: .7rem;
    }
}

@media (max-width: 720px) {
    .tut-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: .55rem;
    }
    .tut-card-body {
        padding: .55rem .65rem .7rem;
    }
    .tut-card-body h3 {
        font-size: .82rem;
        min-height: 2.3em;
    }
    .tut-card-body p {
        display: none;
    }
    .tut-card-meta {
        font-size: .62rem;
    }

    /* Article on mobile — use full container width */
    .tut-article,
    .tut-breadcrumb,
    .tut-related {
        max-width: 100%;
    }
    .tut-article-header {
        padding: 0 0 .85rem;
        margin-bottom: .85rem;
    }
    .tut-article-meta {
        gap: .65rem;
        font-size: .72rem;
    }

    /* Video bleed — stretch beyond article padding to fill screen */
    .tut-media {
        margin-inline: -1rem;
    }
    .tut-video-wrap,
    .tut-video-player-wrap {
        border-radius: 0;
    }

    .tut-article-content {
        font-size: .92rem;
        line-height: 1.75;
    }
    .tut-article-content h2 {
        font-size: 1.08rem;
    }
    .tut-article-content h3 {
        font-size: 1rem;
    }

    .tut-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tut-article-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tut-filter-chip {
        font-size: .74rem;
        padding: .3rem .65rem;
    }
}

@media (max-width: 460px) {
    .tut-grid {
        grid-template-columns: 1fr;
    }
    .tut-card-cover {
        aspect-ratio: 21 / 9;
    }
    .tut-card-body h3 {
        font-size: .9rem;
        min-height: auto;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    .tut-related-grid {
        grid-template-columns: 1fr;
    }
    .tut-related-cover {
        aspect-ratio: 21 / 9;
    }
    .tut-article-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tut-hero {
        padding: 1rem .85rem;
    }

    /* Video edge-to-edge on small phones */
    .tut-media {
        margin-inline: calc(-0.6rem - env(safe-area-inset-left, 0px));
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ══════════════════════════════════════════════════════
   NEWS TICKER — Professional Scrolling Bar
   ══════════════════════════════════════════════════════ */

.news-ticker {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(90deg, #060d18, var(--ticker-bg, #0a0f1a), #060d18);
    font-size: var(--ticker-font-size, 15px);
    color: var(--ticker-color, #fff);
    display: flex;
    align-items: center;
    z-index: 100;
    min-height: 46px;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Top & bottom glowing border lines */
.news-ticker::before,
.news-ticker::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 5;
    pointer-events: none;
}
.news-ticker::before {
    top: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--ticker-glow, #0EA5A4) 20%,
        var(--ticker-glow, #0EA5A4) 80%,
        transparent 100%);
    opacity: 0.8;
    animation: tickerGlowPulse 2s ease-in-out infinite;
}
.news-ticker::after {
    bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--ticker-glow, #0EA5A4) 20%,
        var(--ticker-glow, #0EA5A4) 80%,
        transparent 100%);
    opacity: 0.5;
    animation: tickerGlowPulse 2s ease-in-out infinite 1s;
}

@keyframes tickerGlowPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Logo badge on the right */
.ticker-logo {
    flex-shrink: 0;
    padding: 0 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 46px;
    z-index: 4;
    position: relative;
    background: linear-gradient(90deg, rgba(14, 165, 164, 0.12), transparent);
    border-left: 1px solid rgba(14, 165, 164, 0.25);
}
.ticker-logo img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 6px var(--ticker-glow, #0EA5A4));
    animation: tickerLogoGlow 2.5s ease-in-out infinite;
}
@keyframes tickerLogoGlow {
    0%, 100% { filter: drop-shadow(0 0 4px var(--ticker-glow, #0EA5A4)); }
    50% { filter: drop-shadow(0 0 12px var(--ticker-glow, #0EA5A4)); }
}

/* Scrolling track */
.ticker-track {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Fade edges */
.ticker-track::before,
.ticker-track::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 3;
    pointer-events: none;
}
.ticker-track::before {
    right: 0;
    background: linear-gradient(to left, #060d18 10%, transparent);
}
.ticker-track::after {
    left: 0;
    background: linear-gradient(to right, #060d18 10%, transparent);
}

/* The actual scrolling content */
.ticker-content {
    display: inline-flex;
    animation: tickerScroll var(--ticker-speed, 30s) linear infinite;
    animation-delay: 0s;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    will-change: transform;
}

.ticker-content span {
    display: inline-block;
    white-space: nowrap;
    padding: 0 3rem;
    text-shadow: 0 0 10px rgba(14, 165, 164, 0.35);
    line-height: 46px;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

/* Move half the total duplicated content width for seamless loop */
@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.news-ticker:hover .ticker-content {
    animation-play-state: paused;
}

/* Ambient glow underneath */
.news-ticker-glow {
    position: absolute;
    bottom: -8px;
    left: 10%;
    right: 10%;
    height: 12px;
    background: radial-gradient(ellipse at center, var(--ticker-glow, #0EA5A4), transparent 70%);
    opacity: 0.25;
    z-index: -1;
    pointer-events: none;
    filter: blur(6px);
}

@media (max-width: 780px) {
    .news-ticker {
        min-height: 36px;
        font-size: 13px;
    }
    .ticker-content span {
        line-height: 36px;
        padding: 0 1.5rem;
        font-size: 13px;
    }
    .ticker-logo {
        padding: 0 0.4rem;
        min-height: 36px;
    }
    .ticker-logo img {
        height: 32px;
    }
    .ticker-track::before,
    .ticker-track::after {
        width: 20px;
    }
}

/* ══════════════════════════════════════════════════════
   ANIMATED GLOW BORDER — Moving Light on All Sections
   ══════════════════════════════════════════════════════ */

@property --glow-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes glowSpin {
    to { --glow-angle: 360deg; }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

@keyframes outerGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(14, 165, 164, 0.08), 0 20px 40px rgba(1, 5, 12, 0.45); }
    50% { box-shadow: 0 0 30px rgba(14, 165, 164, 0.18), 0 0 60px rgba(245, 158, 11, 0.08), 0 20px 40px rgba(1, 5, 12, 0.45); }
}

/* Sections that get the moving light border */
.hero,
.hero-stats article,
.cms-section-cards .cms-grid > .cms-col,
.slider-wrapper,
.banner-list > h2,
.cms-section-title {
    position: relative;
}

/* The animated border ring */
.hero::after,
.hero-stats article::after,
.cms-section-cards .cms-grid > .cms-col::after,
.slider-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(
        from var(--glow-angle),
        transparent 0%,
        transparent 20%,
        rgba(14, 165, 164, 0.6) 27%,
        var(--primary) 30%,
        var(--accent) 36%,
        rgba(245, 158, 11, 0.6) 40%,
        transparent 45%,
        transparent 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: glowSpin 3.5s linear infinite, glowPulse 3.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
}

/* Stagger animation delays for natural look */
.hero-stats article:nth-child(2)::after,
.cms-section-cards .cms-grid > .cms-col:nth-child(2)::after {
    animation-delay: -1.2s, -1.2s;
}
.hero-stats article:nth-child(3)::after,
.cms-section-cards .cms-grid > .cms-col:nth-child(3)::after {
    animation-delay: -2.4s, -2.4s;
}

/* Subtle outer glow aura */
.hero-stats article,
.cms-section-cards .cms-grid > .cms-col,
.slider-wrapper {
    animation: outerGlow 4s ease-in-out infinite;
}

.cms-section-cards .cms-grid > .cms-col:nth-child(2),
.hero-stats article:nth-child(2) {
    animation-delay: -1.3s;
}
.cms-section-cards .cms-grid > .cms-col:nth-child(3),
.hero-stats article:nth-child(3) {
    animation-delay: -2.6s;
}

/* Glowing underline for section titles */
.cms-section-title,
.banner-list > h2 {
    display: inline-block;
    width: 100%;
}
.cms-section-title::after,
.banner-list > h2::after {
    content: '';
    display: block;
    height: 3px;
    margin-top: 0.5rem;
    border-radius: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--primary) var(--glow-pct, 30%),
        var(--accent) calc(var(--glow-pct, 30%) + 12%),
        transparent calc(var(--glow-pct, 30%) + 25%)
    );
    animation: titleScan 3s ease-in-out infinite;
}

@keyframes titleScan {
    0%   { --glow-pct: 0%; opacity: 0.6; }
    50%  { --glow-pct: 75%; opacity: 1; }
    100% { --glow-pct: 0%; opacity: 0.6; }
}

/* Ensure hero fadeUp still works alongside glow */
.hero {
    animation: fadeUp 0.6s ease, outerGlow 4s ease-in-out infinite 0.6s;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero::after,
    .hero-stats article::after,
    .cms-section-cards .cms-grid > .cms-col::after,
    .slider-wrapper::after,
    .cms-section-title::after,
    .banner-list > h2::after {
        animation: none;
    }
    .hero-stats article,
    .cms-section-cards .cms-grid > .cms-col,
    .slider-wrapper,
    .hero {
        animation: none;
    }
}
