/* ==========================================================================
   FONT-DISPLAY OVERRIDES (Optimize PageSpeed Performance)
   ========================================================================== */
@font-face {
    font-family: 'stmlms';
    src: url('/wp-content/plugins/masterstudy-lms-learning-management-system/_core/assets/icons/fonts/stmlms.woff2?ver=3.7.34') format('woff2'),
         url('/wp-content/plugins/masterstudy-lms-learning-management-system/_core/assets/icons/fonts/stmlms.woff?ver=3.7.34') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('/wp-content/plugins/woocommerce/assets/fonts/Inter-VariableFont_slnt,wght.woff2') format('woff2'),
         url('/wp-content/themes/twentytwentyfour/assets/fonts/inter/Inter-VariableFont_slnt,wght.woff2') format('woff2'),
         url('https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp5VKnu2uL7O.woff2') format('woff2');
}

/* ==========================================================================
   DESIGN TOKENS (Scoped to Custom Header and Footer)
   ========================================================================== */
.site-header-custom,
.mobile-menu-drawer,
.site-footer-custom,
.site-topbar {
    --header-gold: #ebbc38;
    --header-gold-hover: #c9a022;
    --header-green: #014524;
    --header-green-hover: #012d18;
    --header-text-dark: #111111;
    --header-bg: #ffffff;
    --header-height: 96px;
    --header-font: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    --header-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    --header-radius-pill: 999px;
}

/* ==========================================================================
   UTILITY TOPBAR (search + account, compact)
   ========================================================================== */
.site-topbar {
    background-color: var(--header-green);
    font-family: var(--header-font);
    box-sizing: border-box;
}

.site-topbar * {
    box-sizing: border-box;
}

.site-topbar__container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 40px;
}

.site-topbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px;
    border-radius: var(--header-radius-pill);
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--header-transition);
}

.topbar-btn:hover {
    background-color: rgba(255, 255, 255, 0.18);
    color: var(--header-gold);
}

.topbar-btn:focus-visible {
    outline: 2px solid var(--header-gold);
    outline-offset: 2px;
}

.topbar-profile-btn {
    padding-left: 6px !important;
}

.topbar-profile-btn .avatar-icon {
    display: inline-flex;
    align-items: center;
    border-radius: 50%;
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    background: #eeeeee;
}

.topbar-profile-btn .avatar-icon img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: cover;
}

/* ==========================================================================
   GLOBAL RESET AND CONTAINER FOR CUSTOM HEADER
   ========================================================================== */
.site-header-custom {
    background-color: var(--header-bg);
    box-shadow: var(--header-shadow);
    border-bottom: 1px solid #f2f6f4;
    position: sticky;
    top: 0;
    z-index: 9999;
    height: var(--header-height);
    display: flex;
    align-items: center;
    font-family: var(--header-font);
    box-sizing: border-box;
}

.site-header-custom *,
.mobile-menu-drawer * {
    box-sizing: border-box;
}

.site-header-custom .header-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* ==========================================================================
   LOGO STYLING
   ========================================================================== */
.site-header-custom .header-logo {
    position: relative;
    align-self: flex-start;
    height: 100%;
    width: 160px; /* Footprint expanded to 160px for larger logo circle */
}

.site-header-custom .header-logo .custom-logo-link {
    position: absolute;
    top: 0px;
    left: 0;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    padding: 10px; /* Padding reduced to 10px as requested to shrink the circle */
}

.site-header-custom .header-logo .custom-logo-link:hover {
    transform: scale(1.03);
}

.site-header-custom .header-logo img {
    height: 105px; /* Increased image height to make the logo larger */
    width: auto;
    display: block;
    object-fit: contain;
}

.mobile-menu-drawer .mobile-logo img {
    height: 64px;
    width: auto;
    display: block;
    object-fit: contain;
}

.site-header-custom .header-logo .site-title-link {
    font-size: 24px;
    font-weight: 800;
    color: var(--header-green);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* ==========================================================================
   NAVIGATION MENU STYLING
   ========================================================================== */
.site-header-custom .header-navigation {
    height: 100%;
    display: flex;
    align-items: center;
}

.site-header-custom .header-menu-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 36px;
    height: 100%;
    align-items: center;
}

.site-header-custom .header-menu-list .menu-item {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.site-header-custom .header-menu-list .menu-item a {
    color: var(--header-green);
    text-decoration: none;
    font-size: 17px;
    font-weight: 700;
    padding: 10px 0;
    transition: var(--header-transition);
    letter-spacing: -0.01em;
}

.site-header-custom .header-menu-list .menu-item a:hover {
    color: var(--header-gold);
}

/* Active Menu Item styling with bottom indicator line */
.site-header-custom .header-menu-list .menu-item.current-menu-item a,
.site-header-custom .header-menu-list .menu-item.current_page_item a,
.site-header-custom .header-menu-list .menu-item.current-menu-parent a {
    color: var(--header-gold);
}

.site-header-custom .header-menu-list .menu-item.current-menu-item::after,
.site-header-custom .header-menu-list .menu-item.current_page_item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--header-gold);
    border-radius: 3px 3px 0 0;
}

/* Dropdown arrow indicator for items with children */
.site-header-custom .header-menu-list .menu-item-has-children > a {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-header-custom .header-menu-list .menu-item-has-children > a::after {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.25s ease;
    opacity: 0.65;
    flex-shrink: 0;
}

.site-header-custom .header-menu-list .menu-item-has-children:hover > a::after,
.site-header-custom .header-menu-list .menu-item-has-children:focus-within > a::after {
    transform: rotate(225deg) translateY(2px);
}

/* Hover bridge so the dropdown doesn't close in the gap below the link */
.site-header-custom .header-menu-list .menu-item-has-children::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 14px;
}

/* Submenu dropdown panel */
.site-header-custom .header-menu-list .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    margin: 0;
    padding: 10px;
    list-style: none;
    background-color: #ffffff;
    border: 1px solid #f2f6f4;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(1, 69, 36, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: var(--header-transition);
    z-index: 10000;
}

.site-header-custom .header-menu-list .menu-item-has-children:hover > .sub-menu,
.site-header-custom .header-menu-list .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-header-custom .header-menu-list .sub-menu .menu-item {
    height: auto;
    display: block;
}

.site-header-custom .header-menu-list .sub-menu .menu-item a {
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--header-green);
    white-space: normal;
}

.site-header-custom .header-menu-list .sub-menu .menu-item a:hover {
    background-color: rgba(1, 69, 36, 0.06);
    color: var(--header-gold);
}

/* ==========================================================================
   ACTIONS: BUTTONS & SEARCH
   ========================================================================== */
.site-header-custom .header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Common Button Styles */
.site-header-custom .header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: var(--header-radius-pill);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--header-transition);
    padding: 0 20px;
    white-space: nowrap;
    cursor: pointer;
}

.mobile-menu-drawer .header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    border-radius: var(--header-radius-pill);
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    transition: var(--header-transition);
    padding: 0 28px;
    white-space: nowrap;
    cursor: pointer;
}

.site-header-custom .header-btn:focus-visible,
.mobile-menu-drawer .header-btn:focus-visible {
    outline: 3px solid var(--header-green);
    outline-offset: 2px;
}

/* Outline Button */
.site-header-custom .header-btn-outline {
    border: 2px solid var(--header-gold);
    background-color: transparent;
    color: var(--header-green);
    gap: 8px;
}

.mobile-menu-drawer .header-btn-outline {
    border: 2.5px solid var(--header-gold);
    background-color: transparent;
    color: var(--header-green);
    gap: 8px;
}

.site-header-custom .header-btn-outline:hover,
.mobile-menu-drawer .header-btn-outline:hover {
    background-color: rgba(179, 131, 50, 0.06);
    transform: translateY(-2px);
}

.site-header-custom .header-btn-outline .btn-icon,
.mobile-menu-drawer .header-btn-outline .btn-icon {
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.site-header-custom .header-btn-outline .btn-icon svg {
    width: 15px;
    height: 12px;
}

.site-header-custom .header-btn-outline:hover .btn-icon,
.mobile-menu-drawer .header-btn-outline:hover .btn-icon {
    transform: translateX(4px);
}

/* Prominent CTA Button (main bar) */
.site-header-custom .header-btn-cta {
    height: 50px;
    padding: 0 26px;
    background-color: var(--header-green);
    color: var(--header-gold);
    border: none;
    font-size: 15px;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(1, 69, 36, 0.28);
}

.site-header-custom .header-btn-cta:hover {
    background-color: var(--header-green-hover);
    color: var(--header-gold);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(1, 69, 36, 0.38);
}

.site-header-custom .header-btn-cta .btn-icon {
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.site-header-custom .header-btn-cta .btn-icon svg {
    width: 15px;
    height: 12px;
}

.site-header-custom .header-btn-cta:hover .btn-icon {
    transform: translateX(4px);
}

/* Solid Button */
.site-header-custom .header-btn-solid {
    background-color: var(--header-gold);
    color: #ffffff;
    border: none;
}

.mobile-menu-drawer .header-btn-solid {
    background-color: var(--header-gold);
    color: #ffffff;
    border: none;
}

.site-header-custom .header-btn-solid:hover,
.mobile-menu-drawer .header-btn-solid:hover {
    background-color: var(--header-gold-hover);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(179, 131, 50, 0.28);
    transform: translateY(-2px);
}

/* Search Icon and Popup Form */
.site-topbar .header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.site-topbar .search-toggle-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--header-transition);
    border-radius: 50%;
}

.site-topbar .search-toggle-btn:hover {
    color: var(--header-gold);
    background-color: rgba(255, 255, 255, 0.1);
}

.site-topbar .search-icon-svg {
    width: 16px;
    height: 16px;
}

/* Dropdown Search Box */
.site-topbar .header-search-form-wrapper {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 340px;
    background-color: #ffffff;
    border: 1px solid #e2ebd9;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: var(--header-transition);
    z-index: 10002;
}

.site-topbar .header-search-form-wrapper.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Styling native WP search form elements inside dropdown */
.site-topbar .header-search-form-wrapper .search-form {
    display: flex;
    width: 100%;
    margin: 0;
    gap: 0;
}

.site-topbar .header-search-form-wrapper .search-form label {
    flex-grow: 1;
    margin: 0;
}

.site-topbar .header-search-form-wrapper .search-form .search-field {
    width: 100%;
    height: 46px;
    border: 1.5px solid #dcdcdc;
    border-radius: 8px 0 0 8px;
    padding: 0 16px;
    font-size: 15px;
    font-family: var(--header-font);
    outline: none;
    transition: var(--header-transition);
}

.site-topbar .header-search-form-wrapper .search-form .search-field:focus {
    border-color: var(--header-green);
}

.site-topbar .header-search-form-wrapper .search-form .search-submit {
    height: 46px;
    background-color: var(--header-green);
    color: #ffffff;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 0 20px;
    font-weight: 700;
    font-family: var(--header-font);
    cursor: pointer;
    transition: var(--header-transition);
}

.site-topbar .header-search-form-wrapper .search-form .search-submit:hover {
    background-color: var(--header-green-hover);
}

/* ==========================================================================
   MOBILE MENU TOGGLE
   ========================================================================== */
.site-header-custom .mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
}

.site-header-custom .mobile-menu-toggle .hamburger-bar {
    width: 100%;
    height: 2.5px;
    background-color: var(--header-green);
    border-radius: 2px;
    transition: var(--header-transition);
}

/* ==========================================================================
   MOBILE MENU DRAWER & OVERLAY
   ========================================================================== */
.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.08);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 30px 24px;
    font-family: var(--header-font);
}

.mobile-menu-drawer.is-active {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(9, 86, 39, 0.25);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--header-transition);
}

.mobile-menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-drawer .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
}

.mobile-menu-drawer .mobile-drawer-close {
    background: none;
    border: none;
    font-size: 38px;
    color: var(--header-green);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: var(--header-transition);
}

.mobile-menu-drawer .mobile-drawer-close:hover {
    color: var(--header-gold);
}

.mobile-menu-drawer .mobile-drawer-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.mobile-menu-drawer .mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.mobile-menu-drawer .mobile-menu-list .menu-item a {
    color: var(--header-green);
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    display: block;
    padding: 8px 0;
    transition: var(--header-transition);
}

.mobile-menu-drawer .mobile-menu-list .menu-item a:hover {
    color: var(--header-gold);
    padding-left: 6px;
}

.mobile-menu-drawer .mobile-menu-list .menu-item.current-menu-item a {
    color: var(--header-gold);
    border-left: 3px solid var(--header-gold);
    padding-left: 12px;
}

/* Submenu items nested inside the mobile drawer */
.mobile-menu-drawer .mobile-menu-list .sub-menu {
    list-style: none;
    margin: 4px 0 0;
    padding: 4px 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-left: 2px solid rgba(1, 69, 36, 0.12);
}

.mobile-menu-drawer .mobile-menu-list .sub-menu .menu-item a {
    font-size: 15px;
    font-weight: 600;
    padding: 4px 0;
}

.mobile-menu-drawer .mobile-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: auto;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.mobile-menu-drawer .mobile-drawer-actions .header-btn {
    width: 100%;
}

/* ==========================================================================
   RESPONSIVE DESIGN / MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1399px) {
    .site-header-custom .header-menu-list {
        gap: 24px;
    }
    .site-header-custom .header-menu-list .menu-item a {
        font-size: 16px;
    }
}

@media (max-width: 1199px) {
    .site-topbar__container {
        padding: 0 24px;
    }
    .site-header-custom .header-container {
        padding: 0 24px;
    }
    .site-header-custom .header-menu-list {
        gap: 18px;
    }
    .site-header-custom .header-actions {
        gap: 10px;
    }
    .site-header-custom .header-btn {
        padding: 0 16px;
        height: 40px;
        font-size: 13.5px;
    }
}

@media (max-width: 1023px) {
    .site-topbar__container {
        padding: 0 16px;
    }
    .site-header-custom .header-navigation {
        display: none;
    }
    .site-header-custom .header-actions .header-btn {
        display: none;
    }
    .site-header-custom .mobile-menu-toggle {
        display: flex;
    }
    .site-header-custom .header-logo {
        width: 90px;
    }
    .site-header-custom .header-logo .custom-logo-link {
        top: 5px;
        padding: 18px; /* Scales down padding for mobile header compatibility */
    }
    .site-header-custom .header-logo img {
        height: 48px; /* Scales logo image height inside circle for mobile */
    }
}

/* ==========================================================================
   CUSTOM FOOTER STYLING
   ========================================================================== */
.site-footer-custom {
    background: linear-gradient(180deg, #1a6338 0%, #014524 40%, #012d18 100%);
    color: #ffffff;
    padding-top: 80px;
    font-family: var(--header-font);
    box-sizing: border-box;
}

.site-footer-custom *,
.site-footer-custom *::before,
.site-footer-custom *::after {
    box-sizing: border-box;
}

/* Footer Upper Grid Layout */
.site-footer-custom .footer-upper {
    padding-bottom: 56px;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.15);
}

.site-footer-custom .footer-upper .footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 2fr;
    gap: 48px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Columns General Styles */
.site-footer-custom .footer-col {
    display: flex;
    flex-direction: column;
}

.site-footer-custom .footer-col-title {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 20px;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* Column 1: Brand Info Specifics */
.site-footer-custom .footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.site-footer-custom .footer-logo img {
    height: 72px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Forces standard golden logo to be pure white */
}

.site-footer-custom .footer-company-name {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 16px;
    line-height: 1.35;
    letter-spacing: -0.015em;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-footer-custom .footer-description {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    max-width: 440px;
    font-weight: 500;
}

/* Column 2: Quick Links Specifics */
.site-footer-custom .footer-menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.site-footer-custom .footer-menu-links .menu-item {
    padding: 0;
    margin: 0;
}

.site-footer-custom .footer-menu-links .menu-item a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: var(--header-transition);
    display: inline-block;
}

.site-footer-custom .footer-menu-links .menu-item a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

/* Column 3: Contact & Socials Specifics */
.site-footer-custom .footer-contact-text {
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 10px;
}

.site-footer-custom .footer-contact-text a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 600;
    transition: var(--header-transition);
}

.site-footer-custom .footer-contact-text a:hover {
    color: #ffffff;
}

.site-footer-custom .footer-social-icons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.site-footer-custom .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.site-footer-custom .social-icon:hover {
    opacity: 0.75;
}

.site-footer-custom .social-icon svg {
    width: 32px;
    height: 32px;
}

.site-footer-custom .social-facebook { color: #1877f2; }
.site-footer-custom .social-facebook svg {
    width: 38px;
    height: 38px;
}
.site-footer-custom .social-zalo { color: #0068ff; }
.site-footer-custom .social-skype { color: #00aff0; }
.site-footer-custom .social-youtube { color: #ff0000; }

/* Column 4: Map Container Specifics */
.site-footer-custom .footer-map-container {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background-color: rgba(255, 255, 255, 0.05);
}

.site-footer-custom .footer-map-iframe {
    width: 100%;
    height: 280px;
    display: block;
    border: 0;
}

/* ==========================================================================
   FOOTER LOWER (Copyright & Legal)
   ========================================================================== */
.site-footer-custom .footer-lower {
    padding: 32px 0;
}

.site-footer-custom .footer-lower .footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

.site-footer-custom .footer-copyright {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

.site-footer-custom .footer-legal-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-footer-custom .footer-legal-links a {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: underline;
    font-weight: 600;
    transition: var(--header-transition);
}

.site-footer-custom .footer-legal-links a:hover {
    color: #ffffff;
}

.site-footer-custom .legal-divider {
    width: 1px;
    height: 14px;
    background-color: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   FOOTER RESPONSIVE OVERRIDES
   ========================================================================== */
@media (max-width: 1199px) {
    .site-footer-custom .footer-upper .footer-container {
        grid-template-columns: 1.5fr 1fr 1.2fr 1.5fr;
        gap: 30px;
    }
}

@media (max-width: 1023px) {
    .site-footer-custom {
        padding-top: 60px;
    }
    .site-footer-custom .footer-upper .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        padding: 0 24px;
    }
    .site-footer-custom .footer-lower .footer-container {
        padding: 0 24px;
    }
}

@media (max-width: 767px) {
    .site-footer-custom {
        padding-top: 50px;
    }
    .site-footer-custom .footer-upper .footer-container {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 0 16px;
    }
    .site-footer-custom .footer-lower .footer-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 0 16px;
    }
    .site-footer-custom .footer-company-name {
        white-space: normal;
    }
    .site-footer-custom .footer-contact-text a {
        word-break: break-all;
    }
    .site-footer-custom .footer-legal-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 16px;
    }
}

/* ==========================================================================
   TIN TỨC CATEGORY PAGE ARCHIVE LAYOUT
   ========================================================================== */
.tin-tuc-archive-wrapper {
    background-color: #ffffff;
    padding: 60px 0 100px;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
}

.tin-tuc-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 60px;
}

/* Full-width layout: no sidebar (used for pages, user-account, etc.) */
.tin-tuc-container--no-sidebar {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 1400px;
}

.single-post-main-content--full {
    width: 100%;
    max-width: 100%;
}

/* Sidebar styles */
.tin-tuc-sidebar {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.sidebar-widget {
    background-color: #f7f7f7;
    border: 1px solid #eef2f0;
    border-radius: 8px;
    padding: 30px 24px;
}

.sidebar-widget .widget-title {
    font-size: 20px;
    font-weight: 800;
    color: #014524;
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eef2f0;
    letter-spacing: -0.01em;
}

/* Search widget input group */
.widget-search .search-input-group {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    border: 1.5px solid #e2ebd9;
    background-color: #ffffff;
}

.widget-search .search-field {
    flex-grow: 1;
    height: 46px;
    border: none;
    padding: 0 16px;
    font-size: 15px;
    outline: none;
}

.widget-search .search-submit {
    width: 48px;
    height: 46px;
    background-color: #ebbc38;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.widget-search .search-submit:hover {
    background-color: #c9a022;
}

.widget-search .magnifying-glass-icon {
    width: 18px;
    height: 18px;
}

/* Category list widget */
.sidebar-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-category-list .category-item {
    margin: 0;
    padding: 0;
}

.sidebar-category-list .category-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.sidebar-category-list .category-item a:hover {
    color: #ebbc38;
    transform: translateX(4px);
}

.category-star-icon-wrapper {
    display: inline-flex;
    align-items: center;
    color: #ebbc38;
}

.category-star-icon {
    width: 14px;
    height: 14px;
}

/* Content/Title Area */
.archive-main-title {
    font-size: 36px;
    font-weight: 800;
    color: #014524;
    text-align: center;
    margin: 0 0 50px;
    text-transform: uppercase;
    letter-spacing: -0.015em;
}

/* Grid Layout for posts */
.tin-tuc-main-content {
    display: flex;
    flex-direction: column;
}

.tin-tuc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

/* News Post Card Styling */
.news-card {
    background-color: #ffffff;
    border: 1px solid #eef2f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(9, 86, 39, 0.06);
    border-color: rgba(9, 86, 39, 0.1);
}

.news-card-image-link {
    display: block;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Set constant aspect ratio for grid card images */
.news-card-image-link::before {
    content: "";
    display: block;
    padding-top: 66.67%; /* 3:2 aspect ratio */
}

.news-card-image,
.news-card-image-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card-image-fallback {
    background-color: #f0f3f1;
}

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

.news-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px;
}

.news-card-title a {
    color: #014524;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-card-title a:hover {
    color: #ebbc38;
}

.news-card-excerpt {
    font-size: 15px;
    line-height: 1.55;
    color: #666666;
    margin: 0;
}

.news-card-excerpt p {
    margin: 0;
}

/* Featured News Card Styling (Spans 2 columns, vertical layout) */
.news-card.featured-news-card {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
}

.news-card.featured-news-card .news-card-image-link {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.news-card.featured-news-card .news-card-image-link::before {
    content: "";
    display: block;
    padding-top: 50%; /* Aspect ratio 2:1 for wide layout */
}

.news-card.featured-news-card .news-card-content {
    padding: 30px;
}

.news-card.featured-news-card .news-card-title {
    font-size: 24px;
    margin-bottom: 14px;
}

.news-card.featured-news-card .news-card-excerpt {
    font-size: 16px;
    line-height: 1.6;
}

/* Pagination styling */
.tin-tuc-main-content .navigation {
    grid-column: span 3;
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 50px;
}

.tin-tuc-main-content .navigation a {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background-color: #ffffff;
    border: 1.5px solid #014524;
    color: #014524;
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tin-tuc-main-content .navigation a:hover {
    background-color: #014524;
    color: #ffffff;
}

/* ==========================================================================
   RESPONSIVE STYLING for Tin Tức
   ========================================================================== */
@media (max-width: 1400px) {
    .tin-tuc-container {
        gap: 40px;
    }
    .tin-tuc-grid {
        gap: 30px;
    }
}

@media (max-width: 1199px) {
    .tin-tuc-container {
        grid-template-columns: 280px 1fr;
        padding: 0 24px;
    }
    .tin-tuc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .news-card.featured-news-card {
        grid-column: span 2;
    }
    .tin-tuc-main-content .navigation {
        grid-column: span 2;
    }
}

@media (max-width: 991px) {
    .tin-tuc-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .tin-tuc-sidebar {
        order: 2; /* Put sidebar at bottom on tablet/mobile */
    }
    .tin-tuc-main-content {
        order: 1;
    }
    .archive-main-title {
        font-size: 32px;
        margin-bottom: 36px;
    }
}

@media (max-width: 767px) {
    .tin-tuc-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .news-card.featured-news-card {
        grid-column: span 1;
    }
    .news-card.featured-news-card .news-card-image-link::before {
        padding-top: 66.67%; /* Return to 3:2 ratio on mobile */
    }
    .news-card.featured-news-card .news-card-content {
        padding: 24px;
    }
    .news-card.featured-news-card .news-card-title {
        font-size: 20px;
    }
    .tin-tuc-main-content .navigation {
        grid-column: span 1;
    }
    .tin-tuc-container {
        padding: 0 16px;
    }
}

/* ==========================================================================
   STICKY FOOTER LAYOUT (Ensure footer stays at bottom on short pages)
   ========================================================================== */
#main-container {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
}

.site-footer-custom {
    margin-top: auto !important;
}

/* Adjust for WordPress admin bar when logged in */
.admin-bar #main-container {
    min-height: calc(100vh - 32px) !important;
    min-height: calc(100dvh - 32px) !important;
}

@media screen and (max-width: 782px) {
    .admin-bar #main-container {
        min-height: calc(100vh - 46px) !important;
        min-height: calc(100dvh - 46px) !important;
    }
}

/* ==========================================================================
   DYNAMIC HEADER PROFILE & DROPDOWN
   ========================================================================== */
.header-user-profile {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.header-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px !important;
    padding-right: 16px !important;
}

.header-profile-btn .avatar-icon {
    display: inline-flex;
    align-items: center;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: #eeeeee;
}

.header-profile-btn .avatar-icon img {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: cover;
}

.header-user-profile .profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #f2f6f4;
    width: 180px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
}

/* Hover bridge to prevent flickering */
.header-user-profile::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    height: 15px;
    display: block;
}

.header-user-profile:hover .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-user-profile .profile-dropdown a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--header-green);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: var(--header-transition);
}

.header-user-profile .profile-dropdown a:hover {
    background-color: rgba(9, 86, 39, 0.05);
    color: var(--header-gold);
    padding-left: 20px;
}

.header-user-profile .profile-dropdown a:not(:last-child) {
    border-bottom: 1px solid #f2f6f4;
}

/* Mobile Styling */
.mobile-profile-btn {
    gap: 8px;
    padding-left: 14px !important;
}

.mobile-profile-btn .avatar-icon {
    display: inline-flex;
    align-items: center;
    border-radius: 50%;
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    background: #eeeeee;
}

.mobile-profile-btn .avatar-icon img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: cover;
}

.mobile-drawer-actions .mobile-logout-link {
    display: inline-block;
    text-align: center;
    margin-top: 10px;
    color: #b32d2e;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: var(--header-transition);
}

.mobile-drawer-actions .mobile-logout-link:hover {
    color: #d63638;
}

/* ==========================================================================
   MASTERSTUDY LMS - BUY COURSE BUTTON GREEN COLOR OVERRIDE
   ========================================================================== */
body .masterstudy-buy-button {
    background-color: #014524 !important;
    border-color: #014524 !important;
}

body .masterstudy-buy-button:hover,
body .masterstudy-buy-button:focus,
body .masterstudy-buy-button:active {
    background-color: #012d18 !important;
    border-color: #012d18 !important;
}

body .masterstudy-buy-button > a.masterstudy-buy-button__link {
    color: #ffffff !important;
}

body .masterstudy-buy-button .masterstudy-buy-button__title {
    color: #ffffff !important;
}

