/* ==========================================================================
   GLOBAL RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
    font-family: Arial, Helvetica, sans-serif;
}

html, body {
    scroll-behavior: smooth;
}

body {
    background-color: #082f57;
    background-image: url("gallery/splash-background.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

body.splash-active {
    overflow: hidden;
}

section {
    
    padding: 80px 60px; 
}

/* ==========================================================================
SPLASH SCREEN
========================================================================== */
#splash-screen {
  position: fixed;
  inset: 0;
  background-color: #082f57;
  background-image: linear-gradient(
      135deg,
      rgba(0, 51, 102, 0.55),
      rgba(7, 93, 168, 0.45)
    ),
    url("gallery/splash-background.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 1;
  transition: opacity 0.5s ease;
  will-change: opacity;
  contain: layout paint;
}

#splash-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.splash-content {
  text-align: center;
  color: #fff;
  animation: zoomIn 0.9s ease both;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
  padding: 20px;
}

.splash-content img {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  padding: 6px;
  margin-bottom: 20px;
  animation: spinIn 1.5s ease forwards;
  transform-origin: center center;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
  box-shadow: 0 12px 35px rgba(0,0,0,0.28);
}

#splash-screen.splash-assets-ready .splash-content {
  opacity: 1;
}

@keyframes zoomIn { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes spinIn { from { transform: rotate(-180deg) scale(0.5); opacity: 0; } to { transform: rotate(0) scale(1); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .splash-content,
  .splash-content img {
    animation: none !important;
    transition: opacity 0.25s ease !important;
  }
}
/* ==========================================================================
   NAVBAR & HEADER
   ========================================================================== */
.close-menu { display: none; }

   .navbar { 
    position: fixed; 
    top: 0; 
    width: 100%; 
    padding: 10px 50px; 
    background: rgba(44, 62, 80, 0.95); 
    color: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    z-index: 1000; 
}


.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: start;
}
.logo img {
    height: 65px;
    width: 65px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    padding: 4px;
}
.title-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    font-size: 20px;
    font-weight: 700;
}
.title-text .sub-text {
    font-size: 18px;
    font-weight: 400;
    opacity: 0.9;
}
.nav-menu { display: flex; align-items: center;  }
.nav-links { 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    margin-bottom: -30px; 
    margin-right: 50px;
    position: relative; /* REQUIRED: Keeps the indicator contained within the nav */
    padding-bottom: 8px; /* Optional: adds breathing room for the indicator below the text */
}.nav-links a { color: white; text-decoration: none; margin-left: 20px; font-size: 14px; transition: color 0.3s; }
.nav-links a:hover { color: #f1c40f; }
/* ==========================================
   SLIDING NAV INDICATOR
   ========================================== */
.nav-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: #f1c40f; /* Matches your hover color */
    border-radius: 3px;
    transition: width 0.3s ease, transform 0.3s ease;
    pointer-events: none; /* Prevents it from blocking clicks */
    z-index: 1;
}

/* Hide the sliding indicator on mobile/sidebar view */
@media screen and (max-width: 1000px) {
    .nav-indicator {
        display: none !important;
    }
}

.nav-links a:hover,
.nav-links a.active { 
    color: #f1c40f; 
    border-bottom-color: #f1c40f;
}
.btn-allow {
    transition: all 0.3s ease;
}

.hamburger { display: none; font-size: 28px; cursor: pointer; }

/* ==========================================
   NAVBAR DROPDOWN FOR ABOUT -> SERVICES
   ========================================== */
.nav-dropdown {
    position: relative;
    margin-left: 20px; /* Matches your existing nav-link spacing */
}
.nav-dropdown .dropdown-trigger {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}
.nav-dropdown .dropdown-trigger:hover { color: #f1c40f; }

/* Main Dropdown Menu */
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
    min-width: 180px;
    z-index: 1002;
    padding: 8px 0;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }

/* Submenu Trigger */
.nav-submenu { position: relative; }
.nav-submenu-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}
.nav-submenu-trigger:hover { background: #f0f2f5; color: #1e3799; }

/* Right-Side Content Panel */
.nav-submenu-panel {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
    min-width: 250px;
    max-height: 350px;
    overflow-y: auto;
    z-index: 1003;
    padding: 8px 0;
    margin-left: 1px;
}
.nav-submenu:hover .nav-submenu-panel { display: block; }

.nav-submenu-panel h4 {
    padding: 0 15px 10px;
    margin: 0;
    font-size: 13px;
    color: #1e3799;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
}
.nav-submenu-list a {
    display: block;
    padding: 8px 15px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}
.nav-submenu-list a:hover { background: #e2e8f0; color: #1e3799; }
.nav-submenu a{color: #1e3799;}
.sub-menu {color: #1e3799;}
/* Mobile Adjustments (Stacks vertically inside slide-menu) */
@media screen and (max-width: 1000px) {
    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        background: transparent;
        margin-top: 0;
    }
    .nav-submenu-panel {
        position: static;
        box-shadow: none;
        background: transparent;
        margin-left: 0;
        max-height: none;
    }
    .nav-submenu-trigger, .nav-submenu-list a { color: #000000; padding-left: 30px; }
    .nav-submenu-panel h4 { color: #000000; border-bottom-color: rgba(255,255,255,0.2); }
    .nav-submenu-list a:hover { background: rgba(255,255,255,0.1); color: #fff; }
}
/* USER ACCOUNT & ONE-LINE USERNAME */
.user-account {
    margin-left: 20px;
    display: flex;
    align-items: center;
    justify-self: end;
    position: relative;
    cursor: pointer;
}

.user-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    padding: 6px 14px;
    border-radius: 50px;
    transition: background 0.3s;
}
.user-display:hover { background: rgba(255,255,255,0.2); }
.user-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    flex-shrink: 0;
}
.user-name {
    white-space: nowrap;       /* Forces single line */
    overflow: hidden;
    text-overflow: ellipsis;   /* Adds "..." if too long */
    max-width: 130px;          /* Prevents layout shifting */
    font-size: 14px;
    font-weight: 600;
}

/* DROPDOWN (Kept intact) */
.user-dropdown {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background: #fff;
    color: #2c3e50;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
    min-width: 180px;
    z-index: 1001;
    flex-direction: column;
    overflow: hidden;
}
.user-dropdown a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #2c3e50;
    font-weight: bold;
    transition: background 0.3s, color 0.3s;
}
.user-dropdown a:hover { background: #007bff; color: #fff; }
.user-account:hover .user-dropdown { display: flex; }

/* MOBILE & UTILS */
.hamburger { display: none; font-size: 28px; cursor: pointer; }
.close-menu { display: none; }
.btn-allow { transition: all 0.3s ease; }
.login-btn { background: #f1c40f; padding: 6px 12px; border-radius: 4px; color: #2c3e50; font-weight: bold; text-decoration: none; }
.notif-floating-btn {margin-left: 20px;}


@media (max-width: 1024px) {
    .navbar {
        grid-template-columns: auto 1fr auto;
        padding: 10px 20px;
        gap: 15px;
    }
    .nav-links a { font-size: 14px; }
    .user-name { max-width: 100px; }
}
/* ==========================================================================
   HERO CAROUSEL & ANNOUNCEMENTS
   ========================================================================== */
.hero-announcements { 
    margin-top: 90px; 
    display: flex; 
    gap: 30px; 
    padding: 20px 60px; 
    justify-content: center; 
    align-items: stretch;
    /* ADD THIS so the section isn't transparent */
}

.view-more-btn:hover {
    background: #002366 !important; /* Darker blue */
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.carousel-container { 
    flex: 1 1 600px; 
    max-width: 900px; 
    position: relative; 
    height: 450px; 
    overflow: hidden; 
    border-radius: 12px; 
    box-shadow: 0 6px 20px rgba(0,0,0,0.2); 
}
.slides { display: flex; width: 1000%; height: 100%; transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.slide { width: 10%; height: 100%; position: relative; }
.slide img { width: 100%; height: 170%; object-fit: cover; margin-top: -10%; }
.overlay { position: absolute; inset: 0; height: 200%;  margin-top: -20%;  background: rgba(0,0,0,0.4); color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; z-index: 2; padding: 20px; }

/* Radio Button Navigation Logic */
#slide1:checked ~ .slides { transform: translateX(0%); }
#slide2:checked ~ .slides { transform: translateX(-10%); }
#slide3:checked ~ .slides { transform: translateX(-20%); }
#slide4:checked ~ .slides { transform: translateX(-30%); }
#slide5:checked ~ .slides { transform: translateX(-40%); }
#slide6:checked ~ .slides { transform: translateX(-50%); }
#slide7:checked ~ .slides { transform: translateX(-60%); }
#slide8:checked ~ .slides { transform: translateX(-70%); }
#slide9:checked ~ .slides { transform: translateX(-80%); }
#slide10:checked ~ .slides { transform: translateX(-90%); }

.navigation { position: absolute; bottom: 15px; width: 100%; text-align: center; z-index: 10; }
.navigation label { display: inline-block; width: 12px; height: 12px; background: rgba(255, 255, 255, 0.5); border-radius: 50%; margin: 0 5px; cursor: pointer; transition: background 0.3s, transform 0.3s; }
#slide1:checked ~ .navigation label:nth-child(1), 
#slide2:checked ~ .navigation label:nth-child(2), 
#slide3:checked ~ .navigation label:nth-child(3) { background: #fff; transform: scale(1.3); }

/* Announcements Panel */
.announcements { 
    flex: 1 1 350px; 
    max-width: 400px; 
    background: #fff; 
    border-radius: 12px; 
    border: 2px solid #c0392b;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1); 
    display: flex;
    flex-direction: column;
    height: 450px; 
}
.announcements-header { display: flex; justify-content: space-between; padding: 15px; font-weight: bold; background: #f8f8f8; border-bottom: 2px solid #c0392b; position: sticky; top: 0; z-index: 10; font-size: 14px; color: #2c3e50; border-radius: 10px 10px 0 0;}
.announcement-section { padding: 15px; overflow-y: auto; flex-grow: 1; }
.announcement-section h3 {position: absolute; font-size: 20px;height: 30px;  width: auto;margin-top: -15px;background-color: #ffffff; color: #c0392b; border-bottom: 2px solid #c0392b; padding-bottom: 5px; }
.announcement-section ul {margin-top: 10%; list-style: none; }
.announcement-section li { margin-bottom: 15px; }
.announcement-section a { text-decoration: none; color: #333; font-size: 14px; display: block; padding: 10px; background: #f9f9f9; border-radius: 8px; transition: background 0.3s; }
.announcement-section a:hover { background: #f1f1f1; }
.announcement-section a strong { color: #c0392b; display: block; margin-bottom: 5px; font-size: 15px; }

.post-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #555; margin: 6px 0; }
.post-meta i { color: #000; margin-right: 4px; width: 14px; text-align: center; }
.post-preview { font-size: 13px; color: #666; margin-top: 8px; line-height: 1.5; font-style: italic; }

/* ==========================================================================
   NEWS & UPDATES SECTION
   ========================================================================== */
.news-updates { padding: 0 60px 60px; background: rgba(245, 245, 245, 0.95); position: relative; }
.news-updates h2 { font-size: 22px; color: #fff; background: #c0392b; padding: 15px 20px; margin: 0 0 40px 0; text-transform: uppercase; border-radius: 0 0 8px 8px; }

.news-grid { 
    display: flex; 
    flex-wrap: nowrap;       /* Changed from wrap to nowrap */
    overflow-x: auto;       /* Enables horizontal scroll */
    gap: 25px; 
    padding-bottom: 15px;   /* Space for the scrollbar */
    justify-content: flex-start; /* Ensure cards start from the left */
    scroll-behavior: smooth;
}
.news-grid::-webkit-scrollbar {
    height: 8px;
}
.news-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.news-grid::-webkit-scrollbar-thumb {
    background: #c0392b;
    border-radius: 10px;
}

.news-card { 
    flex: 0 0 350px;         /* Prevents cards from shrinking */
    background: #fff; 
    padding: 25px; 
    border-radius: 12px; 
    box-shadow: 0 6px 15px rgba(0,0,0,0.1); 
    display: flex;
    flex-direction: column;
}
.news-card:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(0,0,0,0.2); }
.news-card h3 { font-size: 20px; margin-bottom: 12px; color: #c0392b; }
.news-card p { font-size: 14px; color: #444; line-height: 1.6; margin-bottom: 5px; }
.news-card i { color: #007bff; margin-right: 8px; width: 20px; text-align: center; }
.news-snippet { font-style: italic; color: #666; margin-top: 10px; flex-grow: 1; }

.read-more-btn { display: inline-block; margin-top: 15px; padding: 10px 16px; background-color: #c0392b; color: #fff; text-decoration: none; border-radius: 6px; font-size: 14px; text-align: center; font-weight: bold; transition: background 0.3s, transform 0.3s; }
.read-more-btn:hover { background-color: #e74c3c; transform: translateY(-2px); }

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about { background: rgba(253, 253, 253, 0.95); text-align: center; }
.about h2 { font-size: 36px; margin-bottom: 20px; color: #2c3e50; text-transform: uppercase; }
.about > p { font-size: 16px; line-height: 1.8; max-width: 800px; margin: 0 auto 40px auto; color: #555; }

/* Container to hold both columns */
.about-container {
  display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: stretch;
}

/* Left Sidebar Styles */
.contact-sidebar {
    flex: 1;
    min-width: 300px;
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  
}

.contact-title {
    color: #1e3799;
    margin-bottom: 25px;
    font-size: 24px;
    border-left: 4px solid #1e3799;
    padding-left: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-icon {
    font-size: 24px;
    background: #f1f2f6;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.contact-text label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    font-weight: bold;
}

.contact-text p {
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
}

/* Right Side Cards Styling */
.about-facts {
    flex: 2;
    display: grid;
    /* Explicitly define 4 columns so they stay in one row */
    grid-template-columns: repeat(4, 1fr); 
    /* Create two rows: one for cards (auto height), one for the banner (expands) */
    grid-template-rows: auto 1fr; 
    gap: 20px;
}

.fact-card {
    background: #fff;
    padding: 20px 10px; /* Reduced side padding to prevent text squashing */
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fact-card:hover {
    transform: translateY(-5px);
}

.fact-card h3 {
    font-size: 16px;
    color: #7f8c8d;
    margin: 10px 0 5px;
}

.fact-card p {
    font-size: 18px;
    font-weight: bold;
    color: #1e3799;
}

.e-services-banner {
    grid-column: 1 / -1;
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: left; /* Align title to the left like the image */
}

.services-title {
    color: #2c3e50;
    font-size: 20px;
    margin-bottom: 25px;
    font-weight: bold;
    text-transform: none; /* Removed uppercase to match image */
}

/* The Grid for the 4 buttons */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns */
    gap: 15px;
}

/* Styling the buttons to look like the image */
.dropbtn {
    width: 100%;
    background: #f1f5f9; /* Light grayish-blue background */
    border: none;
    padding: 15px 20px;
    border-radius: 12px;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.3s ease;
}

.dropbtn:hover {
    background: #e2e8f0;
}

.dropbtn .icon {
    font-size: 18px;
    color: #1e3799; /* Blue icons */
}

/* Dropdown Content Logic */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 100%;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
}

.dropdown-content a {
    color: #2c3e50;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
}

.dropdown-content a:hover {
    background-color: #f1f2f6;
    color: #1e3799;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr; /* 1 column on small screens */
    }
}


.about-location { display: flex; gap: 40px; margin: 50px 0; align-items: flex-start;}
.map-container, .boundary-container { flex: 1; background: #fff; padding: 20px; border-radius: 12px; box-shadow: 0 6px 15px rgba(0,0,0,0.08); }
.map-container h3, .boundary-container h3 { margin-bottom: 20px; font-size: 22px; color: #1e3799; border-bottom: 2px solid #eee; padding-bottom: 10px;}
.map-container iframe { width: 100%; border-radius: 8px; }
.boundary-container img { width: 100%; max-width: 500px; height: auto; border-radius: 8px; margin-bottom: 15px; }
.boundary-container p { color: #555; font-weight: bold; }



.spot-map {
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.spot-map:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* Full screen spot map viewer */
.spot-map-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 25px;
}

.spot-map-modal.active {
    display: flex;
}

.spot-map-modal img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 35px rgba(0,0,0,0.45);
}

.spot-map-close {
    position: fixed;
    top: 20px;
    right: 30px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    transition: background 0.3s ease;
    z-index: 100000;
}

.spot-map-close:hover {
    background: rgba(255,255,255,0.3);
}

body.spot-map-open {
    overflow: hidden;
}

.about-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; }
.about-card { flex: 1 1 280px; max-width: 350px; background: #ecf0f1; padding: 30px 20px; border-radius: 12px; box-shadow: 0 6px 15px rgba(0,0,0,0.05); transition: transform 0.3s; }
.about-card h3 { font-size: 22px; color: #1e3799; margin-bottom: 15px; }
.about-card p { font-size: 15px; color: #444; line-height: 1.6; }
.about-card:hover { transform: translateY(-5px); background: #e0e6ed; }


/* ==========================================================================
   MOBILE RESPONSIVENESS FOR ABOUT SECTION
   ========================================================================== */
/* Desktop: Show Banner 1, Hide Banner 2 */
#e-services-banner1 {
    display: block; /* This is part of your grid in about-facts */
}

#e-services-banner2 {
    display: none; /* Hide the mobile version by default */
}
/* Tablet & Large Mobile Devices (768px and below) */
@media (max-width: 768px) {
    /* Stack the contact sidebar and the facts on top of each other */
    .about-container {
        flex-direction: column;
    }

    .contact-sidebar, 
    .about-facts {
        flex: auto;
        min-width: 100%;
        width: 100%;
    }

    /* Change the 4-column fact cards to a 2x2 grid so they don't squish */
    .about-facts {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Stack the Map and Boundaries sections vertically */
    .about-location {
        flex-direction: column;
        gap: 20px;
    }

    .map-container, 
    .boundary-container {
        width: 100%;
        flex: auto;
    }
    
    .boundary-container img {
        max-width: 100%; /* Ensure image fills container nicely */
    }

    #e-services-banner1 {
        display: none;
    }

    #e-services-banner2 {
        display: block;
        margin-top: 20px; /* Optional: adds space since it's now outside the grid */
    }
}

/* Small Mobile Devices (480px and below) */
@media (max-width: 480px) {
    /* Stack the fact cards into a single column on very small screens */
    .about-facts {
        grid-template-columns: 1fr;
    }

    /* Ensure the services buttons stack into a single column */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Adjust padding for the section to save screen real estate */
    .about {
        padding: 40px 15px; 
    }
    
    .contact-sidebar,
    .e-services-banner {
        padding: 20px;
    }
}

/* ==========================================================================
   CERTIFICATES & GALLERY
   ========================================================================== */
.certificates-awards { background-color: #fff; text-align: center; }
.certificates-awards h2 { font-size: 36px; color: #2c3e50; margin-bottom: 40px; text-transform: uppercase; }
.certificates-gallery { display: flex; overflow-x: auto; gap: 25px; padding-bottom: 20px; scroll-behavior: smooth; }
.certificates-gallery::-webkit-scrollbar { height: 8px; }
.certificates-gallery::-webkit-scrollbar-thumb { background: #1e3799; border-radius: 4px; }

.certificate-item { flex: 0 0 320px; position: relative; overflow: hidden; border-radius: 12px; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,0.1); height: 220px;}
.certificate-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.certificate-item:hover img { transform: scale(1.1); }

.gallery { background: #ecf0f1; text-align: center; }
.gallery h2 { font-size: 36px; color: #2c3e50; text-transform: uppercase; margin-bottom: 20px;}
.year-filters { margin-bottom: 30px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.year-btn { padding: 10px 20px; background: #fff; border: 1px solid #ddd; border-radius: 30px; cursor: pointer; font-weight: bold; transition: 0.3s; color: #555; }
.year-btn.active, .year-btn:hover { background: #1e3799; color: white; border-color: #1e3799; }

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}
.gallery-item {
    flex: 1 1 300px; /* Base width */
    max-width: 450px;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: auto;
    /* This ensures landscape and portrait images maintain a nice shape */
    aspect-ratio: 4 / 3; 
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

/* Modals General */
.modal { display: none; position: fixed; z-index: 2000; inset: 0; background-color: rgba(0,0,0,0.85); justify-content: center; align-items: center; padding: 20px;}
.modal-content { background-color: #fff; padding: 30px; border-radius: 12px; max-width: 600px; width: 100%; text-align: center; position: relative; max-height: 90vh; overflow-y: auto;}
.modal-content img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 8px; margin-bottom: 20px; }
.modal-content h3 { font-size: 24px; margin-bottom: 10px; color: #c0392b;}
.modal-content p { font-size: 16px; color: #444; line-height: 1.6; }
.close, .close-news { position: absolute; top: 15px; right: 20px; font-size: 32px; font-weight: bold; cursor: pointer; color: #7f8c8d; transition: color 0.3s; }
.close:hover, .close-news:hover { color: #e74c3c; }

/* ==========================================================================
   EMERGENCY HOTLINES
   ========================================================================== */
.emergency-hotline { background: #c0392b; color: #fff; text-align: center; }
.emergency-hotline h2 { font-size: 36px; margin-bottom: 15px; text-transform: uppercase; }
.emergency-note { max-width: 800px; margin: 0 auto 40px auto; font-size: 16px; line-height: 1.6; color: #f9f9f9; }

.hotline-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; max-width: 1100px; margin: 0 auto; }
.hotline-card { background: #ffffff; color: #2c3e50; padding: 30px 20px; border-radius: 12px; box-shadow: 0 8px 20px rgba(0,0,0,0.15); transition: transform 0.3s ease; }
.hotline-card h3 { font-size: 18px; margin-bottom: 15px; color: #c0392b; }
.hotline-number { font-size: 20px; font-weight: bold; color: #1e3799;}
.hotline-card:hover { transform: translateY(-5px); }

/* ==========================================================================
   FLOATING ACTIONS & FOOTER
   ========================================================================== */
.floating-actions { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 15px; z-index: 1000;}
.float-icon, .floating-msg { background: #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 6px 15px rgba(0,0,0,0.3); transition: transform 0.3s; }
.float-icon { width: 50px; height: 50px; }
.float-icon img { width: 25px; height: 25px; }
.floating-msg { width: 65px; height: 65px; background: #1e3799; }
.floating-msg img { width: 35px; height: 35px; filter: brightness(0) invert(1); }
.float-icon:hover, .floating-msg:hover { transform: scale(1.1); }

.chat-box { display: none; position: absolute; bottom: 80px; right: 0; width: 300px; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); overflow: hidden; flex-direction: column; }
.chat-header { background: #1e3799; color: #fff; padding: 15px; display: flex; justify-content: space-between; font-weight: bold; }
.close-chat { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; }
.chat-body {
    height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #f5f7fb;
}

.user-msg {
    background: #4CAF50;
    color: #fff;
    padding: 10px 14px;
    border-radius: 18px;
    max-width: 70%;
    font-size: 14px;
}

.bot-msg {
    background: #e4e6eb;
    color: #333;
    padding: 10px 14px;
    border-radius: 18px;
    max-width: 70%;
    font-size: 14px;
}

.chat-footer {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #ddd;
}

.chat-footer input {
    flex: 1;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #ccc;
}

.chat-footer button {
    background: #1877f2;
    color: #fff;
    border: none;
    padding: 0 16px;
    border-radius: 20px;
    cursor: pointer;
}

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
}

.faq-btn {
    background: #f0f2f5;
    border: 1px solid #1e3799;
    color: #1e3799;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-btn:hover {
    background: #1e3799;
    color: #fff;
}
.footer {
    background: #0a1128; /* Deep dark blue background */
    color: #ffffff;
    padding: 60px 10% 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section {
    flex: 1;
    min-width: 250px;
    background: #0a1128; 
}

/* Logo Styling */
.footer-custom-logo {
    width: 50px;         /* Adjust this size as needed */
    height: 50px;        /* Keeping it square */
    object-fit: contain; /* Ensures the logo isn't stretched */
    border-radius: 8px;  /* Optional: keeps that slight rounded corner look */
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;           /* Space between logo and text */
    margin-bottom: 20px;
}

.footer-logo h2 {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
}

.logo-box {
    background: #004aad;
    color: white;
    padding: 5px 10px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 20px;
}

.footer-section h2 {
    font-size: 22px;
    margin: 0;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section p {
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 14px;
}

/* Links Styling */
.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #ffffff;
}

/* Icons and Contact */
.footer-section i {
    margin-right: 10px;
    color: #3b82f6; /* Light blue icons */
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
}

/* Bottom Bar */
.footer-bottom {
    display: flex;
    align-items: center;
    padding-top: 20px;
    font-size: 13px;
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}
/* ==========================================================================
   MOBILE SCROLL (HORIZONTAL / SWIPEABLE CAROUSELS)
   ========================================================================== */

.gallery-title {
    color: #1cb3e0;
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

@media screen and (max-width: 1000px) {
    section { padding: 60px 30px; }
    
    .navbar { padding: 10px 20px; }
    .nav-links { 
        display: flex; 
        flex-direction: column; 
        position: fixed; 
        top: 0; 
        margin-right: -15px;
        right: -300px; /* Hides the menu off-screen to the right */
        height: 100vh; /* Takes up full screen height */
        width: 250px; 
        background-color: rgba(44, 62, 80, 0.98); 
        padding: 80px 20px 20px; /* Top padding pushes links down */
        box-shadow: -5px 0 15px rgba(0,0,0,0.5); 
        transition: right 0.4s ease-in-out; /* The smooth sliding animation */
        z-index: 1000;
        border-radius: 0; /* Removing the old rounded corners */
    }

    .nav-links.active { 
        right: 0; /* Slides the menu into view */
    }

    .close-menu {
        display: block;
        position: absolute;
        top: 20px;
        right: 25px;
        font-size: 36px;
        color: #fff;
        cursor: pointer;
        transition: color 0.3s;
    }

    .close-menu:hover {
        color: #f1c40f;
    }
    .hamburger { display: block; margin-right: -50px; margin-right: 2px;}

    .hero-announcements { flex-direction: column; padding: 20px; margin-top: 80px; }
    .carousel-container { flex: none; width: 100%; max-width: 100%; height: 350px; }
    .announcements { flex: none; width: 100%; max-width: 100%; height: auto; max-height: 500px; }
    .about-location { flex-direction: column; gap: 30px; }
    .map-container, .boundary-container { width: 100%; text-align: center; }

    /* SWIPEABLE CONTAINERS (News, About,) */
    .news-grid, 
    .about-facts, 
    .about-cards {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
    }
    
    /* Scrollbar styling for containers */
    .news-grid::-webkit-scrollbar, .about-facts::-webkit-scrollbar, 
    .about-cards::-webkit-scrollbar::-webkit-scrollbar { height: 6px; }
    
    .news-grid::-webkit-scrollbar-track, .about-facts::-webkit-scrollbar-track, 
    .about-cards::-webkit-scrollbar-track::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
    
    .news-grid::-webkit-scrollbar-thumb, .about-facts::-webkit-scrollbar-thumb, 
    .about-cards::-webkit-scrollbar-thumb::-webkit-scrollbar-thumb { background: #c0392b; border-radius: 10px; }

    /* CARD SIZING FOR SWIPE VIEW */
    .news-card, 
    .about-card, 
    .fact-card, 
    .official-card {
        flex: 0 0 85%; /* Shows 85% of the card, hinting there are more to the right */
        max-width: 320px;
        scroll-snap-align: start; /* Snaps beautifully into place */
    }
    
    .punong-barangay { flex: 0 0 100%; max-width: 100%; } /* Captain gets full width */

    .news-card:hover, 
    .fact-card:hover, 
    .about-card:hover, 
    .official-card:hover,
    .hotline-card:hover {
        transform: none !important; /* Stop cards from jumping up on touch */
        box-shadow: 0 6px 15px rgba(0,0,0,0.1); /* Keep shadow consistent */
    }
    .gallery-grid {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        scroll-snap-type: x mandatory;
        padding-bottom: 20px;
    }
    .gallery-item {
        flex: 0 0 85%;
        scroll-snap-align: start;
    }

}

@media screen and (max-width: 600px) {
    section { padding: 50px 15px; }
    .user-name { display: none; }
    .title-text {
        display: flex;
        flex-direction: column;
        line-height: 1.25;
        font-size: 15px;
        font-weight: 700;
    }
    .title-text .sub-text {
        font-size: 13px;
        font-weight: 400;
        opacity: 0.9;
    }
    .splash-content img { width: 200px; height: 200px; }
    .splash-content h1 { font-size: 22px; }
    .logo img { width: 50px; height: 50px; }

    .carousel-container { height: 250px; border-radius: 8px; }
    .about h2, .egov h2, .section-title, .certificates-awards h2, .gallery h2, .emergency-hotline h2 { font-size: 28px; }
    
    .news-updates { padding: 0 15px 40px; }
    .news-updates h2 { font-size: 18px; text-align: center; }
    .floating-actions { transform: scale(0.85); bottom: 10px; right: 10px; }
}

/* ==========================================================================
   MODERN INTERACTIVE GALLERY CAROUSEL
   ========================================================================== */
.gallery-carousel-section {
    padding: 80px 0;
    background: #ffffff;
    overflow: hidden;
    text-align: center;
}

.carousel-container {
    position: relative;
    max-width: 1200%;
    margin: 0 auto;
    padding: 40px 0;
}

.carousel-viewport {
    perspective: 1000px;
    width: 100%;
    overflow: visible;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    will-change: transform;
}

.carousel-item {
    flex: 0 0 500px; /* Width of the center image */
    margin: 0 20px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: transform 0.6s ease, opacity 0.6s ease, filter 0.6s ease;
    opacity: 0.4;
    filter: blur(4px) grayscale(50%);
    transform: scale(0.8) translateY(20px);
    cursor: pointer;
}

/* Active / Center Item */
.carousel-item.active {
    opacity: 1;
    filter: blur(0) grayscale(0);
    transform: scale(1.1) translateY(0);
    z-index: 10;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.carousel-item img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: bold;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.carousel-item.active:hover .item-caption {
    transform: translateY(0);
}

/* Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 20;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    color: #1e3799;
}

.carousel-btn:hover {
    background: #1e3799;
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }

/* Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #1e3799;
    width: 30px;
    border-radius: 10px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    /* 1. Adjust the item size so it doesn't exceed screen width */
    .carousel-item {
        flex: 0 0 280px; /* Fixed width that fits all mobile screens */
        margin: 0 10px;
        opacity: 0.5;
        filter: blur(2px); /* Reduced blur for better performance on mobile */
        transform: scale(0.85);
    }

    /* 2. Scale the active item slightly less to prevent clipping */
    .carousel-item.active {
        opacity: 1;
        filter: blur(0) grayscale(0);
        transform: scale(1.02); 
    }

    /* 3. Adjust image height for mobile aspect ratios */
    .carousel-item img {
        height: 200px; 
     
    }

    /* 4. Make captions always visible or easier to see on touch */
    .item-caption {
        transform: translateY(0); /* Hover doesn't exist on mobile, so show it */
        background: rgba(0, 0, 0, 0.6);
        padding: 12px;
        font-size: 0.9rem;
    }

    /* 5. Adjust navigation buttons so they don't block the image */
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        background: rgba(255, 255, 255, 0.8);
    }

    .carousel-btn.prev { left: 5px; }
    .carousel-btn.next { right: 5px; }

    /* 6. Ensure the section title doesn't cramp the carousel */
    .gallery-carousel-section {
        padding: 40px 0;
    }
}

@media (max-width: 480px) {
    /* Even smaller width for very narrow phones */
    .carousel-item {
        flex: 0 0 240px;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
}

/* ==========================================================================
   CLEANUP & VIEW MORE BUTTON
   ========================================================================== */
.view-more-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: #1e3799;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 55, 153, 0.3);
}

.view-more-btn:hover {
    background: #0a1e6e;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(30, 55, 153, 0.4);
}

/* ==========================================================================
   OFFICIALS SECTION
   ========================================================================== */

.officials-section {
    background: radial-gradient(circle at top, #1a1a1a 0%, #0a0a0a 100%);
    padding: 80px 0;
}

.section-title {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: #007bff; /* Adjust this color to match your barangay's theme color */
    border-radius: 2px;
}

/* Container for the single row */
.officials-row {
    display: flex;
    gap: 8px; /* Slightly tighter gap to fit more cards */
    width: 100%;
    height: 450px; /* Slightly taller to accommodate thin default states */
    margin-bottom: 30px;
    padding: 0 15px;
    overflow-x: auto; /* Allows side-scrolling on tiny screens if it gets too cramped */
}

/* Individual Card Styling */
.official-card {
    position: relative;
    flex: 1; 
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    background-color: #1a1a1a;
    min-width: 40px; /* Lowered from 80px so 10+ cards can fit in one line */
}

/* The Hover Expansion */
.official-card:hover {
    flex: 8; /* The hovered card takes up 8 times the space */
}

/* Keep the rest of your CSS for .img-container, .card-info, etc., exactly the same! */

/* Image Container and Image */
.img-container {
    width: 100%;
    height: 100%;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Keeps image proportions correct */
    object-position: center top; 
    transition: transform 0.6s ease;
}

/* Optional: Slight zoom effect on the image when hovered */
.official-card:hover .img-container img {
    transform: scale(1.05);
}

/* Gradient Overlay for Text Readability */
.official-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 40%);
    transition: background 0.6s ease;
    z-index: 1;
    pointer-events: none; /* ADDED: allows clicks to pass through to the image */
}

/* Darken the whole image slightly on hover to make centered text pop */
.official-card:hover::after {
    background: rgba(0,0,0,0.6);
}

/* Text Container Default State (Bottom Left) */
.card-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
    color: #ffffff;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none; /* ADDED: allows clicks on the text to pass to the image */
}

/* Typography & Truncation */
.card-info h4, 
.card-info p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Adds '...' when shrunk */
}

.card-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    transition: font-size 0.5s ease;
}

.card-info p {
    font-size: 0.85rem;
    color: #d1d5db; /* Light gray */
}

/* Text Container Hover State (Centered) */
.official-card:hover .card-info {
    bottom: 50%;
    left: 50%;
    right: auto;
    width: 90%;
    transform: translate(-50%, 50%); /* Centers the absolute positioned element */
    text-align: center;
}

/* Scale up the text when expanded */
.official-card:hover .card-info h4 {
    font-size: 1.8rem;
    white-space: normal; /* Allows text to wrap if the name is very long */
}

.official-card:hover .card-info p {
    font-size: 1.1rem;
}



/* ==========================================================================
   MOBILE RESPONSIVENESS FOR OFFICIALS
   ========================================================================== */
@media (max-width: 768px) {
    .officials-section {
        padding: 40px 15px;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    /* 1. Change Flex to Grid for mobile */
    .officials-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Two columns */
        gap: 12px;
        height: auto; /* Remove the fixed height from desktop */
        overflow-x: visible; /* Disable side scrolling */
        padding: 0;
    }

    /* 2. Reset the accordion effect (no expanding on mobile) */
    .official-card {
        flex: none; 
        width: 100%;
        height: 250px; /* Give cards a consistent height */
        min-width: unset;
        transition: transform 0.3s ease;
    }

    .official-card:hover {
        flex: none; /* Disable expansion */
        transform: translateY(-5px); /* Slight lift instead of expanding */
    }

    /* 3. Make the Punong Barangay (Captain) take full width at the top */
    .official-card.punong-barangay {
        grid-column: span 2; 
        height: 300px; /* Make the leader's card slightly taller */
    }

    /* 4. Fix text visibility for mobile */
    .card-info {
        bottom: 15px;
        left: 10px;
        right: 10px;
        text-align: center;
    }

    .card-info h4 {
        font-size: 1rem;
        white-space: normal; /* Allow names to wrap on small screens */
    }

    .card-info p {
        font-size: 0.75rem;
    }

    /* 5. Disable the "centering" animation from desktop to keep text readable */
    .official-card:hover .card-info {
        bottom: 15px;
        left: 10px;
        transform: none;
        width: calc(100% - 20px);
    }
    
    .official-card:hover .card-info h4 {
        font-size: 1.1rem;
    }
}




/* Modal Overlay display*/
/* Modal Overlay */
.official-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.85); /* Modern dark blue-ish overlay */
    backdrop-filter: blur(5px); /* Blurs background for focus */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* The ID Card Container */
.id-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px; /* Slimmer, ID-card like width */
    max-height: 90vh;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ID Card Header (The Badge Area) */
.id-card-header {
    background: linear-gradient(135deg, #1e3799 0%, #0984e3 100%);
    padding: 40px 20px 30px;
    text-align: center;
    position: relative;
    color: white;
}

.id-card-header .close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    cursor: pointer;
    transition: 0.2s;
}

.id-card-header .close-modal:hover { color: white; }

.id-card-header img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
}

.id-card-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.id-card-header p {
    margin: 5px 0 0;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 4px 15px;
    border-radius: 20px;
    letter-spacing: 1px;
}

/* ID Card Body */
.id-card-body {
    padding: 25px;
    overflow-y: auto;
    background: #fff;
}

.info-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
}

.info-row i {
    width: 35px;
    height: 35px;
    background: #f0f3f9;
    color: #1e3799;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-right: 15px;
    flex-shrink: 0;
}

.info-content label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #8e9aaf;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.info-content p {
    margin: 0;
    color: #2d3436;
    font-size: 14px;
    line-height: 1.5;
}

/* Bio/About Section */
#modalBio {
    font-style: italic;
    color: #636e72;
    border-left: 2px solid #dfe6e9;
    padding-left: 10px;
}

/* Accomplishments Custom Styling */
#modalAccomplishments h4 {
    font-size: 14px;
    color: #1e3799;
    margin: 20px 0 10px;
}

/* Scrollbar Styling for a Modern Look */
.id-card-body::-webkit-scrollbar { width: 5px; }
.id-card-body::-webkit-scrollbar-track { background: #f1f1f1; }
.id-card-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }

/* Mobile View Adjustments */
@media (max-width: 480px) {
    .id-card { max-height: 95vh; border-radius: 15px; }
    .id-card-header { padding: 30px 15px 20px; }
    .id-card-header img { width: 110px; height: 110px; }
}

/* ==========================================================================
   MISSION, VISION & VALUES
   ========================================================================== */
.mv-section {
    background: #f9f9f9;
    text-align: center;
}

.mv-section h2 {
    font-size: 36px;
    margin-bottom: 40px;
    color: #1e3799;
    text-transform: uppercase;
}

.mv-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    align-items: stretch;
    max-width: 1180px;
    margin: 0 auto;
}

.mv-card {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    min-height: 100%;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mv-image-wrap {
    width: 100%;
    height: 220px;
    background: #f8fafc;
    border-bottom: 1px solid rgba(30, 55, 153, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mv-image-wrap img,
.mv-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
}

.mv-content {
    padding: 26px 22px 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mv-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #1e3799;
}

.mv-card p {
    color: #555;
    line-height: 1.7;
    font-size: 15px;
    margin: 0;
}

.mv-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

@media (max-width: 992px) {
    .mv-grid {
        grid-template-columns: 1fr;
        max-width: 650px;
    }

    .mv-image-wrap {
        height: 260px;
    }
}

@media (max-width: 480px) {
    .mv-section {
        padding: 50px 16px;
    }

    .mv-section h2 {
        font-size: 26px;
    }

    .mv-image-wrap {
        height: 190px;
    }

    .mv-content {
        padding: 22px 18px 26px;
    }
}

/* ==========================================================================
animated background for about section
   ========================================================================== */

.animated-bg {
  background: linear-gradient(-45deg, #eef2ff, #e0f7fa, #fce4ec, #f3e5f5);
  background-size: 400% 400%;
 animation: gradientMove 18s ease infinite;

  min-height: 100vh;
}


/* Animation */
@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ==========================================================================
STICKY OVERLAP (DECK OF CARDS) - FINAL FIX
========================================================================== */
section {
  position: sticky !important;
  z-index: 10;
  overflow: visible !important; 
  /* REMOVE THIS: transform: translateZ(0); */
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.15); 
}


.footer {
    position: relative;
    z-index: 100; /* This pushes the footer on top of the sticky sections */
/* Ensure you have a solid background color so sections don't bleed through */
}


/* =========================================
PAGE REDIRECT LOADER
========================================= */
.page-loader-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 999999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    animation: fadeInLoader 0.3s ease;
}
.page-loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #1e3799; /* Matches your theme */
    border-radius: 50%;
    animation: spinLoader 0.8s linear infinite;
    margin-bottom: 15px;
}
@keyframes spinLoader { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadeInLoader { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
PAGE CONTENT LOADING TRANSITION
========================================================================== */
.page-content {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.page-content.loaded {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Ensure splash screen stays on top during transition */
#splash-screen {
    z-index: 99999;
}



.unread-notif-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.unread-notif-box {
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    animation: unreadPop 0.25s ease;
}

@keyframes unreadPop {
    from {
        transform: translateY(20px) scale(0.96);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.unread-notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e3799;
    color: #fff;
    padding: 16px 18px;
}

.unread-notif-header h3 {
    margin: 0;
    font-size: 18px;
}

.unread-close-btn {
    background: transparent;
    color: #fff;
    border: none;
    font-size: 28px;
    cursor: pointer;
}

.unread-notif-list {
    padding: 15px;
    overflow-y: auto;
    max-height: 55vh;
}

.unread-notif-item {
    border: 1px solid #e5e7eb;
    border-left: 5px solid #1e3799;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    background: #f9fafb;
}

.unread-notif-item h4 {
    margin: 0 0 6px;
    color: #111827;
}

.unread-notif-item .notif-type {
    display: inline-block;
    font-size: 12px;
    font-weight: bold;
    background: #e0e7ff;
    color: #1e3799;
    padding: 3px 8px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.unread-notif-item p {
    margin: 6px 0;
    color: #374151;
    white-space: pre-line;
    font-size: 14px;
}

.unread-notif-item small {
    color: #6b7280;
}

.unread-notif-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.unread-read-btn,
.unread-view-btn {
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.unread-read-btn {
    background: #e5e7eb;
    color: #111827;
}

.unread-view-btn {
    background: #1e3799;
    color: #fff;
}

body.dark-mode .unread-notif-box {
    background: #1f2937;
    color: #fff;
}

body.dark-mode .unread-notif-item {
    background: #111827;
    border-color: #374151;
}

body.dark-mode .unread-notif-item h4,
body.dark-mode .unread-notif-item p {
    color: #fff;
}

body.dark-mode .unread-notif-actions {
    background: #111827;
    border-color: #374151;
}

.live-notification-popup {
    position: fixed;
    top: 100px;
    right: 25px;
    width: 360px;
    max-width: calc(100vw - 40px);
    background: #ffffff;
    border-left: 5px solid #1e3799;
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.25);
    z-index: 999999;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    overflow: hidden;
}

.live-notification-popup.show {
    transform: translateX(0);
    opacity: 1;
}

.live-notification-content {
    display: flex;
    gap: 12px;
    padding: 16px;
    position: relative;
}

.live-notification-icon {
    width: 42px;
    height: 42px;
    background: #e8efff;
    color: #1e3799;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-notification-text h4 {
    margin: 0 25px 6px 0;
    color: #1e3799;
    font-size: 16px;
}

.live-notification-text p {
    margin: 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-line;
    max-height: 120px;
    overflow-y: auto;
}

.live-notification-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
}

.live-notification-view {
    margin-top: 12px;
    border: none;
    background: #1e3799;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

body.dark-mode .live-notification-popup {
    background: #1f2937;
}

body.dark-mode .live-notification-text h4,
body.dark-mode .live-notification-text p {
    color: #ffffff;
}

/* ========================================================================== 
   PROFESSIONAL MOBILE NAVIGATION SIDEBAR OVERRIDE
   Keeps your current desktop navbar and services process intact.
   ========================================================================== */
.mobile-nav-overlay {
    display: none;
}

body.sidebar-open {
    overflow: hidden;
}

@media screen and (max-width: 1000px) {
    .navbar {
        padding: 10px 16px;
        min-height: 76px;
        gap: 12px;
        background: rgba(31, 45, 61, 0.98);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    }

    .logo {
        min-width: 0;
        flex: 1;
    }

    .logo img {
        width: 54px;
        height: 54px;
    }

    .title-text {
        font-size: 16px;
        line-height: 1.2;
    }

    .title-text .sub-text {
        font-size: 13px;
    }

    .nav-menu {
        margin-left: auto;
        gap: 10px;
    }

    .hamburger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin: 0 !important;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.18);
        color: #fff;
        font-size: 28px;
        line-height: 1;
        transition: background 0.25s ease, transform 0.25s ease;
    }

    .hamburger:hover,
    .hamburger:focus {
        background: rgba(241, 196, 15, 0.22);
        outline: none;
        transform: translateY(-1px);
    }

    .mobile-nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(2, 6, 23, 0.55);
        backdrop-filter: blur(2px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 1001;
    }

    .mobile-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-links {
        position: fixed !important;
        top: 0;
        right: 0;
        width: min(340px, 88vw);
        height: 100dvh;
        margin: 0 !important;
        padding: 88px 18px 26px !important;
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        background: linear-gradient(180deg, #1f2d3d 0%, #263b50 100%);
        border-left: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: -18px 0 40px rgba(0, 0, 0, 0.32);
        overflow-y: auto;
        overflow-x: hidden;
        transform: translateX(105%);
        transition: transform 0.35s ease;
        z-index: 1004;
    }

    .nav-links.active {
        right: 0 !important;
        transform: translateX(0);
    }

    .nav-links::before {
        content: "Navigation";
        position: absolute;
        top: 28px;
        left: 20px;
        color: #fff;
        font-size: 18px;
        font-weight: 800;
        letter-spacing: 0.3px;
    }

    .close-menu {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 20px;
        right: 18px;
        width: 42px;
        height: 42px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        font-size: 34px;
        line-height: 1;
        cursor: pointer;
        transition: background 0.25s ease, color 0.25s ease;
    }

    .close-menu:hover,
    .close-menu:focus {
        background: rgba(231, 76, 60, 0.25);
        color: #fff;
        outline: none;
    }

    .nav-links > a,
    .nav-dropdown > .dropdown-trigger {
        width: 100%;
        margin: 0 !important;
        padding: 13px 14px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        gap: 10px;
        color: #fff !important;
        text-decoration: none;
        font-size: 15px !important;
        font-weight: 700;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.10);
    }

    .nav-links > a:hover,
    .nav-links > a.active,
    .nav-dropdown > .dropdown-trigger:hover {
        color: #f1c40f !important;
        background: rgba(241, 196, 15, 0.14);
        border-color: rgba(241, 196, 15, 0.35);
    }

    .nav-links > a[href="#home"]::after {
        content: "Home";
        font-size: 15px;
        font-weight: 700;
        margin-left: 4px;
    }

    .nav-links > a[href="#home"] i {
        margin-left: 0 !important;
        font-size: 14px !important;
    }

    .nav-dropdown {
        width: 100%;
        margin: 0 !important;
    }

    .nav-dropdown-menu {
        display: block !important;
        position: static !important;
        min-width: 0;
        width: 100%;
        margin: 6px 0 2px;
        padding: 10px;
        background: rgba(255, 255, 255, 0.07);
        border: 1px solid rgba(255, 255, 255, 0.10);
        border-radius: 16px;
        box-shadow: none;
    }

    .nav-submenu {
        width: 100%;
        margin: 0 0 8px;
    }

    .nav-submenu:last-child {
        margin-bottom: 0;
    }

    .nav-submenu-trigger {
        width: 100%;
        margin: 0 !important;
        padding: 11px 12px !important;
        border-radius: 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #ffffff !important;
        background: rgba(15, 23, 42, 0.18);
        font-size: 14px;
        font-weight: 700;
    }

    .nav-submenu-trigger:hover {
        background: rgba(241, 196, 15, 0.14);
        color: #f1c40f !important;
    }

    .nav-submenu-panel {
        display: block !important;
        position: static !important;
        min-width: 0;
        width: 100%;
        max-height: none;
        margin: 8px 0 0 !important;
        padding: 10px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.10);
        border-radius: 14px;
        box-shadow: none;
        overflow: visible;
    }

    .nav-submenu-panel h4 {
        margin: 0 0 8px;
        padding: 0 0 8px;
        color: #f1c40f !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
        font-size: 12px;
        letter-spacing: 0.5px;
        text-transform: uppercase;
    }

    .nav-submenu-list {
        display: grid;
        gap: 6px;
    }

    .nav-submenu-list a {
        width: 100%;
        margin: 0 !important;
        padding: 10px 12px !important;
        border-radius: 10px;
        color: rgba(255, 255, 255, 0.92) !important;
        background: rgba(255, 255, 255, 0.07);
        border-left: 3px solid rgba(241, 196, 15, 0.75);
        font-size: 13px !important;
        line-height: 1.35;
    }

    .nav-submenu-list a:hover {
        background: rgba(241, 196, 15, 0.16) !important;
        color: #ffffff !important;
    }

    .notif-floating-btn {
        width: 100%;
        margin: 10px 0 0 !important;
        padding: 12px 14px;
        border: 0;
        border-radius: 14px;
        background: #f1c40f;
        color: #1f2d3d;
        font-weight: 800;
        cursor: pointer;
    }

    .user-account {
        margin-left: 0;
    }

    .user-display {
        padding: 5px 8px;
    }

    .user-dropdown {
        position: fixed;
        top: 76px;
        right: 12px;
        z-index: 1005;
    }
}

@media screen and (max-width: 600px) {
    .navbar {
        padding: 8px 12px;
        min-height: 70px;
    }

    .logo img {
        width: 48px;
        height: 48px;
    }

    .title-text {
        font-size: 14px;
    }

    .title-text .sub-text {
        font-size: 11px;
    }

    .hamburger {
        width: 40px;
        height: 40px;
        font-size: 25px;
    }

    .nav-links {
        width: min(318px, 90vw);
        padding: 82px 14px 22px !important;
    }

    .nav-links::before {
        top: 25px;
        left: 16px;
        font-size: 17px;
    }

    .close-menu {
        top: 18px;
        right: 14px;
        width: 40px;
        height: 40px;
    }
}

.post-view-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.post-view-modal.active {
    display: flex;
}

.post-view-card {
    width: min(900px, 96vw);
    max-height: 90vh;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    position: relative;
    animation: postModalIn 0.25s ease;
}

@keyframes postModalIn {
    from {
        transform: translateY(20px) scale(0.98);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.post-view-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #334155;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.post-view-close:hover {
    background: #fee2e2;
    color: #dc2626;
}

.post-view-header {
    padding: 28px 32px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.post-view-type {
    display: inline-block;
    margin-bottom: 10px;
    background: #1e3a8a;
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-view-header h2 {
    margin: 0 42px 12px 0;
    color: #0f172a;
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1.2;
}

.post-view-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #475569;
    font-size: 14px;
}

.post-view-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-view-body {
    padding: 28px 32px;
    overflow-y: auto;
    max-height: 52vh;
}

.post-view-body p {
    margin: 0;
    color: #1e293b;
    line-height: 1.8;
    font-size: 16px;
    white-space: pre-line;
}

.post-view-footer {
    padding: 16px 32px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
}

.post-view-footer button {
    border: none;
    background: #1e3a8a;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

body.post-modal-open {
    overflow: hidden;
}

/* Mobile view */
@media (max-width: 640px) {
    .post-view-modal {
        padding: 16px;
        align-items: center;
        justify-content: center;
    }

    .post-view-card {
        width: min(94vw, 560px);
        max-height: 86vh;
        border-radius: 18px;
    }

    .post-view-header {
        padding: 24px 20px 16px;
    }

    .post-view-header h2 {
        margin-right: 36px;
        font-size: 22px;
    }

    .post-view-meta {
        flex-direction: column;
        gap: 7px;
        font-size: 13px;
    }

    .post-view-body {
        padding: 20px;
        max-height: 56vh;
    }

    .post-view-body p {
        font-size: 15px;
        line-height: 1.7;
    }

    .post-view-footer {
        padding: 14px 20px;
    }

    .post-view-footer button {
        width: 100%;
    }
}

/* Dark mode support */
body.dark-mode .post-view-card {
    background: #111827;
}

body.dark-mode .post-view-header {
    background: linear-gradient(135deg, #172554, #111827);
    border-bottom-color: #374151;
}

body.dark-mode .post-view-header h2,
body.dark-mode .post-view-body p {
    color: #f9fafb;
}

body.dark-mode .post-view-meta {
    color: #d1d5db;
}

body.dark-mode .post-view-footer {
    background: #1f2937;
    border-top-color: #374151;
}

body.dark-mode .post-view-close {
    background: #374151;
    color: #ffffff;
}


/* ==========================================================================
   ANNOUNCEMENT / ADVISORY / NEWS POST MODAL
   ========================================================================== */
.sidebar-post,
.read-more-btn {
    cursor: pointer;
}

.post-view-modal {
    z-index: 10050;
    background-color: rgba(6, 15, 30, 0.82);
    backdrop-filter: blur(3px);
}

.post-view-modal.active {
    display: flex;
}

.post-modal-content {
    max-width: 920px;
    width: min(92vw, 920px);
    text-align: left;
    border-radius: 18px;
    padding: 34px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    animation: postModalPop 0.22s ease;
}

.post-modal-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 999px;
    padding: 7px 14px;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-modal-content h3 {
    color: #1f2937;
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1.2;
    margin: 0 42px 12px 0;
}

.post-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
    font-size: 14px;
}

.post-modal-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.post-modal-meta i {
    color: #c0392b;
}

.post-modal-body {
    color: #374151;
    font-size: 16px;
    line-height: 1.75;
    white-space: pre-line;
    text-align: left;
    margin: 0;
}

.post-view-modal .close-news {
    top: 18px;
    right: 22px;
    color: #6b7280;
    line-height: 1;
    z-index: 2;
}

.post-view-modal .close-news:hover {
    color: #c0392b;
}

body.post-modal-open {
    overflow: hidden;
}

@keyframes postModalPop {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .post-view-modal {
        align-items: center;
        justify-content: center;
        padding: 16px;
    }

    .post-modal-content {
        width: min(94vw, 560px);
        max-width: 560px;
        max-height: 86vh;
        border-radius: 20px;
        padding: 28px 20px 24px;
    }

    .post-modal-content h3 {
        margin-right: 38px;
        font-size: 22px;
    }

    .post-modal-meta {
        flex-direction: column;
        gap: 8px;
        font-size: 13px;
    }

    .post-modal-body {
        font-size: 15px;
        line-height: 1.7;
    }
}

