/*
Theme Name: ACC Official Portal
Author: ACC Technical Team
Version: 1.2.0
Description: Unified CSS for ACC Portal with Battambang/Moul typography and Multi-level Dropdowns.
*/

:root {
    --acc-blue: #003366;
    --acc-gold: #C5A059;
    --acc-white: #ffffff;
    --acc-light-gray: #f4f4f4;
    --acc-border: #eeeeee;
}

/* --- CORE RESET --- */
body { 
    margin: 0; 
    background: var(--acc-light-gray); 
    color: #333; 
    -webkit-font-smoothing: antialiased;
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* --- FRONT-END TYPOGRAPHY --- */
/* Global body, menu, and paragraph font */
body, 
.main-navigation a, 
p, li, div, input, select {
    font-family: 'Battambang', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
}

/* Header & Title font */
h1, h2, h3, h4, h5, h6, 
.moul-font, 
.site-title {
    font-family: 'Moul', serif;
    font-weight: normal;
    line-height: 1.5;
    color: var(--acc-blue);
}

.moul-font-footer, 
.site-title {
    font-family: 'Moul', serif;
    font-weight: normal;
    line-height: 1.5;
    color: var(--acc-white);
}


/* English Specific Overrides */
:lang(en-US) body, :lang(en) body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
}

/* --- HEADER & NAVIGATION FRAMEWORK --- */
.acc-header {
    background: var(--acc-white);
    border-bottom: 3px solid var(--acc-gold);
    position: sticky;
    top: 0;
    z-index: 9999;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

/* --- DESKTOP MENU --- */
.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 0 18px;
    line-height: 80px;
    text-decoration: none;
    color: var(--acc-blue);
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.main-navigation a:hover {
    color: var(--acc-gold);
}

/* --- DROPDOWN SYSTEM (Levels 2, 3, & 4) --- */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    width: 280px;
    background: var(--acc-white);
    flex-direction: column;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    border-top: 3px solid var(--acc-gold);
    
    /* Animation */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    display: flex; /* Always flex, but hidden by opacity */
}

/* Show Dropdown on Hover */
.main-navigation li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Fly-out Dropdowns (Level 3 & 4) */
.main-navigation ul ul ul {
    top: 0;
    left: 100%;
    border-top: none;
    border-left: 3px solid var(--acc-gold);
}

.main-navigation ul ul a {
    line-height: 1.6;
    padding: 12px 20px;
    white-space: normal; /* Allows long Khmer titles to wrap */
    border-bottom: 1px solid var(--acc-border);
    font-size: 14px;
}

/* --- RESPONSIVE MOBILE MENU --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    border: none;
    background: none;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--acc-blue);
    margin: 4px 0;
    transition: 0.4s;
}

@media (max-width: 1100px) {
    .main-navigation a { padding: 0 10px; font-size: 14px; }
}

@media (max-width: 992px) {
    .menu-toggle { display: flex; z-index: 10001; }
    
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--acc-white);
        padding-top: 80px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: 0.4s ease;
        overflow-y: auto;
        z-index: 10000;
    }

    .main-navigation.toggled { right: 0; }

    .main-navigation ul { flex-direction: column; }
    
    /* Mobile Dropdown Interaction */
    .main-navigation ul ul, 
    .main-navigation ul ul ul {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        display: none; /* Controlled by JS active-sub class */
        transform: none;
        box-shadow: none;
        background: var(--acc-light-gray);
    }

    .main-navigation li.active-sub > ul {
        display: block;
    }

    .main-navigation a {
        line-height: 50px;
        padding: 0 20px;
        border-bottom: 1px solid var(--acc-border);
    }
}

/* --- SECTION: SLIDE --- */
/* --- UPDATED SLIDESHOW STYLES --- */
.acc-hero-slider {
    width: 100%;
    height: 600px;
}

.hero-overlay {
    background: rgba(0, 51, 102, 0.65); /* ACC Blue tint */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    text-align: center;
}
.hero-content { color: #fff; }
.hero-content h2 { font-size: 38px; color: var(--acc-gold); margin-bottom: 20px; }

.hero-excerpt p { font-size: 18px; margin-bottom: 30px; }
.hero-excerpt p {
    color: #ffffff;
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Ensure the background image covers the area properly */
.swiper-slide {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.swiper-pagination-bullet-active {
    background: var(--acc-gold) !important;
}

.swiper-button-next, .swiper-button-prev {
    color: var(--acc-gold) !important;
}

@media (max-width: 768px) {
    .acc-hero-slider { height: 400px; }
}

.acc-hero-slider .hero-overlay {
    background: rgba(0, 51, 102, 0.7); /* Official ACC Blue with transparency */
    height: 100%;
    display: flex;
    align-items: center;
}
.hero-content { text-align: center; color: #fff; width: 100%; }
.hero-content h2 { font-size: 32px; color: var(--acc-gold); margin-bottom: 15px; }
.hero-content p { font-size: 18px; margin-bottom: 30px; }

/* Hero Search Bar */
.hero-search-box form { display: flex; justify-content: center; max-width: 600px; margin: 0 auto; }
.hero-search-box input { 
    width: 70%; padding: 15px; border: none; border-radius: 4px 0 0 4px; font-size: 15px; 
}
.hero-search-box button { 
    width: 30%; background: var(--acc-gold); border: none; color: #fff; cursor: pointer; 
    border-radius: 0 4px 4px 0; font-size: 18px; 
}

/* --- MAIN CONTENT ROW --- */
.content-row { display: flex; gap: 40px; margin: 50px 0; }
.section-articles { flex: 2; }
.section-documents { flex: 1; }

.section-heading { 
    border-bottom: 2px solid var(--acc-gold); 
    padding-bottom: 10px; margin-bottom: 30px; font-size: 22px; 
}

/* --- ARTICLE GRID --- */

/*.article-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }*/
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}
.news-item { background: #fff; border: 1px solid #eee; transition: 0.3s; }
.news-item:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.news-item img { width: 100%; height: 180px; object-fit: cover; }
.news-meta { padding: 15px; }
.news-meta h3 a { color: var(--acc-blue); text-decoration: none; font-size: 16px; }

/* --- DOCUMENT SIDEBAR --- */
.section-documents .doc-list-wrapper { background: #fff; padding: 20px; border: 1px solid #eee; border-top: 4px solid var(--acc-blue); }
.doc-list { list-style: none; padding: 0; }
.doc-list li { padding: 12px 0; border-bottom: 1px solid #eee; }
.doc-list li a { color: #333; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.doc-list li a:hover { color: var(--acc-gold); }
.dashicons-pdf { color: #d11; }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .content-row { flex-direction: column; }
    .article-grid { grid-template-columns: 1fr; }
    .hero-content h2 { font-size: 24px; }
}


/* Sidebar PDF Styling */
.doc-list li {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    transition: padding-left 0.3s ease;
}

.doc-list li:hover {
    padding-left: 5px;
}

.doc-list li a {
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
}

.doc-list .dashicons-pdf {
    color: #cc0000; /* Red for PDF recognition */
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.doc-list li a:hover {
    color: var(--acc-gold);
}

/* --- STICKY WRAPPER --- */
/* This container holds both the header and the ticker */
.sticky-top-wrapper {
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- HEADER ADJUSTMENTS --- */
.acc-header {
    background: var(--acc-white);
    border-bottom: 2px solid var(--acc-gold);
    /* Remove position: sticky from here since the wrapper handles it */
}

/* --- NEWS TICKER STYLING --- */
.news-ticker-bar {
    background: #001a33; /* Slightly darker for contrast */
    color: #fff;
    height: 35px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.ticker-label {
    background: var(--acc-gold);
    color: #000;
    padding: 0 15px;
    height: 35px;
    line-height: 35px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.ticker-flex {
    display: flex;
    align-items: center;
    width: 100%;
}

/*
.ticker-label {
    background: var(--acc-gold);
    padding: 0 15px;
    height: 40px;
    line-height: 40px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 10;
    position: relative;
    box-shadow: 5px 0 10px rgba(0,0,0,0.2);
}
*/
.ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-track {
    display: flex;
    white-space: nowrap;
    padding-left: 100%;
    animation: marquee 30s linear infinite;
}

.ticker-track a {
    color: #fff;
    text-decoration: none;
    padding: 0 20px;
    font-size: 14px;
    transition: color 0.3s;
}

.ticker-track a:hover {
    color: var(--acc-gold);
}

.ticker-divider {
    color: var(--acc-gold);
    opacity: 0.5;
}

/* --- THE ANIMATION --- */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Pause on hover so people can read/click */
.ticker-track:hover {
    animation-play-state: paused;
}

/* Responsive Hide for very small screens */
@media (max-width: 600px) {
    .ticker-label { font-size: 11px; padding: 0 8px; }
    .ticker-track a { font-size: 12px; }
}

