/* ==========================================================================
   MAXXMA Knowledge Hub — Rainy Drive Article
   Light Theme + 3D Parallax Scroller UX
   Brand: Modern Light Pro-tier
   ========================================================================== */

/* ── CSS Variables (Light Theme) ───────────────────────────────────────── */
:root {
    --rd-white: #ffffff;
    --rd-off-white: #f8f9fa;
    --rd-light-gray: #e9ecef;
    --rd-mid-gray: #6c757d;
    --rd-dark: #212529;
    --rd-blue: #48819f;
    --rd-blue-dark: #366b87;
    --rd-gold: #d99435;
    --rd-gold-light: #f0c060;
    --rd-yellow: #e9c34c;
    --rd-text-green: #89802f;
    --rd-accent: #947e33;
    --rd-radius: 16px;
    --rd-radius-sm: 10px;
    --rd-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --rd-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --rd-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.10);
    --rd-transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --rd-max-width: 900px;
}

/* ── Reset & Base ───────────────────────────────────────────────────────── */
body {
    background: var(--rd-off-white);
    color: var(--rd-dark);
}

/* ── 3D Scene Layer ─────────────────────────────────────────────────────── */
.rd-scene {
    opacity: 0;
    transform: translateY(40px);
    transform: translateY(40px) translateY(var(--rd-parallax-y, 0px));
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
}

.rd-scene--visible {
    opacity: 1;
    transform: translateY(0) translateY(var(--rd-parallax-y, 0px));
}

/* ═════════════════════════════════════════════════════════════════════════
   HERO — Full-bleed parallax with overlay
   ═════════════════════════════════════════════════════════════════════════ */
.rd-hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--rd-dark);
    margin-bottom: 4rem;
}

.rd-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.rd-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rd-hero:hover .rd-hero__img,
.rd-hero:focus-within .rd-hero__img {
    transform: scale(1);
}

.rd-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        rgba(9, 12, 18, 0.85) 0%,
        rgba(9, 12, 18, 0.45) 40%,
        rgba(9, 12, 18, 0.15) 70%,
        rgba(9, 12, 18, 0.05) 100%
    );
}

.rd-hero__content {
    position: relative;
    z-index: 2;
    max-width: var(--rd-max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
    color: #ffffff;
}

.rd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    opacity: 0.85;
}

.rd-breadcrumb a {
    color: var(--rd-gold-light);
    text-decoration: none;
    transition: color 0.2s;
}

.rd-breadcrumb a:hover {
    color: #ffffff;
}

.rd-breadcrumb span {
    color: rgba(255, 255, 255, 0.7);
}

.rd-hero__category {
    display: inline-block;
    background: var(--rd-gold);
    color: #ffffff;
    padding: 0.3rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.rd-hero__content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

.rd-hero__subtitle {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    max-width: 680px;
    margin: 0 0 1.5rem;
}

.rd-hero__subtitle strong {
    color: var(--rd-gold-light);
}

.rd-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.rd-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* ═════════════════════════════════════════════════════════════════════════
   ARTICLE BODY
   ═════════════════════════════════════════════════════════════════════════ */
.rd-article {
    position: relative;
    z-index: 1;
}

.rd-article__container {
    max-width: var(--rd-max-width);
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

/* ── Section ────────────────────────────────────────────────────────────── */
.rd-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 5rem;
    padding: 2.5rem;
    background: var(--rd-white);
    border-radius: var(--rd-radius);
    box-shadow: var(--rd-shadow-sm);
    border: 1px solid var(--rd-light-gray);
    transition: box-shadow var(--rd-transition), transform var(--rd-transition);
}

.rd-section:hover {
    box-shadow: var(--rd-shadow-md);
    transform: translateY(-2px);
}

.rd-section__title {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 700;
    color: var(--rd-dark);
    line-height: 1.35;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.rd-section__num {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rd-blue);
    opacity: 0.8;
}

.rd-section__num--gold {
    color: var(--rd-gold);
    opacity: 1;
}

.rd-section__body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #495057;
}

.rd-section__body p {
    margin: 0 0 1.25rem;
}

.rd-section__body p:last-child {
    margin-bottom: 0;
}

.rd-section__body strong {
    color: var(--rd-dark);
}

.rd-section__body ul {
    padding-left: 1.5rem;
    margin: 0 0 1.25rem;
}

.rd-section__body li {
    margin-bottom: 0.6rem;
}

.rd-section__body li:last-child {
    margin-bottom: 0;
}

/* ── Section with visual (image side by side) ──────────────────────────── */
@media (min-width: 768px) {
    .rd-section:has(.rd-section__visual) {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    .rd-section:has(.rd-section__visual--left) {
        direction: rtl;
    }

    .rd-section:has(.rd-section__visual--left) .rd-section__text {
        direction: ltr;
    }
}

.rd-section__visual {
    border-radius: var(--rd-radius-sm);
    overflow: hidden;
    box-shadow: var(--rd-shadow-md);
    transition: transform var(--rd-transition), box-shadow var(--rd-transition);
}

.rd-section__visual:hover {
    transform: scale(1.02);
    box-shadow: var(--rd-shadow-lg);
}

.rd-section__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

/* ── Science Section (special styling) ─────────────────────────────────── */
.rd-section--science {
    background: linear-gradient(135deg, #f0f6fa 0%, #e8f0f5 100%);
    border-color: #d0dce6;
    border-left: 5px solid var(--rd-blue);
}

.rd-science-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.rd-science-card {
    background: var(--rd-white);
    padding: 1.5rem;
    border-radius: var(--rd-radius-sm);
    border: 1px solid var(--rd-light-gray);
    box-shadow: var(--rd-shadow-sm);
    transition: box-shadow var(--rd-transition), transform var(--rd-transition);
}

.rd-science-card:hover {
    box-shadow: var(--rd-shadow-md);
    transform: translateY(-3px);
}

.rd-science-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--rd-blue-dark);
    margin: 0 0 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--rd-gold-light);
}

.rd-science-card p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: #495057;
    margin: 0;
}

.rd-polarized-callout {
    margin-top: 2rem;
    padding: 1.75rem;
    background: var(--rd-white);
    border-radius: var(--rd-radius-sm);
    border: 1px solid var(--rd-light-gray);
    border-left: 4px solid var(--rd-gold);
}

.rd-polarized-callout h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--rd-accent);
    margin: 0 0 0.75rem;
}

.rd-polarized-callout p {
    font-size: 0.98rem;
    line-height: 1.8;
    color: #495057;
    margin: 0 0 1rem;
}

.rd-polarized-callout p:last-child {
    margin-bottom: 0;
}

/* ── CTA Section ────────────────────────────────────────────────────────── */
.rd-section--cta {
    background: linear-gradient(135deg, #fef9f0 0%, #fdf3e0 100%);
    border: 2px solid var(--rd-gold-light);
    text-align: center;
}

.rd-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--rd-transition);
}

.rd-btn--primary {
    background: var(--rd-gold);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(217, 148, 53, 0.35);
}

.rd-btn--primary:hover {
    background: #c8852f;
    box-shadow: 0 6px 20px rgba(217, 148, 53, 0.5);
    transform: translateY(-2px);
}

/* ═════════════════════════════════════════════════════════════════════════
   EXPERTISE BAR (E-E-A-T)
   ═════════════════════════════════════════════════════════════════════════ */
.rd-expertise {
    max-width: var(--rd-max-width);
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
}

.rd-expertise__inner {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, #eaf2f7 0%, #e0ebf2 100%);
    border-radius: var(--rd-radius);
    border: 1px solid #c5d5e0;
}

.rd-expertise__icon {
    flex-shrink: 0;
    color: var(--rd-blue);
    margin-top: 0.2rem;
}

.rd-expertise__text h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--rd-dark);
    margin: 0 0 0.4rem;
}

.rd-expertise__text h3 strong {
    color: var(--rd-accent);
}

.rd-expertise__text p {
    font-size: 0.9rem;
    color: var(--rd-mid-gray);
    line-height: 1.6;
    margin: 0;
}

/* ═════════════════════════════════════════════════════════════════════════
   RELATED ARTICLES
   ═════════════════════════════════════════════════════════════════════════ */
.rd-related {
    max-width: var(--rd-max-width);
    margin: 0 auto 5rem;
    padding: 0 1.5rem;
}

.rd-related__container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--rd-dark);
    margin: 0 0 1.5rem;
}

.rd-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

.rd-related__card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--rd-white);
    border-radius: var(--rd-radius-sm);
    border: 1px solid var(--rd-light-gray);
    text-decoration: none;
    color: var(--rd-dark);
    transition: all var(--rd-transition);
    box-shadow: var(--rd-shadow-sm);
}

.rd-related__card:hover {
    border-color: var(--rd-gold-light);
    box-shadow: var(--rd-shadow-md);
    transform: translateY(-3px);
}

.rd-related__card h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 0.75rem;
}

.rd-related__card span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rd-gold);
    margin-top: auto;
}

/* ═════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    .rd-hero {
        min-height: 60vh;
    }

    .rd-hero__content {
        padding: 2rem 1.25rem 3rem;
    }

    .rd-hero__meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .rd-section {
        padding: 1.5rem;
        margin-bottom: 3rem;
        gap: 1.5rem;
    }

    .rd-section__visual {
        order: -1;
    }

    .rd-science-grid {
        grid-template-columns: 1fr;
    }

    .rd-expertise__inner {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem;
    }

    .rd-related__grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1200px) {
    .rd-article__container {
        padding: 0;
    }

    .rd-section {
        padding: 3rem;
    }
}