:root {
    --sky-blue: #87CEEB;
    --deep-blue: #0077b6;
    --light-gray: #f8f9fa;
    --medium-gray: #e0e0e0;
    --black: #000000;
    --white: #ffffff;
}

body { font-family: 'Segoe UI', Arial, sans-serif; color: var(--black); margin: 0; padding: 0; line-height: 1.6; }

header {
    background: var(--white);
    padding: 20px 5%;
    border-bottom: 4px solid var(--sky-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-links a {
    color: var(--black);
    text-decoration: none;
    font-weight: 600;
    margin-left: 20px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.nav-links a:hover { color: var(--deep-blue); }

#map { height: 500px; width: 100%; border-bottom: 1px solid var(--medium-gray); }

.container { padding: 5px 5%; max-width: 1200px; margin: 0 auto; min-height: 1vh; }

#poolSearch {
    width: 90%;
    display: block;
    margin: 0 auto 30px auto;
    padding: 15px;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 1rem;
}

.pool-card {
    display: flex;
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.pool-img-side { width: 250px; min-width: 250px; background: #eee; object-fit: cover; }
.pool-details-side { padding: 20px; flex-grow: 1; }

.closure-badge {
    color: red;
    font-size: 0.8rem;
    border: 1px solid red;
    padding: 2px 5px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
    display: inline-block;
}

.blue-btn {
    background: var(--deep-blue);
    color: var(--white) !important;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    font-weight: bold;
    margin-top: 10px;
}

.star-btn { background: none; border: none; font-size: 2rem; cursor: pointer; color: var(--medium-gray); padding: 20px; }
.star-btn.active { color: #FFD700; }

table { width: 100%; border-collapse: collapse; margin: 20px 0; }
th { background: var(--sky-blue); text-align: left; padding: 12px; }
td { padding: 12px; border-bottom: 1px solid var(--medium-gray); }

.back-link { text-decoration: none; color: var(--deep-blue); font-weight: bold; display: block; margin-bottom: 20px; }
.hero-img { 
    width: 584px; 
    max-height: 264px; 
    object-fit: cover; 
    border-radius: 10px; 
    display: block;
    margin: 0 auto;
}

.legend-container { padding: 15px 5%; background: var(--light-gray); display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.85rem; }
.dot { height: 12px; width: 12px; border-radius: 50%; display: inline-block; }
.indoor { background: var(--deep-blue); }
.outdoor { background: var(--sky-blue); }

/* Map Markers */
.pool-marker {
    width: 100%;
    height: 100%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    box-sizing: border-box;
}

.pool-marker.circle {
    border-radius: 50%;
}

.pool-marker.square {
    border-radius: 0%;
}

.pool-marker.triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    border: none; /* Border doesn't work well with clip-path */
    box-shadow: none; /* Shadow gets clipped */
}

/* Mobile Menu - Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 1001;
}

.hamburger .bar {
    width: 30px;
    height: 3px;
    background-color: var(--black);
    border-radius: 10px;
    transition: all 0.3s linear;
}

/* Other Components */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
    align-items: start;
}

.store-btn {
    width: 25%;
    margin-top: 20px;
    text-align: center;
    box-sizing: border-box;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    align-items: center;
}

.pagination-controls button {
    padding: 10px 20px;
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    header {
        position: relative;
        flex-wrap: wrap;
        padding: 15px 5%;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: center;
        margin-top: 20px;
        background-color: var(--white);
        padding-bottom: 20px;
        border-top: 1px solid var(--medium-gray);
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-in-out;
    }

    .nav-links a {
        margin: 10px 0;
        margin-left: 0;
        font-size: 1.1rem;
        display: block;
        width: 100%;
        text-align: center;
        padding: 10px;
    }

    .nav-links a:hover {
        background-color: var(--light-gray);
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Layout Adjustments */
    .pool-card {
        flex-direction: column;
    }

    .pool-img-side {
        width: 100%;
        min-width: 100%;
        height: 200px;
    }

    .pool-details-side {
        padding: 15px;
    }

    #map {
        height: 350px;
    }

    .container {
        padding: 5px 3%;
    }

    /* Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
    }
    
    table {
        min-width: 600px; /* Force scroll */
    }

    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }

    /* Pool Header specific */
    .pool-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .pool-nav a {
        display: block;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }

    .store-btn {
        width: 100%;
    }

    .pagination-controls button {
        padding: 15px 25px;
        flex-grow: 1;
    }

    .closure-badge {
        display: block;
        margin-left: 0;
        margin-top: 5px;
        width: fit-content;
    }

    .hero-img {
        width: 100%;
        max-height: 450px;
    }
}
