/* =========================================================
   GLOBAL RESET + BASE
   ========================================================= */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
*, *::before, *::after {
    box-sizing: border-box;
}
body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #222;
    font-size: 16px;
    line-height: 1.6;
}


.hidden {
    display: none !important;   /* ✅ forces modal to be hidden on load */
}


/* =========================================================
   DESKTOP NAVIGATION BAR
   ========================================================= */
.navbar {
    width: 100%;
    background: #fff;
    padding: 12px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;  /* ✅ required for desktop */
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 4000;
}

.nav-title {
    font-size: 22px;
    font-weight: 700;
}

/* Desktop: nav menu inline */
.nav-right {
    display: flex;
    gap: 22px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    padding: 6px 0;
}
.nav-link:hover {
    text-decoration: underline;
}

/* Desktop: hamburger hidden */
.hamburger {
    display: none;
}

.nav-link {
    position: relative;
}

.nav-link.active {
    color: #4CAF50;
    font-weight: 700;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 3px;
    background: #4CAF50;
    border-radius: 2px;
}

/* =========================================================
   HOME PAGE LAYOUT RESTORE
   ========================================================= */
.hero {
    text-align: center;
    padding: 60px 15%;
    margin-top: 25px;
}

.hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
}

.about-section,
.disclaimer-section,
.feedback-section {
    width: 70%;
    margin: 40px auto;
    line-height: 1.6;
    color: #333;
}

.disclaimer-card {
    background: #fff8e1;
    padding: 15px 20px;
    border: 1px solid #e4d18c;
    border-radius: 10px;
    margin-bottom: 15px;
}



/* =========================================================
   MAP + FILTER PANEL
   ========================================================= */
.map-container {
    position: relative;
    display: flex;
    height: 88vh;
    overflow: hidden;
}

.filter-toggle {
    position: absolute;
    top: 65px;
    left: 12px;
    z-index: 1001;
    background: #fff;
    border: 1px solid #ddd;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.filter-panel {
    padding-top: 90px !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: #fff;
    padding: 15px;
    border-right: 1px solid #ddd;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
}
.filter-panel.open {
    transform: translateX(0);
}

.label {
    font-weight: bold;
    margin-top: 15px;
    display: block;
}

.search-input {
    width: 100%;
    padding: 9px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
}



/* =========================================================
   DROPDOWN + CHIPS
   ========================================================= */
.dropdown {
    border: 1px solid #aaa;
    border-radius: 6px;
    padding: 8px;
    background: #fff;
    position: relative;
    user-select: none;
    cursor: pointer;
}
.dropdown-selected {
    font-size: 14px;
}
.dropdown-menu {
    display: none;
    position: absolute;
    top: 42px;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #aaa;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 2000;
}
.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-item {
    padding: 6px;
    display: block;
}

/* Chips */
.chip-container {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.chip {
    background: #eef1ff;
    border-radius: 20px;
    padding: 6px 10px;
    font-size: 13px;
}
.chip-close {
    margin-left: 6px;
    cursor: pointer;
    font-weight: bold;
}



/* =========================================================
   MAP AREA + PIN COUNTER
   ========================================================= */
#map {
    flex: 1;
    height: 88vh;
    width: 100%;
    position: relative;
    z-index: 1;
}

.pin-counter {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: #fff;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    z-index: 1500;
    pointer-events: none;
}



/* =========================================================
   CLEAR FILTERS BUTTON
   ========================================================= */
.clear-filters-btn {
    position: absolute;
    top: 10px;
    right: 60px;
    z-index: 2000;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    padding: 10px 22px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #444;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.clear-filters-btn:hover {
    background: #f4f4f4;
}



/* =========================================================
   DIRECTORY PAGE
   ========================================================= */
.card {
    background:#fff;
    padding:15px;
    margin:10px auto;
    max-width:600px;
    border-radius:8px;
    box-shadow:0 2px 6px rgba(0,0,0,0.2);
}

/* Directory Search */
#dirSearch {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 20px auto;
    display: block;
    padding: 14px 18px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}



/* =========================================================
   CAROUSEL
   ========================================================= */
.carousel-section {
    padding: 20px 0;
    text-align: center;
}
.carousel {
    position: relative;
    width: 100%;
    max-width: 760px;
    height: 320px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 14px;
    background: #f2f2f2;
}
.carousel-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.carousel-img.active {
    opacity: 1;
}
.carousel-dots {
    margin-top: 12px;
}
.carousel-dot {
    height: 12px;
    width: 12px;
    background: #ccc;
    border-radius: 50%;
    display: inline-block;
    margin: 0 4px;
}
.carousel-dot.active {
    background: #666;
}



/* =========================================================
   MODAL (ABOVE MAP)
   ========================================================= */

/* =========================================================
   GENERIC MODAL OVERLAY (for both desktop + mobile)
   ========================================================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.50);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.hidden { display: none !important; }

/* =========================================================
   DESKTOP MODAL
   ========================================================= */
.modal-content {
    width: 95%;
    max-width: 480px;
    max-height: 80vh;

    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.28);
    overflow: hidden;
    position: relative;

    padding-top: 48px; /* space for close button */
}

/* Close button */
.close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 26px;
    cursor: pointer;
    color: #444;
    z-index: 10000;
}

/* Scrollable inner content */
.modal-scroll {
    max-height: calc(80vh - 60px);
    overflow-y: auto;
    padding: 0 26px 26px 26px;
}

/* ============================================
   ICON SECTIONS (headings with icons)
   ============================================ */
.section-heading {
    display: flex;
    align-items: center;
    margin-top: 26px;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #222;
}

.section-heading .icon {
    font-size: 20px;
    margin-right: 8px;
}

/* ============================================
   BADGES (animals + features)
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    background: #eef1ff;
    padding: 6px 12px;
    border-radius: 20px;
    margin: 4px 6px 4px 0;
    font-size: 14px;
    color: #333;
    border: 1px solid #d8ddff;
}

.badge .icon {
    margin-right: 6px;
}

/* ✅ Feature badges with Yes/No colouring */
.badge-yes {
    background: #e8f8e8;
    border-color: #bfe8bf;
}

.badge-no {
    background: #f5f5f5;
    border-color: #ddd;
}

/* ============================================
   LINK BUTTONS (Website, Facebook)
   ============================================ */
.link-btn {
    display: inline-flex;
    align-items: center;
    background: #eef1ff;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 15px;
    text-decoration: none;
    color: #1a4ed8;
    font-weight: 600;
    border: 1px solid #d8ddff;
    transition: background 0.2s;
}

.link-btn:hover {
    background: #e0e6ff;
}

.link-btn .icon {
    margin-right: 8px;
}

/* =========================================================
   HEADER PHOTO (top of modal / bottom sheet)
   ========================================================= */
.header-photo-wrapper {
    width: 100%;
    height: 180px;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    margin-bottom: 18px;
}

.header-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* On desktop modal */
@media (min-width: 769px) {
    .header-photo-wrapper {
        height: 220px;
        border-radius: 18px;
        margin-bottom: 22px;
    }
}

/* ============================================
   ITEM SPACING
   ============================================ */
.item-row {
    margin-bottom: 8px;
}

/* =========================================================
   ✅ MOBILE BOTTOM SHEET MODE
   ========================================================= */
@media (max-width: 768px) {

    /* Overlay dims but allows sheet effect */
    .modal {
        align-items: flex-end;         /* ✅ sheet comes from bottom */
        padding: 0;                    /* sheet touches bottom edge */
    }

    /* Bottom sheet */
    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 88vh;              /* more room on mobile */
        border-radius: 18px 18px 0 0;  /* ✅ rounded top only */
        padding-top: 52px;
        transform: translateY(100%);  
        animation: slideUp 0.25s ease-out forwards;
    }

    /* Sliding animation */
    @keyframes slideUp {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }

    /* Scroll area */
    .modal-scroll {
        max-height: calc(88vh - 70px);
        padding: 0 20px 20px;
    }

    /* Close button stays at top-right of sheet */
    .close-btn {
        top: 12px;
        right: 12px;
    }
}

/* =========================================================
   CONTACT PAGE
   ========================================================= */
.contact-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}
.two-col {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.two-col .form-group { flex: 1; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}
.submit-btn {
    background: #f4c430;
    padding: 14px 22px;
    border: none;
    border-radius: 6px;
    cursor:pointer;
    margin-top: 5px;
}



/* =========================================================
   ✅ MOBILE NAVIGATION (FULLY VERIFIED)
   ========================================================= */
@media (max-width: 768px) {

    .navbar {
        justify-content: center;
    }

    /* Mobile: show hamburger */
    .hamburger {
        display: block;
        font-size: 28px;
        background: none;
        border: none;
        cursor: pointer;
        margin: 0 auto;
        position: relative;
        z-index: 6000;
    }

    /* Mobile: hide desktop horizontal menu */
    .nav-right {
        display: none;
        flex-direction: column;
        background: #fff;

        position: absolute;
        top: 40px;
        left: 50%;
        transform: translateX(-50%);

        width: 200px;
        padding: 10px;

        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 5000;
    }
    .nav-right.open {
        display: flex;
    }

    /* Mobile carousel */
    .carousel {
        height: 180px;
    }
    .carousel-img {
        height: 180px;
    }

    /* Mobile sections */
    .about-section,
    .disclaimer-section,
    .feedback-section {
        width: 90%;
        margin: 25px auto;
    }

    /* Mobile directory search */
    #dirSearch {
        max-width: 100%;
        margin: 0 10px 20px 10px;
    }

    /* Mobile filter panel */
    .filter-panel {
        top: 60px;
        width: 100%;
        height: calc(100vh - 60px);
        transform: translateY(-100%);
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    .filter-panel.open {
        transform: translateY(0);
    }
    .filter-toggle {
        top: 60px;
        left: 15px;
    }

    #map {
        height: 65vh;
        min-height: 300px;
    }

    .clear-filters-btn {
        top: 60px;
        right: 15px;
        padding: 8px 14px;
        font-size: 14px;
    }
}


/* =========================================================
   BADGES — For animals & feature items
   ========================================================= */
.badge {
    display: inline-block;
    background: #eef1ff;
    padding: 6px 12px;
    border-radius: 20px;
    margin: 4px 6px 4px 0;
    font-size: 14px;
    color: #333;
    border: 1px solid #d8ddff;
}

/* Animal icon size inside badges */
.badge .icon {
    margin-right: 6px;
}



.filter-close-btn { 
    position: absolute;
    top: 12px;
    right: 12px;

    width: 36px;
    height: 36px;

    border: none;
    background: transparent;

    font-size: 28px;
    line-height: 1;

    color: #666;
    cursor: pointer;

    z-index: 1100;
}

.filter-close-btn:hover {
    color: #000;
} 
