/* =====================
   BUTTONS
===================== */
.btn-primary-custom {
    background-color: var(--primary-red);
    border: 2px solid var(--primary-red);
    color: white;
    border-radius: 6px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary-custom:hover {
    background-color: transparent;
    color: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(211, 47, 47, 0.2);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
    padding: 0.9rem 2.5rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* =====================
   HERO SECTION
===================== */
.hero-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 120px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0 0 0 auto;
    width: 40%;
    background-color: rgba(211, 47, 47, 0.05);
    clip-path: polygon(100% 0, 100% 100%, 25% 100%);
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-title span {
    color: var(--primary-red);
    position: relative;
}

.hero-title span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: rgba(211, 47, 47, 0.2);
    z-index: -1;
}

.hero-subtitle {
    max-width: 600px;
    font-size: 1.1rem;
    color: var(--medium-gray);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* Hero Badge */
.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.1), rgba(211, 47, 47, 0.05));
    border: 2px solid rgba(211, 47, 47, 0.2);
    border-radius: 50px;
    color: var(--primary-red);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.hero-highlight {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 10px;
    background-color: rgba(211, 47, 47, 0.1);
    border-left: 4px solid var(--primary-red);
}

.hero-highlight h5 {
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}


/* =====================
   QUICK INFO SECTION
===================== */
.quick-info-section {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.info-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    border: 2px solid rgba(211, 47, 47, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.info-card.emergency {
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.05), rgba(255, 107, 107, 0.05));
    border-color: rgba(211, 47, 47, 0.2);
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(211, 47, 47, 0.15);
}

.info-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-red), #ff6b6b);
    box-shadow: 0 4px 20px rgba(211, 47, 47, 0.3);
}

.info-icon i {
    font-size: 1.75rem;
    color: white;
}

.info-card h5 {
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.info-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-red);
    margin: 1rem 0;
}

.info-card small {
    color: var(--medium-gray);
    font-size: 0.85rem;
}

/* =====================
   ADDITIONAL COMPONENTS
===================== */
/* Section Badge */
.section-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-red), #ff6b6b);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Stats Cards */
.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    border: 2px solid rgba(211, 47, 47, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(211, 47, 47, 0.2);
    border-color: rgba(211, 47, 47, 0.3);
}

.stat-card i {
    font-size: 2rem;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

.stat-card h4 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-red);
    margin: 0.5rem 0;
}

.stat-card p {
    font-size: 0.9rem;
    color: var(--medium-gray);
    margin: 0;
}

/* Service Request Cards - Modern Design */
.service-request-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    height: 100%;
    border: 2px solid rgba(211, 47, 47, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.service-request-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), #ff6b6b);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-request-card:hover::before {
    transform: scaleX(1);
}

.service-request-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(211, 47, 47, 0.2);
    border-color: rgba(211, 47, 47, 0.3);
}

.service-request-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.1), rgba(211, 47, 47, 0.05));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.service-request-card:hover .service-request-icon {
    background: linear-gradient(135deg, var(--primary-red), #ff6b6b);
    transform: scale(1.1) rotate(-5deg);
}

.service-request-icon i {
    font-size: 2rem;
    color: var(--primary-red);
    transition: color 0.3s ease;
}

.service-request-card:hover .service-request-icon i {
    color: white;
}

.service-request-title {
    color: var(--dark-gray);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.service-request-desc {
    color: var(--medium-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.service-request-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(211, 47, 47, 0.1);
    border-radius: 50%;
    color: var(--primary-red);
    transition: all 0.3s ease;
}

.service-request-card:hover .service-request-arrow {
    background: var(--primary-red);
    color: white;
    transform: translateX(5px);
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 992px) {
    .hero-section {
        padding-top: 100px;
        text-align: center;
    }
    .hero-title span::after { height: 5px; }
    .hero-subtitle { margin-inline: auto; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.4rem; }
    .info-number { font-size: 2rem; }
    .stat-card h4 { font-size: 1.5rem; }
}

@media (max-width: 576px) {
    .hero-title { font-size: 2rem; }
    .btn-primary-custom,
    .btn-outline-primary {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* =====================
   MAIN CAROUSEL - CONSISTENT SIZING
===================== */

/* Base carousel container */
#myCarousel {
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Carousel inner container */
#myCarousel .carousel-inner {
    width: 100%;
    position: relative;
}

/* Consistent sizing for all carousel items */
#myCarousel .carousel-item {
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Fixed consistent height for all slides */
#myCarousel,
#myCarousel .carousel-inner,
#myCarousel .carousel-item {
    height: 70vh; /* Fixed height */
    max-height: 700px;
    min-height: 500px;
}

/* Consistent image styling - ALL images same treatment */
#myCarousel img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures consistent cropping */
    display: block;
}

/* =====================
   RESPONSIVE BREAKPOINTS - CONSISTENT RATIOS
===================== */

/* Large desktops (1200px and up) */
@media (min-width: 1200px) {
    #myCarousel,
    #myCarousel .carousel-inner,
    #myCarousel .carousel-item {
        height: 75vh; /* Consistent ratio */
        max-height: 800px;
        min-height: 550px;
    }
}

/* Medium devices (tablets, 768px to 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    #myCarousel,
    #myCarousel .carousel-inner,
    #myCarousel .carousel-item {
        height: 65vh; /* Consistent ratio */
        max-height: 600px;
        min-height: 450px;
    }
}

/* Small devices (landscape phones, 576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    #myCarousel,
    #myCarousel .carousel-inner,
    #myCarousel .carousel-item {
        height: 55vh; /* Consistent ratio */
        max-height: 500px;
        min-height: 350px;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575px) {
    #myCarousel,
    #myCarousel .carousel-inner,
    #myCarousel .carousel-item {
        height: 45vh; /* Consistent ratio */
        max-height: 400px;
        min-height: 280px;
    }
}

/* Extra adjustments for very small screens */
@media (max-width: 375px) {
    #myCarousel,
    #myCarousel .carousel-inner,
    #myCarousel .carousel-item {
        height: 40vh; /* Consistent ratio */
        max-height: 350px;
        min-height: 250px;
    }
}

/* =====================
   CAROUSEL OVERLAYS
===================== */

/* Overlay for normal slides */
.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.2) 100%
    );
    z-index: 1;
}

/* =====================
   CAROUSEL CONTROLS
===================== */

/* Navigation arrows */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    margin: 0 10px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 1;
}

/* Indicator dots */
.carousel-indicators {
    margin-bottom: 20px;
    z-index: 2;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background-color: var(--primary-red);
    transform: scale(1.2);
}

/* =====================
   MODERN CAROUSEL (Barangay Gallery) - ALSO CONSISTENT
===================== */

.modern-carousel {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    border: 3px solid rgba(211, 47, 47, 0.1);
}

/* Fixed height for gallery carousel */
.modern-carousel,
#barangayCarousel,
#barangayCarousel .carousel-inner,
#barangayCarousel .carousel-item {
    height: 300px; /* Fixed consistent height */
}

/* Gallery carousel images - same consistent treatment */
#barangayCarousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* Responsive gallery carousel */
@media (min-width: 992px) {
    .modern-carousel,
    #barangayCarousel,
    #barangayCarousel .carousel-inner,
    #barangayCarousel .carousel-item {
        height: 300px;
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    .modern-carousel,
    #barangayCarousel,
    #barangayCarousel .carousel-inner,
    #barangayCarousel .carousel-item {
        height: 280px;
    }
}

@media (max-width: 767px) and (min-width: 576px) {
    .modern-carousel,
    #barangayCarousel,
    #barangayCarousel .carousel-inner,
    #barangayCarousel .carousel-item {
        height: 250px;
    }
}

@media (max-width: 575px) {
    .modern-carousel,
    #barangayCarousel,
    #barangayCarousel .carousel-inner,
    #barangayCarousel .carousel-item {
        height: 220px;
    }
}

/* =====================
   ANIMATION & TRANSITIONS
===================== */

/* Smooth slide transition */
.carousel-item {
    transition: transform 0.6s ease-in-out;
}

/* =====================
   ACCESSIBILITY
===================== */

/* Ensure carousel is accessible */
.carousel {
    position: relative;
}

/* Screen reader text */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =====================
   NEWS CARDS
===================== */
.news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.news-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-img {
    transform: scale(1.05);
}

.news-description {
    font-size: 0.95rem;
    color: #555;
}

.read-more {
    display: inline-block;
    margin-top: 5px;
    font-size: 0.9rem;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}