/* ================= GLOBAL ================= */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family:'Poppins', sans-serif;
    background: #e4e4e4;
}

/* ================= NAVBAR ================= */
.navbar {
    height: 100px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.navbar-brand img {
    height: 80px !important;
    width: auto !important;
    margin-right: 15px;
    margin-left: -60px;
}

.navbar-brand.brand-logo span {
    color: #001f3f;
    font-weight: 700;
    font-size: 25px;
}

.navbar-nav .nav-link {
    color: #001f3f;
    font-size: 15px;
    font-weight: 700;
}

.navbar-nav .nav-link.active {
    color: #001f3f !important;
    border-bottom: 2px solid #000;
}

.navbar-nav .nav-link:hover {
    color: #001f3f;
}

.navbar .dropdown-menu,
.navbar .dropdown-item {
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
}

/* Hamburger button - tatlong guhit */
.hamburger {
  display: none;          /* nakatago sa desktop */
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1030;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background: #001f3f;
  border-radius: 10px;
  transition: all 0.2s ease;
}

/* Sa mobile, ipakita ang hamburger */
@media (max-width: 991.98px) {
  .hamburger {
    display: flex;
  }
}

.coverage-hero {
    background:
        linear-gradient(rgba(1,13,68,0.85), rgba(36,85,158,0.85)),
        url("/static/background.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 100px 20px;
    text-align: center;
    margin-bottom: 50px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
    position: relative;
}

.coverage-hero .container {
    max-width: 900px;
    margin: 0 auto;
}

.coverage-hero h2 {
    font-weight: 800;
    font-size: clamp(2rem, 6vw, 38px);
    color: #fff;
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateX(-30px);
    animation: heroFadeLeft 0.8s ease forwards;
    animation-delay: 0.3s;
}

.coverage-hero p {
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif; 
    max-width: 600px;
    margin: 0 auto 1rem auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    display: block; /* Changed from inline-block to block */
    width: fit-content; /* Keeps the background only around the text */
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.8s ease-out;
}

/* Scroll Indicator */
.scroll-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: fit-content;
    margin: 0.5rem auto 0 auto;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    animation: heroFadeLeft 0.8s ease forwards;
    animation-delay: 0.9s;
}

.scroll-indicator span {
    font-size: 0.8rem;
    color: white;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.scroll-indicator svg {
    transition: transform 0.3s ease;
}

.scroll-indicator:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(3px);
}

.scroll-indicator:hover svg {
    transform: translateY(3px);
}

@keyframes heroFadeLeft {
    from { 
        opacity: 0; 
        transform: translateX(-30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* Responsive */
@media (max-width: 768px) {
    .coverage-hero {
        padding: 70px 20px;
    }
    
    .coverage-hero h2 {
        font-size: 1.8rem;
    }
    
    .coverage-hero p {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
    }
    
    .scroll-indicator {
        padding: 0.5rem 1rem;
    }
    
    .scroll-indicator span {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .coverage-hero {
        padding: 60px 15px;
    }
    
    .coverage-hero h2 {
        font-size: 1.5rem;
    }
    
    .coverage-hero p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .scroll-indicator {
        padding: 0.4rem 0.9rem;
    }
    
    .scroll-indicator span {
        font-size: 0.65rem;
    }
}

/* ================= MAP SECTION ================= */
.coverage-map {
    padding: 60px 0 80px 0;
    position: relative;
    overflow: hidden;
}

/* Decorative Background Element */
.coverage-map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: radial-gradient(circle at 0% 0%, rgba(0,31,63,0.02) 0%, transparent 70%);
    pointer-events: none;
}

.coverage-map .container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px; /* Increased padding on sides */
}

/* Map Header */
.map-header {
    text-align: center;
    margin-bottom: 40px;
}

.map-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(0,31,63,0.08), rgba(3,123,228,0.08));
    border-radius: 50%;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out;
}

.map-icon-wrapper svg {
    stroke: #037be4;
    transition: transform 0.3s ease;
}

.map-icon-wrapper:hover svg {
    transform: scale(1.05);
}

/* Map Title */
.map-title {
    font-size: clamp(1.5rem, 4vw, 28px);
    font-weight: 700;
    color: #001f3f;
    margin-bottom: 15px;
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
    letter-spacing: -0.3px;
    animation: fadeInUp 0.7s ease-out;
}

/* Title Underline */
.map-title-underline {
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, #001f3f, #037be4, #001f3f);
    margin: 0 auto;
    border-radius: 3px;
    animation: expandWidth 0.8s ease-out;
}

@keyframes expandWidth {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 70px;
        opacity: 1;
    }
}

/* Map Container */
.map-wrapper {
    position: relative;
}

#map {
    height: 550px;
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    opacity: 0;
    transform: translateX(-30px);
    animation: mapFadeLeft 0.8s ease forwards;
    animation-delay: 0.5s;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 31, 63, 0.08);
}

#map:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
}

.map-action-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: none;
    border-radius: 999px;
    background: #ffffff;
    color: #001f3f;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.map-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.map-action-btn i {
    color: #037be4;
}

@keyframes mapFadeLeft {
    from { 
        opacity: 0; 
        transform: translateX(-30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

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

/* Responsive Design */
@media (max-width: 992px) {
    .coverage-map {
        padding: 50px 0 70px 0;
    }
    
    .coverage-map .container {
        padding: 0 25px;
    }
    
    #map {
        height: 450px;
        border-radius: 20px;
    }
    
    .map-icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .map-icon-wrapper svg {
        width: 28px;
        height: 28px;
    }
    
    .map-title {
        font-size: 1.8rem;
    }
    
    .map-title-underline {
        width: 60px;
        height: 2px;
    }
}

@media (max-width: 768px) {
    .coverage-map {
        padding: 40px 0 60px 0;
    }
    
    .coverage-map .container {
        padding: 0 20px;
    }
    
    #map {
        height: 380px;
        border-radius: 16px;
    }
    
    .map-icon-wrapper {
        width: 55px;
        height: 55px;
        margin-bottom: 15px;
    }
    
    .map-icon-wrapper svg {
        width: 26px;
        height: 26px;
    }
    
    .map-title {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .map-title-underline {
        width: 50px;
    }
}

@media (max-width: 480px) {
    .coverage-map {
        padding: 30px 0 50px 0;
    }
    
    .coverage-map .container {
        padding: 0 15px;
    }
    
    #map {
        height: 320px;
        border-radius: 14px;
    }
    
    .map-icon-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .map-icon-wrapper svg {
        width: 24px;
        height: 24px;
    }
    
    .map-title {
        font-size: 1.3rem;
    }
    
    .map-title-underline {
        width: 45px;
        height: 2px;
    }
}

/* Optional: Add loading state for map */
#map.loading {
    position: relative;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ================= CUSTOM MARKER STYLES ================= */
.custom-marker {
    background: transparent;
    border: none;
}

.marker-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.marker-pin i {
    transform: rotate(45deg);
    font-size: 13px;
    color: white;
}

.marker-pin:hover {
    transform: rotate(-45deg) scale(1.05);
}

.marker-pulse {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    opacity: 0.4;
    animation: pulse 1.5s infinite;
    top: 0;
    left: 0;
    pointer-events: none;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ================= CUSTOM LEGEND ================= */
.custom-legend {
    background: rgba(255,255,255,0.95);
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    min-width: 160px;
    backdrop-filter: blur(4px);
    font-family: 'IBM Plex Sans', sans-serif;
}

.legend-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-note {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
    font-size: 10px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ================= MAP CONTAINER ================= */
#map {
    height: 450px;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    z-index: 1;
}

/* ================= RESPONSIVE FOR TABLET (768px and below) ================= */
@media (max-width: 768px) {
    .custom-legend {
        padding: 8px 12px;
        min-width: 130px;
    }
    
    .legend-title {
        font-size: 11px;
        margin-bottom: 6px;
        padding-bottom: 4px;
        gap: 6px;
    }
    
    .legend-title i {
        font-size: 10px;
    }
    
    .legend-items {
        gap: 5px;
    }
    
    .legend-item {
        gap: 6px;
        font-size: 10px;
    }
    
    .legend-dot {
        width: 10px;
        height: 10px;
    }
    
    .legend-note {
        margin-top: 6px;
        padding-top: 5px;
        font-size: 8px;
        gap: 4px;
    }
    
    .legend-note i {
        font-size: 8px;
    }
    
    #map {
        height: 350px;
        border-radius: 12px;
    }
}

/* ================= RESPONSIVE FOR MOBILE (576px and below) ================= */
@media (max-width: 576px) {
    .custom-legend {
        padding: 6px 10px;
        min-width: 110px;
        border-radius: 8px;
    }
    
    .legend-title {
        font-size: 10px;
        margin-bottom: 5px;
        padding-bottom: 3px;
        gap: 5px;
    }
    
    .legend-title i {
        font-size: 9px;
    }
    
    .legend-items {
        gap: 4px;
    }
    
    .legend-item {
        gap: 5px;
        font-size: 9px;
    }
    
    .legend-dot {
        width: 8px;
        height: 8px;
    }
    
    .legend-note {
        margin-top: 5px;
        padding-top: 4px;
        font-size: 7px;
        gap: 3px;
    }
    
    .legend-note i {
        font-size: 7px;
    }
    
    #map {
        height: 280px;
        border-radius: 10px;
    }
}

/* ================= RESPONSIVE FOR SMALL MOBILE (480px and below) ================= */
@media (max-width: 480px) {
    .custom-legend {
        padding: 5px 8px;
        min-width: 95px;
        border-radius: 6px;
    }
    
    .legend-title {
        font-size: 9px;
        margin-bottom: 4px;
        padding-bottom: 3px;
        gap: 4px;
    }
    
    .legend-title i {
        font-size: 8px;
    }
    
    .legend-items {
        gap: 3px;
    }
    
    .legend-item {
        gap: 4px;
        font-size: 8px;
    }
    
    .legend-dot {
        width: 7px;
        height: 7px;
    }
    
    .legend-note {
        margin-top: 4px;
        padding-top: 3px;
        font-size: 6px;
        gap: 3px;
    }
    
    .legend-note i {
        font-size: 6px;
    }
    
    #map {
        height: 250px;
        border-radius: 8px;
    }
}

/* ================= LANDSCAPE MODE FOR MOBILE ================= */
@media (max-width: 768px) and (orientation: landscape) {
    #map {
        height: 300px;
    }
    
    .custom-legend {
        padding: 6px 10px;
        min-width: 120px;
    }
    
    .legend-item {
        font-size: 9px;
    }
}

@media (max-width: 768px) {
    #map {
        height: 500px !important;
    }
}

@media (max-width: 576px) {
    #map {
        height: 470px !important;
    }
}

@media (max-width: 480px) {
    #map {
        height: 430px !important;
    }
}

/* ================= TOUCH DEVICES - LARGER TAP TARGETS ================= */
@media (hover: none) and (max-width: 768px) {
    .legend-item {
        padding: 2px 0;
    }
    
    .legend-dot {
        width: 10px;
        height: 10px;
    }
}

/* ================= REDUCED MOTION PREFERENCE ================= */
@media (prefers-reduced-motion: reduce) {
    .marker-pulse {
        animation: none;
    }
}

/* ================= LEAFLET POPUP - RESPONSIVE ================= */

/* Base styles para sa lahat ng device */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.leaflet-popup-tip {
    background: white;
}

.leaflet-popup-content {
    margin: 0;
    min-width: 200px;
    max-width: 280px;
}

/* Popup inner content styling */
.custom-popup,
.leaflet-popup-content > div {
    font-family: 'IBM Plex Sans', sans-serif;
}

.popup-header {
    font-weight: 700;
    font-size: 14px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    color: #001f3f;
}

.popup-body {
    padding: 12px 15px;
}

.popup-info {
    font-size: 12px;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

.popup-info i {
    width: 18px;
    color: #6c757d;
    font-size: 12px;
    text-align: center;
}

/* ================= RESPONSIVE FOR TABLET (768px and below) ================= */
@media (max-width: 768px) {
    .leaflet-popup-content {
        min-width: 180px;
        max-width: 250px;
    }
    
    .popup-header {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .popup-body {
        padding: 10px 12px;
    }
    
    .popup-info {
        font-size: 11px;
        padding: 5px 0;
        gap: 8px;
    }
    
    .popup-info i {
        width: 16px;
        font-size: 11px;
    }
    
    /* Mas malaking close button para sa touch */
    .leaflet-popup-close-button {
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 18px !important;
        top: 8px;
        right: 8px;
    }
}

/* ================= RESPONSIVE FOR MOBILE (576px and below) ================= */
@media (max-width: 576px) {
    .leaflet-popup-content {
        min-width: 160px;
        max-width: 220px;
    }
    
    .popup-header {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .popup-body {
        padding: 8px 10px;
    }
    
    .popup-info {
        font-size: 10px;
        padding: 4px 0;
        gap: 6px;
    }
    
    .popup-info i {
        width: 14px;
        font-size: 10px;
    }
    
    /* Mas malaki ang tap area para sa mobile */
    .leaflet-popup-close-button {
        width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 20px !important;
        top: 6px;
        right: 6px;
    }
    
    /* Adjust popup tip size */
    .leaflet-popup-tip {
        width: 16px;
        height: 16px;
    }
}

/* ================= RESPONSIVE FOR SMALL MOBILE (480px and below) ================= */
@media (max-width: 480px) {
    .leaflet-popup-content {
        min-width: 140px;
        max-width: 200px;
    }
    
    .popup-header {
        font-size: 11px;
        padding: 6px 8px;
    }
    
    .popup-body {
        padding: 6px 8px;
    }
    
    .popup-info {
        font-size: 9px;
        padding: 3px 0;
        gap: 5px;
    }
    
    .popup-info i {
        width: 12px;
        font-size: 9px;
    }
    
    .leaflet-popup-close-button {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 18px !important;
        top: 4px;
        right: 4px;
    }
}

/* ================= TOUCH DEVICES - BETTER TAP TARGETS ================= */
@media (hover: none) and (max-width: 768px) {
    .leaflet-popup-close-button {
        width: 36px;
        height: 36px;
        line-height: 36px;
        font-size: 22px !important;
    }
    
    .leaflet-popup-content {
        min-width: 170px;
    }
    
    /* Add subtle feedback for touch */
    .leaflet-popup-close-button:active {
        background-color: rgba(0,0,0,0.1);
        border-radius: 50%;
    }
}

/* ================= LANDSCAPE MODE FOR MOBILE ================= */
@media (max-width: 768px) and (orientation: landscape) {
    .leaflet-popup-content {
        max-width: 250px;
    }
    
    .popup-header {
        padding: 6px 10px;
    }
    
    .popup-body {
        padding: 6px 10px;
    }
    
    .popup-info {
        padding: 3px 0;
    }
}

/* ================= POPUP ARROW ADJUSTMENT FOR MOBILE ================= */
@media (max-width: 576px) {
    .leaflet-popup-tip-container {
        margin-top: -2px;
    }
}

/* ================= PREVENT POPUP FROM GOING OFF-SCREEN ================= */
@media (max-width: 768px) {
    .leaflet-popup {
        margin-bottom: 10px !important;
    }
    
    .leaflet-popup-content-wrapper {
        max-width: calc(100vw - 40px);
    }
}

/* ================= REDUCED MOTION ================= */
@media (prefers-reduced-motion: reduce) {
    .leaflet-popup-content-wrapper {
        transition: none;
    }
}

/* ================= ENHANCED COVERAGE NOTE ================= */
.coverage-note {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    max-width: 1000px;
    margin: 30px auto 60px auto;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8faff 0%, #ffffff 100%);
    border: 1px solid rgba(0, 31, 63, 0.1);
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-30px);
    animation: noteFadeLeft 0.8s ease forwards;
    animation-delay: 1.4s;
}

.coverage-note:hover {
    transform: translateY(-3px) translateX(0);
    box-shadow: 0 10px 25px rgba(0, 31, 63, 0.08);
    border-color: rgba(3, 123, 228, 0.2);
}

/* Note Icon */
.note-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(0, 31, 63, 0.08), rgba(3, 123, 228, 0.08));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.coverage-note:hover .note-icon {
    background: linear-gradient(135deg, rgba(0, 31, 63, 0.12), rgba(3, 123, 228, 0.12));
    transform: scale(1.05);
}

.note-icon svg {
    stroke: #037be4;
    width: 22px;
    height: 22px;
}

/* Note Content */
.note-content {
    flex: 1;
}

.note-content p {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
}

/* Note Highlight */
.note-highlight {
    background: linear-gradient(135deg, rgba(3, 123, 228, 0.05), rgba(0, 31, 63, 0.05));
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-top: 0.5rem;

}

.note-highlight strong {
    color: #001f3f;
    font-weight: 700;
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
}

.note-highlight {
    font-size: 0.9rem;
    color: #2d3748;
    line-height: 1.5;
}

@keyframes noteFadeLeft {
    from { 
        opacity: 0; 
        transform: translateX(-30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .coverage-note {
        margin: 25px 20px 50px 20px;
        padding: 1.2rem;
        gap: 0.8rem;
    }
    
    .note-icon {
        width: 42px;
        height: 42px;
    }
    
    .note-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .note-content p {
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
    }
    
    .note-highlight {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .coverage-note {
        margin: 20px 15px 40px 15px;
        padding: 1rem;
        gap: 0.6rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .note-icon {
        width: 38px;
        height: 38px;
        margin-bottom: 0.5rem;
    }
    
    .note-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .note-content p {
        font-size: 0.8rem;
    }
    
    .note-highlight {
        padding: 0.5rem 0.7rem;
        font-size: 0.75rem;
        text-align: left;
    }
}

/* Optional: Add subtle animation for the note highlight */
.note-highlight {
    position: relative;
    overflow: hidden;
}

.note-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.coverage-note:hover .note-highlight::before {
    left: 100%;
}

/* ================= ENHANCED OFFICE SECTION ================= */
.custom-section {
    padding: 40px 0 60px 0;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(0,31,63,0.08), rgba(3,123,228,0.08));
    border-radius: 50%;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out;
}

.section-icon svg {
    stroke: #037be4;
    transition: transform 0.3s ease;
}

.section-icon:hover svg {
    transform: scale(1.05);
}

.section-title {
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 28px);
    color: #001f3f;
    margin-bottom: 15px;
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
    letter-spacing: -0.3px;
    opacity: 0;
    transform: translateY(20px);
    animation: titleFadeUp 0.7s ease forwards;
    animation-delay: 1.1s;
}

.section-underline {
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, #001f3f, #037be4, #001f3f);
    margin: 0 auto;
    border-radius: 3px;
    animation: expandWidth 0.8s ease-out;
    animation-delay: 1.3s;
    opacity: 0;
    animation-fill-mode: forwards;
}

@keyframes expandWidth {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 70px;
        opacity: 1;
    }
}

/* Office Cards Container */
.custom-cards {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Office Card */
.office-card {
    border: 1px solid rgba(0, 31, 63, 0.08);
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(25px);
    animation: cardFadeUp 0.6s ease forwards;
}

.office-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px rgba(0, 31, 63, 0.1);
    border-color: rgba(3, 123, 228, 0.2);
}

.office-card.active-card {
    border: 2px solid #037be4;
    box-shadow: 0 0 25px rgba(3, 123, 228, 0.25);
    transform: scale(1.02);
}

/* Card Header */
.office-header {
    background: #001f3f;
    color: #fff;
    padding: 15px 20px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.office-card:hover .office-header {
    background: #001f3f;
}

.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.office-card.active-card .office-header {
    background: #001f3f;
}

/* Card Body */
.office-body {
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
}

.location-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.location-icon svg {
    stroke: #037be4;
}

.address-group {
    margin-bottom: 12px;
}

.office-schedule {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 12px;
    background: rgba(3, 123, 228, 0.05);
    border-radius: 50px;
    font-size: 12px;
    color: #037be4;
}

.office-schedule svg {
    stroke: #037be4;
}

.office-schedule strong {
    color: #001f3f;
}

/* Back to Map Button */
.back-to-map {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 40px);
    margin: 0 20px 20px 20px;
    padding: 10px;
    background: transparent;
    border: 1px solid rgba(3, 123, 228, 0.3);
    border-radius: 50px;
    color: #037be4;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
}

.back-to-map:hover {
    background: linear-gradient(135deg, #001f3f, #037be4);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(3, 123, 228, 0.3);
}

.back-to-map svg {
    transition: transform 0.3s ease;
}

.back-to-map:hover svg {
    transform: translateX(3px);
}

/* Animations */
@keyframes titleFadeUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

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

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

/* Staggered Animation for Cards */
.office-card:nth-child(1) { animation-delay: 0.1s; }
.office-card:nth-child(2) { animation-delay: 0.2s; }
.office-card:nth-child(3) { animation-delay: 0.3s; }
.office-card:nth-child(4) { animation-delay: 0.4s; }

/* Responsive Design */
@media (max-width: 768px) {
    .custom-section {
        padding: 30px 0 50px 0;
    }
    
    .section-header {
        margin-bottom: 35px;
    }
    
    .section-icon {
        width: 55px;
        height: 55px;
    }
    
    .section-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-underline {
        width: 55px;
    }
    
    .office-header {
        font-size: 0.9rem;
        padding: 12px 15px;
    }
    
    .office-body {
        padding: 15px;
        font-size: 13px;
    }
    
    .office-schedule {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .back-to-map {
        width: calc(100% - 30px);
        margin: 0 15px 15px 15px;
        padding: 8px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .custom-section {
        padding: 25px 0 40px 0;
    }
    
    .section-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .section-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .section-underline {
        width: 45px;
        height: 2px;
    }
    
    .office-header {
        font-size: 0.85rem;
        padding: 10px 12px;
        gap: 6px;
    }
    
    .header-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .office-body {
        padding: 12px;
        font-size: 12px;
    }
    
    .office-schedule {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .back-to-map {
        width: calc(100% - 24px);
        margin: 0 12px 12px 12px;
        padding: 6px;
        font-size: 11px;
    }
}

/* ================= CUSTOM PIN ================= */
.custom-pin div {
    width: 20px;
    height: 20px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    position: relative;
    box-shadow: 0 0 2px #000;
}

.custom-pin div::after {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* ================= BARANGAY SECTION - 2 COLUMNS DESKTOP, 1 COLUMN MOBILE ================= */
.barangay-section {
    padding: 60px 30px 80px 30px;
}

/* Grid: eksaktong 2 columns sa desktop */
.barangay-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1000px;      /* limitahan ang kabuuang lapad */
    margin: 0 auto;
}

/* Card styling */
.barangay-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 31, 63, 0.08);
    height: 100%;
}

.barangay-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 31, 63, 0.12);
    border-color: rgba(3, 123, 228, 0.2);
}

.barangay-header {
    background: linear-gradient(135deg, #001f3f 0%, #002b5c 100%);
    color: white;
    padding: 18px 16px;
    text-align: center;
}

.barangay-header h5 {
    margin: 0 0 5px 0;
    font-weight: 700;
    font-size: 1.1rem;
}

.barangay-count {
    font-size: 0.7rem;
    background: rgba(255,255,255,0.2);
    display: inline-block;
    padding: 3px 10px;
    border-radius: 30px;
    font-weight: 500;
}

.barangay-body {
    padding: 20px;
    flex: 1;
}

/* Vertical list - isang barangay bawat linya */
.barangay-list {
    display: block;
    margin: 0 0 18px 0;
    padding: 0;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom scroll */
.barangay-list::-webkit-scrollbar {
    width: 4px;
}
.barangay-list::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}
.barangay-list::-webkit-scrollbar-thumb {
    background: #037be4;
    border-radius: 10px;
}

/* Bawat barangay */
.barangay-item {
    display: block;
    font-size: 0.8rem;
    color: #2d3748;
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
    padding: 8px 0 8px 12px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    line-height: 1.4;
    border-bottom: 1px solid rgba(0, 31, 63, 0.04);
}

.barangay-item:last-child {
    border-bottom: none;
}

.barangay-item:hover {
    border-left-color: #037be4;
    color: #037be4;
    background: rgba(3, 123, 228, 0.03);
    padding-left: 16px;
}

/* Note */
.barangay-note {
    margin-top: 12px;
    font-size: 0.7rem;
    color: #e53e3e;
    background: rgba(229, 62, 62, 0.05);
    padding: 8px 12px;
    border-radius: 12px;
    text-align: center;
    border-left: 3px solid #e53e3e;
}

/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 768px) {
    .barangay-section {
        padding: 40px 20px 50px 20px;
    }
    .barangay-grid {
        grid-template-columns: 1fr;  /* isang column sa mobile */
        gap: 25px;
        max-width: 500px;
    }
    .barangay-header h5 {
        font-size: 1rem;
    }
    .barangay-item {
        font-size: 0.75rem;
        padding: 7px 0 7px 10px;
    }
    .barangay-body {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .barangay-section {
        padding: 30px 15px 40px 15px;
    }
    .barangay-list {
        max-height: 260px;
    }
    .barangay-item {
        font-size: 0.7rem;
        padding: 6px 0 6px 8px;
    }
    .barangay-count {
        font-size: 0.6rem;
    }
    .barangay-note {
        font-size: 0.65rem;
    }
}

/* ================= MODALS ================= */
.about-modal {
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
}
.about-modal-header {
    justify-content: center;
    border-bottom: 1px solid #dee2e6;
    position: relative;
    padding: 20px 40px;
}
.about-modal-logo {
    height: 50px;
    margin-right: 10px;
}
.about-modal-header .modal-title {
    text-align: center;
    font-weight: 600;
    font-size: 1.4rem;
}
.about-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
}
.about-modal-body {
    text-align: justify;
    white-space: pre-line;
    padding: 20px 40px;
    line-height: 1.7;
    color: #333;
    font-size: 0.95rem;
}
.about-modal-footer {
    justify-content: center;
    border-top: 1px solid #dee2e6;
    padding: 15px 0;
}

/* ================= MODALS - MOBILE RESPONSIVE (AYOS) ================= */

/* Tablet at Mobile Landscape (max-width: 768px) */
@media (max-width: 768px) {
    .about-modal {
        width: 90%;
        margin: 1rem auto;
    }
    
    .about-modal-header {
        padding: 15px 20px;
        flex-direction: row !important;  /* ITO ANG PAGBABAGO - pilitin na row para magkatabi */
        gap: 10px;
        justify-content: center;
        align-items: center;
    }
    
    .about-modal-logo {
        height: 40px;
        margin-right: 0;
    }
    
    .about-modal-header .modal-title {
        font-size: 1.2rem;
        margin: 0;
    }
    
    .about-modal-close {
        top: 10px;
        right: 10px;
    }
    
    .about-modal-body {
        padding: 16px 20px;
        font-size: 0.85rem;
        line-height: 1.6;
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .about-modal-footer {
        padding: 12px 0;
    }
}

/* Mobile Portrait (max-width: 576px) */
@media (max-width: 576px) {
    .about-modal {
        width: 92%;
        margin: 0.8rem auto;
    }
    
    .about-modal-header {
        padding: 12px 16px;
        flex-direction: row !important;  /* PANATILIHING ROW */
        gap: 8px;
    }
    
    .about-modal-logo {
        height: 35px;
    }
    
    .about-modal-header .modal-title {
        font-size: 1.1rem;
    }
    
    .about-modal-body {
        padding: 14px 16px;
        font-size: 0.8rem;
    }
    
    .about-modal-footer {
        padding: 10px 0;
    }
    
    .about-modal-footer .btn {
        padding: 6px 16px;
        font-size: 0.8rem;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .about-modal {
        width: 94%;
        margin: 0.5rem auto;
    }
    
    .about-modal-header {
        padding: 10px 14px;
        flex-direction: row !important;  /* PANATILIHING ROW - magkatabi */
        gap: 8px;
    }
    
    .about-modal-logo {
        height: 30px;
    }
    
    .about-modal-header .modal-title {
        font-size: 1rem;
    }
    
    .about-modal-body {
        padding: 12px 14px;
        font-size: 0.75rem;
    }
    
    .about-modal-close {
        top: 8px;
        right: 8px;
    }
    
    .about-modal-close .btn-close {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* Extra Small Mobile (max-width: 380px) */
@media (max-width: 380px) {
    .about-modal {
        width: 96%;
        margin: 0.3rem auto;
    }
    
    .about-modal-header {
        padding: 8px 12px;
        flex-direction: row !important;  /* PANATILIHING ROW */
        gap: 6px;
    }
    
    .about-modal-logo {
        height: 28px;
    }
    
    .about-modal-header .modal-title {
        font-size: 0.95rem;
    }
    
    .about-modal-body {
        padding: 10px 12px;
        font-size: 0.7rem;
    }
}

/* Landscape orientation sa mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .about-modal {
        width: 90%;
        margin: 0.5rem auto;
    }
    
    .about-modal-header {
        flex-direction: row !important;  /* PANATILIHING ROW */
        padding: 10px 20px;
    }
    
    .about-modal-body {
        max-height: 50vh;
    }
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

.modal-backdrop.fade {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop.show {
    opacity: 1;
}

/* ===== FOOTER ===== */
.footer {
    background: #001f3f;
    color: #ffffff;
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
    padding: 60px 0 20px;
}

.footer-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
}

.footer-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.footer-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    margin-right: 10px;
}

.footer-icon-small {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-right: 8px;
    vertical-align: middle;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #037be4;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 2rem 0;
}

.footer-bottom .nav-link {
    margin: 0 15px;
    font-size: 0.9rem;
    opacity: 0.9;
    color: #ffffff;
    text-decoration: none;
    padding-bottom: 4px;
    transition: all 0.3s ease;
}

.footer-bottom .nav-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-bottom .nav-link.active {
    border-bottom: 2px solid #ffffff;
    opacity: 1;
}

.footer-copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.footer .dropdown-menu {
    background-color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer .dropdown-item {
    color: #000000;
}

.footer .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #037be4;
}

/* NAVBAR ACTIVE LINK */
.navbar-nav .nav-link.active{
    background: #001f3f;        /* Navy blue background */
    border-radius: 20px;        /* Oval shape */
    padding: 8px 12px;          /* Padding for oval appearance */
    color:#ffffff !important;   /* White text */
}

.navbar-nav .nav-link{
    color:#001f3f; 
    font-family: 'Poppins', sans-serif;
    font-size:15px;
    
    font-weight:700;
}

.navbar-nav .nav-link:hover{
    color:#037be4 !important;
}

/* Login link separator */
.navbar-nav .nav-link.login {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    margin-left: 20px;
    padding-left: 20px;
}


/* Footer nav link base style */
.footer-bottom .nav-link {
    margin: 0 15px;
    font-size: 14px;
    opacity: 0.9;
    color: #ffffff;
    text-decoration: none;
    padding-bottom: 4px;      /* space for border */
    transition: all 0.3s ease;
}

/* Hover effect */
.footer-bottom .nav-link:hover {
    opacity: 1;
    color: #037be4;
}

/* Active link with background highlight */
.footer-bottom .nav-link.active {
    opacity: 1;
    color: #037be4;
}


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

/* ================= BACK TO MAP BUTTON ================= */
.back-to-map {
    display: block;
    margin: 12px auto 20px auto;
    padding: 6px 12px;
    font-size: 14px;
    background-color: #0d3b66;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.3s;
}

.back-to-map:hover { background-color: #07426b; }

/* ================= RESPONSIVE (FULL ENHANCED) ================= */

/* ===== BODY FONT ADJUSTMENT ===== */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* ===== HERO SECTION ===== */
@media (max-width: 768px) {
    .coverage-hero {
        padding: 80px 15px;
        text-align: center;
    }
    .coverage-hero h2 {
        font-size: 28px;
        margin-bottom: 15px;
    }
    .coverage-hero p {
        font-size: 14px;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.5;
    }
}
@media (max-width: 576px) {
    .coverage-hero h2 {
        font-size: 24px;
    }
    .coverage-hero p {
        font-size: 13px;
    }
}

/* ===== SECTION TITLE ===== */
@media (max-width: 768px) {
    .section-title {
        font-size: 18px;
        padding: 10px 20px;
    }
}
@media (max-width: 576px) {
    .section-title {
        font-size: 16px;
        padding: 8px 16px;
    }
}

/* ===== NAVBAR (POSITION PAREHAS SA CONTACT) ===== */
@media (max-width: 768px) {
    .navbar {
        height: auto;
        padding: 15px 10px;
    }
    .navbar-brand {
        font-size: 18px;
        display: flex;
        align-items: center;
        flex-wrap: wrap; /* responsive wrap */
        justify-content: flex-start; /* katulad sa contact */
    }
    .navbar-brand img {
        height: 60px !important;
        margin-left: 0; /* align left sa tablet */
        margin-right: 10px;
    }
    .navbar-brand.brand-logo span {
        font-size: 20px;
    }

    /* Navbar links including login */
    .navbar-nav .nav-link {
        font-size: 14px;
        margin: 5px 0;
        display: block; /* ensure stacked in collapsed menu */
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        height: 50px !important;
        margin-left: 0; /* align left sa mobile */
        margin-right: 8px;
    }
    .navbar-brand.brand-logo span {
        font-size: 18px; /* mobile scale down */
    }

    /* Navbar links including login */
    .navbar-nav .nav-link {
        font-size: 13px;
        margin: 5px 0;
        display: block;
    }
}

/* ===== MAP SECTION ===== */
@media (max-width: 768px) {
    #map {
        height: 450px;
    }
}
@media (max-width: 576px) {
    #map {
        height: 350px;
    }
}

/* ===== OFFICE ROW / LOCATION CARDS ===== */
@media (max-width: 768px) {
    .office-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .office-body {
        font-size: 15px;
    }
    .office-number {
        margin-top: 6px;
    }
}
@media (max-width: 576px) {
    .office-body, .office, .office-number {
        font-size: 14px;
    }
}

/* ===== RESPONSIVE FOOTER ===== */
@media (max-width: 768px) {
    .footer {
        padding: 40px 0 15px;
    }
    .footer-heading {
        font-size: 1.1rem;
    }
    .footer-text {
        font-size: 0.9rem;
    }
    .footer-bottom .nav-link {
        margin: 0 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .footer {
        text-align: center;
    }
    .footer-heading {
        font-size: 1rem;
    }
    .footer-text {
        font-size: 0.85rem;
    }
    .footer-icon, .footer-icon-small {
        margin-bottom: 5px;
    }
}

/* ===== FOOTER ===== */
@media (max-width: 768px) {
    .footer {
        padding: 30px 15px;
        font-size: 14px;
    }
    .footer-icon {
        width: 24px;
        height: 24px;
    }
}
@media (max-width: 576px) {
    .footer, .footer-link, .footer-bottom .nav-link {
        font-size: 13px;
    }
}

/* ===== BACK TO MAP BUTTON ===== */
@media (max-width: 768px) {
    .back-to-map {
        padding: 5px 12px;
        font-size: 13px;
    }
}
@media (max-width: 576px) {
    .back-to-map {
        padding: 4px 10px;
        font-size: 12px;
    }
}

/* ===== BRAND LOGO ===== */
@media (max-width: 768px) {
    .brand-logo {
        font-size: 20px;
        gap: 6px;
    }
    .brand-logo img {
        height: 30px;
    }
}

/* ================= RESPONSIVE MOBILE FIXES (COVERAGE PAGE) ================= */
/* Ilagay ito sa dulo ng iyong CSS file */

/* Para maiwasan ang horizontal scroll sa buong page */
body {
    overflow-x: hidden;
    width: 100%;
}

/* Tablet at smaller desktop */
@media (max-width: 991.98px) {
    .hamburger {
        display: flex;
    }
    
    .navbar-brand img {
        height: 60px !important;
        margin-left: 0 !important;  /* tanggal ang negative margin */
    }
}

/* Mobile phones (tablet pababa) */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* ===== NAVBAR ===== */
    .navbar {
        height: auto;
        padding: 10px;
    }
    
    .navbar-brand img {
        height: 50px !important;
        margin-left: 0 !important;  /* inaalis ang -60px na margin */
        margin-right: 8px;
    }
    
    .navbar-brand.brand-logo span {
        font-size: 16px;
    }
    
    .navbar-nav .nav-link {
        font-size: 14px;
        margin: 5px 0;
    }
    
    /* ===== COVERAGE HERO ===== */
    .coverage-hero {
        padding: 60px 15px;
        margin-bottom: 30px;
    }
    
    .coverage-hero h2 {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .coverage-hero p {
        font-size: 14px;
        padding: 0.5rem 1rem;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .scroll-indicator {
        padding: 0.5rem 1rem;
        margin-top: 0.4rem;
    }
    
    .scroll-indicator span {
        font-size: 0.7rem;
    }
    
    /* ===== MAP SECTION ===== */
    .coverage-map {
        padding: 30px 0 50px 0;
    }
    
    .coverage-map .container {
        padding: 0 20px;
    }
    
    .map-icon-wrapper {
        width: 55px;
        height: 55px;
        margin-bottom: 15px;
    }
    
    .map-title {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .map-title-underline {
        width: 50px;
        height: 2px;
    }
    
    #map {
        height: 380px;
        border-radius: 16px;
    }
    
    /* ===== COVERAGE NOTE ===== */
    .coverage-note {
        margin: 25px 20px 40px 20px;
        padding: 1.2rem;
        gap: 0.8rem;
    }
    
    .note-icon {
        width: 42px;
        height: 42px;
    }
    
    .note-content p {
        font-size: 0.85rem;
    }
    
    .note-highlight {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* ===== OFFICE CARDS SECTION ===== */
    .custom-section {
        padding: 30px 0 50px 0;
    }
    
    .section-header {
        margin-bottom: 35px;
    }
    
    .section-icon {
        width: 55px;
        height: 55px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-underline {
        width: 55px;
    }
    
    .office-card {
        margin-bottom: 20px;
    }
    
    .office-header {
        font-size: 0.9rem;
        padding: 12px 15px;
    }
    
    .office-body {
        padding: 15px;
        font-size: 13px;
    }
    
    .office-schedule {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .back-to-map {
        width: calc(100% - 30px);
        margin: 0 15px 15px 15px;
        padding: 8px;
        font-size: 12px;
    }
    
    /* ===== BARANGAY SECTION ===== */
    .barangay-section {
        padding: 40px 20px 50px 20px;
    }
    
    .barangay-grid {
        grid-template-columns: 1fr;  /* isang column sa mobile */
        gap: 25px;
        max-width: 500px;
    }
    
    .barangay-header h5 {
        font-size: 1rem;
    }
    
    .barangay-body {
        padding: 15px;
    }
    
    .barangay-item {
        font-size: 0.75rem;
        padding: 7px 0 7px 10px;
    }
    
    .barangay-list {
        max-height: 280px;
    }
    
    /* ===== FOOTER ===== */
    .footer {
        padding: 40px 15px;
        text-align: center;
    }
    
    .footer-heading {
        font-size: 1.1rem;
    }
    
    .footer-text {
        font-size: 0.9rem;
    }
    
    .footer-bottom .nav-link {
        margin: 0 10px;
        font-size: 0.85rem;
    }
    
    .footer-icon, .footer-icon-small {
        margin-bottom: 5px;
    }
    
    /* ===== MODALS ===== */
    .about-modal-header {
        padding: 15px 20px;
    }
    
    .about-modal-body {
        padding: 15px 20px;
        font-size: 0.9rem;
    }
    
    .about-modal-logo {
        height: 40px;
    }
    
    .about-modal-header .modal-title {
        font-size: 1.2rem;
    }
    
    /* ===== BRAND LOGO ===== */
    .brand-logo {
        font-size: 20px;
        gap: 6px;
    }
    
    .brand-logo img {
        height: 30px;
    }
}

/* Maliit na phone (max 576px) */
@media (max-width: 576px) {
    .coverage-hero {
        padding: 50px 15px;
    }
    
    .coverage-hero h2 {
        font-size: 24px;
    }
    
    .coverage-hero p {
        font-size: 13px;
    }
    
    .scroll-indicator {
        padding: 0.4rem 0.9rem;
    }
    
    .scroll-indicator span {
        font-size: 0.65rem;
    }
    
    .map-title {
        font-size: 1.3rem;
    }
    
    .map-title-underline {
        width: 45px;
    }
    
    #map {
        height: 320px;
        border-radius: 14px;
    }
    
    .coverage-note {
        margin: 20px 15px 30px 15px;
        padding: 1rem;
        gap: 0.6rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .note-icon {
        width: 38px;
        height: 38px;
        margin-bottom: 0.5rem;
    }
    
    .note-content p {
        font-size: 0.8rem;
    }
    
    .note-highlight {
        padding: 0.5rem 0.7rem;
        font-size: 0.75rem;
        text-align: left;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .section-underline {
        width: 45px;
        height: 2px;
    }
    
    .office-header {
        font-size: 0.85rem;
        padding: 10px 12px;
    }
    
    .office-body {
        padding: 12px;
        font-size: 12px;
    }
    
    .office-schedule {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .back-to-map {
        width: calc(100% - 24px);
        margin: 0 12px 12px 12px;
        padding: 6px;
        font-size: 11px;
    }
    
    .barangay-section {
        padding: 30px 15px 40px 15px;
    }
    
    .barangay-list {
        max-height: 260px;
    }
    
    .barangay-item {
        font-size: 0.7rem;
        padding: 6px 0 6px 8px;
    }
    
    .barangay-count {
        font-size: 0.6rem;
    }
    
    .navbar-brand img {
        height: 40px !important;
    }
    
    .navbar-brand.brand-logo span {
        font-size: 14px;
    }
}

/* Sobrang liit na phone (max 480px) */
@media (max-width: 480px) {
    .coverage-hero {
        padding: 40px 15px;
    }
    
    .coverage-hero h2 {
        font-size: 22px;
    }
    
    #map {
        height: 280px;
    }
    
    .barangay-note {
        font-size: 0.65rem;
    }
}

/* Landscape orientation sa mobile */
@media (orientation: landscape) and (max-height: 600px) {
    .coverage-hero {
        padding: 40px 15px;
        margin-bottom: 20px;
    }
    
    .coverage-map {
        padding: 20px 0 30px 0;
    }
    
    #map {
        height: 300px;
    }
    
    .office-card {
        margin-bottom: 15px;
    }
    
    .barangay-section {
        padding: 20px 15px 30px 15px;
    }
}

/* Hover effects - para sa desktop lang, hindi sa mobile */
@media (hover: hover) {
    .office-card:hover {
        transform: translateY(-8px);
    }
    
    .barangay-card:hover {
        transform: translateY(-5px);
    }
    
    .coverage-note:hover {
        transform: translateY(-3px) translateX(0);
    }
    
    .scroll-indicator:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(3px);
    }
    
    .back-to-map:hover {
        background: linear-gradient(135deg, #001f3f, #037be4);
        transform: translateY(-2px);
    }
}

/* Para sa touch devices (mobile) - active state imbes na hover */
@media (hover: none) {
    .office-card:active {
        transform: translateY(-4px);
        transition: transform 0.1s;
    }
    
    .barangay-card:active {
        transform: translateY(-3px);
    }
    
    .coverage-note:active {
        transform: translateY(-2px);
    }
    
    .scroll-indicator:active {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(2px);
    }
    
    .back-to-map:active {
        background: linear-gradient(135deg, #001f3f, #037be4);
        transform: translateY(-1px);
    }
}

/* Iwasan ang page flicker sa mobile dahil sa body animation */
@media (max-width: 768px) {
    body:not(.modal-open) {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    /* Para sa desktop lang ang page fade animation */
    @media (min-width: 769px) {
        body:not(.modal-open) {
            opacity: 0;
            animation: pageFadeLeft 0.7s ease forwards;
        }
    }
}

/* ================= HAMBURGER ICON - ILAGAY SA KANANG BAHAGI ================= */

/* Para sa mobile, i-adjust ang navbar container para nasa kanan ang hamburger */
@media (max-width: 768px) {
    .navbar .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    /* Siguraduhing ang brand ay nasa kaliwa */
    .navbar-brand {
        margin-right: auto;  /* itulak ang lahat sa kanan */
    }
    
    /* Ang hamburger button ay nasa kanan, katabi ng navbar toggler kung mayroon */
    .hamburger {
        display: flex;
        order: 2;            /* ilagay sa kanang dulo */
        margin-left: auto;   /* itulak sa kanan */
        margin-right: 0;
    }
    
    /* Kung may navbar-toggler (Bootstrap default), itago ito at gamitin ang hamburger */
    .navbar-toggler {
        display: none !important;
    }
    
    /* Siguraduhing maayos ang spacing */
    .navbar .container {
        position: relative;
    }
}

/* Para sa sobrang liit na screen, panatilihin ang tama */
@media (max-width: 576px) {
    .hamburger {
        width: 28px;
        height: 22px;
    }
}

/* ================= NAVBAR RESPONSIVE ================= */

/* Tablet and below (max-width: 991.98px) */
@media (max-width: 991.98px) {
    /* Show hamburger */
    .hamburger {
        display: flex !important;
        margin-left: auto;
        order: 2;
    }
    
    /* Navbar container */
    .navbar .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0 15px;
        position: relative;
    }
    
    /* Brand logo */
    .navbar-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-right: auto;
        order: 1;
    }
    
    .navbar-brand img {
        height: 50px !important;
        width: auto !important;
        margin-left: 0 !important;
        margin-right: 10px;
    }
    
    .navbar-brand.brand-logo span {
        font-size: 16px;
    }
    
    /* Hide Bootstrap toggler */
    .navbar-toggler {
        display: none !important;
    }
    
    /* Navigation collapse */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 0 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        border-radius: 0 0 12px 12px;
        z-index: 1029;
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        opacity: 0;
        transition: all 0.3s ease;
        border-top: 2px solid #001f3f;
    }
    
    .navbar-collapse.show {
        max-height: 600px;
        padding: 20px;
        visibility: visible;
        opacity: 1;
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: 5px;
        margin: 0;
        padding: 0;
        list-style: none;
    }
    
    .navbar-nav .nav-item {
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        display: block;
        padding: 10px 15px;
        font-size: 15px;
        color: #001f3f !important;
        border-radius: 8px;
        transition: all 0.2s ease;
        font-weight: 600;
    }
    
    .navbar-nav .nav-link:hover {
        background: #f0f4fa;
        color: #037be4 !important;
    }
    
    .navbar-nav .nav-link.active {
        background: #001f3f !important;
        color: white !important;
        border-radius: 8px;
    }
    
    /* Dropdown menu sa mobile */
    .navbar-nav .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100%;
        background: #f8fafc;
        border: none;
        box-shadow: none;
        padding: 0;
        margin-top: 5px;
        border-radius: 8px;
    }
    
    .navbar-nav .dropdown-item {
        padding: 10px 15px;
        font-size: 14px;
        color: #001f3f;
        border-radius: 8px;
    }
    
    .navbar-nav .dropdown-item:hover {
        background: #e8edf4;
        color: #037be4;
    }
    
    .navbar-nav .nav-link.login {
        border-left: none;
        margin-left: 0;
        padding-left: 15px;
    }
    
    .navbar-nav .dropdown-toggle::after {
        float: right;
        margin-top: 8px;
    }
}

/* Mobile phones (max-width: 768px) */
@media (max-width: 768px) {
    .navbar {
        padding: 8px 0;
        height: auto;
    }
    
    .navbar-brand img {
        height: 40px !important;
    }
    
    .navbar-brand.brand-logo span {
        font-size: 14px;
    }
    
    .hamburger {
        width: 26px;
        height: 20px;
    }
    
    .hamburger span {
        height: 2.5px;
    }
    
    .navbar-nav .nav-link {
        font-size: 14px;
        padding: 8px 12px;
    }
}

/* Small mobile (max-width: 576px) */
@media (max-width: 576px) {
    .navbar-brand img {
        height: 35px !important;
        margin-right: 8px;
    }
    
    .navbar-brand.brand-logo span {
        font-size: 12px;
    }
    
    .hamburger {
        width: 24px;
        height: 18px;
    }
    
    .hamburger span {
        height: 2px;
    }
    
    .navbar-nav .nav-link {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .navbar-collapse.show {
        padding: 15px;
        max-height: 500px;
    }
}

/* Extra small mobile (max-width: 380px) */
@media (max-width: 380px) {
    .navbar-brand img {
        height: 30px !important;
        margin-right: 6px;
    }
    
    .navbar-brand.brand-logo span {
        font-size: 11px;
    }
    
    .hamburger {
        width: 22px;
        height: 16px;
    }
    
    .hamburger span {
        height: 2px;
    }
    
    .navbar-nav .nav-link {
        font-size: 12px;
        padding: 5px 8px;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .navbar-collapse {
        max-height: 300px;
        overflow-y: auto;
    }
    
    .navbar-collapse.show {
        max-height: 300px;
        padding: 15px;
    }
    
    .navbar-nav .nav-link {
        padding: 5px 10px;
        font-size: 13px;
    }
    
    .navbar-brand img {
        height: 35px !important;
    }
}

/* Desktop - hide hamburger and show full menu */
@media (min-width: 992px) {
    .hamburger {
        display: none !important;
    }
    
    .navbar-toggler {
        display: none !important;
    }
    
    .navbar-collapse {
        display: flex !important;
        position: static;
        background: transparent;
        padding: 0;
        box-shadow: none;
        max-height: none;
        overflow: visible;
        visibility: visible;
        opacity: 1;
        border-top: none;
    }
    
    .navbar-nav {
        flex-direction: row;
        gap: 0;
        align-items: center;
    }
    
    .navbar-nav .nav-link {
        padding: 8px 16px;
        font-size: 15px;
        color: #001f3f !important;
        border-radius: 20px;
    }
    
    .navbar-nav .nav-link:hover {
        background: transparent;
        color: #037be4 !important;
    }
    
    .navbar-nav .nav-link.active {
        background: #001f3f !important;
        color: white !important;
        border-radius: 20px;
    }
    
    .navbar-nav .nav-link.login {
        border-left: 1px solid rgba(0, 0, 0, 0.15);
        margin-left: 20px;
        padding-left: 20px;
    }
    
    .navbar-nav .dropdown-menu {
        position: absolute !important;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        padding: 8px 0;
        min-width: 200px;
    }
    
    .navbar-nav .dropdown-item {
        padding: 10px 20px;
        font-size: 14px;
        color: #001f3f;
        transition: all 0.2s ease;
    }
    
    .navbar-nav .dropdown-item:hover {
        background: #f0f4fa;
        color: #037be4;
    }
    
    .navbar-nav .dropdown-toggle::after {
        margin-left: 8px;
    }
}

/* Hamburger animation - active state */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .navbar-collapse,
    .hamburger span,
    .navbar-nav .nav-link {
        transition: none !important;
    }
}