/*
Theme Name:   KJIT Wordpress Template
Theme URI:    https://kjit.bme.hu
Author:       Tamás Ormándi
Description:  Custom theme for the Department of Control for Transportation and Vehicle Systems.
Version:      1.0.1
Text Domain:  kjit
*/

/* =========================================
   1. COLOR MAPS & THEME VARIABLES
   ========================================= */

/* --- LIGHT THEME (KJIT Light) --- */
[data-theme="kjit-light"] { 
    /* Core Layout Colors */
    --theme-bg: #f3f6f9; 
    --theme-nav: #212A3E; 
    --theme-nav-sticky: rgba(255, 255, 255, 0.62);
    --theme-card-bg: #ffffff; 
    --theme-border-subtle: rgba(0,0,0,0.08);

    /* Text Colors (Main Body) */
    --theme-text-main: #212A3E; 
    --theme-text-inverse: #3f5074; 

    /* TYPOGRAPHY COLORS */
    --theme-text-h1: #212A3E;       /* Dark Navy */
    --theme-text-h2: #394867;       /* Muted Navy */
    --theme-text-h3: #9BA4B5;       /* Steel Blue */
    
    /* SECTION TITLE PILLS */
    --theme-section-pill-bg: #dae1e7;   
    --theme-section-pill-text: #212A3E; 

    /* TOPIC CARDS */
    --theme-topic-card-bg: #394867d2;       /* Darken the card to pop text */
    --theme-topic-card-border: #3f5b93d2;
    --theme-topic-card-title: #ffffff;                /* Pure White for contrast */
    --theme-topic-card-text: rgba(255, 255, 255, 0.85); /* Off-white for body */
    --theme-topic-card-hover-bg: #102144e0; /* Darker on hover */
    --theme-topic-card-hover-border: #9BA4B5;        /* Highlight color border */
    --theme-topic-icon-bg: rgba(255, 255, 255, 0.1); /* Icon circle background */

    /* LINK COLORS */
    --theme-link-idle: #394867;     
    --theme-link-hover: #9BA4B5;    

    /* FOOTER SCHEME */
    --theme-footer-bg: #dae1e7;     
    --theme-footer-text: #475264;   
    --theme-footer-heading: #212A3E;
    --theme-footer-link: #394867;   
    --theme-footer-link-hover: #000000; 

    /* Navigation Specifics */
    --local-nav-bg: #ffffff; 
    --local-nav-text: #212A3E; 
    --color-bg-mega-menu: rgba(255, 255, 255, 0.98); 
    
    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(33, 42, 62, 0.1); 
    --glass-shadow: rgba(0, 0, 0, 0.08);
    --glass-image-bg: linear-gradient(135deg, #e0e7ef, #cfd8e3); 
    
    /* Misc */
    --theme-accent: #394867; 
    --theme-highlight: #9BA4B5;

    --theme-research-title-bg: #394867d2;
    --theme-research-title-color: white;
    --theme-color-text-inverse-tilt: white;
    --theme-staff-placeholder-icon: rgba(0, 0, 0, 0.269);

    --theme-nav-hover: rgba(0, 0, 0, 0.05);

    /* INDUSTRIAL PARTNERS (Light Mode) */
    --theme-partner-bg: #212A3E;       /* Dark Navy */
    --theme-partner-title: #ffffff;    /* White */
    --theme-partner-card-bg: #0d1117;  /* White boxes for logos (best for pngs) */
    --theme-partner-card-shadow: rgba(0, 0, 0, 0.2);
    --theme-partner-border: rgba(255,255,255,0.1);
}

/* --- DARK THEME (KJIT Dark) --- */
[data-theme="kjit-dark"] { 
    /* Core Layout Colors */
    --theme-bg: #0d1117; 
    --theme-nav: #161b22; 
    --theme-nav-sticky: rgba(22, 27, 34, 0.66);
    --theme-card-bg: #161b22; 
    --theme-border-subtle: rgba(255,255,255,0.1);

    /* Text Colors (Main Body) */
    --theme-text-main: #c9d1d9; 
    --theme-text-inverse: #ffffff; 

    /* TYPOGRAPHY COLORS */
    --theme-text-h1: #ffffff;       
    --theme-text-h2: #58a6ff;       
    --theme-text-h3: #8b949e;       

    /* SECTION TITLE PILLS */
    --theme-section-pill-bg: #21262d;   
    --theme-section-pill-text: #c9d1d9; 

    /* TOPIC CARDS */
    --theme-topic-card-bg: rgba(0, 0, 0, 0.2);        /* Original Dark Transparent */
    --theme-topic-card-border: rgba(255, 255, 255, 0.1);
    --theme-topic-card-title: #ffffff;                /* White Title */
    --theme-topic-card-text: rgba(255, 255, 255, 0.8);/* Transparent White Text */
    --theme-topic-card-hover-bg: rgba(0, 0, 0, 0.3);  /* Darker on hover */
    --theme-topic-card-hover-border: #1f6feb;         /* Blue Highlight */
    --theme-topic-icon-bg: rgba(255, 255, 255, 0.1);

    /* LINK COLORS */
    --theme-link-idle: #58a6ff;     
    --theme-link-hover: #1f6feb;    

    /* FOOTER SCHEME */
    --theme-footer-bg: #010409;     
    --theme-footer-text: #8b949e;   
    --theme-footer-heading: #f0f6fc;
    --theme-footer-link: #58a6ff;   
    --theme-footer-link-hover: #ffffff; 

    /* Navigation Specifics */
    --local-nav-bg: #161b22; 
    --local-nav-text: #f0f6fc; 
    --color-bg-mega-menu: #161b22; 
    
    /* Glass Effect */
    --glass-bg: rgba(22, 27, 34, 0.7); 
    --glass-border: rgba(240, 246, 252, 0.1);
    --glass-shadow: rgba(0, 0, 0, 0.5);
    --glass-image-bg: linear-gradient(135deg, #161b22, #010409);
    
    /* Misc */
    --theme-accent: #4989d2; 
    --theme-highlight: #2c63b5; 

    --theme-research-title-bg: rgba(0, 0, 0, 0.3);
    --theme-research-title-color: white;
    --theme-color-text-inverse-tilt: white;
    --theme-staff-placeholder-icon: rgba(255, 255, 255, 0.15);

    --theme-nav-hover: rgba(255, 255, 255, 0.1);

    /* INDUSTRIAL PARTNERS (Dark Mode) */
    --theme-partner-bg: #161b22;        
    --theme-partner-title: #ffffff;
    --theme-partner-card-bg: #0d1117;  /* Dark boxes for logos */
    --theme-partner-card-shadow: rgba(0, 0, 0, 0.5);
    --theme-partner-border: #30363d;

}

/* =========================================
   2. FUNCTIONAL VARIABLE MAPPING
   ========================================= */
:root {
    --width-container: 65%;
    --cut: 100px;

    /* Backgrounds */
    --color-bg-body: var(--theme-bg);
    --color-bg-header: var(--local-nav-bg); 
    --color-bg-nav: var(--local-nav-bg); 
    --color-bg-card: var(--theme-card-bg);
    --color-bg-nav-sticky: var(--theme-nav-sticky); 
    
    /* --- TYPOGRAPHY MAPPING --- */
    --color-text-main: var(--theme-text-main);
    --color-text-inverse: var(--theme-text-inverse);
    
    --color-text-h1: var(--theme-text-h1);
    --color-text-h2: var(--theme-text-h2);
    --color-text-h3: var(--theme-text-h3);
    
    /* --- SECTION TITLE PILL MAPPING --- */
    --color-bg-section-title: var(--theme-section-pill-bg);
    --color-text-section-title: var(--theme-section-pill-text);

    /* --- TOPIC CARD MAPPING --- */
    --color-topic-bg: var(--theme-topic-card-bg);
    --color-topic-border: var(--theme-topic-card-border);
    --color-topic-title: var(--theme-topic-card-title);
    --color-topic-text: var(--theme-topic-card-text);
    --color-topic-hover-bg: var(--theme-topic-card-hover-bg);
    --color-topic-hover-border: var(--theme-topic-card-hover-border);
    --color-topic-icon-bg: var(--theme-topic-icon-bg);

    /* --- LINK MAPPING --- */
    --color-link-idle: var(--theme-link-idle);
    --color-link-hover: var(--theme-link-hover);

    /* --- FOOTER MAPPING --- */
    --color-bg-footer: var(--theme-footer-bg);
    --color-text-footer: var(--theme-footer-text);
    --color-text-footer-heading: var(--theme-footer-heading);
    --color-link-footer-idle: var(--theme-footer-link);
    --color-link-footer-hover: var(--theme-footer-link-hover);

    /* --- NAV MAPPING --- */
    --color-nav-link: var(--local-nav-text); 
    
    /* Accents & Borders */
    --color-accent: var(--theme-accent);
    --color-highlight: var(--theme-highlight);
    --color-border-subtle: var(--theme-border-subtle);
    
    /* Mobile/Overlay specific */
    --color-overlay-dark: var(--theme-nav-hover);
    --color-overlay-mobile-sub: rgba(0,0,0,0.05);
    --color-border-mobile-nav: rgba(0,0,0,0.1);
    --color-border-mobile-sub: rgba(0,0,0,0.1);
    --color-lang-text: var(--local-nav-text);
    --color-lang-border: var(--theme-highlight);

    /* Shadows */
    --color-shadow-nav: rgba(0, 0, 0, 0.1);
    --color-shadow-strong: rgba(0, 0, 0, 0.2);
    --color-shadow-light: rgba(0, 0, 0, 0.05);
    --color-shadow-card: rgba(0, 0, 0, 0.08);

    /*TITLE OF TOPIC CARDS*/
    --bg-research-title-bg: var(--theme-research-title-bg);
    --bg-research-title-color: var(--theme-research-title-color);

    --color-text-inverse-tilt: var(--theme-color-text-inverse-tilt);
    --staff-placeholder-icon-color: var(--theme-staff-placeholder-icon);

    --color-partner-bg: var(--theme-partner-bg);
    --color-partner-title: var(--theme-partner-title);
    --color-partner-card-bg: var(--theme-partner-card-bg);
    --color-partner-shadow: var(--theme-partner-card-shadow);
    --color-partner-border: var(--theme-partner-card-border);
}

@media (max-width: 1300px) {
    :root { --width-container: 90%; }
}

/* =========================================
   3. BASE STYLES & RESET
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Body takes full screen height */
}

/* GLOBAL LINKS */
a { 
    text-decoration: none; 
    color: var(--color-link-idle); 
    transition: color 0.2s ease;
}
a:hover { 
    color: var(--color-link-hover); 
}

/* HEADINGS (Global Application) */
h1, .entry-title, .profile-name, .hero-slide .slide-content h1 {
    color: var(--color-text-h1);
}

h2, .section-title, .wave-section h1 {
    color: var(--color-text-h2);
}

h3, .sidebar-heading, .footer-widget h4.widget-title {
    color: var(--color-text-h3);
}

/* Default / Light Mode State (Steel Light) */
[data-theme="kjit-light"] .logo-light {
    display: block;
}
[data-theme="kjit-light"] .logo-dark {
    display: none;
}

/* Dark Mode State (GitHub Dark) */
[data-theme="kjit-dark"] .logo-light {
    display: none;
}
[data-theme="kjit-dark"] .logo-dark {
    display: block;
}

/* Base styling to prevent layout shift */
.nav-logo img {
    height: 50px; 
    width: auto; 
    display: block;
}

/* Wrapper */
.container {
    max-width: var(--width-container);
    margin: 0 auto;
    padding: 0 20px;
    position: relative; 
}

/* =========================================
   4. HEADER & NAVIGATION
   ========================================= */
.site-header { background-color: var(--color-bg-header); }

.main-navigation {
    width: 100%;
    background: var(--color-bg-nav); 
    box-shadow: 0 4px 6px var(--color-shadow-nav);
    z-index: 999;
    transition: all 0.4s ease; 
    position: relative;
}

.main-navigation .container {
    justify-content:center !important;
    display: flex !important;        
    flex-direction: row !important; 
    flex-wrap: nowrap;               
    align-items: center;             
}

.nav-logo {
    flex-shrink: 0;                 
    display: flex;                  
    align-items: center;            
    height: 100%;                   
    padding: 10px 0;               
}
.nav-logo img { height: 50px; width: auto; display: block; }

/* --- HAMBURGER BUTTON --- */
.menu-toggle {
    display: none; 
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001; 
}

.hamburger-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-nav-link);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.menu-toggle.open .hamburger-bar:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.menu-toggle.open .hamburger-bar:nth-child(2) { opacity: 0; }
.menu-toggle.open .hamburger-bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* --- DESKTOP MENU --- */
.main-navigation ul.nav-menu {
    display: flex;                  
    flex-direction: row;           
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

.main-navigation ul.nav-menu > li {
    margin: 0;
    position: static; 
    display: flex;
    align-items: center;
}

.main-navigation ul.nav-menu > li > a {
    display: flex;
    align-items: center;       
    height: 100%;             
    color: var(--color-nav-link);             
    text-decoration: none;
    padding: 20px 30px;        
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;       
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

/* Nav Animations */
.main-navigation ul.nav-menu > li > a::before {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--color-overlay-dark); 
    opacity: 0; 
    transition: opacity 0.3s ease;
    z-index: -1; 
}

.main-navigation ul.nav-menu > li > a::after {
    content: '';
    position: absolute; bottom: 0; left: 0; width: 100%; height: 4px; 
    background-color: var(--color-highlight); 
    transform: scaleX(0);        
    transform-origin: center;    
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.main-navigation ul.nav-menu > li > a:hover::before { opacity: 1; }
.main-navigation ul.nav-menu > li > a:hover::after { transform: scaleX(1); }

/* --- MEGA MENU --- */
.main-navigation ul.nav-menu > li > ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%; 
    background-color: var(--color-bg-mega-menu);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); 
    border-top: 5px solid var(--color-accent); 
    box-shadow: 0 15px 30px var(--color-shadow-strong);
    border-radius: 0 0 10px 10px;
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    padding: 40px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    z-index: 1000;
}

@media (min-width: 769px) {
    .main-navigation ul.nav-menu > li:hover > ul.sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.main-navigation ul.nav-menu > li > ul.sub-menu > li > a {
    color: var(--color-text-main); 
    padding: 12px 0 12px 20px; 
    font-size: 0.95rem;
    font-weight: bold;
    display: block;
    position: relative; 
    transition: padding 0.3s ease, color 0.3s ease;
}

.main-navigation ul.nav-menu > li > ul.sub-menu > li > a::before {
    content: '>'; 
    display: block; 
    position: absolute; left: 0; top: 50%;
    transform: translateY(-50%); 
    color: var(--theme-accent);
    font-weight: bold;
    background: transparent;
    width: auto; height: auto;
    font-weight: 900; 
    font-family: monospace;
    font-size: 1.1em;
}

.main-navigation ul.nav-menu > li > ul.sub-menu > li > a:hover {
    color: var(--color-accent);
    padding-left: 30px; 
}

/* --- THEME TOGGLE BUTTON & ACTIONS --- */
.nav-actions {
    display: flex;
    align-items: center;
    order: 2; 
    gap: 15px;
}

@media (min-width: 769px) {
    .nav-actions {
        order: 3; 
        margin-left: 20px;
    }
    .main-navigation ul.nav-menu {
        margin-left: 20px; 
    }
}

.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--color-nav-link);
    color: var(--color-nav-link);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background: var(--color-nav-link);
    color: var(--color-bg-nav);
    transform: rotate(15deg);
}

.theme-toggle-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* Toggle Visibility Logic */
[data-theme="kjit-light"] .icon-sun { display: block; }
[data-theme="kjit-light"] .icon-moon { display: none; }
[data-theme="kjit-dark"] .icon-sun { display: none; }
[data-theme="kjit-dark"] .icon-moon { display: block; }

/* --- LANGUAGE SWITCHER --- */
ul.lang-switcher {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

ul.lang-switcher li a {
    color: var(--color-lang-text); 
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 5px 8px;
    transition: all 0.3s ease;
}

ul.lang-switcher li a:hover {
    background-color: var(--color-white);
    color: var(--color-bg-nav); 
    border-color: var(--color-white);
}

ul.lang-switcher li.current-lang a {
    background-color: var(--color-accent); 
    color: var(--color-text-inverse);
    border-color: var(--color-accent);
}

/* =========================================
   5. MOBILE MENU
   ========================================= */
@media (max-width: 945px) {
    .menu-toggle { display: block; }
    
    .main-navigation ul.nav-menu {
        display: block; 
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--color-bg-nav); 
        padding: 0;
        border-top: 1px solid var(--color-border-mobile-nav);
        height: auto !important; 
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s;
    }
    
    .main-navigation ul.nav-menu.active {
        max-height: 2000px !important; 
        opacity: 1;
        visibility: visible;
    }

    .main-navigation ul.nav-menu > li {
        width: 100%;
        position: relative; 
        display: block; 
        border-bottom: 1px solid var(--color-border-mobile-nav);
    }

    .main-navigation ul.nav-menu > li > a {
        display: flex; 
        width: 100%;
        padding: 15px 20px;
        justify-content: space-between; 
        height: auto; 
        color: var(--color-nav-link);
    }
    
    .main-navigation ul.nav-menu > li > a::before,
    .main-navigation ul.nav-menu > li > a::after { display: none; }

    .main-navigation ul.nav-menu > li.menu-item-has-children > a::after {
        content: '>'; 
        font-family: monospace;
        font-weight: bold;
        font-size: 1.2rem;
        display: inline-block;
        transition: transform 0.3s ease;
        margin-left: 10px;
        position: static; 
        background: transparent;
        width: auto; height: auto;
        transform: none;
    }

    .main-navigation ul.nav-menu > li.submenu-active > a::after {
        transform: rotate(90deg);
        color: var(--color-highlight); 
    }

    .main-navigation ul.nav-menu > li > ul.sub-menu {
        position: relative; 
        top: 0;
        box-shadow: none;
        border-top: none;
        width: 100%;
        display: block;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease;
        grid-template-columns: 1fr; 
        padding: 0;
        background-color: var(--color-overlay-mobile-sub); 
        transform: none;
    }

    .main-navigation ul.nav-menu > li.submenu-active > ul.sub-menu {
        max-height: 1000px; 
        opacity: 1;
        visibility: visible;
    }

    .main-navigation ul.nav-menu > li > ul.sub-menu > li > a {
        color: var(--color-text-inverse); 
        padding-left: 30px; 
        border-bottom: 1px solid var(--color-border-mobile-sub);
        display: block;
    }
    .main-navigation ul.nav-menu > li > ul.sub-menu > li > a::before { display: none; }
    
    .nav-actions { margin-left: auto; }
}

/* =========================================
   6. STICKY HEADER
   ========================================= */
.main-navigation.is-sticky {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: var(--color-bg-nav-sticky); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); 
    box-shadow: 0 4px 15px var(--color-shadow-strong);
    animation: slideDown 0.3s ease-out;
}

.main-navigation.is-sticky ul.nav-menu > li > ul.sub-menu {
    background-color: var(--color-bg-mega-menu) !important; 
    backdrop-filter: none !important; 
    box-shadow: 0 15px 30px rgba(0,0,0,0.25);
}

body.admin-bar .main-navigation.is-sticky { top: 32px; }
@media (max-width: 782px) { body.admin-bar .main-navigation.is-sticky { top: 46px; } }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

/* =========================================
   7. SECTIONS & DIVIDERS
   ========================================= */
section {
    background-color: var(--color-bg-nav); 
    min-height: 30vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

section h1 {
    font-size: 1.6rem;
    color: var(--color-text-section-title);
    background-color: var(--color-bg-section-title);
    padding: 0.2rem 1rem;
    border-radius: 1rem;
    text-align: center;
    text-transform: uppercase;
}

.tilt {
    background: linear-gradient(to right, var(--color-accent), var(--color-highlight));
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - var(--cut)));
    z-index: 3;
    position: relative;
}

.wave-section {
    background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-highlight) 60%, var(--color-bg-card) 100%);
    clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%);
    z-index: 3;
    position: relative;
    padding-bottom: calc(var(--cut) + 20px);
    min-height: 150px; 
    padding-top: 30px;
    padding-right: 30px;
    padding-left: 30px;
    vertical-align:middle;
    margin: 0;
    border-radius: 10px;
}

.wave-section h1 {
    font-size: 1.5rem;
    color: var(--color-text-inverse); /* Explicitly set to inverse for visibility on gradient */
    text-align: center;
}

/* =========================================
   8. HERO SLIDER
   ========================================= */
.hero-slider {
    position: relative;
    width: 100%;
    height: 80vh; 
    overflow: hidden;
    background-color: #000; 
}

.hero-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s;
    z-index: 1;
}

.hero-slide.active { opacity: 1; visibility: visible; z-index: 2; }

.slide-media {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.slide-media img, .slide-media video {
    width: 100%; height: 100%; object-fit: cover; display: block;
}

.hero-slide.has-overlay .slide-media::after {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 2;
}

.slide-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.slide-content h1 {
    font-size: 3rem;
    color: white !important; /* Force white on hero */
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
    transition-delay: 0.3s; 
}

.hero-slide.active .slide-content h1 { opacity: 1; transform: translateY(0); }

.slider-controls button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    font-size: 2rem;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    border-radius: 4px;
}
.slider-controls button:hover { background: var(--color-accent); }
.prev-slide { left: 20px; }
.next-slide { right: 20px; }

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}
.dot.active { background: var(--color-accent); transform: scale(1.2); }

@media (max-width: 768px) {
    .hero-slider { height: 60vh; }
    .slide-content h1 { font-size: 1.8rem; }
    .slider-controls { display: none; } 
}

/* =========================================
   9. RESEARCH TOPICS SECTION
   ========================================= */
.research-topics-section {
    background-color: var(--color-bg-nav); /* Consistent Dark/Nav background */
    background: linear-gradient(135deg, var(--color-bg-nav) 0%, var(--color-bg-card) 100%);
    color: var(--color-text-inverse);
    width: 100%;
    clip-path: polygon(0 50px, 100% 0, 100% calc(100% - 50px), 0 100%);
    padding: 120px 0; 
    margin: 60px 0;
    position: relative;
    z-index: 2;
}

.research-topics-section .section-header h1 {
    background-color: var(--bg-research-title-bg); 
    color: var(--bg-research-title-color);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.research-topics-section .section-header {
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 40px;
    margin-top: 30px;
}

/* Updated Topic Card using Separate Variables */
.topic-card {
    background: var(--color-topic-bg); 
    border: 1px solid var(--color-topic-border);
    border-radius: 12px; 
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.topic-card:hover {
    transform: translateY(-10px);
    background: var(--color-topic-hover-bg);
    border-color: var(--color-topic-hover-border);
}

.topic-icon {
    margin-bottom: 25px;
    color: var(--color-highlight);
    height: 60px;
    width: 60px;
    margin-left: auto;
    margin-right: auto;
    background: var(--color-topic-icon-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.topic-icon svg { width: 30px; height: 30px; }

.topic-card:hover .topic-icon {
    background-color: var(--color-highlight);
    color: var(--color-text-inverse); 
    transform: scale(1.1);
}

.topic-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--color-topic-title);
    font-weight: 700;
}

.topic-card p {
    font-size: 1rem;
    color: var(--color-topic-text);
    margin-bottom: 25px;
    line-height: 1.6;
}

.topic-link {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--color-highlight);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.topic-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--color-highlight);
    transition: width 0.3s;
    margin-top: 5px;
}
.topic-card:hover .topic-link::after { width: 100%; }

@media (max-width: 900px) {
    .topics-grid {
        grid-template-columns: 1fr; 
        max-width: 500px;
        margin: 0 auto;
    }
    .research-topics-section {
        clip-path: polygon(0 30px, 100% 0, 100% calc(100% - 30px), 0 100%);
        padding: 80px 0;
    }
}

/* =========================================
   10. BLOG POST LAYOUT
   ========================================= */
article {
    background: var(--color-bg-card);
    border-radius: 8px;
    box-shadow: var(--color-shadow-card); 
    margin-bottom: 40px;
    padding: 0; 
    overflow: hidden; 
    display: flex;
    flex-direction: column;
}

.post-inner {
    display: flex;
    flex-direction: row; 
    align-items: stretch; 
    min-height: 350px; 
}

.post-image {
    width: 50%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.post-image::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2; 
    pointer-events: none; 
    opacity: 0.3; 
    transition: opacity 0.3s ease, background 0.3s ease;
    background: linear-gradient(to left, var(--color-accent) 0%, transparent 40%);
}

article:nth-child(even) .post-image::after {
    background: linear-gradient(to right, var(--color-accent) 0%, transparent 40%);
}

article:hover .post-image::after { opacity: 0.5; }

.post-image a, .post-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.5s ease;
}

article:hover .post-image img { transform: scale(1.05); }

.post-text-content {
    width: 50%;
    padding: 50px; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
}

.entry-title {
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 0.5em;
    color: var(--color-text-h1);
}

hr {
    border: none;
    height: 0;
    border-top: 2px solid var(--color-accent); 
    -webkit-mask-image: linear-gradient(to right, black 0%, transparent 40%);
    mask-image: linear-gradient(to right, black 0%, transparent 40%);
    margin: 0;
    opacity: 0.8; 
}

.entry-title a { color: var(--color-text-h1); }
.entry-title a:hover { color: var(--color-accent); }

.entry-meta {
    color: var(--color-accent);
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.entry-content { font-size: 1.1rem; }

.entry-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.entry-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.read-more-link {
    display: inline-block;
    margin-top: 20px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

article:nth-child(even) .post-inner { flex-direction: row-reverse; }

/* Pagination */
.theme-pagination {
    margin: 60px 0;
    text-align: center;
}

.theme-pagination .nav-links {
    display: flex; /* Changed from inline-flex */
    flex-wrap: wrap; /* Allows buttons to drop to next line */
    justify-content: center;
    gap: 8px; /* Reduced gap slightly for mobile density */
}

.theme-pagination a,
.theme-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    background: var(--color-bg-card);
    color: var(--color-text-main);
    border-radius: 4px;
    font-weight: bold;
    box-shadow: 0 4px 6px var(--color-shadow-light);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

@media (max-width: 480px) {
    .theme-pagination a,
    .theme-pagination span {
        padding: 10px 14px; /* Smaller touch targets for tiny screens */
        font-size: 0.9rem;
    }
}

.theme-pagination a:hover {
    background-color: var(--color-highlight); 
    color: var(--color-text-main); 
    transform: translateY(-2px);
}

.theme-pagination span.current {
    background-color: var(--color-bg-nav); 
    color: var(--color-text-inverse); 
    border-color: var(--color-bg-nav);
}

/* Single Post */
.single-featured-image-box {
    background: var(--color-bg-card);
    border-radius: 8px; 
    box-shadow: 0 10px 25px var(--color-shadow-card); 
    margin-bottom: 30px; 
    overflow: hidden; 
    width: 100%;
    line-height: 0; 
    margin-top: 20px;
    transition: all 0.6s ease;
}

.single-featured-image-box:hover { scale: 1.05; }
.single-featured-image-box img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.page-layout article,
.single-post-layout article {
    padding: 50px !important; 
    display: block; 
    height: auto;
    overflow: hidden;
    position: relative;
}

.single-post-layout article .wave-section {
    margin: -50px -50px 30px -50px; 
    width: calc(100% + 100px); 
    padding-top: 40px; 
}

.tilt-header {
    background: linear-gradient(to right, var(--color-accent), var(--color-highlight));
    color: var(--color-text-inverse-tilt);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 60px));
    margin: -50px -50px 30px -50px;
    width: calc(100% + 100px);
    min-height: 160px; 
    padding: 40px 30px 80px 30px; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.tilt-header h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.2;
    color: var(--color-text-inverse-tilt);
    background-color: transparent; 
    border: none;
    box-shadow: none;
}

.post-navigation {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

@media (max-width: 945px) {
    .post-inner,
    article:nth-child(even) .post-inner { flex-direction: column !important; }
    .post-image, .post-text-content { width: 100%; min-height: 250px; }
    .post-text-content { padding: 30px; }
    .page-layout article, .single-post-layout article { padding: 30px !important; }
    .single-post-layout article .wave-section {
        margin: -30px -30px 20px -30px; 
        width: calc(100% + 60px);
    }
    .single-post-layout article .tilt-header {
        margin: -30px -30px 20px -30px; 
        width: calc(100% + 60px);
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 40px));
        padding-bottom: 60px;
    }
    .tilt-header h1 { font-size: 1.5rem; }
}

/* =========================================
   11. STAFF GRID (GLASS EFFECT)
   ========================================= */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding-bottom: 60px;
}

.staff-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    /* Glass Vars */
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px var(--glass-shadow);
}

.staff-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px var(--glass-shadow);
    border-color: var(--theme-highlight); 
}

.staff-card-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    background: var(--glass-image-bg);
}

.staff-card-image img {
    width: 100%; height: 100%; 
    object-fit: cover; display: block;
    object-position: top center;
    transition: transform 0.6s ease;
    position: relative; z-index: 1;
}

.staff-card:hover .staff-card-image img { transform: scale(1.1); }

.staff-card-image::after {
    content: '';
    position: absolute; bottom: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top right, rgba(255,255,255,0.1), transparent 50%);
    pointer-events: none;
    z-index: 2; 
}

/* Dark mode override for image gradient */
[data-theme="kjit-dark"] .staff-card-image::after {
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}

.staff-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    color: var(--color-text-main);
}

.staff-name {
    font-size: 1.4rem;
    margin: 0 0 5px 0;
    line-height: 1.2;
}

.staff-name a { color: var(--color-text-h3); text-decoration: none; transition: color 0.2s; }
.staff-name a:hover { color: var(--theme-accent); }

.staff-position {
    font-size: 0.9rem;
    color: var(--theme-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.staff-divider {
    height: 2px;
    width: 40px;
    background: var(--theme-highlight);
    margin-bottom: 15px;
    border-radius: 2px;
}

.staff-meta {
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-main);
    opacity: 0.8;
}

.meta-label { font-weight: bold; color: var(--theme-accent); }
.staff-topics { font-size: 0.85rem; margin-bottom: 20px; font-style: italic; opacity: 0.7; }
.staff-footer { margin-top: auto; }
.read-more-btn {
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--theme-accent);
}
.read-more-btn:hover { color: var(--color-text-main); }

.staff-placeholder-icon {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center; 
    color: var(--staff-placeholder-icon-color);
    transition: color 0.3s ease;
}
.staff-placeholder-icon svg { width: 80px; height: 80px; }
.staff-card:hover .staff-placeholder-icon { color: rgba(255, 255, 255, 0.4); }

@media (max-width: 768px) {
    .staff-grid { grid-template-columns: 1fr; padding-left: 10px; padding-right: 10px; }
}

/* =========================================
   12. SINGLE STAFF PROFILE
   ========================================= */
.profile-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 60px;
    align-items: start;
}

.profile-sidebar {
    position: sticky;
    /* Increased top offset to account for fixed header (approx 80px) + gap */
    top: 120px; 
    background-color: var(--color-bg-card);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--color-border-subtle);
    box-shadow: 0 4px 20px var(--color-shadow-card);
}

.profile-image-container {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--color-bg-nav), var(--color-bg-footer));
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.profile-image-container img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--staff-placeholder-icon-color);
}
.profile-placeholder svg { width: 100px; height: 100px; }

.sidebar-heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--color-text-h3);
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    margin-top: 30px;
    font-weight: 800;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--color-text-main);
}
.contact-item .icon svg {
    width: 20px;
    height: 20px;
    color: var(--theme-accent); /* Applies your theme accent color */
    margin-right: 5px; /* Adds a little space between icon and text */
}

.contact-item a { color: var(--color-text-main); text-decoration: none; }
.contact-item a:hover { color: var(--theme-accent); }

/* ACADEMIC ICON LINKS */
.academic-links {
    display: flex;
    justify-content: center; 
    gap: 15px;
    margin-top: 35px;
    border-top: 1px solid var(--color-border-subtle);
    padding-top: 20px;
}

.academic-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--color-bg-body); 
    border: 1px solid var(--color-border-subtle);
    color: var(--color-text-main);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.academic-icon-link svg { width: 20px; height: 20px; fill: currentColor; }

.academic-icon-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 5px 15px var(--color-shadow-card);
    background-color: var(--theme-accent);
    border-color: var(--theme-accent);
    color: white;
}

.profile-main { padding: 0; }
.profile-header { margin-bottom: 50px; }
.profile-name {
    font-size: 1.6rem;
    margin: 0;
    line-height: 1.1;
    color: var(--color-text-h1);
}
.profile-position {
    font-size: 1.4rem;
    margin-top: 10px;
    font-weight: 300;
    color: var(--color-text-main);
    opacity: 0.8;
}
.header-divider {
    height: 4px;
    width: 80px;
    background: var(--theme-highlight);
    margin-top: 25px;
}

.profile-body {
    background-color: var(--color-bg-card);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--color-shadow-card);
    border: 1px solid var(--color-border-subtle);
}

.profile-section {
    background-color: transparent; 
    padding: 0;
    border-radius: 0;
    margin-bottom: 40px; 
    border-bottom: 1px solid var(--color-border-subtle); 
    padding-bottom: 40px;
    display: block;
    flex-direction: column; 
    min-height: auto !important;
}
.profile-section:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }

.section-title {
    display: flex;
    align-items: center; 
    gap: 12px;
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--color-text-h2);
    margin-bottom: 20px;
}

.title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--theme-accent); 
    color: white;
    border-radius: 50%;
    flex-shrink: 0;
}
.title-icon svg { width: 18px; height: 18px; }

.section-content {
    display: block;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-main);
    text-align: justify;
    text-justify: inter-word; 
}

.section-content ul { list-style: none; padding: 0; margin: 0; text-align: left; }
.section-content ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    text-align: justify; 
}
.section-content ul li::before {
    content: '•';
    color: var(--theme-accent);
    position: absolute; left: 0;
    font-weight: bold;
}

@media (max-width: 900px) {
    .profile-layout { display: flex; flex-direction: column; gap: 30px; }
    .profile-sidebar, .profile-main { width: 100%; position: static; }
    .profile-body { padding: 20px; }
    .profile-image-container { height: auto; max-height: 400px; max-width: 350px; aspect-ratio: 1/1; }
    .profile-name { font-size: 2.2rem; }
}

/* =========================================
   13. MTMT API STYLES (Fixed for Light Mode)
   ========================================= */
.mtmt-pub-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mtmt-card {
    display: flex;
    align-items: flex-start; 
    /* Default State: Neutral against card bg */
    background: var(--color-bg-body); 
    border: 1px solid var(--color-border-subtle);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    gap: 20px;
    position: relative;
}

.mtmt-card:hover {
    background: var(--color-bg-card); 
    border-color: var(--theme-accent);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--color-shadow-card);
}

/* Ensure text remains readable on hover */
.mtmt-card:hover .apa-journal {
    color: var(--theme-highlight);
}

/* --- BADGES --- */
.mtmt-badge {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
    color: #ffffff; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    margin-top: 5px; 
    background-color: #777; 
}

/* Rank Colors */
.sjr-D1 { background: linear-gradient(135deg, #6a11cb, #2575fc); }
.sjr-Q1 { background: linear-gradient(135deg, #11998e, #38ef7d); }
.sjr-Q2 { background: linear-gradient(135deg, #f6d365, #fda085); color: #333 !important; }
.sjr-Q3 { background: linear-gradient(135deg, #a8edea, #fed6e3); color: #333 !important; }
.sjr-Q4 { background: #cfd8dc; color: #333 !important; }
.sjr-na { background: rgba(128, 128, 128, 0.2); color: var(--color-text-main) !important; border: 1px solid var(--color-border-subtle); }

.mtmt-info.apa-style {
    flex-grow: 1;
    color: var(--color-text-main);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left; 
}

.apa-authors { display: inline; }
.apa-year { color: var(--color-text-main); opacity: 0.8; }
.apa-title { display: inline; font-weight: 600; }
.apa-journal-line { display: inline; }
.apa-journal { font-style: italic; color: var(--theme-accent); transition: color 0.3s; }

.mtmt-disclaimer {
    font-size: 0.75rem;
    opacity: 0.5;
    margin-top: 15px;
    font-style: italic;
    text-align: right;
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    .mtmt-card { padding: 15px; gap: 15px; }
    .mtmt-badge { width: 35px; height: 35px; font-size: 0.9rem; }
    .mtmt-info.apa-style { font-size: 0.9rem; }
}

/* =========================================
   14. FOOTER
   ========================================= */
.site-content { 
    padding: 0px 0; 
    flex: 1; /* This makes content grow to fill space between Header and Footer */
    min-height: auto; /* Reset the 100vh setting */
    width: 100%; /* Ensure full width */ }

.site-footer {
    background-color: var(--color-bg-footer);
    color: var(--color-text-footer);
    padding: 60px 0;
    margin-top: auto;
    border-top: 5px solid var(--color-bg-nav);
}

.site-footer a {
    color: var(--color-link-footer-idle);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}
.site-footer a:hover { 
    color: var(--color-link-footer-hover); 
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); 
    gap: 20px;
}

.footer-widget h4.widget-title {
    border-bottom: 1px solid var(--color-accent);
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--color-text-footer-heading); /* Specific Variable */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-widget {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-footer); 
    opacity: 0.9;
}

@media (max-width: 945px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* =========================================
   NEWS GRID LAYOUT
   ========================================= */

/* Section Header Spacing */
.tilt-section-header {
    margin-bottom: 40px;
    padding-top: 40px;
    background: transparent;
}

/* Grid Container */
.news-container {
    padding-bottom: 80px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 Columns */
    gap: 30px;
    width: 100%;
}

/* News Card */
.news-card {
    background: var(--color-bg-card);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--color-shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--color-border-subtle);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    border-color: var(--theme-accent);
}

/* Image Wrapper with Tilt Effect */
.news-card-image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
    /* Background for the tilt shape */
    background: linear-gradient(135deg, var(--color-bg-nav), var(--theme-accent));
}

.news-card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
    transition: transform 0.5s ease;
    /* Create the Tilt Cut on the image itself via clip-path */
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.news-card:hover .news-card-image-wrapper img {
    transform: scale(1.05);
}

/* Placeholder if no thumbnail */
.no-image-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    background: linear-gradient(45deg, var(--theme-nav), var(--theme-accent));
    opacity: 0.8;
}

/* Content Area */
.news-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    font-size: 0.8rem;
    color: var(--theme-accent);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.news-title {
    font-size: 1.3rem;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.news-title a {
    color: var(--color-text-h2);
    text-decoration: none;
    transition: color 0.2s;
}

.news-title a:hover {
    color: var(--theme-accent);
}

.news-excerpt {
    font-size: 0.95rem;
    color: var(--color-text-main);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes button to bottom */
    opacity: 0.85;
}

.news-read-more {
    display: inline-flex;
    align-items: center;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--theme-accent);
    letter-spacing: 1px;
    margin-top: auto;
}

.news-read-more .arrow {
    margin-left: 5px;
    transition: transform 0.2s;
}

.news-read-more:hover .arrow {
    transform: translateX(5px);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 Columns on Tablet */
    }
}

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr; /* 1 Column on Mobile */
    }
    
    .news-card-image-wrapper {
        height: 200px;
    }
}

/* =========================================
   UI ELEMENTS (Cookie & Scroll Top)
   ========================================= */

/* --- SCROLL TO TOP BUTTON --- */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--theme-accent);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9990; /* Below mobile menu, above content */
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background-color: var(--theme-highlight);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.scroll-top-btn svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10000; /* Highest priority */
    
    /* Use Theme Glass Effect */
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--theme-border-subtle);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    
    padding: 20px 0;
    
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-text {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-main);
}

.cookie-btn {
    background-color: var(--theme-accent);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s ease, transform 0.2s ease;
}

.cookie-btn:hover {
    background-color: var(--theme-highlight);
    transform: scale(1.05);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .cookie-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .scroll-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    /* Push scroll button up if cookie banner is visible to prevent overlap */
    .cookie-banner.show ~ .scroll-top-btn.visible {
        bottom: 140px; /* Adjust based on banner height */
    }
}

/* =========================================
   INDUSTRIAL PARTNERS SECTION
   ========================================= */

.industrial-partners-section {
    background-color: var(--color-partner-bg);
    /* REVERSE TILT GEOMETRY */
    clip-path: polygon(0 50px, 100% 0, 100% 100%, 0 calc(100% - 50px));
    padding: 120px 0;
    margin: 60px 0;
    position: relative;
    z-index: 2;
}

.industrial-partners-section .section-header h1 {
    background-color: var(--bg-research-title-bg); 
    color: var(--bg-research-title-color);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    width: fit-content;
    margin: 0 auto 0 auto;
}

/* GRID LAYOUT - 3 Columns Fixed */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
    margin-top: 30px;
    justify-items: center;
}

/* PARTNER CARD */
.partner-card {
    background-color: var(--color-partner-card-bg);
    border: 1px solid var(--color-partner-border);
    border-radius: 12px;
    width: 80%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    box-shadow: 0 4px 6px var(--color-partner-shadow);
    transition: all 0.3s ease;
    text-decoration: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0); /* Forces GPU acceleration */
    will-change: transform;   /* Tells browser to prepare for movement */
    
    filter: grayscale(100%) opacity(0.8);
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--color-partner-shadow);
    /* Hover: Színes és teljes opacitás */
    filter: grayscale(0%) opacity(1);
    border-color: var(--theme-accent);
}

.partner-logo-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 oszlop */
    }
}

@media (max-width: 600px) {
    .partners-grid {
        grid-template-columns: 1fr; /* Mobil: 1 oszlop */
        gap: 15px;
    }
    
    .industrial-partners-section {
        padding: 80px 0;
        clip-path: polygon(0 30px, 100% 0, 100% 100%, 0 calc(100% - 30px));
    }
}

.footer-column .nav-logo {
    justify-content: center; 
    height: auto;            
    padding: 0 0 20px 0;     
}

.footer-column .nav-logo img {
    max-height: 60px; 
    width: auto;
}

/* =========================================
   TOPICS ARCHIVE (ACCORDION) - UPDATED
   ========================================= */

.topics-container {
    padding-bottom: 80px;
    max-width: var(--width-container);
    width: 100%;
}

/* --- FILTER BAR (Refined for Centering) --- */
.topics-filter-bar {
    position: sticky;
    top: 80px;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid var(--theme-border-subtle);
    
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers everything horizontally */
    gap: 15px;
}

/* Top Row: Buttons + View Switcher */
.filter-row-top {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

/* Category Buttons Group */
.category-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-label {
    font-weight: bold;
    color: var(--theme-accent);
    margin-right: 5px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--theme-border-subtle);
    color: var(--color-text-main);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--theme-border-subtle);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--theme-accent);
    color: white;
    border-color: var(--theme-accent);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* View Switcher */
.view-controls {
    display: flex;
    gap: 5px;
    align-items: center;
    padding-left: 10px;
    border-left: 1px solid var(--theme-border-subtle);
    opacity: 1; 
    visibility: visible;
}

.view-btn {
    background: transparent;
    border: 1px solid var(--theme-border-subtle);
    color: var(--color-text-main);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.view-btn:hover { opacity: 1; background-color: var(--theme-border-subtle); }
.view-btn.active {
    opacity: 1;
    background-color: var(--theme-accent);
    color: white;
    border-color: var(--theme-accent);
}

/* Bottom Row: Dropdowns */
.filter-row-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    padding-top: 15px;
    border-top: 1px solid var(--theme-border-subtle);
}

.dropdown-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-select {
    appearance: none; 
    -webkit-appearance: none;
    background-color: transparent;
    border: 1px solid var(--theme-border-subtle);
    color: var(--color-text-main);
    padding: 8px 30px 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    min-width: 180px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23212A3E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
}
[data-theme="kjit-dark"] .filter-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9d1d9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.filter-select option {
    background-color: var(--color-bg-card);
    color: var(--color-text-main);
}

/* --- ACCORDION GRID LAYOUT (Default) --- */
.topics-accordion-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
    width: 100%;
}

.topic-item {
    background-color: var(--theme-card-bg);
    border: 1px solid var(--theme-border-subtle);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--color-shadow-card);
}

.topic-item:hover {
    border-color: var(--theme-accent);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.topic-item.active {
    border-color: var(--theme-accent);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Grid View Header */
.topic-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    min-height: 100px; /* Uniform height for grid */
}

.topic-main-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Badges in Grid */
.topic-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}
.cat-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    background-color: var(--theme-border-subtle); /* Fallback */
    color: var(--color-text-main);
    border: 1px solid transparent; /* Essential for the colored borders below to show */
}
/* Specific Colors */
.cat-badge.bsc {
    background-color: rgba(57, 72, 103, 0.1); 
    color: var(--theme-text-h2);
    border-color: var(--theme-text-h2);
}

.cat-badge.msc {
    background-color: rgba(155, 164, 181, 0.2); 
    color: var(--theme-text-h1);
    border-color: var(--theme-text-h3);
}

.cat-badge.tdk {
    background-color: var(--theme-accent);
    color: white;
}

.cat-badge.phd {
    background-color: var(--color-text-main);
    color: var(--color-bg-body);
}

.topic-title {
    font-size: 1.05rem;
    margin: 0 0 5px 0;
    color: var(--color-text-h2);
    font-weight: 700;
    line-height: 1.3;
}

.topic-meta {
    font-size: 0.85rem;
    color: var(--theme-accent);
    margin-top: auto;
}

/* Standard Chevron for Grid View */
.topic-icon {
    flex-shrink: 0;
    color: var(--theme-accent);
    transition: transform 0.3s ease;
}
.topic-icon svg { width: 20px; height: 20px; }
.topic-item.active .topic-icon { transform: rotate(180deg); }

.topic-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    background-color: rgba(0,0,0,0.02);
}
.topic-item.active .topic-body {
    max-height: 2000px;
    border-top: 1px solid var(--theme-border-subtle);
}
.topic-content-inner { padding: 20px; font-size: 0.95rem; color: var(--color-text-main); }

/* --- LIST VIEW OVERRIDES (Small Button Logic) --- */
.topics-accordion-list.list-view {
    grid-template-columns: 1fr !important;
    gap: 10px;
}

.topics-accordion-list.list-view .topic-item {
    margin-bottom: 0;
}

.topics-accordion-list.list-view .topic-header {
    padding: 10px 20px;
    min-height: auto;
    align-items: center; /* Vertically center everything */
}

.topics-accordion-list.list-view .topic-main-info {
    flex-direction: row; /* Horizontal layout */
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.topics-accordion-list.list-view .topic-badges {
    margin-bottom: 0;
}

.topics-accordion-list.list-view .topic-title {
    margin: 0;
    font-size: 1rem;
    margin-right: auto; /* Pushes supervisor to right */
}

.topics-accordion-list.list-view .topic-meta {
    margin-top: 0;
    white-space: nowrap;
}
.topics-accordion-list.list-view .meta-label { display: contents; }

/* SMALL BUTTON STYLING FOR LIST VIEW */
.topics-accordion-list.list-view .topic-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid var(--theme-border-subtle);
    display: contents;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    transition: all 0.2s ease;
}

.topics-accordion-list.list-view .topic-icon svg {
    width: 16px; 
    height: 16px;
    stroke-width: 2.5; /* Make arrow slightly bolder */
}

.topics-accordion-list.list-view .topic-item:hover .topic-icon {
    border-color: var(--theme-accent);
    background-color: var(--theme-accent);
    color: var(--theme-text-inverse);
}

.topics-accordion-list.list-view .topic-item.active .topic-icon {
    transform: rotate(180deg);
    background-color: var(--theme-accent);
    border-color: var(--theme-accent);
    color: var(--theme-text-inverse);
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 1200px) {
    .topics-accordion-list { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .topics-accordion-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* Center filter bar contents on mobile */
    .topics-filter-bar { padding: 15px; }
    
    .filter-row-top {
        justify-content: center;
    }

    /* Ensure view controls are visible and centered */
    .view-controls {
        display: flex;
        border-left: none; /* Remove separator on mobile */
        padding-left: 0;
        width: 100%;
        justify-content: center;
    }

    /* Stack Dropdowns */
    .filter-row-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .dropdown-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    .filter-label { text-align: center; margin-bottom: 5px; display: block; }
    .filter-select { width: 100%; }
}

@media (max-width: 600px) {
    .topics-accordion-list { grid-template-columns: 1fr; }
    
    /* List View Mobile Adjustments */
    .topics-accordion-list.list-view .topic-main-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .topics-accordion-list.list-view .topic-title { margin-right: 0; }
    .topics-accordion-list.list-view .topic-icon {
        position: absolute;
        top: 15px;
        right: 15px;
    }
    .topics-accordion-list.list-view .topic-header { position: relative; }
}

[data-theme="kjit-light"] .entry-content a {
    color: #7182a5;
}

[data-theme="kjit-light"] .entry-content a:hover {
    color: #151921;
}

/* =========================================
   15. CUSTOM TABLES (KJIT LINKS TABLE)
   ========================================= */
.kjit-links-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-bg-card);
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--color-shadow-card);
    overflow: hidden; /* Keeps border-radius intact */
    margin-top: 20px;
    margin-bottom: 40px;
    border: 1px solid var(--color-border-subtle);
}

.kjit-links-table thead tr {
    background-color: var(--theme-accent);
    color: white; /* Forces white text on the dark navy/blue accent */
}

.kjit-links-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.95rem;
    border: none;
}

.kjit-links-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border-subtle);
    border-right: 1px solid var(--color-border-subtle);
    vertical-align: top;
    color: var(--color-text-main);
    font-size: 1rem;
    line-height: 1.6;
}

.kjit-links-table td:last-child {
    border-right: none;
}

.kjit-links-table tbody tr:last-child td {
    border-bottom: none;
}

.kjit-links-table tbody tr {
    transition: background-color 0.3s ease;
}

/* Subtle hover effect for both light and dark modes */
[data-theme="kjit-light"] .kjit-links-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}
[data-theme="kjit-dark"] .kjit-links-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.kjit-table-cat {
    color: var(--color-text-h2);
    font-weight: 800;
    font-size: 1.05rem;
}

/* Spacing for link groups */
.kjit-links-table td a {
    display: inline-block;
    margin-bottom: 4px;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto; /* Enables horizontal scroll if the table is too wide */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iPhones */
    margin-bottom: 2rem;
}

/* Ensure the table inside doesn't shrink smaller than its content */
.table-wrapper table {
    min-width: 600px; /* Optional: forces scroll on mobile instead of squishing */
    width: 100%;
}

/* Target all Gutenberg headings and your theme headings */
h1, h2, h3, .wp-block-heading {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word; /* Forces break if the word is longer than the screen */
    hyphens: auto;           /* Adds a hyphen when breaking words */
}

/* Fluid Typography: Adjust sizes specifically for mobile */
@media (max-width: 600px) {
    h1, .wp-block-heading.has-x-large-font-size, .entry-title {
        font-size: clamp(1.8rem, 8vw, 2.2rem) !important;
        line-height: 1.2;
    }
    
    h2, .wp-block-heading.has-large-font-size, .section-title {
        font-size: clamp(1.4rem, 6vw, 1.7rem) !important;
    }
}

/* Mobile: Force 100% width */
@media (max-width: 768px) {
    :root { --width-container: 100%; }

    .container {
        padding: 0 15px; /* Keeps text from touching screen edges */
        box-sizing: border-box; /* Essential so padding doesn't add to the 100% width */
    }
}

.entry-content a, 
.staff-meta a, 
.contact-item a {
    /* These properties force the email to wrap inside the container */
    overflow-wrap: break-word;  /* Standard modern fix */
    word-wrap: break-word;      /* Legacy support */
    word-break: break-all;      /* Aggressive fix: breaks at any character */
    
    /* Optional: Visual cue for mobile */
    display: inline-block;      /* Helps with hit-area and wrapping logic */
    max-width: 100%;            /* Ensure it never exceeds the parent width */
}

/* =========================================
   16. BLOCKQUOTES (Updated with Accent Glow)
   ========================================= */

/* Target both standard HTML blockquotes and Gutenberg blocks */
blockquote,
.wp-block-quote {
    position: relative;
    margin: 40px 0;
    padding: 25px 30px;
    background-color: var(--color-bg-card);
    border-left: 6px solid var(--color-accent);
    
    /* Rounded right corners to fit theme aesthetic */
    border-radius: 0 12px 12px 0; 
    
    /* * DUAL SHADOW LOGIC:
     * 1. A standard dark shadow for depth (var(--color-shadow-light)).
     * 2. A large, soft, transparent glow using the ACCENT color.
     */
    box-shadow: 
        0 5px 20px var(--color-shadow-light), 
        0 0 30px color-mix(in srgb, var(--color-accent) 15%, transparent);
        
    /* Smooth transition for theme switching and hover effects */
    transition: all 0.4s ease;
}

/* Optional: Slight hover effect to enhance the glow */
blockquote:hover,
.wp-block-quote:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px var(--color-shadow-light), 
        0 0 40px color-mix(in srgb, var(--color-accent) 25%, transparent);
}

/* Decorative Quote Mark (Kept subtle to not clash with glow) */
blockquote::before,
.wp-block-quote::before {
    content: '\201C'; /* Unicode for Left Double Quotation Mark */
    position: absolute;
    top: -5px;
    left: 15px;
    font-size: 5rem;
    font-family: Georgia, serif;
    color: var(--color-accent);
    opacity: 0.1; /* Very low opacity so it doesn't distract from text */
    line-height: 1;
    pointer-events: none;
}

/* --- Blockquote Text --- */
blockquote p,
.wp-block-quote p {
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 500; /* Medium weight */
    color: var(--color-text-main);
    line-height: 1.7;
    margin-bottom: 0;
    position: relative; /* Sits above background quote mark */
    z-index: 1;
}

blockquote p + p,
.wp-block-quote p + p {
    margin-top: 15px;
}

/* --- Citation / Author Name --- */
blockquote cite,
.wp-block-quote cite {
    display: block;
    margin-top: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text-h3);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: right; /* Standard style for modern quotes */
}

blockquote cite::before,
.wp-block-quote cite::before {
    content: "— ";
    color: var(--color-accent);
    font-weight: bold;
}

/* --- Mobile Adjustments --- */
@media (max-width: 768px) {
    blockquote,
    .wp-block-quote {
        margin: 30px 0;
        padding: 20px;
        /* Reduce shadow size/spread on mobile to prevent clutter */
        box-shadow: 
            0 4px 15px var(--color-shadow-light), 
            0 0 15px color-mix(in srgb, var(--color-accent) 15%, transparent);
    }
    
    blockquote p,
    .wp-block-quote p {
        font-size: 1.05rem;
    }
}