/* ============================================
   EDEN VACATIONS - PAGE STYLES
   ============================================ */

/* Import Global Styles */
@import url('../assets/css/global.css');

/* ===== HERO SECTION (Specific to Vacations) ===== */
.hero {
    position: relative;
    background-image: url("images/hero-background.jpg");
    background-size: cover;
    background-position: center center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;

    /* since body has padding-top, hero remains visually consistent */
    margin-top: calc(var(--navbar-height) * -1);
    padding-top: var(--navbar-height);
}

/* 
   OVERRIDE NAVBAR BEHAVIOR FOR THIS PAGE ONLY
   User Request: Navbar should NOT scroll with page (fixed at top relative to doc, not viewport)
   and should NOT change color.
*/
body .navbar {
    position: absolute; /* Changed from fixed (global) to absolute */
    background: transparent !important; /* Force transparency */
    box-shadow: none !important;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.35) 100%
    );
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    width: 100%;
}

.hero h1 {
    margin-bottom: 16px;
    color: #ffffff;
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.hero-headline {
    position: relative;
    top: -60px;
    font-family: "Playfair Display", Georgia, serif;
    font-style: italic;
    font-size: 4.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
    letter-spacing: -0.5px;
}

.hero-eden {
    font-weight: 700;
}

.hero p {
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 48px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

/* ===== SEARCH BOX ===== */
.search-box {
    background: white;
    border-radius: 60px;
    box-shadow: var(--shadow-xl);
    padding: 12px 12px 12px 40px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0;
}

.search-field {
    position: relative;
    flex: 1;
    padding: 16px 24px 16px 0;
}

.search-field label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--airbnb-dark);
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    text-align: center;
}

/* Trennlinie zwischen Feldern */
.search-field-guests {
    border-left: 1px solid var(--airbnb-border);
    padding-left: 24px;
}

/* Datum Display */
.search-date-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--airbnb-dark);
    font-weight: 500;
    min-width: 180px;
}

.search-date-icon {
    font-size: 1.1rem;
    opacity: 0.5;
}

/* Gäste Display */
.search-guest-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--airbnb-dark);
    font-weight: 500;
    min-width: 140px;
}

.search-guest-icon {
    font-size: 1.1rem;
    opacity: 0.5;
}

/* Suchen Button */
.search-button {
    background: var(--airbnb-red);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 18px 36px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-button:hover {
    background: var(--airbnb-red-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.search-button:active {
    transform: translateY(0);
}

/* ===== CUSTOM KALENDER (Shared with Apartment) ===== */
.calendar-popup {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 28px;
    z-index: 200;
    width: 680px;
}

.calendar-popup.active {
    display: block;
}

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

.calendar-nav {
    background: none;
    border: 1px solid var(--airbnb-border);
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--airbnb-dark);
    transition: all 0.2s;
}

.calendar-nav:hover {
    border-color: var(--airbnb-dark);
    background: var(--airbnb-light-gray);
}

.calendar-month-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--airbnb-dark);
}

.calendar-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.calendar-month-block .month-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--airbnb-dark);
    margin-bottom: 16px;
    text-align: center;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-weekdays span {
    text-align: center;
    font-size: 0.8rem;
    color: var(--airbnb-gray);
    font-weight: 600;
    padding: 4px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    text-align: center;
    padding: 10px 4px;
    font-size: 0.9rem;
    color: var(--airbnb-dark);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    border: none;
    background: none;
    font-family: inherit;
}

.calendar-day:hover {
    background: var(--airbnb-light-gray);
}

.calendar-day.other-month {
    color: var(--airbnb-border);
    cursor: default;
}

.calendar-day.other-month:hover {
    background: none;
}

.calendar-day.today {
    font-weight: 700;
    border: 1px solid var(--airbnb-dark);
}

.calendar-day.selected {
    background: var(--airbnb-dark);
    color: white;
    font-weight: 600;
}

.calendar-day.in-range {
    background: #f0f0f0;
}

.calendar-day.disabled {
    color: var(--airbnb-border);
    cursor: not-allowed;
}

.calendar-day.disabled:hover {
    background: none;
}

/* ===== GÄSTE DROPDOWN ===== */
.guest-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 24px;
    z-index: 200;
    width: 280px;
}

.guest-dropdown.active {
    display: block;
}

.guest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.guest-row + .guest-row {
    border-top: 1px solid var(--airbnb-border);
}

.guest-row-label strong {
    display: block;
    font-size: 0.95rem;
    color: var(--airbnb-dark);
    margin-bottom: 2px;
}

.guest-row-label span {
    font-size: 0.82rem;
    color: var(--airbnb-gray);
}

.guest-row-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.guest-row-controls span {
    font-size: 1rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    color: var(--airbnb-dark);
}

.guest-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--airbnb-border);
    background: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--airbnb-dark);
    transition: all 0.2s;
}

.guest-btn:hover {
    border-color: var(--airbnb-dark);
}

.guest-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: var(--airbnb-border);
}

.guest-btn:disabled:hover {
    border-color: var(--airbnb-border);
}

/* ===== APARTMENT GRID ===== */
.apartments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 32px;
}

/* ===== APARTMENT CARD (AIRBNB STYLE) ===== */
.apartment-card {
    cursor: pointer;
    transition: transform 0.2s;
}

.apartment-card:hover {
    transform: translateY(-4px);
}

.apartment-image-container {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 Aspect Ratio */
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--airbnb-light-gray);
}

.apartment-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.apartment-card:hover .apartment-image {
    transform: scale(1.05);
}

.apartment-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: white;
    color: var(--airbnb-dark);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.favorite-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.favorite-btn:hover {
    background: white;
    transform: scale(1.1);
}

.apartment-info {
    padding: 4px 0;
}

.apartment-location {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.apartment-city {
    font-weight: 600;
    color: var(--airbnb-dark);
    font-size: 1rem;
}

.apartment-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.apartment-title {
    color: var(--airbnb-gray);
    font-size: 0.9375rem;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apartment-guests {
    color: var(--airbnb-gray);
    font-size: 0.9375rem;
    margin-bottom: 8px;
}

.apartment-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-amount {
    font-weight: 600;
    color: var(--airbnb-dark);
    font-size: 1rem;
}

.price-period {
    color: var(--airbnb-gray);
    font-size: 0.9375rem;
}

/* Responsive adjustments specific to search page */
/* Responsive adjustments specific to search page */
@media (max-width: 1024px) {
    .apartments-grid {
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 Columns */
    }
}

@media (max-width: 768px) {
    /* Hero Typography */
    .hero h1 { font-size: 2.5rem; }
    .hero-headline { font-size: 3rem; top: -20px; }
    .hero p { font-size: 1rem; margin-bottom: 32px; }

    /* Search Form Stacking */
    .search-box {
        padding: 16px; /* Reduced padding */
        border-radius: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .search-form {
        flex-direction: column; /* Stack items */
        align-items: stretch;
        gap: 12px;
        width: 100%;
    }

    .search-field {
        border: 1px solid var(--airbnb-border);
        border-radius: 12px;
        padding: 12px 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .search-field-guests {
        border-left: 1px solid var(--airbnb-border);
        /* Actually, in stacking we just want the full border from .search-field */
        border-left: 1px solid var(--airbnb-border); 
        padding-left: 16px; 
        /* Reset specific desktop styles if needed, but .search-field overrides mostly */
    }
    
    /* Correcting the border-left issue - simply use the standard border */
    .search-field-guests {
        border: 1px solid var(--airbnb-border);
        padding-left: 16px;
    }

    .search-button {
        width: 100%;
        border-radius: 12px;
        justify-content: center;
    }

    /* Apartment Grid Mobile */
    .apartments-grid {
        grid-template-columns: 1fr; /* Mobile: 1 Column */
        gap: 32px;
    }

    /* Ensure dropdowns fit */
    .guest-dropdown, .calendar-popup {
        width: 100%; /* Max width relative to container */
        min-width: unset;
        max-width: 320px;
    }
    
    .calendar-popup {
        width: 90vw;
        max-width: 350px;
        padding: 16px;
    }
    
    .calendar-grid-wrapper {
        grid-template-columns: 1fr; /* Single month view on mobile */
        gap: 20px;
    }
    
    .calendar-month-block:nth-child(2) {
        display: none; /* Show only 1 month on very small screens? or stack them */
        display: block; /* Let them stack */
    }

    .search-date-display, .search-guest-display {
        min-width: unset;
        width: 100%;
    }
}
