/* -------------------- Background Styling -------------------- */
/* Shared styles for fullscreen background */
.root-page, .main-page {
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Light mode backgrounds - Commented out to defer to JavaScript background switchers */
/*
.root-page {
    background-image: url('./images/Cebu_Capitol_Compound.png');
}

.main-page {
    background-image: url('images/Cebu_Capitol_Compound.png');
}
*/

/* -------------------- Dark Mode Support -------------------- */
/* Commented out to defer to JavaScript background switchers */
/*
@media (prefers-color-scheme: dark) {
    .root-page {
        background-image: url('./images/Cebu_Capitol_Compound_Night.png');
    }
    
    .main-page {
        background-image: url('images/Cebu_Capitol_Compound_Night.png');
    }
}
*/

/* -------------------- Reset & Fonts -------------------- */
/* Reset default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font Face Declarations */
@font-face {
    font-family: 'EuphoriaScript';
    src: url('assets/fonts/EuphoriaScript-Regular.ttf') format('truetype'),
         url('assets/fonts/EuphoriaScript-Regular.woff2') format('woff2'),
         url('assets/fonts/EuphoriaScript-Regular.woff') format('woff');
    font-display: swap;
}

/* Global class for Pangatungdanan styling */
.pangatungdanan {
  font-family: 'EuphoriaScript', cursive;
}

@font-face {
    font-family: 'Whitehella';
    src: url('assets/fonts/Whitehella.ttf') format('opentype');
    font-display: swap;
}

/* -------------------- Base Styles -------------------- */
body {
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 80px; /* Adjusted for fixed header */
    display: block;
    padding-bottom: 0;
}

/* Default background for all pages if no specific class is applied */
body:not(.root-page):not(.main-page) {
    background-color: #f5f5f5;
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Override container styles for pages with navigation */
body:not(.landing-page) .container {
    display: block;
    padding-top: 20px;
}

/* -------------------- Logo & Images -------------------- */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 2rem;
}

img {
    max-width: 20%;
    height: auto;
}

.coming-soon {
    font-family: "Whitehella", cursive;
    font-size: 2.5rem;
    color: #333;
    margin-top: 1rem;
}

/* -------------------- Responsive Adjustments -------------------- */
@media screen and (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .coming-soon {
        font-size: 2rem;
    }
    
    .image-row {
        gap: 15px;
    }
    
    .image-row img {
        max-width: 120px;
    }
}

@media screen and (max-width: 480px) {
    .coming-soon {
        font-size: 1.5rem;
    }
    
    .logo-container {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 1rem;
    }
    
    img {
        max-width: 30%;
    }
    
    .image-row {
        gap: 10px;
    }
    
    .image-row img {
        max-width: 100px;
    }
}

/* -------------------- Navigation Styles -------------------- */
/* Main header & navigation container */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* Navigation bar */
.main-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo inside navigation */
.nav-logo img {
    max-width: 90px;
    height: auto;
    margin-right: 20px;
}

/* Navigation menu container */
.nav-menu {
    flex-grow: 1;
}

/* Main menu styles */
.main-menu {
    display: flex;
    list-style: none;
    justify-content: center;
    white-space: nowrap; /* Prevent text wrapping */
}

.main-menu > li {
    position: relative;
    margin: 0 5px;
    white-space: nowrap; /* Prevent text wrapping */
}

.main-menu > li > a {
    display: block;
    padding: 4px 4px;
    color: #333;
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    transition: color 0.3s ease;
    white-space: nowrap; /* Prevent text wrapping */
}

.main-menu > li > a:hover {
    color: #0056b3;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    list-style: none;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Nested Dropdown for multi-level menus */
.has-dropdown ul.dropdown-menu li.has-dropdown:hover > ul.dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0.05s;
    z-index: 110;
}

.dropdown-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: #0056b3;
    padding-left: 18px;
}

/* Nested dropdown menu styling for LGU's */
.main-menu li.has-dropdown ul.dropdown-menu li.has-dropdown ul.dropdown-menu {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    border-left: 3px solid #0056b3;
    z-index: 110;
}

/* Custom scrollbar for nested dropdowns */
.main-menu li.has-dropdown ul.dropdown-menu li.has-dropdown ul.dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.main-menu li.has-dropdown ul.dropdown-menu li.has-dropdown ul.dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.main-menu li.has-dropdown ul.dropdown-menu li.has-dropdown ul.dropdown-menu::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.main-menu li.has-dropdown ul.dropdown-menu li.has-dropdown ul.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Custom font for PANGATUNGDANAN menu item */
a[href="index.html?p=1853.html"] {
    font-family: 'EuphoriaScript', cursive;
    font-size: 20px !important;
    font-weight: bold !important;
    line-height: 1.2;
    padding: 5px 0;
    display: inline-block;
    transition: color 0.3s ease;
}

/* More specific selectors for PANGATUNGDANAN in navigation menus */
.main-navigation a[href="index.html?p=1853.html"], 
.footer-navigation a[href="index.html?p=1853.html"] {
    font-size: 20px !important;
    font-weight: bold !important; 
}

/* Responsive adjustment for PANGATUNGDANAN menu item */
@media screen and (max-width: 768px) {
    a[href="index.html?p=1853.html"] {
        font-size: 48px !important;
    }
}

/* Dropdown indicator styles */
.main-menu > li.has-dropdown > a::after {
    content: "\25BC";
    display: inline-block;
    margin-left: 5px;
    font-size: 9px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    vertical-align: middle;
    opacity: 0.7;
}

.main-menu > li.has-dropdown > a .dropdown-indicator {
    display: inline-block;
    margin-left: 5px;
    font-size: 12px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.has-dropdown:hover > a .dropdown-indicator,
.has-dropdown:hover > a::after {
    transform: rotate(180deg);
    opacity: 1;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    transition: all 0.3s ease;
}

/* -------------------- Responsive Navigation -------------------- */
@media screen and (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    
    .main-navigation {
        padding: 10px;
    }
    
    .nav-logo img {
        max-width: 80px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        position: absolute;
        top: 15px;
        right: 20px;
        z-index: 1002;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: #fff;
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        z-index: 1001;
    }
    
    .nav-menu.active {
        height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .main-menu {
        flex-direction: column;
        padding: 20px;
        justify-content: center;
        align-items: center;
    }
    
    .main-menu > li {
        margin: 0;
        /* border-bottom: 1px solid #f0f0f0; */
    }
    
    .dropdown-menu li {
        border-bottom: none;
    }
    
    .main-menu > li > a {
        padding: 15px 0;
    }
    
    /* Center main menu links on mobile */
    .main-navigation .main-menu {
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    
    /* Center dropdown containers and items on mobile */
    .main-navigation .dropdown-menu {
        text-align: center;
        width: 100%;
    }
    
    /* Reset left padding and make links full width */
    .main-navigation .dropdown-menu a {
        display: block;
        width: 100%;
        padding-left: 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.19, 1, 0.22, 1);
        border-radius: 0;
    }
    
    .has-dropdown.open .dropdown-menu {
        max-height: 500px;
        overflow-y: auto;
        /* Removed border-left and background color to eliminate unnecessary lines */
        background-color: transparent;
    }
    
    .has-dropdown.open > a .dropdown-indicator,
    .has-dropdown.open > a::after {
        transform: rotate(180deg);
        opacity: 1;
        color: #0056b3;
    }
    
    .dropdown-menu a {
        padding-left: 30px;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* -------------------- Image Row Styles -------------------- */
.image-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 0 20px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.image-row img {
    max-width: 2000px;
    height: auto;
    object-fit: contain;
}

/* Base image dimensions for large screens */
@media screen and (min-width: 1024px) {
    .image-row img {
         width: 250px;
         max-width: 250px;
    }
}

/* -------------------- Footer Styles -------------------- */
.jupiterx-footer {
    background-color: #fff;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-top: 30px;
}

.jupiterx-footer-widgets {
    padding: 20px 0;
}

.jupiterx-footer-menu {
    border-top: 1px solid #f0f0f0;
    padding: 20px 0;
}

.footer-navigation {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-navigation .main-menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    justify-content: center;
}

.footer-navigation .main-menu > li {
    position: relative;
    margin: 0 10px;
}

.footer-navigation .main-menu > li > a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-navigation .main-menu > li > a:hover {
    color: #0056b3;
}

/* Footer Dropdown Menu Styles - Disabled */
.footer-navigation .dropdown-menu {
    display: none !important;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    min-width: 200px;
    background-color: #fff;
    z-index: 100;
    list-style: none;
}

.footer-navigation .has-dropdown:hover .dropdown-menu {
    display: none !important;
}

.footer-navigation .dropdown-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.footer-navigation .dropdown-menu li:last-child {
    border-bottom: none;
}

.footer-navigation .dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.footer-navigation .dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: #0056b3;
}

/* Footer Dropdown indicator styles - Disabled */
.footer-navigation .main-menu > li.has-dropdown > a::after {
    display: none;
}

.footer-navigation .has-dropdown:hover > a::after {
    transform: none;
}

.jupiterx-subfooter {
    background-color: #f8f8f8;
    padding: 15px 0;
    text-align: center;
    border-top: 1px solid #eaeaea;
}
.jupiterx-subfooter-copyright {
    font-size: 12px;
    color: #666;
}
.jupiterx-footer, .jupiterx-subfooter {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Responsive Footer */
@media screen and (max-width: 768px) {
    .footer-navigation .main-menu {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-navigation .main-menu > li {
        margin: 5px 0;
        width: 100%;
        text-align: center;
    }
    
    .footer-navigation .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        width: 100%;
    }
    
    .footer-navigation .has-dropdown.open .dropdown-menu {
        max-height: 500px;
        overflow-y: auto;
    }
    
    .footer-navigation .dropdown-menu a {
        padding-left: 30px;
    }
    
    .jupiterx-footer-widgets .row {
        flex-direction: column;
    }
    
    .jupiterx-footer-widgets .col-md-3 {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* 
 * NEW RULES: Top Main Menu Grid Layout & Footer Menu Grid Layout
 * These rules convert the existing flex layout into a grid layout with fixed columns on desktop screens (min-width: 769px).
 * The top main menu will have 7 columns and the footer menu 5 columns.
 */
@media screen and (min-width: 769px) {
    /* Top Main Menu: Two rows with 7 items per row (if more items are added, the grid will enforce 7 columns) */
    .main-navigation .nav-menu .main-menu {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 10px;
        justify-items: center;
        justify-content: center;
    }

    /* Footer Menu: Removed grid layout to use flex layout instead */
}

/* -------------------- Main Page Slider Styles -------------------- */
.main-slider-container {
    width: 100vw;
    max-width: none;
    margin: 0;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
}

.main-slider {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
    aspect-ratio: 16 / 9;
    align-items: center;
}

.main-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.main-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    max-width: none;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.5);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    transition: background 0.3s;
}

.slider-nav:hover {
    background: rgba(0,0,0,0.8);
}

.prev-slide {
    left: 20px;
}

.next-slide {
    right: 20px;
}

.slider-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.pagination-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.pagination-dot.active {
    background: white;
}

.slider-note {
    text-align: center;
    margin-top: 10px;
    font-style: italic;
    color: #666;
    font-size: 14px;
}

/* Responsive Slider Adjustments */
@media screen and (max-width: 992px) {
    /* Aspect ratio handles responsive sizing */
}

@media screen and (max-width: 768px) {
    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media screen and (max-width: 480px) {
    .slider-nav {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .pagination-dot {
        width: 8px;
        height: 8px;
    }
}

@media screen and (min-width: 769px) {
    .main-slider {
        /* Adjust aspect ratio to reduce height by 10% for large displays */
        aspect-ratio: 16 / 10;
    }
}

/* Default for very small screens (smartphones) */
.main-slider {
    aspect-ratio: 16 / 9;
}

/* Tablets (Portrait) */
@media screen and (min-width: 481px) {
    .main-slider {
        aspect-ratio: 16 / 10;
    }
}

/* Tablets (Landscape) and Small Laptops */
@media screen and (min-width: 769px) {
    .main-slider {
        aspect-ratio: 16 / 10;
    }
}

/* Large Laptops and Small Desktops */
@media screen and (min-width: 1024px) {
    .main-slider {
        aspect-ratio: 16 / 9;
    }
}

/* Large Desktops */
@media screen and (min-width: 1440px) {
    .main-slider {
        aspect-ratio: 21 / 7.8;
    }
}

/* Ultra-Wide Screens (21:9 or wider) */
@media screen and (min-width: 1920px) {
    .main-slider {
        aspect-ratio: 21 / 6.9;
    }
}

/* 4K and Very Large Screens */
@media screen and (min-width: 2560px) {
    .main-slider {
        aspect-ratio: 32 / 7.7;
    }
}

/* Ultra-Wide 5K+ Screens */
@media screen and (min-width: 3840px) {
    .main-slider {
        aspect-ratio: 32 / 6.7;
    }
}

/* Override for Pangatungdanan link to reset disabled state and apply custom styling */
.main-navigation a.pangatungdanan,
.footer-navigation a.pangatungdanan {
  color: #333 !important;             /* Reset to default link color */
  opacity: 1 !important;              /* Fully opaque */
  pointer-events: auto !important;    /* Re-enable clicking */
  cursor: pointer !important;         /* Default pointer */
  font-family: 'EuphoriaScript', cursive !important; /* Custom script font */
  font-size: 20px !important;         /* Match existing sizing */
  font-weight: bold !important;       /* Consistent weight */
}

/* -------------------- Organizational Chart Hover Effects -------------------- */
.orgchart-item {
    display: inline-block;
    width: 150px;
    height: 150px;
    overflow: hidden;
    border-radius: 100px;
    border: 2px solid #333;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.orgchart-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.orgchart-item:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* -------------------- LGU's Menu Grid Styles -------------------- */
/*
 * The LGU menu should be organized as follows:
 * - First column: 11 items (with "Cebu" as the first item)
 * - Columns 2-5: 10 items each
 * This requires manual adjustment in the HTML markup
 */
.lgu-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.lgu-grid li {
    list-style: none;
    padding: 5px 0;
}

.lgu-grid li a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 14px;
    display: block;
}

.lgu-grid li a:hover {
    color: #0056b3;
}

@media screen and (max-width: 992px) {
    .lgu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .lgu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .lgu-grid {
        grid-template-columns: 1fr;
    }
}

/* Attached Agencies Styles */
.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

.agencies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
}

.agency {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.agency img {
    width: var(--agency-img-width, 5000px);
    margin-bottom: var(--agency-img-margin, 10px);
}

/* -------------------- Organizational Chart Image Styles -------------------- */
/* 
 * This class provides consistent sizing for organizational chart images
 * Apply this class to all <img> tags within the organizational chart section
 * to ensure uniform dimensions and appearance across the chart
 */

 .org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.org-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.node-label {
    font-weight: bold;
    text-align: center;
}

.org-row {
    display: flex;
    justify-content: space-around;
    width: 100%;
}

.org-chart-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Transition for hover effect */
}

/* Hover effect */
.org-chart-img:hover {
    transform: scale(1.1); /* Slight zoom-in effect */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Add subtle shadow effect */
}

.org-chart-img img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.adjust-left {
    object-position: 60% center; /* Try 65% or more if still hiding! */
}

/* Mobile Responsive Organizational Chart */
@media screen and (max-width: 768px) {
    /* Stack chart rows vertically */
    .org-row {
      flex-direction: column;
      align-items: center;
    }
    /* Add spacing between nodes */
    .org-row .org-node {
      margin-bottom: 30px;
    }
    /* Reduce image size for mobile */
    .org-chart-img {
      width: 120px;
      height: 120px;
    }
    /* Smaller labels for readability */
    .node-label {
      font-size: 14px;
    }
    /* Make "learn more" buttons full width and add top margin */
    .org-node .container.grid-layout,
    .learn-more-container {
      width: auto;
      padding: 0;
      margin-top: 10px;
    }
}

/* -------------------- MAP IMAGE -------------------- */
/* 
 * This class provides consistent sizing for organizational chart images
 * Apply this class to all <img> tags within the organizational chart section
 * to ensure uniform dimensions and appearance across the chart
 */

  .map-container {
    position: relative;
    width: 7000px;
  }

  .map-container-image {
    width: 100%;
    height: auto;
    display: block;
  }

  .map-container-label {
    position: absolute;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ccc;
    padding: 8px;
    border-radius: 6px;
    font-family: sans-serif;
    font-size: 18px;
    z-index: 10;
  }

/* Long Namespaced CSS Class to Hide the Map Container-  Delete this to show the image */
.long-namespace-to-hide-map .map-container {
    display: none !important;
}

.container.grid-layout .text-content {
    text-align: center;
}

.elementor-button {
    display: inline-block; /* already default in most cases */
    margin: 0 auto;
}
.learn-more-container {
    text-align: center;
}

/* -------------------- Footer Menu Flex Layout for Desktop -------------------- */
@media screen and (min-width: 769px) {
    /* Footer Menu: Flex layout with proper centering for wrapped rows */
    .footer-navigation .main-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 5px;
    }

    .footer-navigation .main-menu > li {
        flex: 0 1 auto;
        margin: 0 10px;
    }
}

/* -------------------- Mobile Padding Removal Overrides -------------------- */
@media screen and (max-width: 768px) {
    /* Remove left/right padding from all containers */
    .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    /* Remove left/right padding specifically from grid-layout containers */
    .container.grid-layout {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    /* Eliminate image-row horizontal padding */
    .image-row {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    /* Adjust main navigation padding for mobile */
    .main-navigation {
        padding: 10px 5px !important;
    }
    /* Reposition mobile menu toggle for reduced padding */
    .mobile-menu-toggle {
        right: 5px !important;
    }
}













/*  FOOTER REPUBLIC OF THE PHILIPPINES   */
/*  FOOTER REPUBLIC OF THE PHILIPPINES   */
/*  FOOTER REPUBLIC OF THE PHILIPPINES   */
/*  FOOTER REPUBLIC OF THE PHILIPPINES   */
/* Tailwind-like utility styles */
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-300 { background-color: #d1d5db; }
.bg-gray-400 { background-color: #9ca3af; }
.bg-gray-500 { background-color: #6b7280; }
.bg-gray-800 { background-color: #1f2937; }

.text-gray-700 { color: #374151; }
.text-gray-600 { color: #4b5563; }
.text-gray-100 { color: #f3f4f6; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }

.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-light { font-weight: 300; }

.uppercase { text-transform: uppercase; }

.hover\:underline:hover { text-decoration: underline; }
.hover\:scale-110:hover { transform: scale(1.10); }
.hover\:font-semibold:hover { font-weight: 600; }

.transition-all { transition: all 0.3s ease-in-out; }
.rounded { border-radius: 0.25rem; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }

.w-full { width: 100%; }
.h-12 { height: 3rem; }
.h-32 { height: 8rem; }
.w-32 { width: 8rem; }

.text-center { text-align: center; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }

.gap-6 { gap: 1.5rem; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }

.max-w-screen-lg { max-width: 1024px; margin: 0 auto; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }
.md\:grid-cols-2 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

.relative { position: relative; }
.absolute { position: absolute; }
.bottom-4 { bottom: 1rem; }
.left-6 { left: 1.5rem; }
.text-\[0\.5rem\] { font-size: 0.5rem; }

/* Custom hover effect for links (no underline) */
.gov-link {
  font-size: 0.75rem;
  color: #000000;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}
.gov-link:hover {
  font-weight: 600;
  transform: scale(1.05);
}









/* TIME FOOTER */

    /* PST Clock Styling */
    .pst-container {
      margin-top: 12px;
      background-color: #6b7280;
      padding: 12px 16px;
      border-radius: 6px;
      display: inline-block;
      font-family: Arial, sans-serif;
    }

    .pst-label {
      font-weight: 600;
      font-size: 0.85rem;
      text-align: center;
      margin-bottom: 6px;
    }

    .pst-clock {
      display: flex;
      justify-content: center;
    }

    .pst-iframe {
      border: none;
      filter: drop-shadow(0 0 1px rgba(0,0,0,0.2));
    }

    /* Link styling for government links */
    .gov-link {
      font-size: 0.75rem;
      color: #ffffff;
      text-decoration: none;
      transition: all 0.2s ease-in-out;
    }

    .gov-link:hover {
      font-weight: 600;
      transform: scale(1.05);
    }






    /* HEADER TIME AND WEATHER WIDGET */
/* HEADER TIME AND WEATHER WIDGET */
.overlay-widget {
  position: absolute;
  top: 10px;
  right: 20px;
  z-index: 2001;
  text-align: right;
  font-size: 1rem;
  background-color: transparent; /* ✅ FULLY transparent */
  color: #000000; /* ✅ Black font */
  padding: 8px 12px;
  border-radius: 10px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: opacity 0.3s ease;
}

.overlay-text {
  white-space: nowrap;
  margin-bottom: 2px;
}

/* Hide overlay on screens smaller than tablets */
@media (max-width: 639px) {
  .overlay-widget {
    display: none;
  }
}







/* AnyFlip Widget */
/* AnyFlip Widget */
/* AnyFlip Widget */

  .responsive-anyflip-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 42%; /* Base ratio for desktop: ~1500x622 */
    max-width: 100%;
    overflow: hidden;
    text-align: center;
  }

  .responsive-anyflip-wrapper iframe {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    border: none;
  }

  /* Tablet range: increase height as width drops */
  @media (max-width: 1024px) {
    .responsive-anyflip-wrapper {
      padding-bottom: 46%; /* +4% height */
    }
  }

  @media (max-width: 900px) {
    .responsive-anyflip-wrapper {
      padding-bottom: 50%; /* +8% height */
    }
  }

  @media (max-width: 768px) {
    .responsive-anyflip-wrapper {
      padding-bottom: 56%; /* +14% height */
    }
  }

  @media (max-width: 640px) {
    .responsive-anyflip-wrapper {
      padding-bottom: 62%; /* +20% height */
    }
  }

  @media (max-width: 480px) {
    .responsive-anyflip-wrapper {
      padding-bottom: 70%; /* +28% height */
    }
  }