/*
 Theme Name:   OceanWP Child
 Template:     oceanwp
 Version:      1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* =========================================
   1. VARIABLES
   ========================================= */
:root {
    --apme-plum:      #582630; 
    --apme-red:       #F26157; 
    --apme-cream:     #FBF5EE; 
    --apme-gold:      #F1A66A; 
    --apme-muted-red: #A54657; 
    --apme-brown:     #704E40; 
    --apme-dark-text: #303030; 
}

/* =========================================
   2. BASE TYPOGRAPHY
   ========================================= */
body, p, a, li, span, div {
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .display-4 {
    font-family: 'Playfair Display', serif !important;
}

body, 
p {
    font-size: 18px !important; 
    line-height: 1.7 !important; 
}

.lead {
    font-size: 1.25rem !important; 
    font-weight: 400 !important;
}

/* Global Headings */
body h1, .h1, #main h1 { font-size: 48px !important; line-height: 1.2 !important; font-weight: 800 !important; color: var(--apme-plum) !important; }
body h2, .h2, #main h2 { font-size: 38px !important; line-height: 1.25 !important; font-weight: 700 !important; color: var(--apme-plum) !important; }
body h3, .h3, #main h3 { font-size: 30px !important; line-height: 1.3 !important; font-weight: 700 !important; color: var(--apme-plum) !important; }
body h4, .h4, #main h4 { font-size: 24px !important; line-height: 1.4 !important; font-weight: 600 !important; color: var(--apme-plum) !important; }
body h5, .h5, #main h5 { font-size: 20px !important; font-weight: 600 !important; color: var(--apme-plum) !important; }
body h6, .h6, #main h6 { font-size: 18px !important; font-weight: 600 !important; color: var(--apme-plum) !important; }

/* Force Footer Headings to be White (Fixes "Center for Southeast Asian Studies") */
.site-footer h1, .site-footer h2, .site-footer h3, 
.site-footer h4, .site-footer h5, .site-footer h6 {
    color: #ffffff !important;
}

.small, small {
    font-size: 0.875rem !important; 
}

/* =========================================
   HEADER & NAVIGATION TYPOGRAPHY
   ========================================= */

/* 1. The Main Site Title (Bold, Impactful, Clean) */
#site-logo #site-logo-inner a.site-logo-text,
.navbar-brand {
    font-family: 'Playfair Display', serif !important;
    font-weight: 600 !important;
    font-size: 1.6rem !important; /* Adjust to match your logo icon size */
    letter-spacing: -0.5px !important;
}

/* 2. Force the Menu Links to use Playfair */
#site-navigation-wrap .dropdown-menu > li > a,
#site-header .main-navigation ul li a,
.navbar-nav .nav-link {
    font-family: 'Playfair Display', serif !important;
    font-weight: 500 !important; 
    font-size: 1.8rem !important; /* Makes it easy to read */
    letter-spacing: 0.5px !important; 
    text-transform: capitalize !important; 
}

.navbar-brand span {
    font-family: 'Playfair Display', serif !important;
    font-weight: 500 !important; 
    font-size: 3rem !important;
    letter-spacing: -0.4px !important;
}

#site-header .dropdown-menu .dropdown-item {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.4rem !important; /* Makes it nice and readable. Increase if needed! */
    font-weight: 500 !important;
    padding: 2px 15px !important; /* Adds beautiful breathing room above and below the text */
    letter-spacing: 0.1px !important;
    transition: all 0.2s ease;
}

/* Make dropdown items turn gold on hover */
#site-header .dropdown-menu .dropdown-item:hover {
    background-color: transparent !important;
    color: var(--apme-gold) !important;
    padding-left: 25px !important; /* Optional: A cool subtle slide-right effect on hover */
}

/* =========================================
   GLOBAL SECTION SPACING
   ========================================= */

/* Bump up Bootstrap's default py-5 padding just for your main sections */
section.py-5 {
    padding-top: 5rem !important;   /* Increased from the default 3rem */
    padding-bottom: 5rem !important; 
}

/* On mobile phones, shrink it back down a little so it doesn't take up the whole screen */
@media (max-width: 768px) {
    section.py-5 {
        padding-top: 3.5rem !important;
        padding-bottom: 3.5rem !important;
    }
}

/* =========================================
   3. BUTTONS
   ========================================= */
.btn {
    font-size: 18px !important;
    padding: 12px 30px !important; 
    border-radius: 0px !important; 
    border: none !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.btn-apme-gold { background-color: var(--apme-gold) !important; color: #ffffff !important; }
.btn-apme-gold:hover { background-color: #d48a4e !important; transform: translateY(-2px); color: #ffffff !important; }

.btn-apme-muted-red { background-color: var(--apme-muted-red) !important; color: #ffffff !important; }
.btn-apme-muted-red:hover { background-color: #8a3542 !important; transform: translateY(-2px); color: #ffffff !important; }

.btn-apme-red { background-color: var(--apme-red) !important; color: #ffffff !important; }
.btn-apme-red:hover { background-color: #8a3542 !important; transform: translateY(-2px); color: #ffffff !important; }

.btn-apme-plum {
    background-color: var(--apme-plum) !important;
    border: 2px solid var(--apme-plum) !important;
    color: #ffffff !important;
}
.btn-apme-plum:hover {
    background-color: color-mix(in srgb, var(--apme-plum) 80%, black) !important; 
    border-color: color-mix(in srgb, var(--apme-plum) 80%, black) !important;
    color: #ffffff !important;
}

/* =========================================
   4. COMPONENTS
   ========================================= */
/* Face2Face Fellow Cards */
.fellow-card {
    background-color: var(--apme-cream);
    border-radius: 0; 
    padding: 20px 25px 20px 25px;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 2px solid var(--apme-plum); 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06); 
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.fellow-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border: 2px solid var(--apme-muted-red); 
}

.fellow-card-img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 10px auto;
    display: block;
}

.fellow-card-name { font-size: 2.25rem; font-weight: 700; color: var(--apme-plum); text-align: center; margin-bottom: 2px; }
.fellow-card-country { font-size: 1.5rem; font-weight: 700; color: var(--apme-plum); text-align: right; margin-bottom: 15px; }
.fellow-card-text { font-size: 1.5rem; color: #555555; line-height: 1.6; margin-bottom: 10px; flex-grow: 1; }
.fellow-card-org { font-weight: 700; color: var(--apme-plum); font-size: 1.5rem; margin: 0; }
.fellow-card-footer {
    display: flex;
    justify-content: flex-end; /* This forces everything inside to align right */
    align-items: center;
    width: 100%;
    overflow: hidden; /* Keeps things contained */
}
.fellow-card-link {
    text-overflow: ellipsis !important; 
    text-align: right;
    display: block;
    max-width: 100%; 
    color: var(--apme-plum);
}

/* Editorial Text Highlight Box */
.text-highlight-box {
    background-color: #c28e97; 
    color: #000;
    padding: 2px 8px;
    display: inline-block;
    line-height: 1;
    font-weight: 700;
}

.editorial-link:hover {
    color: var(--apme-gold) !important;
    border-bottom: 2px solid var(--apme-plum); 
}

/* Image Utilities */
.object-fit-cover { object-fit: cover; }
.icon-circle { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%; margin-bottom: 1rem; }

/* Scroll to Top Button */
#scroll-top span, 
#scroll-top:before { display: none !important; }

#scroll-top {
    width: clamp(60px, 5vw, 150px) !important;
    height: clamp(60px, 5vw, 150px) !important;
    bottom: clamp(20px, 4vw, 50px) !important;
    right: clamp(20px, 4vw, 50px) !important;
    background-color: color-mix(in srgb, var(--apme-plum) 10%, transparent) !important; 
    border-radius: 50% !important; 
    background-image: url('assets/StickChart_simplified_S.png'); 
    background-size: 70% !important; 
    background-repeat: no-repeat;
    background-position: center;
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: none !important;
    text-indent: -9999px;
    transition: transform 0.3s ease, background-color 0.3s ease; 
}
#scroll-top:hover {
    transform: translateY(-10px); 
    background-color: rgba(100, 100, 100, 0.9) !important; 
}

/* =========================================
   OUR STORIES TIMELINE
   ========================================= */

/* The vertical line running down the middle */
.timeline-center-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, var(--apme-plum) 0%, var(--apme-plum) 50%, #e0e0e0 50%, #e0e0e0 100%);
    transform: translateX(-50%);
    z-index: 1;
}

/* The circle dots */
.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    z-index: 2;
    background-color: #fafafa; /* Matches the section background so the line doesn't show through */
}

/* The Solid active dot (Top one) */
.dot-solid {
    background-color: var(--apme-plum);
    box-shadow: 0 0 0 4px #fafafa; /* Clears the line around the dot */
}

/* The Open circle dot (Older ones) */
.dot-open {
    border: 2px solid var(--apme-plum);
    box-shadow: 0 0 0 4px #fafafa;
}

/* On mobile phones, hide the center line and center align everything */
@media (max-width: 767px) {
    .timeline-item {
        border-bottom: 1px solid #eee;
        padding-bottom: 2rem;
    }
    .timeline-item:last-child {
        border-bottom: none;
    }
}

.story-intro p.lead {
    font-size: 1.85rem !important; /* About 20px. Change to 1.5rem if you want it even bigger! */
}

/* =========================================
   SCROLLING TIMELINE CSS
   ========================================= */

/* The Gray Background Line */
.timeline-line-bg {
    position: absolute;
    top: 0; bottom: 0; left: 50%;
    width: 2px;
    background-color: #dee2e6; /* Light gray */
    transform: translateX(-50%);
    z-index: 1;
}

/* The Plum Progress Line */
.timeline-line-progress {
    position: absolute;
    top: 0; left: 50%;
    width: 2px;
    background-color: var(--apme-plum);
    transform: translateX(-50%);
    z-index: 2;
    height: 0px; /* Starts at zero, script changes this! */
}

/* Default Dots (Gray) */
.timeline-dot {
    width: 16px; height: 16px; border-radius: 50%; z-index: 3;
    background-color: #dee2e6;
    box-shadow: 0 0 0 6px #fafafa;
    transition: background-color 0.4s ease;
}

/* Default Titles (Grayed out) */
.timeline-title {
    color: #a0a0a0 !important;
    transition: color 0.4s ease;
}

/* ACTIVE STATE: When the JS detects it is in view */
.timeline-item.active .timeline-dot {
    background-color: var(--apme-plum);
}

.timeline-item.active .timeline-title {
    color: var(--apme-plum) !important;
}

/* Make the scrollbar look elegant on webkit browsers */
.timeline-scroll-window::-webkit-scrollbar { width: 6px; }
.timeline-scroll-window::-webkit-scrollbar-track { background: transparent; }
.timeline-scroll-window::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 10px; }


/* =========================================
   NEWS & EVENTS CARDS
   ========================================= */
.news-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.news-card:hover {
    transform: translateX(5px); /* Gentle slide to the right */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
    border-left: 4px solid var(--apme-plum) !important;
}

/* Ensure the text clamps to 2 lines so cards stay perfectly sized */
.text-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================
   5. LAYOUT & SECTIONS
   ========================================= */
/* OceanWP structural overrides */
.page-header { display: none !important; }
body.home #content-wrap, body.home .page-content, body.home .entry-content { padding-top: 0; padding-bottom: 0; }

/* Header & Navigation */
#site-header, 
#site-header.minimal-header { 
    background-color: var(--apme-plum) !important; 
    /* border-bottom: 5px solid var(--apme-red) !important;  */
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important; 
}

/* PAGE TITLE SECTIONS (Global Header Spacing) */
.page-title-section {
    padding-top: 50px !important;
    padding-bottom: 50px !important;
}

/* 3. Break OceanWP's hidden scrolling lock so sticky actually works */
#outer-wrap, 
#wrap {
    overflow: visible !important;
}
#site-navigation-wrap .dropdown-menu > li > a, #site-header .oceanwp-mobile-menu-icon a { color: #ffffff; font-weight: 500; letter-spacing: 0.5px; }
#site-navigation-wrap .dropdown-menu > li > a:hover { color: var(--apme-gold); }
.sidr { background-color: var(--apme-plum); }
#site-logo a, .site-title a, .navbar-brand { text-decoration: none; border-bottom: none; box-shadow: none; }

/* Footer */
.site-footer { background-color: var(--apme-plum); color: #ffffff; font-size: 0.9rem; }
.site-footer p, .site-footer li, .site-footer a { font-size: 16px; }
.site-footer img.footer-logo { width: clamp(200px, 18vw, 350px); height: auto; display: block; margin: 0 auto; }
.footer-link { color: rgba(255, 255, 255, 0.8); text-decoration: none; transition: color 0.2s ease; }
.footer-link:hover { color: var(--apme-red); }

/* Hero Section */
.hero-section img { max-height: 380px; width: 100%; object-fit: contain; }
.hero-section h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; line-height: 1.1; margin-bottom: 24px; }
.hero-section p, 
.hero-section .lead { 
    color: var(--apme-dark-text) !important; /* Uses your global softer dark gray */
    font-size: 18px !important; /* Explicitly matches your global paragraph size */
    line-height: 1.7 !important; /* Matches your global line height */
    margin-bottom: 32px !important; 
    max-width: 800px; 
}

/* Card Section Overrides */
section.cards-section.parallax-bg {
    padding-top: 120px !important;  /* Adjust this up or down (e.g., 140px, 180px) */
    padding-bottom: 120px !important; 
}

/* 2. Add more breathing room inside the white cards */
.cards-section .card { 
    padding: 45px 35px !important; 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    border: none; 
}

.cards-section .card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
}

.cards-section .card h3, 
.cards-section .card h4, 
.cards-section .card h5, 
.cards-section .card-title { 
    font-size: 1.5rem !important; 
    line-height: 1.3 !important; 
    font-weight: 700 !important; 
}

.cards-section .card p, 
.cards-section .card-text { 
    font-size: 18px !important; 
    line-height: 1.4 !important;
}

.cards-section .card small, 
.cards-section .card .text-muted { 
    font-size: 16px !important; 
}

.cards-section .card img, 
.cards-section .card-img-top { 
    height: 220px; 
    width: 100%; 
    object-fit: cover; 
    border-top-left-radius: 8px; 
    border-top-right-radius: 8px; 
}

/* Home — spotlights: simple editorial blocks (plum / gold / cream language) */
.cards-section--spotlights .apme-spotlights-wrap {
    z-index: 2;
}
.cards-section--spotlights .apme-spotlights {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (min-width: 992px) {
    .cards-section--spotlights .apme-spotlights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
        align-items: stretch;
    }
    .cards-section--spotlights .apme-spotlight:only-child {
        grid-column: 1 / -1;
    }
}
.cards-section--spotlights .apme-spotlight {
    display: grid;
    grid-template-columns: 1fr;
    background-color: #fff;
    border: 1px solid rgba(88, 38, 48, 0.1);
    overflow: hidden;
    transition: box-shadow 0.28s ease, border-color 0.28s ease;
}
@media (min-width: 768px) {
    .cards-section--spotlights .apme-spotlight {
        grid-template-columns: minmax(0, 1fr) minmax(220px, 36%);
        align-items: stretch;
    }
}
.cards-section--spotlights .apme-spotlight--gold {
    border-left: 3px solid var(--apme-gold);
}
.cards-section--spotlights .apme-spotlight--plum {
    border-left: 3px solid var(--apme-muted-red);
}
.cards-section--spotlights .apme-spotlight:hover {
    box-shadow: 0 18px 50px rgba(88, 38, 48, 0.08);
    border-color: rgba(88, 38, 48, 0.16);
}
.cards-section--spotlights .apme-spotlight__text {
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
@media (min-width: 768px) {
    .cards-section--spotlights .apme-spotlight__text {
        padding: 2rem 2.25rem;
    }
}
.cards-section--spotlights .apme-spotlight__eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--apme-gold);
    margin: 0 0 0.75rem !important;
    line-height: 1.4 !important;
}
.cards-section--spotlights .apme-spotlight--plum .apme-spotlight__eyebrow {
    color: var(--apme-muted-red);
}
.cards-section--spotlights .apme-spotlight__title {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: clamp(1.375rem, 2.2vw, 1.65rem) !important;
    font-weight: 600 !important;
    color: var(--apme-plum) !important;
    line-height: 1.22 !important;
    margin: 0 0 0.875rem !important;
}
.cards-section--spotlights .apme-spotlight__desc {
    font-family: 'Inter', sans-serif !important;
    font-size: 1.0625rem !important;
    line-height: 1.75 !important;
    color: var(--apme-dark-text) !important;
    margin: 0;
    max-width: 38rem;
}
.cards-section--spotlights .apme-spotlight__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.35rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--apme-plum);
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--apme-gold) 60%, transparent);
    padding-bottom: 0.12rem;
    align-self: flex-start;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.cards-section--spotlights .apme-spotlight--plum .apme-spotlight__cta {
    border-bottom-color: color-mix(in srgb, var(--apme-muted-red) 45%, transparent);
}
.cards-section--spotlights .apme-spotlight__cta:hover {
    color: var(--apme-muted-red);
    border-bottom-color: var(--apme-muted-red);
}
.cards-section--spotlights .apme-spotlight--plum .apme-spotlight__cta:hover {
    color: var(--apme-plum);
    border-bottom-color: var(--apme-gold);
}
.cards-section--spotlights .apme-spotlight__cta-icon {
    line-height: 1;
    transition: transform 0.2s ease;
}
.cards-section--spotlights .apme-spotlight__cta:hover .apme-spotlight__cta-icon {
    transform: translateX(4px);
}
.cards-section--spotlights .apme-spotlight__media {
    position: relative;
    margin: 0;
    background-color: #fff;
    min-height: 210px;
}
.cards-section--spotlights .apme-spotlight__media img {
    display: block;
    width: 100%;
    height: 210px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.45s ease;
}
@media (min-width: 768px) {
    .cards-section--spotlights .apme-spotlight__media {
        min-height: 100%;
    }
    .cards-section--spotlights .apme-spotlight__media img {
        position: absolute;
        inset: 0;
        height: 100%;
        min-height: 260px;
    }
}
.cards-section--spotlights .apme-spotlight:hover .apme-spotlight__media img {
    transform: scale(1.03);
}
/* Backgrounds & Parallax */
.parallax-bg {
    background-image: url('assets/taro1.jpg'); 
    background-attachment: fixed; 
    background-position: top center; 
    background-repeat: repeat; 
    background-size: auto;     
    position: relative;
    z-index: 1;
    padding-top: 100px;
    padding-bottom: 100px;
}

.parallax-bg::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(100, 100, 100, 0.1); 
    z-index: 0; 
}

.leaf-parallax-bg {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('assets/leaves.jpg');
    background-attachment: fixed; background-position: center; background-repeat: no-repeat; background-size: cover;
}

.logo-parallax-bg {
    background-image: linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95)), url('assets/APME_logo_l_brown.svg');
    background-attachment: fixed; background-position: center; background-repeat: no-repeat; background-size: 80%; 
}

/* =========================================
   REMOVE HEADER CLICK OUTLINES
   ========================================= */

/* Targets the mobile menu button, the logo, and the navigation links
#site-header .navbar-toggler:focus,
#site-header .nav-link:focus,
#site-header .navbar-brand:focus,
#site-header a:focus {
    outline: none !important;
    box-shadow: none !important;
}

.site-footer a:focus,
.site-footer button:focus,
.footer-link:focus {
    outline: none !important;
    box-shadow: none !important;
} */

/* Remove click outlines globally for all links and buttons */
a:focus, 
button:focus, 
.btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* =========================================
   6. RESPONSIVE ADJUSTMENTS
   ========================================= */
@media (max-width: 768px) {
    .hero-section { text-align: center; min-height: auto; }
    .site-footer .text-md-start, .site-footer .text-md-end { text-align: center; }
    .footer-logo { margin: 20px auto; }
}

/* =========================================
   INTERACTIVE TABLE STYLING
   ========================================= */

/* Use your clean sans-serif font for the table data */
.dataTable-wrapper {
    font-family: 'Inter', sans-serif !important;
}

/* Style the Search Bar */
.dataTable-input {
    border-radius: 4px !important;
    border: 1px solid #e0e0e0 !important;
    padding: 10px 16px !important;
    font-size: 0.95rem;
}

.dataTable-input:focus {
    outline: none !important;
    border-color: var(--apme-gold, #D4A373) !important;
    box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.15) !important;
}

/* Style the Table Header */
.dataTable-table > thead > tr > th {
    border-bottom: 2px solid var(--apme-gold, #D4A373) !important;
    color: var(--apme-plum) !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Soft hover effect on rows */
.dataTable-table > tbody > tr:hover {
    background-color: var(--apme-cream, #FAF8F5) !important;
}

/* Style the Pagination Buttons (Pages 1, 2, 3...) */
.dataTable-pagination .active a, 
.dataTable-pagination .active a:hover {
    background-color: var(--apme-plum) !important;
    color: white !important;
    border-radius: 4px;
}

.dataTable-pagination a:hover {
    background-color: var(--apme-cream, #FAF8F5) !important;
    border-radius: 4px;
}