/* ============================================
   MODERN RESPONSIVE STYLES
   Pasong Camachile 2 Landing Page
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --primary: #326942;
    --primary-light: #3d7e4f;
    --primary-dark: #274f33;
    --accent: #4a9e63;
    --bg-light: #f8faf9;
    --bg-section: #f1f5f2;
    --text-dark: #1a1a1a;
    --text-muted: #5a6a5e;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --radius: 1rem;
    --radius-sm: 0.5rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Smooth Scroll ---------- */
html {
    scroll-behavior: smooth;
}

/* ---------- Top Header Bar ---------- */
.top-header-bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 0.5rem 0;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

/* ---------- Navbar ---------- */
.navbar-modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    padding: 0.5rem 0;
}

.navbar-modern.scrolled {
    box-shadow: var(--shadow-md);
    padding: 0.25rem 0;
}

.navbar-modern .navbar-brand img {
    height: 65px;
    transition: var(--transition);
}

.navbar-modern.scrolled .navbar-brand img {
    height: 50px;
}

.navbar-modern .nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.navbar-modern .nav-link:hover,
.navbar-modern .nav-link.active {
    color: var(--primary) !important;
    background: rgba(50, 105, 66, 0.06);
}

.navbar-modern .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.navbar-modern .dropdown-menu {
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
    animation: dropdownFade 0.2s ease;
}

.navbar-modern .dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.navbar-modern .dropdown-item:hover {
    background: rgba(50, 105, 66, 0.08);
    color: var(--primary);
}

/* Hamburger toggle */
.navbar-toggler {
    border: none !important;
    padding: 0.5rem;
    outline: none !important;
    box-shadow: none !important;
}

.navbar-toggler:focus {
    box-shadow: none !important;
}

.navbar-toggler-icon {
    width: 24px;
    height: 24px;
}

/* ---------- Hero Section ---------- */
.hero-section {
    height: 85vh !important;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 800px;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
    animation: heroFadeUp 0.8s ease-out;
}

.hero-content p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 1rem auto 0;
    text-shadow: 0 1px 10px rgba(0,0,0,0.3);
    animation: heroFadeUp 0.8s ease-out 0.15s both;
}

.hero-cta {
    animation: heroFadeUp 0.8s ease-out 0.3s both;
}

.hero-cta .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--transition);
}

.hero-cta .btn-light {
    background: #fff;
    color: var(--primary);
    border: none;
}

.hero-cta .btn-light:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(50, 105, 66, 0.4);
}

.hero-cta .btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

/* Carousel controls */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
    opacity: 0.8;
}

.carousel-indicators {
    margin-bottom: 2rem;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px;
    opacity: 0.5;
    transition: var(--transition);
    border: none;
}

.carousel-indicators .active {
    opacity: 1;
    width: 30px;
    border-radius: 5px;
}

/* ---------- Service Cards ---------- */
.services-section {
    margin-top: -80px;
    position: relative;
    z-index: 10;
}

.service-card {
    background: #fff;
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    color: inherit;
}

.service-card .icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(50, 105, 66, 0.1) 0%, rgba(50, 105, 66, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    transition: var(--transition);
}

.service-card:hover .icon-wrapper {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.service-card .icon-wrapper img {
    height: 28px;
    transition: var(--transition);
}

.service-card:hover .icon-wrapper img {
    filter: brightness(0) invert(1);
}

.service-card h6 {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.service-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ---------- Section Divider ---------- */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 2.5rem auto;
    max-width: 600px;
    padding: 0 1rem;
}

.line {
    flex: 1;
    border: none;
    border-top: 1px solid #d4e2d7;
    margin: 0;
}

.line2 {
    flex: 1;
    border: none;
    border-top: 1px solid #e8f0ea;
    margin: 0;
}

.logo {
    position: relative;
    z-index: 1;
    background-color: #fff;
    padding: 0 15px;
}

.logo img {
    height: 20px;
    opacity: 0.7;
}

/* ---------- Section Headings ---------- */
.section-heading {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.section-subheading {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* ---------- Captain Message Section ---------- */
.captain-section {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 3rem;
}

.captain-image {
    border-radius: var(--radius);
    overflow: hidden;
}

.captain-image img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.captain-message p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.captain-message .greeting {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.captain-message .signature {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--primary);
    display: inline-block;
}

.captain-message .signature .name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.captain-message .signature .title {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---------- Officials Section ---------- */
.official-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.04);
}

.official-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.official-card .card-img-wrapper {
    height: 200px;
    overflow: hidden;
    background: var(--bg-section);
    display: flex;
    align-items: center;
    justify-content: center;
}

.official-card .card-img-wrapper img {
    max-height: 200px;
    width: auto;
    object-fit: contain;
}

.official-card .card-body {
    padding: 1rem;
}

.official-card .card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.15rem;
}

.official-card .card-text {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---------- Vision / Mission Section ---------- */
.vision-mission-section {
    background: var(--bg-section);
}

.vm-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-sm);
    height: 100%;
    border-top: 3px solid var(--primary);
    transition: var(--transition);
}

.vm-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.vm-card .vm-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: #fff;
    font-size: 1.25rem;
}

.vm-card h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.vm-card p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-muted);
}

/* ---------- Topography Section ---------- */
.topography-image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.topography-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 400px;
}

.topography-text h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.topography-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ---------- Calendar Section ---------- */
.calendar-section {
    background: var(--bg-light);
}

.calendar-wrapper {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    border: 1px solid rgba(0,0,0,0.04);
}

#calendar {
    margin: 0 auto;
}

#calendar a {
    color: var(--text-dark);
    text-decoration: none;
}

/* ---------- Emergency Hotlines ---------- */
.hotline-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.hotline-card:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-3px);
}

.hotline-card .hotline-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.1rem;
}

.hotline-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}

.hotline-card h6 {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* ---------- Footer ---------- */
.footer-modern {
    background: #1a1a1a;
    padding: 2rem 0;
}

.footer-modern p {
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-modern .social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin: 0 0.35rem;
    transition: var(--transition);
    text-decoration: none;
}

.footer-modern .social-link:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

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

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade-in on scroll */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Utility ---------- */
.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Extra large: 1200px+ */
@media (min-width: 1200px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
}

/* Large: 992px - 1199px */
@media (max-width: 1199px) {
    .navbar-modern .nav-link {
        padding: 0.5rem 0.65rem;
        font-size: 0.9rem;
    }
}

/* Medium: 768px - 991px */
@media (max-width: 991px) {
    .navbar-modern {
        padding: 0.5rem 0;
    }

    .navbar-modern .navbar-brand img {
        height: 50px;
    }

    .navbar-modern .navbar-collapse {
        background: #fff;
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-lg);
        padding: 1rem;
        margin-top: 0.5rem;
        max-height: 80vh;
        overflow-y: auto;
    }

    .navbar-modern .nav-link {
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
    }

    .navbar-modern .dropdown-menu {
        box-shadow: none;
        padding-left: 1rem;
        margin-top: 0;
    }

    .hero-section {
        height: 60vh !important;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .services-section {
        margin-top: -60px;
    }

    .captain-section {
        padding: 2rem 1.5rem;
    }

    .section-heading {
        font-size: 1.9rem;
    }
}

/* Small: 576px - 767px */
@media (max-width: 767px) {
    .top-header-bar h1 {
        font-size: 0.75rem;
    }

    .hero-section {
        height: 50vh !important;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .hero-cta .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .services-section {
        margin-top: -50px;
    }

    .service-card .icon-wrapper {
        width: 50px;
        height: 50px;
    }

    .service-card .icon-wrapper img {
        height: 22px;
    }

    .service-card h6 {
        font-size: 0.8rem;
    }

    .captain-section {
        padding: 1.5rem;
    }

    .captain-message .greeting {
        font-size: 1.2rem;
        text-align: center;
    }

    .captain-message p {
        font-size: 0.95rem;
    }

    .section-heading {
        font-size: 1.6rem;
    }

    .vm-card {
        padding: 2rem 1.5rem;
    }

    .vm-card h2 {
        font-size: 1.3rem;
    }

    .topography-text h2 {
        font-size: 1.6rem;
        text-align: center;
    }

    .official-card .card-img-wrapper {
        height: 160px;
    }

    .hotline-card h3 {
        font-size: 1.1rem;
    }

    .hotline-card h6 {
        font-size: 0.7rem;
    }

    .calendar-wrapper {
        padding: 0.75rem;
    }
}

/* Extra small: < 576px */
@media (max-width: 575px) {
    .hero-section {
        height: 45vh !important;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 0.85rem;
    }

    .hero-cta .btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }

    .services-section {
        margin-top: -40px;
    }

    .service-card {
        padding: 0.75rem !important;
    }

    .service-card .icon-wrapper {
        width: 42px;
        height: 42px;
        margin-bottom: 0.5rem;
    }

    .service-card .icon-wrapper img {
        height: 18px;
    }

    .service-card h6 {
        font-size: 0.72rem;
    }

    .service-card p {
        display: none;
    }

    .section-heading {
        font-size: 1.4rem;
    }

    .captain-section {
        padding: 1.25rem;
        border-radius: var(--radius-sm);
    }

    .captain-message .greeting {
        font-size: 1.1rem;
    }

    .captain-message p {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .official-card .card-img-wrapper {
        height: 140px;
    }

    .official-card .card-title {
        font-size: 0.85rem;
    }

    .official-card .card-text {
        font-size: 0.72rem;
    }

    .vm-card {
        padding: 1.5rem 1.25rem;
    }

    .vm-card h2 {
        font-size: 1.2rem;
    }

    .vm-card p {
        font-size: 0.9rem;
    }

    .topography-text h2 {
        font-size: 1.4rem;
    }

    .topography-text p {
        font-size: 0.9rem;
    }

    .divider {
        margin: 1.5rem auto;
    }

    .hotline-card {
        padding: 1rem;
    }

    .hotline-card .hotline-icon {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }

    .hotline-card h3 {
        font-size: 1rem;
    }
}

/* ---------- Ensure images are responsive ---------- */
img {
    max-width: 100%;
    height: auto;
}

/* ---------- Override generic card hover for non-landing sections ---------- */
.card {
    transition: var(--transition);
}
