/* =========================================================
   Reactoo News — vibrant overlay
   ---------------------------------------------------------
   Loads AFTER style.css and css/app/app.css.
   Re-skins the news listing and article pages to match the
   current Reactoo brand (vibrant palette, ALL CAPS, gradient
   text moves, bg_circles texture on dark sections). The
   article body sits on white per Marc's direction; the hero
   strip and contact section remain dark with brand texture.
   ========================================================= */

:root {
    /* ------------------------------------------------------
       Tokens — mirrored from projects/reactoo-website/styles.css.
       Don't divergent these. If the website changes, update here.
       ------------------------------------------------------ */
    --bg:             #0A0C10;
    --bg-soft:        #0E1116;
    --ink:            #0A0C10;
    --ink-2:          #1A1E26;
    --ink-muted:      #5A6072;
    --line-light:     #E5E7EC;
    --line-light-2:   #F0F2F5;
    --white:          #FFFFFF;
    --paper:          #FFFFFF;
    --paper-soft:     #F7F8FA;

    --magenta:        #FF2E78;
    --magenta-hot:    #FF4F8E;
    --magenta-deep:   #D11463;
    --magenta-glow:   rgba(255,46,120,0.30);

    --yellow:         #FFD60A;
    --green:          #00DD78;
    --blue:           #1F86FF;

    --grad-primary:   linear-gradient(95deg, #FF2E78 0%, #1F86FF 100%);
    --grad-energy:    linear-gradient(95deg, #FF2E78 0%, #FFD60A 100%);
    --grad-trust:     linear-gradient(95deg, #00DD78 0%, #1F86FF 100%);
    --grad-growth:    linear-gradient(95deg, #FFD60A 0%, #00DD78 100%);

    --shadow-sm:      0 4px 14px rgba(10,12,16,0.06);
    --shadow-md:      0 10px 30px rgba(10,12,16,0.10);
    --shadow-lg:      0 24px 60px rgba(10,12,16,0.18);
    --shadow-magenta: 0 14px 36px rgba(255,46,120,0.28);

    --r-sm:           10px;
    --r-md:           16px;
    --r-lg:           22px;

    --font:           "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ----- Base resets — body stays WHITE per Marc ------------- */
html, body {
    background-color: var(--white) !important;
    color: var(--ink);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Kill the legacy red header gradient if the parent theme injects one */
header.main {
    background: transparent !important;
    box-shadow: none !important;
}

/* ----- Shared gradient text helper ------------------------- */
.r-accent,
.r-accent--primary {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.r-accent--energy {
    background: var(--grad-energy);
    -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
}
.r-accent--trust {
    background: var(--grad-trust);
    -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
}
.r-accent--growth {
    background: var(--grad-growth);
    -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
}

/* ============================================================
   1. HERO — header.masthead.news
   Dark base + soft magenta bg_circles (the source dark→red SVG
   hue-rotated into magenta, same recipe as the live website's
   .atmoszone). ALL CAPS title with gradient on accent word.
   ============================================================ */
header.masthead.news {
    position: relative;
    isolation: isolate;
    background: var(--bg) !important;
    background-color: var(--bg) !important;
    color: var(--white);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
}

/* Soft magenta circles — extend past edges, cover, hue-rotated */
header.masthead.news::before {
    content: "";
    position: absolute;
    inset: -8% -4%;
    background-image: url("../../img/brand/bg_circles.svg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: -1;
    opacity: 0.95;
    /* shift dark→red ellipses into dark→magenta */
    filter: hue-rotate(-22deg) saturate(1.15);
}

/* Atmospheric overlay — adds depth and pulls the eye to the copy */
header.masthead.news::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 500px at 85% 15%, rgba(31,134,255,0.16), transparent 60%),
        radial-gradient(1100px 700px at 50% 50%, transparent 30%, rgba(10,12,16,0.45) 75%, rgba(10,12,16,0.85) 100%),
        linear-gradient(180deg, rgba(10,12,16,0.30) 0%, rgba(10,12,16,0.10) 40%, rgba(10,12,16,0.55) 100%);
    pointer-events: none;
    z-index: -1;
}

header.masthead.news .container { position: relative; z-index: 2; }

header.masthead.news .intro-text {
    padding-top: 24vh;
    padding-bottom: 140px;
    text-align: left;
}

@media (min-width: 768px) {
    header.masthead.news .intro-text {
        padding-top: 22vh;
        padding-bottom: 180px;
    }
}

/* Kicker (we'll wrap one in home.php) */
header.masthead.news .intro-kicker {
    display: inline-block;
    margin: 0 0 18px;
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.04);
}

header.masthead.news .intro-heading,
header.masthead.news .intro-text .intro-heading {
    display: block;
    margin: 0;
    color: var(--white);
    font-family: var(--font);
    font-weight: 900;
    font-size: clamp(40px, 7vw, 84px);
    line-height: 0.98;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    text-shadow: none;
}

/* Strip inline color:red from old markup */
header.masthead.news .intro-text .intro-heading[style*="red"],
header.masthead.news .intro-text .intro-heading[style] {
    color: var(--white) !important;
}

header.masthead.news .intro-heading + .intro-heading {
    margin-top: 4px;
}

header.masthead.news .intro-lede {
    max-width: 56ch;
    margin: 18px 0 0;
    color: rgba(255,255,255,0.78);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.5;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* ============================================================
   2. NEWS LISTING GRID — section#news
   White body, white cards on white background with soft shadows.
   ============================================================ */
section#news {
    background: var(--white);
    color: var(--ink);
    padding: 72px 0 96px;
}

@media (min-width: 768px) {
    section#news { padding: 96px 0 120px; }
}

section#news .container { max-width: 1200px; }

section#news .row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin-left: 0;
    margin-right: 0;
}

@media (min-width: 720px) {
    section#news .row { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    section#news .row { grid-template-columns: repeat(3, 1fr); }
}

/* Each card is the <a class="col-sm-4">; defang Bootstrap col widths */
section#news a.col-sm-4 {
    width: 100%;
    max-width: 100%;
    flex: none;
    padding: 0;
    margin: 0;
}

/* Link reset for cards */
section#news a:link,
section#news a:visited,
section#news a:hover { text-decoration: none; }

section#news .news-headline {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--white);
    border: 1px solid var(--line-light);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    text-align: left;
}

section#news a:hover .news-headline {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(255,46,120,0.10);
    border-color: rgba(255,46,120,0.35);
}

/* Thumbnail — fill card width, fixed aspect */
section#news .news-headline img,
section#news .news-headline .post-thumbnail img,
section#news img {
    display: block;
    width: 100% !important;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
}

/* The card meta block — wrap title + date */
section#news .news-headline h5 {
    margin: 18px 22px 8px;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -0.005em;
    text-transform: uppercase;
    color: var(--ink);
    /* Clamp to 3 lines so cards stay balanced */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

section#news .news-headline p.article-date {
    margin: 0 22px 20px;
    padding-top: 12px;
    border-top: 1px solid var(--line-light-2);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--magenta-deep);
}

section#news a:hover .news-headline h5 { color: var(--magenta-deep); }

/* ============================================================
   3. ARTICLE PAGE — section#article (single.php)
   White body, ALL CAPS title, magenta meta, white share buttons.
   ============================================================ */
section#article {
    background: var(--white);
    color: var(--ink);
    padding: 56px 0 80px;
}

@media (min-width: 768px) {
    section#article { padding: 88px 0 96px; }
}

section#article .container { max-width: 1200px; }

/* Back link */
section#article .container > .row:first-child p a,
section#article a.r-back,
section#article p > a[href="/news"] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--magenta-deep);
    margin-bottom: 18px;
}
section#article p > a[href="/news"]:hover { color: var(--magenta); }

/* Title */
section#article h3,
section#article h1.r-article-title {
    margin: 6px 0 16px;
    font-family: var(--font);
    font-size: clamp(28px, 4.2vw, 48px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--ink);
}

/* Date / kicker under title */
section#article p.article-date {
    margin: 0 0 18px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--magenta-deep);
}

/* Intro / excerpt */
section#article p.article-intro {
    font-size: clamp(17px, 1.8vw, 20px);
    line-height: 1.5;
    color: var(--ink-2);
    font-weight: 400;
    margin: 0 0 24px;
}

/* Featured image (right column) */
section#article .post-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
}
section#article .post-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
}

/* Divider above body content */
section#article .container > .row + .row {
    border-top: 1px solid var(--line-light) !important;
    padding-top: 36px !important;
    margin-top: 32px !important;
}

/* Body content typography */
section#article .col-md-9 p,
section#article .col-md-9 li {
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink-2);
    margin: 0 0 18px;
}

section#article .col-md-9 h1,
section#article .col-md-9 h2,
section#article .col-md-9 h3,
section#article .col-md-9 h4 {
    font-family: var(--font);
    font-weight: 800;
    color: var(--ink);
    margin: 32px 0 14px;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
section#article .col-md-9 h2 { font-size: 28px; text-transform: uppercase; letter-spacing: -0.005em; }
section#article .col-md-9 h3 { font-size: 22px; text-transform: uppercase; letter-spacing: -0.005em; }
section#article .col-md-9 h4 { font-size: 18px; }

section#article .col-md-9 a {
    color: var(--magenta-deep);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}
section#article .col-md-9 a:hover { color: var(--magenta); }

section#article .col-md-9 strong { color: var(--ink); }

section#article .col-md-9 img {
    max-width: 100%;
    height: auto;
    border-radius: var(--r-md);
    margin: 24px 0;
}

section#article .col-md-9 blockquote {
    margin: 28px 0;
    padding: 18px 24px;
    border-left: 3px solid var(--magenta);
    background: var(--paper-soft);
    font-style: italic;
    color: var(--ink-2);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

/* Share block */
section#article .col-md-3 p {
    margin: 0 0 12px;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

section#article ul.social-buttons {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
section#article ul.social-buttons li {
    margin: 0;
    list-style: none;
}
section#article ul.social-buttons li a {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--white) !important;
    font-size: 16px;
    line-height: 1;
    transition: background 180ms ease, transform 180ms ease;
}
section#article ul.social-buttons li a:hover {
    background: var(--magenta);
    transform: translateY(-1px);
}

/* ============================================================
   4. CONTACT SECTION — section#contact
   Dark + bg_circles magenta texture, ALL CAPS heading,
   white inputs, magenta SEND button.
   ============================================================ */
section#contact {
    position: relative;
    isolation: isolate;
    background-color: var(--bg) !important;
    color: var(--white);
    padding: 88px 0 96px;
    border-top: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
}

/* Same soft magenta circles recipe as the hero, anchored bottom-right */
section#contact::before {
    content: "";
    position: absolute;
    inset: -6% -4%;
    background-image: url("../../img/brand/bg_circles.svg");
    background-size: cover;
    background-position: 80% 80%;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: -1;
    opacity: 0.55;
    filter: hue-rotate(-22deg) saturate(1.15);
}

section#contact::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1000px 600px at 50% 0%, rgba(10,12,16,0.6) 0%, rgba(10,12,16,0.85) 100%);
    pointer-events: none;
    z-index: -1;
}
section#contact > .container { position: relative; z-index: 2; }

section#contact .section-heading {
    margin: 0 0 36px;
    font-family: var(--font);
    font-weight: 900;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.02;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--white) !important;
    text-align: center;
}

section#contact .form-group { margin-bottom: 18px; }

section#contact .form-control,
section#contact input.form-control,
section#contact textarea.form-control {
    width: 100%;
    background: rgba(255,255,255,0.96);
    color: var(--ink);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: var(--r-sm);
    padding: 16px 18px;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.4;
    box-shadow: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

section#contact textarea.form-control {
    min-height: 200px;
    height: auto !important;
    resize: vertical;
}

section#contact .form-control:focus {
    background: var(--white);
    border-color: var(--magenta) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,46,120,0.25) !important;
}

section#contact ::-webkit-input-placeholder,
section#contact :-ms-input-placeholder,
section#contact :-moz-placeholder,
section#contact ::-moz-placeholder,
section#contact ::placeholder {
    color: var(--ink-muted) !important;
    font-weight: 500;
    font-family: var(--font);
    opacity: 1;
}

/* Send button */
section#contact button#sendMessageButton,
section#contact .btn-primary,
section#contact .btn.btn-xl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    padding: 16px 32px;
    border-radius: 999px;
    border: 1px solid rgba(255,46,120,0.55);
    background: linear-gradient(180deg, var(--magenta-hot), var(--magenta));
    color: var(--white);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: var(--shadow-magenta);
    cursor: pointer;
    transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}
section#contact button#sendMessageButton:hover,
section#contact .btn-primary:hover,
section#contact .btn.btn-xl:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}
section#contact button#sendMessageButton:active { transform: translateY(0); }
section#contact button#sendMessageButton:focus { outline: none; box-shadow: var(--shadow-magenta), 0 0 0 4px rgba(255,46,120,0.35); }

/* Help / error text */
section#contact .help-block.text-danger {
    color: var(--magenta-hot) !important;
    font-size: 12px;
    font-weight: 700;
    margin-top: 6px;
}

/* ============================================================
   5. FOOTER — keep dark, restyle the social ring colour
   ============================================================ */
footer {
    background: var(--bg);
    color: rgba(255,255,255,0.7);
    padding: 28px 0;
}
footer span.copyright,
footer ul.quicklinks { font-family: var(--font); color: rgba(255,255,255,0.7); }
footer ul.quicklinks a { color: rgba(255,255,255,0.85); }
footer ul.quicklinks a:hover { color: var(--magenta-hot); }

ul.social-buttons li a {
    background-color: var(--magenta);
    color: var(--white);
    transition: background-color 180ms ease, transform 180ms ease;
}
ul.social-buttons li a:hover,
ul.social-buttons li a:focus,
ul.social-buttons li a:active {
    background-color: var(--magenta-hot);
    transform: translateY(-1px);
}

/* ============================================================
   6. NAV / TOPBAR — neutralise any leftover red gradient
   from the legacy header.main styles, in case it bleeds through.
   ============================================================ */
#mainNav.navbar-light,
#mainNav.navbar-light.navbar-shrink {
    background-color: var(--white);
    border-bottom: 1px solid var(--line-light);
}
#mainNav.navbar-light .navbar-nav .nav-link { color: var(--ink); font-weight: 600; }
#mainNav.navbar-light .navbar-nav .nav-link:hover { color: var(--magenta-deep); }

.navbar-nav .dropdown-menu li:hover { color: var(--magenta-deep); }
