﻿/*
Theme Name: Research21 Modern Merged
Theme URI: https://research21.org/
Author: Youssry Ghandour / ChatGPT
Description: Modern responsive research platform theme for ITOF. Custom post types disabled; Publications and Research Notes can be normal WordPress Pages. Includes integrated contact form support.
Version: 2.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: research21-itof
*/

:root{
  --bg:#edf6fb;
  --bg2:#f8fcff;
  --surface:#ffffff;
  --surface-alt:#f4f9fc;
  --ink:#12202f;
  --text:#223447;
  --muted:#5f7182;
  --line:rgba(24,46,66,.13);
  --brand:#0e5f82;
  --brand-strong:#083f5b;
  --accent:#a77724;
  --accent-soft:#fff4da;
  --dark:#071f2f;
  --shadow:0 18px 45px rgba(18,32,47,.08);
  --radius-lg:26px;
  --radius-md:18px;
  --max:1280px;
  --page:880px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:radial-gradient(circle at top left,rgba(14,95,130,.13),transparent 34rem),linear-gradient(180deg,var(--bg),#fff 72%);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-size:16.5px;line-height:1.72}
img{max-width:100%;height:auto} a{color:var(--brand);text-decoration:none;transition:.2s ease} a:hover{color:var(--brand-strong);text-decoration:underline}.container{width:min(var(--max),calc(100% - 40px));margin:0 auto}.site-header{position:sticky;top:0;z-index:50;background:rgba(248,252,255,.9);backdrop-filter:blur(18px);border-bottom:1px solid var(--line)}.header-inner{min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:28px}.brand-block{display:flex;align-items:center;gap:14px;color:var(--ink)}.brand-logo-wrap{width:142px;display:inline-flex;align-items:center}.brand-logo-wrap img{display:block;max-height:54px;object-fit:contain}.site-title{display:block;font-weight:850;color:var(--ink);font-size:18px;line-height:1.1;letter-spacing:-.02em}.site-tagline{display:block;margin-top:3px;font-size:12px;color:var(--muted)}.nav-menu{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}.nav-menu a{color:#26394a;font-size:16px;font-weight:600;padding:10px 13px;border-radius:999px}.nav-menu a:hover,.nav-menu .current-menu-item>a{background:rgba(14,95,130,.08);color:var(--brand-strong);text-decoration:none}.hero{padding:28px 0 30px}.hero-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(340px,.85fr);gap:26px;align-items:stretch}.hero-main,.hero-card,.card,.page-card{background:rgba(255,255,255,.9);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:var(--radius-lg)}.hero-main{padding:clamp(24px,4vw,42px)}.hero-card{padding:24px;display:flex;flex-direction:column;gap:14px}.eyebrow,.section-kicker,.meta{color:var(--accent);text-transform:uppercase;font-size:13px;font-weight:900;letter-spacing:.08em}.hero h1{margin:12px 0 8px;max-width:960px;color:var(--ink);font-size:clamp(30px,3.7vw,44px);line-height:1.02;letter-spacing:-.055em}.hero h2{margin:0 0 14px;color:var(--brand-strong);font-size:clamp(17px,1.8vw,23px);line-height:1.25;letter-spacing:-.025em}.hero-lead{max-width:920px;color:#405365;font-size:clamp(17px,1.8vw,20px);line-height:1.58}.hero p{margin:0 0 14px}.hero-actions{display:flex;flex-wrap:wrap;gap:14px;margin-top:26px}.centered-actions{justify-content:center}.button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 20px;border-radius:999px;font-weight:850;border:1px solid transparent}.button.primary{background:var(--brand);color:#fff;box-shadow:0 14px 32px rgba(14,95,130,.22)}.button.primary:hover{background:var(--brand-strong);color:#fff;text-decoration:none;transform:translateY(-1px)}.button.secondary{background:#fff;color:var(--brand-strong);border-color:var(--line)}.button.secondary:hover{border-color:rgba(14,95,130,.28);text-decoration:none;transform:translateY(-1px)}.button.light{border-color:rgba(255,255,255,.28)}.button.secondary.light{background:transparent;color:#fff}.equation-stack,.large-equation,.mini-equation,.formula-panel{font-family:"Times New Roman",Times,serif}.equation-stack{margin:22px 0;padding:18px 20px;border-radius:18px;background:#f6fbfe;border:1px solid var(--line);text-align:center;font-size:18px;line-height:1.8;color:#102b3d}.formula-panel{padding:20px;border-radius:20px;background:#0c3046;color:#eaf6fb;text-align:center;font-size:23px;line-height:1.65}.small-note{font-size:15px;color:var(--muted)}.section{padding:42px 0}.section-header{max-width:800px;margin-bottom:24px}.section-header.centered{text-align:center;margin-left:auto;margin-right:auto}.section h2,.page-card h1{color:var(--ink);letter-spacing:-.04em;line-height:1.1}.section h2{font-size:clamp(25px,3vw,36px);margin:8px 0 12px}.section-desc{color:var(--muted);font-size:18px}.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.align-start{align-items:start}.card{padding:26px}.card:hover{box-shadow:0 20px 50px rgba(18,32,47,.1)}.card h2,.card h3{margin-top:0}.card h3{color:var(--ink);font-size:20px;line-height:1.2;letter-spacing:-.025em}.card p{color:var(--muted)}.feature-card{background:linear-gradient(135deg,#fff,#f4fbff);border-left:5px solid var(--brand)}.highlight-card{background:linear-gradient(135deg,#fff,#f7fbfe)}.dark-card{background:#09273a;color:#edf8fc}.dark-card h3,.dark-card p,.dark-card .meta{color:#edf8fc}.dark-card p{opacity:.86}.large-equation{margin:18px 0;padding:18px;border-radius:16px;background:rgba(14,95,130,.07);border:1px solid var(--line);text-align:center;font-size:20px;line-height:1.7;color:#102b3d}.dark-card .large-equation{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.16);color:#fff}.mini-equation{margin:16px 0;padding:14px;border-radius:14px;background:var(--surface-alt);text-align:center;font-size:18px;color:#102b3d}.final-band{background:linear-gradient(135deg,#082235,#0e5f82);margin:38px 0 0;padding:48px 0}.light-text h2,.light-text p{color:#f2fbff}.light-text h2{font-size:clamp(24px,2.7vw,34px)}.light-text p{font-size:16.5px;max-width:900px;margin-left:auto;margin-right:auto}.scope-mini-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:24px auto 4px;max-width:980px}.scope-mini-grid div{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18);border-radius:16px;padding:16px;text-align:left}.scope-mini-grid strong{display:block;color:#fff;font-size:15px;margin-bottom:5px}.scope-mini-grid span{display:block;color:#d8edf6;font-size:14px;line-height:1.45}.page-section{padding:50px 0}.page-narrow{width:min(var(--page),calc(100% - 40px));}.page-card{padding:clamp(26px,5vw,52px);margin:0 auto}.entry-header h1{font-size:clamp(32px,5vw,50px);margin:0 0 24px}.entry-content{max-width:100%;margin:0 auto}.entry-content h2{margin-top:36px;color:var(--ink);font-size:30px;letter-spacing:-.035em}.entry-content h3{margin-top:28px;color:var(--ink)}.entry-content p{margin:0 0 16px}.entry-content blockquote{margin:28px 0;padding:22px 26px;border-left:5px solid var(--accent);background:var(--accent-soft);border-radius:0 18px 18px 0;color:#4d3a16}.entry-content table{width:100%;border-collapse:collapse;overflow:auto;display:block}.entry-content th,.entry-content td{border:1px solid var(--line);padding:10px 12px}.archive-list{display:grid;gap:18px}.archive-card h2{font-size:24px}.form-panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius-md);padding:26px;box-shadow:0 12px 30px rgba(18,32,47,.05)}.research-contact-form input,.research-contact-form textarea{width:100%;border:1px solid var(--line);border-radius:14px;padding:12px 14px;font:inherit;background:#fbfdff}.research-contact-form label{font-weight:800;color:var(--ink)}.notice-card{border-radius:16px;padding:14px 18px;margin-bottom:18px}.notice-card.success{background:#e8f8ef;color:#176738;border:1px solid rgba(23,103,56,.18)}.site-footer{margin-top:64px;background:#071f2f;color:#dcecf3}.footer-top{padding:46px 0}.footer-grid{display:grid;grid-template-columns:1.4fr .8fr .8fr 1fr;gap:20px}.footer-panel{background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.1);border-radius:20px;padding:22px}.footer-brand h2,.footer-panel h3{color:#fff;margin:0 0 10px}.footer-panel p,.footer-links,.footer-note{color:#bed2dd}.footer-version{font-weight:800;color:#fff!important}.footer-links{list-style:none;margin:0;padding:0}.footer-links li{margin:9px 0}.footer-links a{color:#e9f7fc}.footer-links a:hover{color:#fff}.footer-bottom{border-top:1px solid rgba(255,255,255,.1);padding:16px 0;background:rgba(0,0,0,.12)}.footer-bottom-inner{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;color:#bed2dd;font-size:14px}.sidebar-card{display:none}
@media (max-width: 980px){.header-inner{align-items:flex-start;flex-direction:column;padding:12px 0}.nav-menu{justify-content:flex-start}.hero-grid,.grid-2{grid-template-columns:1fr}.grid-4,.grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}.footer-grid{grid-template-columns:1fr 1fr}.hero{padding-top:24px}.scope-mini-grid{grid-template-columns:1fr}}
@media (max-width: 640px){body{font-size:16px}.container,.page-narrow{width:min(100% - 24px,var(--max))}.brand-logo-wrap{width:118px}.brand-text{display:none}.nav-menu{gap:4px}.nav-menu a{font-size:13px;padding:8px 10px}.hero-main,.hero-card,.card,.page-card{border-radius:20px}.hero-main,.hero-card,.card{padding:20px}.hero h1{font-size:28px;letter-spacing:-.035em}.hero h2{font-size:17px}.grid-4,.grid-3{grid-template-columns:1fr}.footer-grid{grid-template-columns:1fr}.footer-bottom-inner{display:block}.large-equation,.equation-stack{font-size:16px;overflow-wrap:anywhere}.formula-panel{font-size:20px}.section{padding:30px 0}.page-section{padding:30px 0}}

/* =========================================================
   Research21 Final Header Logo + Wider Page Layout Patch
   Paste at the very bottom of style.css
   ========================================================= */

/* Logo normal desktop size */
.site-logo img,
.custom-logo,
.logo img,
.site-branding img {
    width: 207px !important;
    height: auto !important;
    max-width: 207px !important;
    max-height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

/* Header branding alignment after removing tagline */
.site-branding,
.logo-wrap,
.header-brand,
.branding {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
}

/* Remove any leftover hidden spacing from old tagline/description */

/* Wider normal pages */
.page .site-main,
.page .content-area,
.page .entry-content,
.page .page-content,
.page article,
.page .article-wrap,
.page .content-wrap {
    max-width: 1320px !important;
    width: min(1320px, calc(100% - 48px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Wider white page body */
.page .entry-content,
.page .page-content,
.page article {
    padding-left: 34px !important;
    padding-right: 34px !important;
}

/* Avoid narrow nested page appearance */
.page .surface,
.page .surface-alt,
.page .card {
    max-width: 1320px !important;
}

/* Tablet logo adjustment */
@media (max-width: 900px) {
    .site-logo img,
    .custom-logo,
    .logo img,
    .site-branding img {
        width: 207px !important;
        height: auto !important;
        max-width: 205px !important;
    }

    .page .site-main,
    .page .content-area,
    .page .entry-content,
    .page .page-content,
    .page article,
    .page .article-wrap,
    .page .content-wrap {
        width: min(100% - 32px, 1180px) !important;
    }
}

/* Mobile logo adjustment */
@media (max-width: 600px) {
    .site-logo img,
    .custom-logo,
    .logo img,
    .site-branding img {
        width: 168px !important;
        height: auto !important;
        max-width: 168px !important;
    }

    .page .site-main,
    .page .content-area,
    .page .entry-content,
    .page .page-content,
    .page article,
    .page .article-wrap,
    .page .content-wrap {
        width: min(100% - 24px, 100%) !important;
    }

    .page .entry-content,
    .page .page-content,
    .page article {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}
/* =========================================
   FINAL LOGO SIZE FIX
   ========================================= */

.custom-logo-link {
    display: flex !important;
    align-items: center !important;
    line-height: 0 !important;
}

.custom-logo {
    width: 207px !important;
    height: 70px !important;
    max-width: 207px !important;
    max-height: 70px !important;
    min-width: 207px !important;
    min-height: 70px !important;
    object-fit: contain !important;
}

/* Remove theme restrictions */
.site-header img,
.custom-logo-link img,
.site-branding img {
    width: 207px !important;
    height: 70px !important;
    max-width: unset !important;
    max-height: unset !important;
}

/* Header height adjustment */
.site-header,
.header-inner,
.header-container,
.site-branding {
    min-height: 96px !important;
}

/* Tablet */
@media (max-width: 900px) {

    .custom-logo,
    .site-header img,
    .custom-logo-link img,
    .site-branding img {
        width: 205px !important;
        height: auto !important;
    }
}

/* Mobile */
@media (max-width: 700px) {

    .custom-logo,
    .site-header img,
    .custom-logo-link img,
    .site-branding img {
        width: 170px !important;
        height: auto !important;
    }

    .site-header,
    .header-inner,
    .header-container,
    .site-branding {
        min-height: 78px !important;
    }
}
/* =========================================
   STRONG MOBILE PAGE WIDTH FIX
   ========================================= */

@media (max-width: 800px) {

    body.page,
    body.page #page,
    body.page .site,
    body.page .site-content,
    body.page .content-area,
    body.page main,
    body.page .site-main,
    body.page article,
    body.page .entry-content,
    body.page .page-content {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        box-sizing: border-box !important;
    }

    body.page .entry-content p,
    body.page .page-content p,
    body.page .entry-content div,
    body.page .page-content div {
        width: 100% !important;
        max-width: none !important;
    }
}
/* =========================================
   CENTERED WIDE MOBILE PAGE FIX
   ========================================= */

@media (max-width: 800px) {

    body.page .site-content,
    body.page .content-area,
    body.page main,
    body.page .site-main,
    body.page article,
    body.page .entry-content,
    body.page .page-content {
width: calc(100% - 2px) !important;
max-width: calc(100% - 2px) !important;       margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    body.page .entry-content > *,
    body.page .page-content > * {
        max-width: 100% !important;
    }
}

/* =========================================================
   FINAL TYPOGRAPHY + TITLE REFINEMENT
   ========================================================= */

/* Slightly smaller typography globally */
body{
    font-size:14.8px !important;
    line-height:1.60 !important;
    color:#243746 !important;
}

/* Main hero title much smaller */
.hero h1{
    margin:10px 0 8px !important;
    max-width:900px !important;
    color:#14384f !important;
    font-size:clamp(21px,2.4vw,31px) !important;
    line-height:1.12 !important;
    letter-spacing:-.028em !important;
    font-weight:800 !important;
}

/* Hero secondary title */
.hero h2{
    color:#1a4b67 !important;
    font-size:clamp(14px,1.2vw,17px) !important;
    line-height:1.42 !important;
    letter-spacing:-.01em !important;
    font-weight:700 !important;
}

/* Hero paragraph */
.hero-lead{
    color:#3e5363 !important;
    font-size:clamp(13.5px,1.45vw,16px) !important;
    line-height:1.72 !important;
}

/* Global section titles */
.section h2,
.page-card h1,
.entry-header h1{
    color:#14384f !important;
    font-size:clamp(22px,2.1vw,28px) !important;
    line-height:1.18 !important;
    letter-spacing:-.022em !important;
}

/* Page/article h2 */
.entry-content h2{
    color:#17415c !important;
    font-size:21px !important;
    line-height:1.28 !important;
    letter-spacing:-.015em !important;
}

/* Page/article h3 */
.entry-content h3,
.card h3{
    color:#1d4966 !important;
    font-size:17px !important;
    line-height:1.30 !important;
}

/* Dark blue titles refinement */
.section h2,
.card h3,
.entry-content h2,
.entry-content h3{
    color:#18445f !important;
font-size:16px;
}


/* Stronger readable page text */
.entry-content p,
.card p,
.page-content p,
.page-content li,
.entry-content li{
    color:#314555 !important;
    font-size:15.0px !important;
    line-height:1.80 !important;
}

/* Slightly smaller navigation */
.nav-menu a{
    font-size:14px !important;
}

/* Footer typography refinement */
.footer-panel p,
.footer-links,
.footer-note{
    color:#c6d9e4 !important;
    font-size:13px !important;
}

/* Mobile typography refinement */
@media (max-width: 700px){

    body{
        font-size:14.8px !important;
    }

    .hero h1{
        font-size:24px !important;
        line-height:1.18 !important;
    }

    .hero h2{
        font-size:15px !important;
    }

    .hero-lead{
        font-size:15px !important;
    }

    .section h2,
    .page-card h1,
    .entry-header h1{
        font-size:24px !important;
    }

    .entry-content h2{
        font-size:22px !important;
    }

    .entry-content h3,
    .card h3{
        font-size:18px !important;
    }

    .entry-content p,
    .card p,
    .page-content p{
        font-size:15px !important;
        line-height:1.82 !important;
    }
}
/* =========================================================
   SAFE DARK SECTION TITLE FIX
   ========================================================= */

/* ONLY the final dark blue section */
.final-band .section-header.centered.light-text h2,
.final-band .section-header.centered.light-text h3{
    color:#ffffff !important;
}

/* ONLY the final dark blue section text */
.final-band .section-header.centered.light-text p{
    color:#e4f1f7 !important;
}

/* ONLY dark cards inside the final band */
.final-band .dark-card h2,
.final-band .dark-card h3{
    color:#ffffff !important;
}

.final-band .dark-card p,
.final-band .dark-card li{
    color:#d9ebf4 !important;
}

/* =========================================================
   INTERPRETATIONAL CONSTRAINT CARD TEXT FIX
   ========================================================= */

.dark-card h3,
.dark-card h2 {
    color:#ffffff !important;
}

.dark-card p,
.dark-card li,
.dark-card span {
    color:#e4f1f7 !important;
}

.dark-card .large-equation,
.dark-card .mini-equation {
    color:#ffffff !important;
}

/* =========================================================
   MOBILE GRID TEXT + DARK LINK FIX
   ========================================================= */

@media (max-width: 700px){

    /* Better left/right breathing space inside cards/grids */
    .card,
    .dark-card,
    .feature-card,
    .highlight-card,
    .hero-card,
    .grid-2 .card,
    .grid-3 .card,
    .grid-4 .card{
        padding-left:16px !important;
        padding-right:16px !important;
    }

    /* Prevent text from touching far left edge */
    .card p,
    .dark-card p,
    .card li,
    .dark-card li{
        padding-left:2px !important;
    }

    /* Mobile dark-card links */
    .dark-card a{
        color:#a9def7 !important;
    }

    .dark-card a:hover,
    .dark-card a:focus,
    .dark-card a:active{
        color:#ffffff !important;
    }
}



/* =========================================
   FINAL ACTIVE LOGO SIZE FIX
   Research21 header logo: 207 × 70
   ========================================= */

@media (min-width: 901px){

    .brand-logo-wrap{
        width:207px !important;
        max-width:207px !important;
        min-width:207px !important;
        height:70px !important;
        max-height:70px !important;
        min-height:70px !important;
        display:inline-flex !important;
        align-items:center !important;
        justify-content:flex-start !important;
        flex:0 0 207px !important;
    }

    .brand-logo-wrap img{
        width:207px !important;
        height:70px !important;
        max-width:207px !important;
        max-height:70px !important;
        min-width:207px !important;
        min-height:70px !important;
        object-fit:contain !important;
        display:block !important;
    }
}


/* =========================================
   DESKTOP HEADER BALANCE FIX
   ========================================= */

@media (min-width: 901px){

    .header-inner,
    .site-header .container,
    .header-container{
padding-left:40px !important;
padding-right:40px !important;    }
}

/* =========================================================
   HOME DESKTOP H2 SIZE REFINEMENT ONLY
   ========================================================= */

@media (min-width: 901px){

    /* Regular centered section headers on homepage */
    body.home .section .section-header.centered h2{
        font-size:17px !important;
        line-height:1.35 !important;
        letter-spacing:-0.01em !important;
    }

    /* H2 titles inside homepage cards */
    body.home .section .container.grid-2.align-start article.card h2,
    body.home .section.split-section .container.grid-2.align-start article.card.highlight-card h2{
        font-size:17px !important;
        line-height:1.35 !important;
        letter-spacing:-0.01em !important;
    }

    /* Final dark blue band section headers */
    body.home .section.final-band .section-header.centered.light-text h2{
        font-size:17px !important;
        line-height:1.35 !important;
        letter-spacing:-0.01em !important;
    }

    /* Final dark blue band text if needed */
    body.home .section.final-band .section-header.centered.light-text p{
        font-size:17px !important;
        line-height:1.65 !important;
    }
}

/* =========================================================
   FINAL BAND TEXT SIZE REFINEMENT
   Scientific Scope section only
   ========================================================= */

@media (min-width: 901px){

    body.home .section.final-band 
    .section-header.centered.light-text p{
        font-size:14.5px !important;
        line-height:1.5 !important;
    }
    .section-header.centered p{
        font-size:14.5px !important;
        line-height:1.5 !important;
}
}

/* =========================================================
   MOBILE TYPOGRAPHY REFINEMENT
   Only for the recently adjusted homepage sections
   ========================================================= */

@media (max-width: 900px){

    /* Homepage section H2 titles */
    body.home .section .section-header.centered h2,
    body.home .section .container.grid-2.align-start article.card h2,
    body.home .section.split-section .container.grid-2.align-start article.card.highlight-card h2,
    body.home .section.final-band .section-header.centered.light-text h2{
        font-size:17px !important;
        line-height:1.4 !important;
        letter-spacing:-0.01em !important;
    }

    /* Homepage section paragraph text */
    body.home .section.final-band 
    .section-header.centered.light-text p{
        font-size:15px !important;
        line-height:1.7 !important;
    }
.section-header.centered p{
        font-size:15px !important;
        line-height:1.7 !important;

}
    /* Optional: section kicker refinement */
    body.home .section.final-band 
    .section-header.centered.light-text .section-kicker{
        font-size:12px !important;
        letter-spacing:0.08em !important;
    }
}
/* Force centered equation lines on ITOF content pages */
.read-online-page .equation-line,
.read-online-page .long-equation,
.archive-page .equation-line,
.archive-page .long-equation,
.itof-page .equation-line,
.itof-page .long-equation,
.publication-page .equation-line,
.publication-page .long-equation {
  display: block;
  width: 100%;
  text-align: center !important;
  font-family: "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.6;
  margin: 1.1rem auto;
}

/* Center the actual equation text inside the paragraph */
.read-online-page .equation-line em,
.read-online-page .long-equation em,
.archive-page .equation-line em,
.archive-page .long-equation em,
.itof-page .equation-line em,
.itof-page .long-equation em,
.publication-page .equation-line em,
.publication-page .long-equation em {
  display: inline-block;
  text-align: center !important;
  max-width: 100%;
}

/* =========================================================
   HOME PAGE SECTION + FOOTER GAP REFINEMENT
   ========================================================= */

/* Desktop: reduce gaps between homepage sections */
@media (min-width: 901px){

    body.home .section{
        padding-top:28px !important;
        padding-bottom:28px !important;
    }

    body.home .section + .section{
        margin-top:0 !important;
    }

    body.home .final-band{
        margin-bottom:0 !important;
        padding-bottom:36px !important;
    }

    body.home .site-footer{
        margin-top:20px !important;
    }
}

/* Mobile: reduce gap before footer */
@media (max-width: 900px){

    body.home .final-band{
        margin-bottom:0 !important;
        padding-bottom:auto !important;
    }

    body.home .site-footer{
        margin-top:15px !important;
    }
}

/* =========================================================
   FINAL BAND VISUAL WIDTH ALIGNMENT
   fixes section itself, not only inner container
   ========================================================= */

@media (min-width: 901px){

    body.home .section.final-band{
        width:min(1500px, calc(100% - 72px)) !important;
        max-width:1500px !important;
        margin-left:auto !important;
        margin-right:auto !important;
        border-radius:26px !important;
        overflow:hidden !important;
    }

    body.home .section.final-band .container{
        width:100% !important;
        max-width:100% !important;
        margin-left:auto !important;
        margin-right:auto !important;
    }
}

/* Mobile: keep full-width but controlled */
@media (max-width: 900px){

    body.home .section.final-band{
        width:calc(100% - 24px) !important;
        max-width:calc(100% - 24px) !important;
        margin-left:auto !important;
        margin-right:auto !important;
        border-radius:20px !important;
        overflow:hidden !important;
    }

    body.home .section.final-band .container{
        width:100% !important;
        max-width:100% !important;
    }
}

/* =========================================================
   NORMAL PAGES FOOTER GAP FIX
   ========================================================= */

body.page .site-footer{
    margin-top:15px !important;
}

/* Also reduce bottom spacing of the page content area */
body.page .page-section,
body.page .site-main,
body.page .content-area{
    padding-bottom:15px !important;
    margin-bottom:0 !important;
}

/* Mobile */
@media (max-width: 900px){

    body.page .site-footer{
        margin-top:10px !important;
    }

    body.page .page-section,
    body.page .site-main,
    body.page .content-area{
        padding-bottom:12px !important;
        margin-bottom:0 !important;
    }
}

/* =========================================================
   HOME DESKTOP EQUAL HEIGHT CARDS / ASIDES
   ========================================================= */

@media (min-width: 901px){

    body.home .grid-2,
    body.home .grid-3,
    body.home .grid-4,
    body.home .hero-grid,
    body.home .container.grid-2,
    body.home .container.grid-3,
    body.home .container.grid-4{
        align-items: stretch !important;
    }

    body.home .grid-2 > article,
    body.home .grid-2 > aside,
    body.home .grid-2 > .card,
    body.home .grid-3 > article,
    body.home .grid-3 > aside,
    body.home .grid-3 > .card,
    body.home .grid-4 > article,
    body.home .grid-4 > aside,
    body.home .grid-4 > .card,
    body.home .hero-grid > article,
    body.home .hero-grid > aside,
    body.home .hero-grid > .card,
    body.home .hero-main,
    body.home .hero-card{
        height:100% !important;
        min-height:100% !important;
        display:flex !important;
        flex-direction:column !important;
    }
}
/* =========================================================
   CONTACT PAGE TOP GAP FIX — PAGE ID 10
   ========================================================= */

body.page-id-10 .site-main,
body.page-id-10 main,
body.page-id-10 .content-area,
body.page-id-10 .page-section,
body.page-id-10 .entry-content,
body.page-id-10 article{
    padding-top:0 !important;
    margin-top:0 !important;
}

body.page-id-10 .site-main{
    padding-top:16px !important;
}