/**
 * Midnight Pool Template
 * Colors:
 * Primary: #3a6b8a (softer pool blue)
 * Secondary: #328CC1 (brighter pool accent)
 * Accent: #F4D35E (warm light glow)
 * Background: #FDFDFD
 * Text: #111827
 */

:root {
    --primary: #3a6b8a;
    --secondary: #328CC1;
    --accent: #F4D35E;
    --bg: #FDFDFD;
    --text: #111827;
    --white: #FFFFFF;
    --light-gray: #E5E7EB;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background-color: var(--primary);
    color: var(--white);
    padding: 0.6rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.logo-image {
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

.logo a {
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
    opacity: 0.9;
}

.main-nav a:hover {
    opacity: 1;
    color: var(--accent);
}

.btn-primary {
    background-color: var(--accent);
    color: var(--primary);
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-weight: 700;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: var(--secondary);
    color: var(--white);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    display: block;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
}

/* When slider is present, make hero background transparent */
.hero:has(.hero-slider) {
    background: rgba(26, 32, 44, 0.3);
    backdrop-filter: blur(1px);
}

/* Hero Slider - background behind text */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 120%;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    filter: blur(2px) brightness(0.6);
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

/* Hero content appears above slider */
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Add text shadow for better readability over images */
.hero-content h1,
.hero-content p {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 8px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-left: 4px solid var(--accent);
}

.card h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 700;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: var(--secondary);
}

.btn-secondary {
    background-color: var(--secondary);
}

.btn-secondary:hover {
    background-color: var(--accent);
    color: var(--primary);
}

.btn-booking {
    background-color: var(--accent) !important;
    color: var(--primary) !important;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-booking:hover {
    background-color: var(--secondary) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Rooms Grid */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.room-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 3px solid var(--accent);
}

.room-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.room-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.room-content {
    padding: 1.5rem;
}

.room-content h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.room-rate {
    font-size: 1.5rem;
    color: var(--secondary);
    font-weight: 700;
    margin: 1rem 0;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4/3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--light-gray);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Footer */
.site-footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--accent);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
    transition: color 0.3s;
}

.footer-section a:hover {
    opacity: 1;
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.9rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: relative;
    }

    .main-nav ul {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: var(--primary);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        z-index: 1000;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        margin-top: 0;
    }

    .main-nav ul.active {
        display: flex;
    }

    .hero {
        min-height: 400px;
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

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

    /* Hero slider mobile adjustments */
    .hero-slide {
        background-size: cover !important;
        background-position: center center;
    }

    /* Hero buttons mobile layout */
    .hero-buttons {
        flex-direction: column !important;
        align-items: center !important;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Center buttons on mobile with spacing */
    .container > div[style*="text-align: center"] {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
    }

    .container > div[style*="text-align: center"] a {
        width: 100%;
        max-width: 300px;
        text-align: center;
        margin-left: 0 !important;
    }

    /* Contact page mobile layout */
    .contact-layout {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .contact-layout > div {
        margin-bottom: 0 !important;
    }

    .card {
        margin-bottom: 2rem;
    }
}

/* Leaflet Map Styles */
#map {
    z-index: 1;
}

.leaflet-container {
    font-family: inherit;
}

