/* ======================
   Jupiter Condo Rental
   Coastal Beach Theme
   ====================== */

:root {
    --ocean-dark: #1a5276;
    --ocean-mid: #2980b9;
    --ocean-light: #85c1e9;
    --sand: #f5e6ca;
    --sand-light: #fdf2e4;
    --sand-dark: #d4a76a;
    --seafoam: #a3d9c8;
    --white: #ffffff;
    --warm-gray: #6b6b6b;
    --light-gray: #f8f9fa;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    background-color: var(--white);
}

/* --- Typography --- */
h1, h2, h3, .brand-text {
    font-family: 'Playfair Display', serif;
}

.brand-text {
    font-weight: 700;
    color: var(--ocean-dark);
    font-size: 1.4rem;
}

.navbar-brand small {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 80vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 82, 118, 0.7), rgba(41, 128, 185, 0.4));
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.hero .lead {
    font-size: 1.3rem;
    font-weight: 300;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .hero { min-height: 60vh; }
    .hero h1 { font-size: 2.2rem; }
}

/* --- Section styling --- */
.section-heading {
    font-size: 2rem;
    color: var(--ocean-dark);
    margin-bottom: 0.5rem;
}

.section-divider {
    width: 60px;
    height: 3px;
    background: var(--sand-dark);
    margin: 0 auto 2rem;
}

/* --- Unit Cards --- */
.unit-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.unit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.unit-card .card-img-top {
    height: 280px;
    object-fit: cover;
}

.unit-card .card-body {
    padding: 1.5rem;
}

.unit-card .price-tag {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ocean-dark);
}

/* --- Amenity chips --- */
.amenity-chip {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    margin: 0.2rem;
    background: var(--sand-light);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--warm-gray);
}

.amenity-chip i {
    color: var(--ocean-mid);
    margin-right: 0.3rem;
}

/* --- Photo Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}

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

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

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10000;
    background: none;
    border: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    border: none;
    padding: 1rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.25);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

/* --- Gallery filter tabs --- */
.gallery-filters .btn {
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    margin: 0.2rem;
}

.gallery-filters .btn.active {
    background: var(--ocean-dark);
    border-color: var(--ocean-dark);
    color: white;
}

/* --- Availability Calendar --- */
.cal-month {
    user-select: none;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: default;
}

.cal-day.available {
    background: #e8f5e9;
    color: #2e7d32;
    cursor: pointer;
}

.cal-day.unavailable {
    background: #ffebee;
    color: #c62828;
    text-decoration: line-through;
}

.cal-day.past {
    color: #ccc;
}

.cal-day.today {
    border: 2px solid var(--ocean-mid);
    font-weight: 600;
}

.cal-day.selected {
    background: var(--ocean-mid) !important;
    color: white !important;
    text-decoration: none !important;
}

.cal-day.in-range {
    background: var(--ocean-light) !important;
    color: var(--ocean-dark) !important;
    text-decoration: none !important;
}

.cal-header {
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--warm-gray);
    text-align: center;
    padding: 0.3rem 0;
}

/* --- Booking form --- */
.booking-summary {
    background: var(--sand-light);
    border-radius: 12px;
    padding: 1.5rem;
}

.booking-summary .price-line {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
}

.booking-summary .total-line {
    border-top: 2px solid var(--sand-dark);
    font-weight: 600;
    font-size: 1.1rem;
    padding-top: 0.6rem;
    margin-top: 0.4rem;
}

/* --- Buttons --- */
.btn-ocean {
    background: var(--ocean-dark);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-ocean:hover {
    background: var(--ocean-mid);
    color: white;
}

.btn-sand {
    background: var(--sand);
    color: var(--ocean-dark);
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
}

.btn-sand:hover {
    background: var(--sand-dark);
    color: white;
}

/* --- Location highlights --- */
.highlight-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--sand-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--ocean-dark);
    margin: 0 auto 0.8rem;
}

/* --- Admin --- */
.admin-sidebar {
    background: var(--ocean-dark);
    min-height: 100vh;
    padding: 1.5rem 0;
}

.admin-sidebar a {
    color: rgba(255,255,255,0.7);
    padding: 0.7rem 1.5rem;
    display: block;
    text-decoration: none;
    transition: all 0.2s;
}

.admin-sidebar a:hover, .admin-sidebar a.active {
    color: white;
    background: rgba(255,255,255,0.1);
}

.stat-card {
    border: none;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ocean-dark);
}

.source-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

.source-direct { background: #e8f5e9; color: #2e7d32; }
.source-airbnb { background: #fce4ec; color: #c62828; }
.source-vrbo { background: #e3f2fd; color: #1565c0; }
.source-blocked { background: #f3e5f5; color: #7b1fa2; }

/* --- Responsive --- */
@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .unit-card .card-img-top {
        height: 200px;
    }
}

/* --- Misc --- */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lazy-load {
    opacity: 0;
    transition: opacity 0.5s;
}

.lazy-load.loaded {
    opacity: 1;
}
