@import url('https://fonts.googleapis.com/css2?family=Inter:wght@900&display=swap');

/* --------------------------------------------------------------------------
   GLOBAL RESET & ROOT
-------------------------------------------------------------------------- */
:root {
    --side-panel-text-color: #000000;
    --primary-bg-color: #f9f9f9;
    --text-color: #000000;
    --jet-black: #000000;
    --accent-blue: rgba(50, 170, 220, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
    font-family: "Roboto", "Orbitron", sans-serif;
    background-color: var(--primary-bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

body {
    background-image: url('/assets/images/background1.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    position: relative;
    z-index: 1;
}

/* --------------------------------------------------------------------------
     HEADER
-------------------------------------------------------------------------- */
.header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(1px);
    padding: 0.75rem 1rem;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.15),
        inset 0 0 2px rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid var(--jet-black);
}

.header-left { 
    display: inline-block; 
}

.donate-btn { 
    padding: 8px 16px;
    background: linear-gradient(45deg, var(--accent-blue), rgba(255, 2, 2, 0.2));
    border-radius: 6px;
    border: 4px solid var(--jet-black);
    box-shadow: 
        0 4px 15px rgba(34, 162, 236, 0.226),
        0 0 10px rgba(50, 89, 107, 0.5);
    color: var(--jet-black);
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.donate-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(4, 147, 243, 0.226);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.donate-btn:hover::after {
    width: 200%;
    height: 200%;
}

.donate-btn:hover {
    background: rgba(3, 142, 255, 0.192);
    transform: translateY(-3px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(255, 255, 255, 0.7);
}

.page-title {
    color: var(--jet-black);
    text-shadow: 
        1px 1px 2px rgba(255, 255, 255, 0.5),
        0 0 6px rgba(0, 0, 0, 0.7);
    font-weight: 900;
    font-size: 2.2rem;
    margin: 1rem auto;
    max-width: 90%;
    text-align: center;
}

/* --------------------------------------------------------------------------
     HAMBURGER MENU
-------------------------------------------------------------------------- */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 1rem;
    flex-direction: column;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--jet-black);
    margin: 4px 0;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);
    transition: transform 0.3s ease;
}

/* --------------------------------------------------------------------------
     AUTH SECTION
-------------------------------------------------------------------------- */
.auth-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(1px);
    padding: 0.5rem 1rem;
    box-shadow: 
        inset 0 -1px 2px rgba(0, 0, 0, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--jet-black);
    border-radius: 8px;
}

.auth-section .hidden {
    display: none;
}

.auth-section {
    font-weight: 900;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

/* Email Login Form Styling */
.email-login-form {
    margin-top: 1rem; /* Adds space between the auth section and the email form */
    padding: 1rem;
    border: 1px solid var(--jet-black);
    border-radius: 8px;
    background: rgba(111, 195, 235, 0.192);
  }

/* --------------------------------------------------------------------------
     GLASS PANEL & BUTTONS
-------------------------------------------------------------------------- */
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 0 2px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    border: 1px solid var(--jet-black);
}

.glass-input {
    width: 100%;
    padding: 6px;
    margin-bottom: 12px;
    border: 1px solid var(--jet-black);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--jet-black);
    font-size: 14px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    transition: box-shadow 0.3s ease;
}

.glass-input:focus {
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.15),
        0 0 6px rgba(255, 255, 255, 0.5);
}

.glass-input::placeholder {
    color: var(--jet-black);
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.4);
}

.button-group {
    display: flex;
    gap: 4px;
}

.glass-button {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--jet-black);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--jet-black);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    transition: all 0.3s ease;
}

.glass-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 
        0 6px 18px rgba(0, 0, 0, 0.2),
        0 0 8px rgba(255, 255, 255, 0.5);
}

/* --------------------------------------------------------------------------
     MAIN CONTAINER
-------------------------------------------------------------------------- */
.main-container {
    display: flex;
    margin: 1rem;
    gap: 1rem;
}

/* --------------------------------------------------------------------------
     SIDE PANELS (LEFT & RIGHT)
-------------------------------------------------------------------------- */
.side-panel {
    width: 300px;
    min-width: 150px;
    padding: 1rem;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
    color: var(--jet-black);
    font-weight: 900;
    border: 2px solid var(--jet-black);
    background: rgba(111, 195, 235, 0.192);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(1px);
}

.panel-logo {
    text-align: center;
    margin-bottom: 1rem;
}

.panel-logo-img {
    max-height: 120px;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.3));
}

.side-panel h2 {
    margin-bottom: 1rem;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
    color: var(--jet-black);
    font-weight: 900;
    font-size: 1.5rem;
}

.side-panel ul {
    list-style: none;
}

.side-panel li {
    margin-bottom: 0.5rem;
    position: relative;
    color: var(--jet-black);
    font-weight: 900;
}

/* In your styles.css file */
.h2-link {
    color: var(--jet-black);
    font-weight: 900;
    text-decoration: none;
  }

/* --------------------------------------------------------------------------
     DROPDOWN MENUS
-------------------------------------------------------------------------- */
.dropdown {
    position: relative;
    margin-bottom: 0.5rem;
}

.dropdown-btn {
    width: 100%;
    border: 2px solid var(--jet-black);
    background: rgba(255, 255, 255, 0.1);
    color: var(--jet-black);
    text-align: left;
    cursor: pointer;
    font-weight: 700;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(1px);
    transition: all 0.3s ease;
}

.dropdown-btn:hover {
    background: rgba(0, 180, 224, 0.2);
    box-shadow: 
        0 6px 18px rgba(0, 0, 0, 0.2),
        0 0 6px rgba(255, 255, 255, 0.5);
}

.dropdown-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: rgba(2, 196, 245, 0.178);
    padding: 0.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(1px);
    margin-top: 0.25rem;
}

.dropdown.open .dropdown-menu {
    display: flex;
}

.dropdown:hover .dropdown-menu {
    display: flex;
}

.dropdown-menu a {
    color: var(--jet-black);
    text-decoration: none;
    font-weight: 700;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    color: var(--jet-black);
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
     CENTER PANEL
-------------------------------------------------------------------------- */
.center-panel {
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    border: 2px solid var(--jet-black);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(1px);
}

/* --------------------------------------------------------------------------
     MAP CONTAINER
-------------------------------------------------------------------------- */
.map-container {
    flex: 1 1 600px;
    border-radius: 12px;
    border: 4px solid var(--jet-black);
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

#map {
    width: 100%;
    height: 650px;
    min-height: 400px;
}

/* --------------------------------------------------------------------------
     TIMELINE CONTAINER
-------------------------------------------------------------------------- */
.timeline-container {
    padding: 15px;
    background: rgba(83, 206, 243, 0.1);
    border-top: 2px solid var(--jet-black);
    backdrop-filter: blur(2px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.timeline-label {
    font-weight: bold;
    color: var(--jet-black);
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
}

.timeline-year-display {
    font-weight: bold;
    color: var(--jet-black);
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--jet-black);
}

.timeline-slider-container {
    position: relative;
    height: 30px;
    margin-bottom: 10px;
}

.timeline-track {
    position: absolute;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.2);
    top: 50%;
    transform: translateY(-50%);
    border-radius: 2px;
}

.timeline-range {
    position: absolute;
    height: 8px;
    background: rgb(0, 179, 224);
    top: 50%;
    transform: translateY(-50%);
    border-radius: 4px;
    z-index: 1;
}

.timeline-slider {
    position: absolute;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    height: 30px;
    background: transparent;
    outline: none;
    z-index: 2;
}

.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border: 2px solid var(--jet-black);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.timeline-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #412424;
    border: 2px solid var(--jet-black);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.timeline-legend {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 5px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--jet-black);
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}

.legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
    border: 1px solid rgba(0, 0, 0, 0.3);
}

/* Location info window styling */
.location-info-window {
    font-family: "Roboto", sans-serif;
    padding: 10px;
    text-align: center;
}

.location-info-window h3 {
    margin-bottom: 5px;
    color: var(--jet-black);
    font-weight: bold;
}

.child-grid {
    margin-top: 10px;
}

.child-thumbnail {
    transition: transform 0.2s ease;
    position: relative;
}

.child-thumbnail:hover {
    transform: scale(1.1);
    z-index: 10;
}

.child-name-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 20;
}

.child-thumbnail:hover .child-name-tooltip {
    opacity: 1;
}

/* --------------------------------------------------------------------------
     MILK CARTON CONTAINER
-------------------------------------------------------------------------- */
.milk-carton-container {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    margin-left: 1rem;
}

.milk-carton-wrapper {
    position: relative;
    max-width: 300px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0 auto;
}

.milk-carton {
    width: 100%;
    height: auto;
    display: block;
}

.milk-carton-overlay {
    position: absolute;
    top: 26%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    background-color: rgb(167, 23, 23);
    color: #ffffff;
    padding: 1.05rem;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 1.05rem; /* Added text size (20px) */
}

.button-container {
    margin-top: 10px; /* Pushes the button down */
    text-align: center;
}

.child-photo {
    width: 210px;
    height: 210px;
    object-fit: cover;
    object-position: 50% 50%;
    margin-bottom: 0.5rem;
    border-radius: 30% / 80%;
    border: 2px solid #050505;
    background-color: #fff;
}

/* --------------------------------------------------------------------------
     RIGHT PANEL
-------------------------------------------------------------------------- */
.right-panel {
    width: 250px;
    min-width: 150px;
    border: 2px solid var(--jet-black);
    background: rgba(111, 195, 235, 0.192);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(3px);
}

/* --------------------------------------------------------------------------
     STATS WINDOW (NEW)
-------------------------------------------------------------------------- */
.stats-window {
    background: rgba(111, 195, 235, 0.192);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(1px);
    border: 3px solid var(--jet-black);
    text-align: center;
}

.stats-window h3 {
    color: var(--jet-black);
    font-weight: 900;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 4px rgb(252, 251, 251);
}

.stats-window p {
    color: var(--jet-black);
    font-weight: 900;
    font-size: 1.2rem;
}

.stats-window p.total-kids {
    color: #000;
    font-weight: 900;
    font-size: 1.3rem;
    margin-top: 0.5rem;
    border-top: 3px solid var(--jet-black);
    padding-top: 0.5rem;
}

/* Stats Window Colors */
.stats-window p.total-2025 { color: #000; font-weight: 700; }
.stats-window p.total-2024 { color: #000; font-weight: 700; }
.stats-window p.total-2023 { color: #000; font-weight: 700; }
.stats-window p.age-3-6 { color: #ffe600; font-weight: 700; text-shadow: 0 0 3px rgb(0, 0, 0); }
.stats-window p.age-7-10 { color: #ff9800; font-weight: 700; text-shadow: 0 0 3px rgb(0, 0, 0); }
.stats-window p.age-11-17 { color: #ff1100; font-weight: 700; text-shadow: 0 0 3px rgb(0, 0, 0); }
.stats-window p.age-18-21 { color: #1b0707; font-weight: 700; text-shadow: 0 0 3px rgba(0, 0, 0, 0.445); }

/* --------------------------------------------------------------------------
     FOOTER
-------------------------------------------------------------------------- */
.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(111, 195, 235, 0.192);
    backdrop-filter: blur(1px);
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--jet-black);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
    margin-top: 1rem;
}

.footer p {
    color: var(--jet-black);
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--jet-black);
    font-weight: 700;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
    transition: text-shadow 0.3s ease;
}

.footer-links a:hover {
    text-decoration: underline;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
}

/* --------------------------------------------------------------------------
     HAMBURGER VISIBILITY TOGGLE (MOBILE)
-------------------------------------------------------------------------- */
.left-panel.visible,
.right-panel.visible {
    display: block !important; 
}

/* --------------------------------------------------------------------------
     RESPONSIVE DESIGN
-------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    html, body {
        height: 100%;
        margin: 0;
        padding: 0;
    }

    .main-container {
        display: flex;
        flex-direction: column;
        height: 100%;
        padding-bottom: 4rem;
    }

    .left-panel,
    .right-panel {
        width: 100%;
        display: none;
    }

    .center-panel {
        flex-direction: column;
    }

    .map-container {
        flex-grow: 1;
        min-height: 50vh;
        height: auto;
    }

    #map {
        height: 50vh;
    }

    .timeline-container {
        padding: 10px;
    }

    .timeline-legend {
        flex-wrap: wrap;
        justify-content: center;
    }

    .legend-item {
        margin: 0 5px 5px 0;
    }

    .milk-carton-container {
        width: 100%;
        margin: 1rem auto;
    }

    .footer {
        position: fixed;
        bottom: 0;
        width: 100%;
        z-index: 10;
        flex-direction: row;
        justify-content: space-between;
        padding: 0.5rem 1rem;
    }

    .footer-links {
        gap: 1rem;
    }
}

@media (max-width: 768px) and (orientation: portrait) {
    .map-container {
        min-height: 60vh;
    }
}