/* ===================================
   CSS Variables for Easy Color Changes
   Military Budget Theme - Greys with Green Accents
   ==================================== */
   :root {
    /* Primary Colors - Green for money/budget emphasis */
    --primary-color: #2d6a4f;
    --primary-hover: #1b4332;
    --accent-green: #40916c;
    --accent-green-light: #52b788;
    
    /* Footer Colors - Professional Grey Gradient */
    --footer-bg-start: #343a40;
    --footer-bg-end: #495057;
    
    /* Text Colors - Stronger greys for authority */
    --text-dark: #212529;
    --text-light: #6c757d;
    --text-muted: #868e96;
    
    /* Background Colors - Subtle greys */
    --bg-light: #e9ecef;
    --bg-white: #ffffff;
    --bg-grey: #f8f9fa;
    
    /* Meta/Link Colors - Green for money emphasis */
    --meta-color: var(--accent-green);
    --author-link-color: var(--primary-color);
    --author-link-hover: var(--primary-hover);
    
    /* Font Family - Easy to change in one place */
    --font-family-base: 'Roboto', sans-serif;
    --font-family-fallback: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Font Size Scale - Well-organized SASS-style */
    /* Base font size */
    --font-size-base: 1.3rem;           /* 16px - Body text */
    
    /* Smaller sizes */
    --font-size-sm: 0.875rem;         /* 14px - Small text */
    --font-size-xs: 0.75rem;          /* 12px - Extra small */
    
    /* Larger sizes */
    --font-size-lg: 1.125rem;         /* 18px - Large body text */
    --font-size-xl: 1.85rem;          /* 20px - Subheadings */
    
    /* Display sizes (headings) */
    --font-size-2xl: 1.5rem;          /* 24px - H5 */
    --font-size-3xl: 1.875rem;        /* 30px - H4 */
    --font-size-4xl: 2.25rem;         /* 36px - H3 */
    --font-size-5xl: 3rem;            /* 48px - H2 */
    --font-size-6xl: 3.75rem;         /* 60px - H1 */
    --font-size-7xl: 4.5rem;          /* 72px - Display/Hero */
}

/* ===================================
   Global Styles
   ==================================== */
body {
    font-family: var(--font-family-base) !important;
    color: var(--text-dark);
    line-height: 1.6;
    font-size: var(--font-size-base);    /* 16px - Base font size */
}

/* Apply font family to all text elements globally, but exclude icon fonts */
*:not([class*="fa"]):not([class*="fas"]):not([class*="far"]):not([class*="fal"]):not([class*="fab"]):not([class*="fa-"]):not(.dashicons):not([class*="dashicons"]):not(.dashicon):not([class*="icon"]):not([class*="-icon"]) {
    font-family: var(--font-family-base) !important;
}

/* Ensure Font Awesome icons maintain their font-family globally */
[class*="fa"],
[class*="fas"],
[class*="far"],
[class*="fal"],
[class*="fab"],
[class*="fa-"],
i[class*="fa"],
i[class*="fas"],
i[class*="far"],
i[class*="fal"],
i[class*="fab"],
i.fa,
i[class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands", "FontAwesome" !important;
}

/* Ensure Dashicons maintain their font-family */
.dashicons,
.dashicons-before:before,
[class*="dashicons-"]:before,
[class*="dashicons-"]:after {
    font-family: 'dashicons' !important;
}

/* Consistent paragraph styling */
p {
    font-size: var(--font-size-base);    /* 16px - All paragraphs same size */
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ===================================
   Header Styles - WordPress Compatible
   ==================================== */
.main-header {
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* WordPress Admin Bar Support */
.admin-bar .main-header {
    top: 32px;
}

/* Sticky Header on Scroll */
.main-header.scrolled {
    padding: 0.75rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

/* Compensate for fixed header */
body {
    padding-top: 80px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.scrolled {
    padding-top: 65px;
}

/* WordPress Admin Bar Support - Adjust body padding */
.admin-bar body {
    padding-top: 112px; /* 80px header + 32px admin bar */
}

.admin-bar body.scrolled {
    padding-top: 97px; /* 65px header + 32px admin bar */
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Logo Styles */
.site-logo {
    z-index: 1001;
}

.logo-link {
    color: var(--text-dark);
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.logo-link:hover {
    color: var(--primary-color);
}

.logo-combined-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    vertical-align: middle;
}

.logo-text {
    color: var(--text-dark);
    font-size: 1.7rem;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.logo-divider {
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.logo-text-fallback {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.aei-logo-img {
    height: 30px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.main-header.scrolled .logo-combined-link {
    gap: 0.5rem;
}

.main-header.scrolled .logo-text,
.main-header.scrolled .logo-divider,
.main-header.scrolled .logo-text-fallback {
    font-size: 1.3rem;
}

.main-header.scrolled .aei-logo-img {
    height: 28px;
}

/* Logo size on scroll */
.main-header.scrolled .logo-link {
    font-size: 1.5rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-bar {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all 0.3s ease;
    border-radius: 3px;
    display: block;
}

.mobile-menu-toggle.active .menu-bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .menu-bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-menu-toggle.active .menu-bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Main Navigation - WordPress Structure */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    font-family: var(--font-family-base);
}

.menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-family-base);
}

.menu-item {
    position: relative;
    font-family: var(--font-family-base);
}

.menu-item > a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.75rem 1rem;
    display: block;
    font-family: var(--font-family-base);
    font-weight: 500;
    font-size: var(--font-size-base);    /* Match paragraph size */
    transition: all 0.3s ease;
}
.menu-item > a::after {
    content: '';
    display: block;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease;
    margin-top: 4px;
    opacity: 0.9;
}
.footer-links .menu-item > a {
    
    padding: 0.75rem 0;
}
/* Menu items on scroll */
.main-header.scrolled .menu-item > a {
    padding: 0.5rem 0.85rem;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);    /* Match paragraph size */
}

.menu-item > a:hover,
.menu .current-menu-item > a,
.menu .current_page_item > a,
.menu .current-menu-ancestor > a {
    color: var(--primary-color);
}
.menu .current-menu-item > a::after,
.menu .current_page_item > a::after,
.menu .current-menu-ancestor > a::after,
.menu-item > a:hover::after {
    transform: scaleX(1);
}

/* Dropdown Icon */
.menu-item-has-children > a i {
    font-size: 0.7rem;
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

.menu-item-has-children:hover > a i {
    transform: rotate(180deg);
}

/* Submenu Styles */
.sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu .menu-item > a {
    padding: 0.75rem 1.5rem;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);    /* Match paragraph size */
    white-space: nowrap;
}

.sub-menu .menu-item > a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Search Icon Button (Outside Menu) */
.search-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    color: var(--text-dark);
    text-decoration: none;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.search-icon-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.search-icon-btn:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.search-icon-btn:hover i {
    transform: scale(1.2);
}

/* Mobile Menu Styles */
@media (max-width: 991px) {
    .main-header {
        padding: 0.75rem 0;
        min-height: 60px;
    }
    
    .main-header.scrolled {
        padding: 0.5rem 0;
        min-height: 50px;
    }
    
    body {
        padding-top: 60px;
    }
    
    body.scrolled {
        padding-top: 50px;
    }
    
    /* WordPress Admin Bar Support - Mobile */
    .admin-bar body {
        padding-top: 92px; /* 60px header + 32px admin bar */
    }
    
    .admin-bar body.scrolled {
        padding-top: 82px; /* 50px header + 32px admin bar */
    }
    
    html {
        scroll-padding-top: 60px;
    }
    
    section[id],
    main[id] {
        scroll-margin-top: 60px;
    }
    
    body.scrolled section[id],
    body.scrolled main[id] {
        scroll-margin-top: 50px;
    }
    
    /* Mobile Logo */
    .logo-text {
        font-size: 1.2rem;
    }
    
    .logo-divider {
        font-size: 1.2rem;
    }
    
    .logo-text-fallback {
        font-size: 1.2rem;
    }
    
    .aei-logo-img {
        height: 28px;
        max-width: 100px;
    }
    
    .main-header.scrolled .logo-text,
    .main-header.scrolled .logo-divider,
    .main-header.scrolled .logo-text-fallback {
        font-size: 1.1rem;
    }
    
    .main-header.scrolled .aei-logo-img {
        height: 26px;
    }
    
    /* Mobile Footer Logo */
    .footer-logo-text {
        font-size: 1.1rem;
    }
    
    .footer-logo-divider {
        font-size: 1.1rem;
    }
    
    .footer-logo-text-fallback {
        font-size: 1.1rem;
    }
    
    .footer-aei-logo-img {
        height: 28px;
    }
    
    .logo-link {
        font-size: 1.3rem;
    }
    
    .search-icon-btn {
        margin-left: auto;
        margin-right: 0.5rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.4s ease;
    }
    
    .main-navigation.active {
        max-height: 500px;
        opacity: 1;
        padding: 1.5rem 0;
    }
    
    .menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .menu-item {
        width: 100%;
        border-bottom: 1px solid #e9ecef;
    }
    
    .menu-item:last-child {
        border-bottom: none;
    }
    
    .menu-item > a {
        padding: 1rem 1.5rem;
        font-family: var(--font-family-base);
        font-size: var(--font-size-base);
    }
    
    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--bg-light);
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .menu-item-has-children.open > .sub-menu {
        max-height: 300px;
    }
    
    .menu-item-has-children > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-family: var(--font-family-base);
        font-size: var(--font-size-base);
    }
}

/* Extra small mobile adjustments */
@media (max-width: 480px) {
    .main-header {
        min-height: 50px;
        padding: 0.5rem 0;
    }
    
    .main-header.scrolled {
        min-height: 45px;
        padding: 0.375rem 0;
    }
    
    body {
        padding-top: 50px;
    }
    
    body.scrolled {
        padding-top: 45px;
    }
    
    /* WordPress Admin Bar Support - Extra Small Mobile */
    .admin-bar body {
        padding-top: 82px; /* 50px header + 32px admin bar */
    }
    
    .admin-bar body.scrolled {
        padding-top: 77px; /* 45px header + 32px admin bar */
    }
    
    html {
        scroll-padding-top: 50px;
    }
    
    section[id],
    main[id] {
        scroll-margin-top: 50px;
    }
    
    body.scrolled section[id],
    body.scrolled main[id] {
        scroll-margin-top: 45px;
    }
}

/* ===================================
   Sliding Search Popup Styles
   ==================================== */
.search-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px; /* Same as body padding-top to cover full header */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Search popup height adjustment when header is scrolled */
.main-header.scrolled ~ .search-popup {
    height: 65px;
}

/* WordPress Admin Bar Support - Search Popup */
.admin-bar .search-popup {
    top: 32px;
    height: 82px;
}

.admin-bar .main-header.scrolled ~ .search-popup {
    height: 65px;
}

.search-popup.active {
    transform: translateY(0);
}

.search-popup-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.search-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border-radius: 50px;
    padding: 0.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 0;
}

/* Header search popup form - ensure it doesn't get affected by 404 styles */
.search-popup .search-input-group .search-form {
    display: flex !important;
    flex-direction: row !important;
    width: 100%;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.search-popup .search-input-group .search-form:focus-within {
    border: none;
    box-shadow: none;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-family: var(--font-family-base);
    outline: none;
    color: var(--text-dark);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: 0.75rem 1.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

.search-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.search-btn i {
    font-size: 1.1rem;
}

.search-close-btn {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.3rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

/* Search icon animation in menu */
.search-toggle i {
    transition: transform 0.3s ease;
}

.search-toggle:hover i {
    transform: scale(1.2);
}

/* Backdrop overlay when search is open */
.search-popup.active::before {
    content: '';
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    animation: fadeIn 0.3s ease;
    transition: top 0.3s ease;
}

/* Adjust backdrop when header is scrolled */
.main-header.scrolled ~ .search-popup.active::before {
    top: 65px;
}

/* Adjust backdrop when admin bar is visible */
.admin-bar .search-popup.active::before {
    top: 112px; /* 80px header + 32px admin bar */
}

.admin-bar .main-header.scrolled ~ .search-popup.active::before {
    top: 97px; /* 65px header + 32px admin bar */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile search adjustments */
@media (max-width: 768px) {
    .search-popup {
        height: 67px; /* Same as body padding-top on mobile */
    }
    
    .main-header.scrolled ~ .search-popup {
        height: 60px; /* Same as body padding-top when scrolled on mobile */
    }
    
    /* WordPress Admin Bar Support - Mobile Search Popup */
    .admin-bar .search-popup {
        height: 67px;
    }
    
    .admin-bar .main-header.scrolled ~ .search-popup {
        height: 60px;
    }
    
    .search-popup-wrapper {
        flex-direction: row;
        gap: 0.75rem;
        padding: 0 1rem;
        align-items: center;
    }
    
    .search-input-group {
        flex: 1;
        flex-direction: row;
        gap: 0.5rem;
        border-radius: 35px;
        padding: 0.25rem 0.5rem;
        min-width: 0;
    }
    
    /* Ensure header search form stays horizontal on mobile */
    .search-popup .search-input-group .search-form {
        flex-direction: row !important;
    }
    
    .search-input {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
        min-width: 0;
        flex: 1;
    }
    
    .search-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    
    .search-close-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        flex-shrink: 0;
    }
    
    .search-popup.active::before {
        top: 67px;
    }
    
    /* Adjust backdrop when admin bar is visible - Mobile */
    .admin-bar .search-popup.active::before {
        top: 99px; /* 67px header + 32px admin bar */
    }
    
    .admin-bar .main-header.scrolled ~ .search-popup.active::before {
        top: 92px; /* 60px header + 32px admin bar */
    }
    :root {
        --font-size-base: 1rem;
    }
}

@media (max-width: 480px) {
    .search-popup {
        height: 55px; /* Same as body padding-top on small mobile */
    }
    
    .main-header.scrolled ~ .search-popup {
        height: 55px; /* Same as body padding-top when scrolled on small mobile */
    }
    
    /* WordPress Admin Bar Support - Small Mobile Search Popup */
    .admin-bar .search-popup {
        height: 65px;
    }
    
    .admin-bar .main-header.scrolled ~ .search-popup {
        height: 55px;
    }
    
    .search-popup-wrapper {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }
    
    .search-input-group {
        border-radius: 30px;
        padding: 0.2rem 0.4rem;
        min-width: 0;
    }
    
    /* Ensure header search form stays horizontal on small mobile */
    .search-popup .search-input-group .search-form {
        flex-direction: row !important;
    }
    
    .search-input {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        min-width: 0;
        flex: 1;
    }
    
    .search-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
    
    .search-close-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .search-popup.active::before {
        top: 55px;
    }
    
    /* Adjust backdrop when admin bar is visible - Small Mobile */
    .admin-bar .search-popup.active::before {
        top: 87px; /* 55px header + 32px admin bar */
    }
    
    .admin-bar .main-header.scrolled ~ .search-popup.active::before {
        top: 87px; /* 55px header + 32px admin bar */
    }
}

/* ===================================
   Hero Section - Full Background Image
   ==================================== */
.hero-fullscreen {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: kenBurns 20s ease-in-out infinite alternate;
}

@keyframes kenBurns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(33, 37, 41, 0.9) 0%, rgba(45, 106, 79, 0.85) 100%);
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    padding: 4rem 0;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-out 0.3s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hero-badge.featured-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-badge.category-badge {
    background: var(--accent-green);
    color: white;
    box-shadow: 0 4px 15px rgba(64, 145, 108, 0.4);
}

.hero-main-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 90%;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.hero-meta-info {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.meta-item i {
    font-size: 1.1rem;
    color: var(--accent-green-light);
}

.hero-action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.8s backwards;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-btn-primary {
    background: var(--accent-green);
    color: white;
}

.hero-btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(64, 145, 108, 0.4);
}

.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: bounce 2s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

.scroll-indicator:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-50%) translateY(-5px);
}

.scroll-indicator i {
    font-size: 1.5rem;
    color: white;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* Responsive Hero */
@media (max-width: 991px) {
    .hero-fullscreen {
        min-height: 80vh;
    }
    
    .hero-main-title {
        font-size: 2.75rem;
    }
    
    .hero-description {
        font-size: 1.15rem;
        max-width: 100%;
    }
    
    .hero-meta-info {
        gap: 1.5rem;
    }
		.footer-links .list-inline-item:last-child a {
		padding-left:0px;
	}
}

@media (max-width: 768px) {
    .hero-fullscreen {
        min-height: 70vh;
    }
    
    .hero-content-wrapper {
        padding: 2rem 0;
    }
    
    .hero-main-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-meta-info {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .meta-item i {
        font-size: 1rem;
    }
    
    .hero-action-buttons {
        flex-direction: column;
    }
    
    .hero-btn {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
    }
    
    .scroll-indicator {
        bottom: 1rem;
    }
}

/* ===================================
   Home Banner Section
   ==================================== */
.home-banner {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.banner-wrapper {
    position: relative;
    width: 100%;
    display: block;
    max-height: 400px;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: 400px;
    display: block;
    object-fit: cover;
    object-position: bottom;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.banner-text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    width: 100%;
    padding: 0 2rem;
}

.banner-title {
    font-family: var(--font-family-base);
    font-size: var(--font-size-7xl);        /* 72px - Hero display */
    font-weight: 700;
    color: rgb(0 0 0 / 61%);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0;
    line-height: 1.2;
}

/* Responsive Banner */
@media (max-width: 768px) {
    .banner-wrapper {
        max-height: 250px;
    }
    
    .banner-image {
        height: 250px;
    }
    
    .banner-title {
        font-size: var(--font-size-4xl);    /* 36px - Mobile hero */
        letter-spacing: 0.1em;
    }
    
    .banner-text-overlay {
        padding: 0 1rem;
    }
}

/* ===================================
   About Section Styles
   ==================================== */
.about-section {
    background-color: #ffffff;
    padding: 4rem 0;
}

.about-content {
    /* max-width: 900px; */
    margin: 0 auto;
    padding: 0 2rem;
}

.about-main-title {
    font-family: var(--font-family-base);
    font-size: var(--font-size-5xl);        /* 48px - H2 main title */
    font-weight: 700;
    color: #000000;
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.about-subtitle {
    font-family: var(--font-family-base);
    font-size: var(--font-size-xl);         /* 20px - Subtitle */
    font-weight: 400;
    color: #333333;
    text-align: center;
    margin-bottom: 0.5rem;
}

.about-editor {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);       /* 16px - Editor credit */
    font-weight: 400;
    color: #555555;
    text-align: center;
    margin-bottom: 3rem;
}

.about-body-text {
    font-family: var(--font-family-base), var(--font-family-fallback);
    font-size: var(--font-size-lg);         /* 18px - Body text */
    line-height: 1.8;
    color: #000000;
}

.about-body-text p {
    margin-bottom: 1.5rem;
    text-align: left;
}

.about-body-text p:last-child {
    margin-bottom: 0;
}

.about-body-text em {
    font-style: italic;
}

/* Responsive About Section */
@media (max-width: 768px) {
    .about-section {
        padding: 3rem 0;
    }
    
    .about-content {
        padding: 0 1.5rem;
    }
    
    .about-main-title {
        font-size: var(--font-size-3xl);    /* 30px - Mobile H2 */
    }
    
    .about-subtitle {
        font-size: var(--font-size-lg);     /* 18px - Mobile subtitle */
    }
    
    .about-editor {
        font-size: var(--font-size-sm);     /* 14px - Mobile editor */
    }
    
    .about-body-text {
        font-size: var(--font-size-base);   /* 16px - Mobile body */
    }
}

/* ===================================
   Blog Section Styles
   ==================================== */
.blog-section {
    background-color: var(--bg-light);
    min-height: 100vh;
}

/* Main content areas - ensure proper bottom spacing */
main#article,
main#page-content {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    position: relative;
    z-index: 1;
    clear: both;
    display: block;
    width: 100%;
}

main#article article,
main#page-content article {
    margin-bottom: 0;
    position: relative;
    z-index: 1;
    clear: both;
    display: block;
    width: 100%;
}

.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

.blog-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image {
    transform: scale(1.05);
}

.blog-title {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.45rem;
    line-height: 1.4;
    min-height: 3.5rem;
}

.blog-title:hover {
    color: var(--primary-color);
    cursor: pointer;
}

.blog-meta {
    font-size: 0.875rem;
}

.blog-meta span {
    color: var(--meta-color);
}

.blog-meta i {
    color: var(--meta-color);
}

.author-link {
    color: var(--author-link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.author-link:hover {
    color: var(--author-link-hover);
    text-decoration: underline;
}

.blog-excerpt {
    color: var(--text-muted);
    font-size: var(--font-size-base);    /* 16px - Match paragraph size */
    line-height: 1.6;
    margin-bottom: 0;
}

/* ===================================
   Footer Styles
   ==================================== */
.main-footer {
    background: linear-gradient(90deg, var(--footer-bg-start) 0%, var(--footer-bg-end) 100%);
    margin-top: 0;
    position: relative;
    clear: both;
    z-index: 1;
    display: block;
    width: 100%;
}

.footer-logo {
    letter-spacing: 2px;
    white-space: nowrap;
}

.footer-logo-combined-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    vertical-align: middle;
}

.footer-logo-text {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.footer-logo-divider {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.3rem;
    font-weight: 300;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.footer-logo-text-fallback {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.footer-aei-logo-img {
    height: 30px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    filter: brightness(0) invert(1);
}

.footer-links {
    margin-bottom: 0;
}

.footer-links .list-inline-item a {
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.footer-links .list-inline-item a:hover {
    opacity: 0.8;
}

.footer-copyright {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ===================================
   Bootstrap Overrides
   ==================================== */
.text-primary {
    color: var(--primary-color) !important;
}

.card-body {
    padding: 1.5rem;
}

/* ===================================
   Responsive Adjustments
   ==================================== */
@media (max-width: 991px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #e9ecef;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
    }
    
    .footer-links .list-inline-item {
        display: block;
        margin: 0.75rem 0 !important;
    }
    
    .footer-links .list-inline-item a {
        font-size: 0.95rem;
    }
    
    .footer-copyright {
        margin-top: 1rem !important;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .stat-item {
        text-align: center;
        padding-right: 0;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .hero-image-wrapper {
        margin-top: 40px;
        padding: 20px;
    }
    
    .hero-image-background {
        width: 250px;
        height: 250px;
    }
    
    .blog-image {
        height: 220px;
    }
    
    .blog-title {
        font-size: 1.8rem;
        min-height: auto;
    }
    
    .footer-logo {
        margin-top: 0;
        margin-bottom: 0;
    }
}

/* ===================================
   Utility Classes
   ==================================== */
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* ===================================
   Blog Card Animation
   ==================================== */
@keyframes fadeInBlog {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-section .blog-card {
    animation: fadeInBlog 0.6s ease-out;
}

/* Stagger animation for cards */
.blog-section .col-lg-4:nth-child(1) .blog-card,
.blog-section .col-md-6:nth-child(1) .blog-card { animation-delay: 0.1s; }
.blog-section .col-lg-4:nth-child(2) .blog-card,
.blog-section .col-md-6:nth-child(2) .blog-card { animation-delay: 0.2s; }
.blog-section .col-lg-4:nth-child(3) .blog-card,
.blog-section .col-md-6:nth-child(3) .blog-card { animation-delay: 0.3s; }
.blog-section .col-lg-4:nth-child(4) .blog-card,
.blog-section .col-md-6:nth-child(4) .blog-card { animation-delay: 0.4s; }
.blog-section .col-lg-4:nth-child(5) .blog-card,
.blog-section .col-md-6:nth-child(5) .blog-card { animation-delay: 0.5s; }
.blog-section .col-lg-4:nth-child(6) .blog-card,
.blog-section .col-md-6:nth-child(6) .blog-card { animation-delay: 0.6s; }

/* ===================================
   Scroll Behavior
   ==================================== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Matches header height */
}

/* Ensure sections have scroll margin */
section[id],
main[id] {
    scroll-margin-top: 80px; /* Matches header height */
}

/* Adjust scroll offset when header is scrolled (smaller) */
body.scrolled section[id],
body.scrolled main[id] {
    scroll-margin-top: 65px; /* Matches scrolled header height */
}

/* ===================================
   Focus States for Accessibility
   ==================================== */
.nav-link:focus,
.author-link:focus,
.dropdown-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===================================
   Post Navigation Styles
   ==================================== */
.post-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    position: relative;
    z-index: 1;
    clear: both;
    display: block;
    width: 100%;
}

.post-nav-link {
    display: block;
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--bg-light);
    text-decoration: none;
    transition: all 0.3s ease;
    height: 100%;
}

.post-nav-link:hover {
    background: var(--bg-grey);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-nav-direction {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.post-nav-prev .post-nav-direction {
    justify-content: flex-start;
}

.post-nav-next .post-nav-direction {
    justify-content: flex-end;
}

.post-nav-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
}

.post-nav-prev .post-nav-title {
    text-align: left;
}

.post-nav-next .post-nav-title {
    text-align: right;
}

.post-nav-link:hover .post-nav-title {
    color: var(--primary-color);
}

/* Mobile responsive */
@media (max-width: 767px) {
    .post-nav-direction {
        justify-content: flex-start !important;
    }
    
    .post-nav-title {
        text-align: left !important;
    }
}

/* ===================================
   Blog Details: Section Heading Spacing
   - Add top spacing to each h2 within the article
   - Do not add spacing before the first h2
   ==================================== */
main#article article h2 {
    margin-top: 3rem;
}

/* ===================================
   Blog Details: Superscript Text Color
   ==================================== */
main#article article sup {
    color: #2d6a4f;
    font-weight: bold;
}

/* ===================================
   Blog Details: Image Width Constraints
   Ensure images in content don't break layout
   ==================================== */
main#article article img,
main#article article figure img,
main#article article div img,
main#article article .wp-block-image img,
main#article article .wp-image img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

/* Ensure image containers also respect width */
main#article article figure,
main#article article .wp-block-image,
main#article article .wp-image {
    max-width: 100% !important;
}

/* ===================================
   Blog Details: List Styling (ul, ol)
   Match content font, size, and proper indentation
   POST CONTENT ONLY - scoped to main#article article
   ==================================== */
main#article article ul,
main#article article ol {
    font-family: var(--font-family-base) !important;
    font-size: var(--font-size-base);
    line-height: 1.85;
    color: var(--text-dark);
    margin: 1.5rem 0;
    padding-left: 2rem;
}

main#article article ul li,
main#article article ol li {
    font-family: var(--font-family-base) !important;
    font-size: var(--font-size-base);
    line-height: 1.85;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

/* Nested lists - proper indentation */
main#article article ul ul,
main#article article ol ol,
main#article article ul ol,
main#article article ol ul {
    margin: 0.75rem 0;
    padding-left: 2rem;
}

main#article article ul ul li,
main#article article ol ol li,
main#article article ul ol li,
main#article article ol ul li {
    margin-bottom: 0.5rem;
}

/* Deeply nested lists (3+ levels) */
main#article article ul ul ul,
main#article article ol ol ol,
main#article article ul ul ol,
main#article article ol ol ul {
    padding-left: 1.5rem;
}

/* List item content styling */
main#article article li p {
    margin-bottom: 0.5rem;
    font-family: var(--font-family-base) !important;
    font-size: var(--font-size-base);
    line-height: 1.85;
}

main#article article li:last-child {
    margin-bottom: 0;
}

/* ===================================
   PublishPress Authors Plugin Styling
   Custom Layout: Image Left, Name/Email/Bio Right
   Multiple authors displayed one by one (stacked)
   ==================================== */
.pp-multiple-authors-boxes-wrapper,
.pp-multiple-authors-boxes-wrapper *,
.pp-author-wrapper,
.pp-author-wrapper * {
    font-family: var(--font-family-base) !important;
}

/* Main wrapper for multiple authors - stack vertically */
.pp-multiple-authors-boxes-wrapper {
    display: block !important;
    margin: 3rem 0 !important;
}

/* Authors title - centered in all views */
.authors-title {
    text-align: center !important;
}

/* Individual author box container layout */
.pp-author-boxes-wrapper,
.pp-multiple-authors-boxes-li,
.pp-multiple-authors-boxes-wrapper .pp-author-boxes-wrapper,
.pp-multiple-authors-boxes-wrapper .pp-multiple-authors-boxes-li,
.pp-multiple-authors-boxes-wrapper > .pp-author-boxes-wrapper,
.pp-multiple-authors-boxes-wrapper > .pp-multiple-authors-boxes-li {
    display: flex !important;
    gap: 1.5rem !important;
    align-items: flex-start !important;
    margin: 0 0 2rem 0 !important;
    padding: 2rem !important;
    background: #f8f9fa !important;
    border-radius: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    list-style: none !important;
}

/* Last author box - no bottom margin */
.pp-author-boxes-wrapper:last-child,
.pp-multiple-authors-boxes-li:last-child,
.pp-multiple-authors-boxes-wrapper .pp-author-boxes-wrapper:last-child,
.pp-multiple-authors-boxes-wrapper .pp-multiple-authors-boxes-li:last-child {
    margin-bottom: 0 !important;
}

/* Author image on the left */
.pp-author-boxes-avatar,
.pp-multiple-authors-boxes-wrapper .pp-author-boxes-avatar {
    flex-shrink: 0 !important;
    order: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pp-author-boxes-avatar img,
.pp-multiple-authors-boxes-wrapper .pp-author-boxes-avatar img {
    width: 120px !important;
    height: 120px !important;
    border-radius: 50% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    object-position: top !important;
    display: block !important;
    flex-shrink: 0 !important;
}

/* Author content on the right - avatar-details contains name, email, bio */
.pp-author-boxes-avatar-details,
.pp-multiple-authors-boxes-wrapper .pp-author-boxes-avatar-details {
    flex: 1 !important;
    order: 2 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Author name with link */
.pp-author-name,
.pp-author-boxes-name,
.pp-multiple-authors-boxes-wrapper .pp-author-name,
.pp-multiple-authors-boxes-wrapper .pp-author-boxes-name {
    font-family: var(--font-family-base) !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
    margin: 0 0 0.5rem 0 !important;
    line-height: 1.4 !important;
}

.pp-author-name a,
.pp-author-boxes-name a,
.pp-multiple-authors-boxes-wrapper .pp-author-name a,
.pp-multiple-authors-boxes-wrapper .pp-author-boxes-name a {
    color: var(--text-dark) !important;
    text-decoration: none !important;
    font-family: var(--font-family-base) !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
}

.pp-author-name a:hover,
.pp-author-boxes-name a:hover,
.pp-multiple-authors-boxes-wrapper .pp-author-name a:hover,
.pp-multiple-authors-boxes-wrapper .pp-author-boxes-name a:hover {
    color: var(--primary-color) !important;
    text-decoration: underline !important;
}

/* Author email address - email is rendered as a profile field */
.pp-author-boxes-avatar-details .ppma-author-field-meta[data-field="user_email"],
.pp-multiple-authors-boxes-wrapper .pp-author-boxes-avatar-details .ppma-author-field-meta[data-field="user_email"],
.pp-author-boxes-avatar-details a[href^="mailto:"],
.pp-multiple-authors-boxes-wrapper .pp-author-boxes-avatar-details a[href^="mailto:"] {
    word-break: break-all !important;
    white-space: normal !important;
    display: block !important;
    font-family: var(--font-family-base) !important;
    font-size: var(--font-size-base) !important;
    margin: 0 0 1rem 0 !important;
    padding: 0 !important;
    color: var(--accent-green) !important;
    text-decoration: none !important;
}

.pp-author-boxes-avatar-details .ppma-author-field-meta[data-field="user_email"]:hover,
.pp-multiple-authors-boxes-wrapper .pp-author-boxes-avatar-details .ppma-author-field-meta[data-field="user_email"]:hover,
.pp-author-boxes-avatar-details a[href^="mailto:"]:hover,
.pp-multiple-authors-boxes-wrapper .pp-author-boxes-avatar-details a[href^="mailto:"]:hover {
    color: var(--primary-color) !important;
    text-decoration: underline !important;
}

/* Author bio/description */
.pp-author-description,
.pp-author-boxes-description,
.pp-multiple-authors-boxes-wrapper .pp-author-description,
.pp-multiple-authors-boxes-wrapper .pp-author-boxes-description {
    font-family: var(--font-family-base) !important;
    font-size: var(--font-size-base) !important;
    line-height: 1.6 !important;
    color: var(--text-dark) !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure paragraphs in bio are styled correctly */
.pp-author-description p,
.pp-author-boxes-description p,
.pp-multiple-authors-boxes-wrapper .pp-author-description p,
.pp-multiple-authors-boxes-wrapper .pp-author-boxes-description p {
    margin: 0 0 0.75rem 0 !important;
    font-family: var(--font-family-base) !important;
    font-size: var(--font-size-base) !important;
    line-height: 1.6 !important;
    color: var(--text-dark) !important;
}

.pp-author-description p:last-child,
.pp-author-boxes-description p:last-child,
.pp-multiple-authors-boxes-wrapper .pp-author-description p:last-child,
.pp-multiple-authors-boxes-wrapper .pp-author-boxes-description p:last-child {
    margin-bottom: 0 !important;
}

/* Mobile responsive styles for author boxes */
@media (max-width: 768px) {
    /* Stack author box vertically on mobile */
    .pp-author-boxes-wrapper,
    .pp-multiple-authors-boxes-li,
    .pp-multiple-authors-boxes-wrapper .pp-author-boxes-wrapper,
    .pp-multiple-authors-boxes-wrapper .pp-multiple-authors-boxes-li,
    .pp-multiple-authors-boxes-wrapper > .pp-author-boxes-wrapper,
    .pp-multiple-authors-boxes-wrapper > .pp-multiple-authors-boxes-li {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    /* Center avatar on top */
    .pp-author-boxes-avatar,
    .pp-multiple-authors-boxes-wrapper .pp-author-boxes-avatar {
        margin: 0 auto 1.5rem auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    /* Center details below avatar */
    .pp-author-boxes-avatar-details,
    .pp-multiple-authors-boxes-wrapper .pp-author-boxes-avatar-details {
        text-align: center !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    /* Center author name */
    .pp-author-name,
    .pp-author-boxes-name,
    .pp-multiple-authors-boxes-wrapper .pp-author-name,
    .pp-multiple-authors-boxes-wrapper .pp-author-boxes-name {
        text-align: center !important;
    }
    
    /* Center author email */
    .pp-author-boxes-avatar-details .ppma-author-field-meta[data-field="user_email"],
    .pp-multiple-authors-boxes-wrapper .pp-author-boxes-avatar-details .ppma-author-field-meta[data-field="user_email"],
    .pp-author-boxes-avatar-details a[href^="mailto:"],
    .pp-multiple-authors-boxes-wrapper .pp-author-boxes-avatar-details a[href^="mailto:"] {
        text-align: center !important;
    }
    
    /* Center bio text */
    .pp-author-description,
    .pp-author-boxes-description,
    .pp-multiple-authors-boxes-wrapper .pp-author-description,
    .pp-multiple-authors-boxes-wrapper .pp-author-boxes-description {
        text-align: center !important;
    }
}

/* ===================================
   Blog Details: Notes Toggle Section
   ==================================== */
.notes-section {
    margin-top: 3rem;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
    clear: both;
    overflow: visible;
    display: block;
    width: 100%;
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.notes-header h2 {
    margin: 0;
    margin-top: 0 !important;
}

.notes-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--accent-green);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(64, 145, 108, 0.3);
}

.notes-toggle-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 145, 108, 0.4);
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.notes-toggle-btn.expanded .toggle-icon {
    transform: rotate(180deg);
}

.notes-content {
    height: auto;
    max-height: none;
    overflow: visible;
    transition: opacity 0.3s ease-in-out;
    opacity: 1;
    position: relative;
    z-index: 1;
    background: transparent;
    clear: both;
    display: block;
    width: 100%;
}

.notes-content.collapsed {
    height: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.notes-content ol {
    margin: 0;
    padding-left: 1.5rem;
    padding-bottom: 1rem;
}

.notes-content li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.notes-content a {
    color: var(--accent-green);
    text-decoration: none;
    word-break: break-all;
}

.notes-content a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Ensure notes section doesn't overlap footer */
.notes-section {
    margin-bottom: 4rem;
}

.notes-content {
    margin-bottom: 0;
}

/* ===================================
   Content Area Link Styles
   Apply same link styling as notes to all content areas
   ==================================== */
main#article article a,
main#page-content article a {
    color: var(--accent-green);
    text-decoration: none;
}

main#article article a:hover,
main#page-content article a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ===================================
   Enhanced Pagination Styles
   ==================================== */
.pagination-wrapper {
    margin-top: 3rem;
    padding: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    color: var(--text-dark);
    background: transparent;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    margin: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.pagination .page-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--primary-color) 100%);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.pagination .page-link:hover {
    color: white;
    background: transparent;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(64, 145, 108, 0.25);
}

.pagination .page-link:hover::before {
    opacity: 1;
}

.pagination .page-item.active .page-link {
    color: white;
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--primary-color) 100%);
    border-color: var(--accent-green);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(64, 145, 108, 0.3);
}

.pagination .page-item.active .page-link:hover {
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(64, 145, 108, 0.4);
}

.pagination .page-item.disabled .page-link {
    color: var(--text-muted);
    background: transparent;
    border-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination .page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: none;
    color: var(--text-muted);
    background: transparent;
    border-color: #e9ecef;
}

.pagination .page-item.disabled .page-link::before {
    display: none;
}

/* Arrow icons styling */
.pagination .page-link i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.pagination .page-link:hover i {
    transform: translateX(-1px);
}

.pagination .page-item:last-child .page-link:hover i {
    transform: translateX(1px);
}

/* Ellipsis styling */
.pagination .page-item.disabled .page-link {
    color: var(--text-muted);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .pagination {
        padding: 0.75rem 1rem;
        gap: 0.4rem;
    }
    
    .pagination .page-link {
        min-width: 40px;
        height: 40px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .pagination {
        padding: 0.5rem 0.75rem;
        gap: 0.3rem;
    }
    
    .pagination .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* Focus states for accessibility */
.pagination .page-link:focus {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

/* Animation for pagination appearance */
.pagination {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Footer Positioning & Styling
   ==================================== */
.main-footer {
    margin-top: auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
    position: relative;
    z-index: 1;
    clear: both;
    display: block;
    width: 100%;
}

/* Footer menu right alignment with reduced gap */
.footer-links .list-inline-item {
    margin-left: 8px;
    margin-right: 8px;
}

.footer-links .list-inline-item:first-child {
    margin-left: 0;
}

.footer-links .list-inline-item:last-child {
    margin-right: 0;
}

.footer-links .list-inline-item:last-child a {
    padding-right: 0;
}

/* Footer content alignment - menu and copyright stacked right-aligned */
.footer-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    text-align: right !important;
}

.footer-menu-section {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.footer-links {
    text-align: right !important;
}

.footer-copyright {
    margin: 0 !important;
    font-size: 0.85rem !important;
    opacity: 0.9 !important;
    white-space: nowrap;
    text-align: right !important;
}

/* Mobile responsive footer */
@media (max-width: 991px) {
    .footer-links .menu-item > a {
        padding: 5px 20px;
    }
    
    .footer-links .list-inline-item {
        border: none !important;
        margin: 0.25rem 0 !important;
        margin-left: 4px !important;
        margin-right: 4px !important;
    }
    
    .footer-content-wrapper {
        flex-direction: column;
        text-align: center !important;
        gap: 0.5rem;
        align-items: center !important;
    }
    
    .footer-menu-section {
        justify-content: center !important;
    }
    
    .footer-links {
        text-align: center !important;
    }
    
    .footer-copyright {
        text-align: center !important;
    }
}

/* ===================================
   404 Error Page Styles
   ==================================== */
.error-404-hero .hero-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
}

.error-404-title {
    text-align: center !important;
    margin: 0 auto 1.5rem !important;
    display: block;
    width: 100%;
}

.error-404-hero .hero-description {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.error-404-hero .hero-action-buttons {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* 404 Search Section */
.error-404-search {
    background-color: var(--bg-grey);
    padding-bottom: 2rem !important; /* Reduce bottom padding */
    padding-top: 3rem;
    min-height: auto !important; /* Remove unwanted min-height for 404 page */
}

.error-404-search-wrapper {
    padding: 2rem;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 0; /* Remove any extra margin */
}

.error-404-search .container {
    padding-bottom: 0; /* Remove extra container padding */
}

.error-404-search .row {
    margin-bottom: 0; /* Remove extra row margin */
}

.error-404-search-title {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.error-404-search-form-wrapper {
    max-width: 100%;
}

/* Search Form Styles - Scoped to 404 page only */
.error-404-search .search-form {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    background: var(--bg-white);
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    padding: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.error-404-search .search-form:focus-within {
    border-color: var(--accent-green);
    box-shadow: 0 4px 16px rgba(64, 145, 108, 0.15);
}

.error-404-search .search-form label {
    flex: 1;
    margin: 0;
    display: flex;
    align-items: center;
}

.error-404-search .search-field {
    width: 100%;
    border: none;
    background: transparent;
    padding: 0.75rem 1.25rem;
    font-size: var(--font-size-base);
    color: var(--text-dark);
    outline: none;
    font-family: var(--font-family-base);
}

.error-404-search .search-field::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.error-404-search .search-submit {
    background: var(--accent-green);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    font-size: 1.1rem;
}

.error-404-search .search-submit:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 145, 108, 0.3);
}

.error-404-search .search-submit:active {
    transform: translateY(0);
}

.error-404-search .search-submit i {
    font-size: 1rem;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Responsive Search Form - Scoped to 404 page only */
@media (max-width: 768px) {
    .error-404-search-wrapper {
        padding: 1.5rem;
    }
    
    .error-404-search-title {
        font-size: var(--font-size-2xl);
    }
    
    .error-404-search .search-form {
        flex-direction: column;
        border-radius: 12px;
        padding: 0.75rem;
    }
    
    .error-404-search .search-field {
        padding: 0.875rem 1rem;
        border-bottom: 1px solid #e0e0e0;
        border-radius: 0;
        margin-bottom: 0.5rem;
    }
    
    .error-404-search .search-submit {
        width: 100%;
        border-radius: 8px;
        padding: 0.875rem 1.25rem;
    }
    
    .error-404-hero .hero-content-wrapper {
        padding: 2rem 1rem;
    }
    
    .error-404-title {
        font-size: 4rem !important;
    }
}

