/**
 * DuraIsiphala263 Banner
 * Featured image background + green gradient overlay + moving particles
 *
 * @package Astra Child
 */

/* ─── Reset horizontal overflow from breakout ─────────────────────────── */
html, body { overflow-x: hidden !important; }

/* ─── CSS Custom Properties ─────────────────────────────────────────────── */
:root {
    --ban-height-desk:   320px;
    --ban-height-tab:    280px;
    --ban-height-mob:    240px;

    /* Palette */
    --ban-bg:         #000000;          /* DuraIsiphala Black */
    --ban-green:      #2E7D32;          /* Primary */
    --ban-green-dim:  #1B5E20;          /* Secondary */
    --ban-green-glow: rgba(46,125,50,.45);
    --ban-green-line: rgba(46,125,50,.18);
    --ban-neon:       #2E7D32;          /* Primary */
    --ban-white:      #ffffff;
    --ban-muted:      rgba(255,255,255,.65);
    --ban-chip-bg:    rgba(46,125,50,.10);
    --ban-chip-bdr:   rgba(46,125,50,.35);

    --ban-ease: cubic-bezier(.25,.8,.25,1);
}

/* ─── Section Shell ─────────────────────────────────────────────────────── */
.rio-banner {
    position: relative;
    /* Full-bleed breakout from boxed layouts */
    width:  100vw;
    margin-left: calc(-50vw + 50%);
    min-height: var(--ban-height-desk);
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--ban-bg);
    z-index: 1;
}

/* ─── Fallback dark-green base (shows when no featured image) ───────────── */
.rio-banner-base {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #021a0e 0%, #04301a 60%, #062d18 100%);
    z-index: 0;
}

/* ─── Photo Background — full visible when featured image is set ─────────── */
.rio-banner-photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    opacity: 1;
    z-index: 1;
    transform: scale(1.04);
    transition: transform 10s ease-out;
}
.rio-banner:hover .rio-banner-photo { transform: scale(1); }

/*
 * ─── Green Gradient Overlay (left → right) ──────────────────────────────
 * Left:   very dark green — near-black so text is always legible.
 * Centre: mid emerald — fades in as the image becomes visible.
 * Right:  fully transparent — featured image shows completely.
 */
.rio-banner-overlay-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to right,
            rgba(1, 20, 12, 0.98)   0%,    /* near-black dark green — opaque   */
            rgba(2, 38, 22, 0.94)  20%,    /* very dark forest green            */
            rgba(4, 64, 38, 0.82)  40%,    /* dark emerald                      */
            rgba(7, 100, 58, 0.50) 60%,    /* mid emerald — half transparent    */
            rgba(16,185,129, 0.18) 80%,    /* bright emerald — nearly gone      */
            transparent            100%    /* fully transparent — image shows   */
        );
    z-index: 2;
}

/* ─── Canvas (Particles — dots only, no lines) ──────────────────────────── */
.rio-banner-canvas {
    position: absolute;
    inset: 0;
    width:  100% !important;
    height: 100% !important;
    z-index: 3;
    pointer-events: none;
}

/* Scanline removed — particles only */

/* ─── Content Layer ─────────────────────────────────────────────────────── */
.rio-banner-overlay {
    position: relative;
    z-index: 4;          /* sits above gradient (z:2) and canvas (z:3) */
    width: 100%;
}

.rio-banner-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 64px 32px;
    display: flex;
    align-items: center;
    gap: 48px;
}

/* ─── Left Accent Bar ───────────────────────────────────────────────────── */
.rio-banner-accent-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.accent-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ban-green);
    box-shadow: 0 0 8px var(--ban-green-glow), 0 0 20px var(--ban-green-glow);
    animation: pulseDot 2s ease-in-out infinite;
}
.accent-dot:last-child { animation-delay: 1s; }

.accent-line {
    width: 2px;
    height: 80px;
    background: linear-gradient(180deg, var(--ban-green) 0%, transparent 100%);
    border-radius: 1px;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%       { transform: scale(1.4); opacity: .6; }
}

/* ─── Text Block ────────────────────────────────────────────────────────── */
.rio-banner-text {
    flex: 1;
    min-width: 0;
}

/* Tech chip label */
.rio-banner-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--ban-chip-bg);
    border: 1px solid var(--ban-chip-bdr);
    padding: 6px 14px 6px 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ban-neon);
}

.chip-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ban-green);
    box-shadow: 0 0 0 0 var(--ban-green-glow);
    animation: chipPulse 1.8s ease-out infinite;
    flex-shrink: 0;
}

@keyframes chipPulse {
    0%   { box-shadow: 0 0 0 0   var(--ban-green-glow); }
    70%  { box-shadow: 0 0 0 10px transparent; }
    100% { box-shadow: 0 0 0 0   transparent; }
}

/* Page Title */
.rio-banner-title {
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fadeSlide .7s var(--ban-ease) both;
}

.title-line {
    display: block;
    font-family: 'Frank Ruhl Libre', serif;
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 800;
    color: var(--ban-white);
    line-height: 1.2;
    letter-spacing: -.5px;
    /* Neon text underline */
    text-decoration: none;
    position: relative;
}

/* Green glowing underline on title */
.title-line::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    margin-top: 12px;
    background: linear-gradient(90deg, var(--ban-green), var(--ban-neon));
    border-radius: 2px;
    box-shadow: 0 0 10px var(--ban-green-glow);
}

.title-sub {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(.9rem, 1.6vw, 1.1rem);
    font-weight: 400;
    color: var(--ban-muted);
    line-height: 1.55;
    letter-spacing: .01em;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Breadcrumb ────────────────────────────────────────────────────────── */
.rio-banner-breadcrumb {
    animation: fadeSlide .7s var(--ban-ease) .15s both;
}

.rio-breadcrumb-nav { display: inline-block; }

.breadcrumb-container {
    display: flex;
    align-items: center;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: .8rem;
    font-weight: 500;
    color: var(--ban-muted);
    font-family: 'Montserrat', sans-serif;
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,.55);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid transparent;
    transition: color .25s var(--ban-ease), border-color .25s var(--ban-ease), background .25s var(--ban-ease);
    white-space: nowrap;
}

.breadcrumb-link:hover {
    color: var(--ban-neon);
    border-color: var(--ban-chip-bdr);
    background: var(--ban-chip-bg);
    text-decoration: none;
}

.breadcrumb-home-icon,
.breadcrumb-separator {
    width: 13px;
    height: 13px;
    opacity: .5;
}

.breadcrumb-separator { margin: 0 2px; }

.breadcrumb-current {
    color: var(--ban-green);
    font-weight: 600;
}

.breadcrumb-current span {
    padding: 4px 8px;
    background: rgba(16,185,129,.08);
    border: 1px solid rgba(16,185,129,.2);
    border-radius: 3px;
    display: inline-block;
}

/* ─── HUD Decoration ────────────────────────────────────────────────────── */
.rio-banner-hud {
    flex-shrink: 0;
    width: 180px;
    height: 140px;
    position: relative;
    animation: fadeSlide .8s var(--ban-ease) .3s both;
}

/* Corner brackets */
.hud-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: var(--ban-green);
    border-style: solid;
    opacity: .8;
}
.hud-tl { top: 0; left: 0;  border-width: 2px 0 0 2px; }
.hud-tr { top: 0; right: 0; border-width: 2px 2px 0 0; }
.hud-bl { bottom: 0; left: 0;  border-width: 0 0 2px 2px; }
.hud-br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

.hud-inner {
    position: absolute;
    inset: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.hud-line {
    height: 2px;
    background: linear-gradient(90deg, var(--ban-green) 0%, transparent 100%);
    border-radius: 1px;
    animation: hudLinePulse 2.5s ease-in-out infinite alternate;
    opacity: .7;
}

.hud-line--short { width: 55%; animation-delay: .6s; }

@keyframes hudLinePulse {
    from { opacity: .3; transform: scaleX(.8); transform-origin: left; }
    to   { opacity: .8; transform: scaleX(1);  transform-origin: left; }
}

.hud-dot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 4px;
}

.hud-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ban-green);
    opacity: .3;
    animation: dotBlink 3s ease-in-out infinite;
}

/* Stagger each dot's blink */
.hud-dot:nth-child(1)  { animation-delay: 0s; }
.hud-dot:nth-child(2)  { animation-delay: .25s; }
.hud-dot:nth-child(3)  { animation-delay: .5s; }
.hud-dot:nth-child(4)  { animation-delay: .75s; }
.hud-dot:nth-child(5)  { animation-delay: 1s; }
.hud-dot:nth-child(6)  { animation-delay: 1.25s; }
.hud-dot:nth-child(7)  { animation-delay: 1.5s; }
.hud-dot:nth-child(8)  { animation-delay: 1.75s; }
.hud-dot:nth-child(9)  { animation-delay: 2s; }
.hud-dot:nth-child(10) { animation-delay: 2.25s; }
.hud-dot:nth-child(11) { animation-delay: 2.5s; }
.hud-dot:nth-child(12) { animation-delay: 2.75s; }

@keyframes dotBlink {
    0%, 100% { opacity: .15; }
    50%       { opacity: .9; background: var(--ban-neon); }
}

/* ─── Tablet ────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .rio-banner { min-height: var(--ban-height-tab); }
    .rio-banner-inner { padding: 52px 28px; gap: 32px; }
    .rio-banner-hud { width: 140px; height: 110px; }
}

/* ─── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .rio-banner { min-height: var(--ban-height-mob); }

    .rio-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 40px 20px;
        gap: 0;
    }

    /* Hide side decorations on mobile for clean layout */
    .rio-banner-accent-bar,
    .rio-banner-hud { display: none; }

    .rio-banner-chip { font-size: .7rem; margin-bottom: 14px; }

    .title-line { font-size: clamp(1.5rem, 7vw, 2rem); }

    .breadcrumb-container {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .breadcrumb-container::-webkit-scrollbar { display: none; }
    .breadcrumb-list { flex-wrap: nowrap; }
}

@media (max-width: 480px) {
    .rio-banner { min-height: 240px; }
    .rio-banner-inner { padding: 30px 16px; }
    .rio-banner-chip { display: none; }  /* hide on very small screens */
}

/* ─── Reduced Motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .accent-dot,
    .chip-pulse,
    .hud-line,
    .hud-dot,
    .rio-banner-photo { animation: none !important; transition: none !important; }

    .rio-banner-title,
    .rio-banner-breadcrumb,
    .rio-banner-hud { animation: none !important; opacity: 1 !important; transform: none !important; }
}
