/* ===========================
   HERO SECTION
   =========================== */

.sd-hero {
    position: relative;
    min-height: 80vh;
    color: #fff;
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Dark overlay so white text pops */
.sd-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.45),
        rgba(15, 23, 42, 0.70)
    );
}

.sd-hero-inner {
    position: relative;
    z-index: 1;
    padding: 1.25rem 0 4rem;
}

/* Generic hidden helper */
.sd-hidden {
    display: none !important;
}

/* ===========================
   TOP NAV OVER HERO
   =========================== */

.sd-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.sd-logo { display: block; }

/* separate sizes if needed */
.sd-logo-desktop { height: 40px; }
.sd-logo-mobile  { height: 32px; }

.sd-logo-link { text-decoration: none; }

.sd-nav-link {
    color: #f9fafb;
    text-decoration: none;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.sd-nav-link:hover,
.sd-nav-link:focus {
    color: #ffffff;
    opacity: 0.85;
    text-decoration: none;
}

.sd-nav-link-btn {
    border: 0;
    background: transparent;
    padding: 0;
}

.sd-nav-icon {
    margin-right: 0.15rem;
}

/* Mobile menu button (header) */
.sd-mobile-menu-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 0;
    background: rgba(15, 23, 42, 0.86);
    color: #f9fafb;
    font-size: 1.1rem;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.45);
}

/* Slide-down / side mobile menu (base styles) */
.sd-mobile-menu {
    margin-top: 0.5rem;
    background: rgba(15, 23, 42, 0.96);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    display: none;
}

.sd-mobile-menu.is-open { display: block; }

.sd-mobile-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    color: #f9fafb;
    text-decoration: none;
    font-size: 0.9rem;
}

.sd-mobile-link:hover {
    color: #ffffff;
    text-decoration: none;
}

/* ===========================
   HERO HEADING
   =========================== */

.sd-hero-heading {
    text-align: center;
    margin-top: 4.5rem;
}

.sd-hero-tags {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    opacity: 0.95;
}

.sd-hero-tags span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.7rem;
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 999px;
    backdrop-filter: blur(6px);
}

/* ===========================
   SEARCH CARD + TABS
   =========================== */

.sd-search-wrapper {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

/* Rectangular card */
.sd-search-card {
    position: relative;
    max-width: 1100px;
    width: 100%;
    background: #ffffff;
    border-radius: 1rem;
    padding: 3.5rem 3rem 2.5rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.45);
}

/* Floating menu wrapper – positions the tabs half in / half out */
.sd-search-tabs-wrapper {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.sd-search-tabs {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem;
    border-radius: 999px;
    background: #f8fafc;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.35);
}

.sd-search-tab {
    border: 0;
    border-radius: 999px;
    padding: 0.55rem 1.4rem;
    background: transparent;
    color: #0f172a;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    white-space: nowrap;
}

.sd-search-tab .sd-tab-icon { font-size: 1rem; }

.sd-search-tab.active {
    background: #1856ff;
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.7);
}

.sd-search-tab:not(.active):hover {
    background: rgba(148, 163, 184, 0.18);
}

/* ===========================
   SEARCH OPTIONS (RADIO PILLS)
   =========================== */

.sd-search-options {
    gap: 1rem;
}

.sd-radio-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(100, 116, 139, 0.35);
    background: #f8fafc;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.85rem;
    color: #0f172a;
}

.sd-radio-pill input {
    display: none;
}

.sd-radio-pill-active {
    border-color: rgba(37, 99, 235, 0.45);
    background: rgba(37, 99, 235, 0.10);
}

.sd-badge-new {
    font-size: 0.68rem;
    line-height: 1;
    padding: 0.22rem 0.45rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sd-link-inline {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 600;
}
.sd-link-inline:hover { text-decoration: underline; }

/* ===========================
   FORM LABELS + INPUTS
   =========================== */

.sd-search-form .sd-field-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

/* ✅ FIX: allow shrinking (was min-width:180px) */
.sd-field {
    position: relative;
    min-width: 0;            /* ✅ critical */
}

/* ✅ FIX: remove hard min-widths that cause overflow */
/* .sd-field-city { min-width: 320px; } */
/* .sd-field-guests { min-width: 220px; } */
/* .sd-field-price { min-width: 200px; } */

.sd-field-input,
.sd-field-display {
    border-radius: 999px;
    border: 1px solid #6b7280; /* darker border */
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    box-shadow: none;
    width: 100%;
    min-width: 0;            /* ✅ critical */
    box-sizing: border-box;  /* ✅ critical */
    background-color: #ffffff;
}

.sd-field-display {
    text-align: left;
    cursor: pointer;
    white-space: nowrap;        /* ✅ prevent wrap */
    overflow: hidden;           /* ✅ prevent overflow */
    text-overflow: ellipsis;    /* ✅ */
}

.sd-field-input::placeholder {
    color: #4b5563;
    font-weight: 600; /* bold-ish placeholder */
}

.sd-field-input:focus,
.sd-field-display:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
    outline: none;
}

/* ✅ FIX: DESKTOP one-line layout inside card (no overlap, no spill) */
/* ✅ FIX: DESKTOP one-line layout (fits Search button comfortably) */
@media (min-width: 768px) {
    .sd-search-form-row{
        display: grid;
        align-items: end;
        gap: 14px;
        width: 100%;

        /* Tweaked ratios:
           - Guests + Price slightly smaller
           - Button gets safe space
        */
        grid-template-columns:
            minmax(0, 2.55fr)     /* City */
            minmax(0, 1.05fr)     /* Check-in */
            minmax(0, 1.05fr)     /* Check-out */
            minmax(0, 1.25fr)     /* Rooms & guests (slightly smaller) */
            minmax(0, 0.95fr)     /* Price (slightly smaller) */
            minmax(150px, 0.90fr);/* Search (guaranteed) */
    }

    /* Ensure shrink is allowed everywhere */
    .sd-search-form-row .sd-field{
        min-width: 0;
    }

    /* Tighten ONLY these two fields a bit (so button fits nicely) */
    .sd-field-guests .sd-field-display,
    .sd-field-price  .sd-field-display{
        padding: 0.60rem 0.85rem;
        font-size: 0.88rem;
    }

    /* Keep their text single-line */
    .sd-field-guests .sd-field-display,
    .sd-field-price .sd-field-display{
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Dates should not force width */
    #checkInInput,
    #checkOutInput{
        width: 100%;
        min-width: 0;
    }

    /* Button fills its grid cell */
    .sd-btn-search-inline{
        width: 100%;
        height: 46px;
        min-width: 150px;
    }
}

/* ===========================
   CITY DROPDOWN
   =========================== */

.sd-city-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 80;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(15,23,42,0.10);
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.18);
    padding: 0.65rem;
}

.sd-city-section + .sd-city-section {
    border-top: 1px solid rgba(15,23,42,0.08);
    margin-top: 0.65rem;
    padding-top: 0.65rem;
}

.sd-city-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(15,23,42,0.55);
    margin-bottom: 0.35rem;
}

.sd-city-item {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    color: rgba(15,23,42,0.90);
}

.sd-city-item:hover {
    background: rgba(37,99,235,0.08);
}

.sd-city-name { font-weight: 700; }
.sd-city-meta { font-size: 0.78rem; color: rgba(15,23,42,0.55); font-weight: 600; }

/* ===========================
   DROPDOWNS (GUESTS / PRICE)
   =========================== */

.sd-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 90;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(15,23,42,0.10);
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.18);
    padding: 0.65rem;
}

.sd-dropdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0.35rem;
}

.sd-dropdown-row + .sd-dropdown-row {
    border-top: 1px solid rgba(15,23,42,0.08);
}

.sd-dropdown-label {
    font-weight: 700;
    color: rgba(15,23,42,0.88);
}

.sd-dropdown-help {
    font-size: 0.8rem;
    color: rgba(15,23,42,0.55);
    font-weight: 600;
}

.sd-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(15,23,42,0.04);
    border: 1px solid rgba(15,23,42,0.10);
    border-radius: 999px;
    padding: 0.25rem 0.35rem;
}

.sd-counter-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 0;
    background: rgba(37,99,235,0.12);
    color: rgba(15,23,42,0.90);
    font-weight: 900;
    cursor: pointer;
}

.sd-counter-btn:hover {
    background: rgba(37,99,235,0.18);
}

.sd-counter-value {
    min-width: 18px;
    text-align: center;
    font-weight: 800;
    color: rgba(15,23,42,0.85);
}

.sd-dropdown-footer {
    border-top: 1px solid rgba(15,23,42,0.08);
    margin-top: 0.4rem;
    padding-top: 0.55rem;
    display: flex;
    justify-content: flex-end;
}

.sd-btn-apply {
    border: 0;
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    font-weight: 800;
    background: rgba(37,99,235,0.12);
    color: rgba(15,23,42,0.90);
    cursor: pointer;
}

.sd-btn-apply:hover {
    background: rgba(37,99,235,0.18);
}

.sd-dropdown-item {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 0.6rem 0.65rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

.sd-dropdown-item:hover {
    background: rgba(37,99,235,0.08);
}

/* ===========================
   TRENDING PILL LINKS
   =========================== */

.sd-pill-link {
    border: 1px solid rgba(15,23,42,0.10);
    background: rgba(15,23,42,0.03);
    color: rgba(15,23,42,0.75);
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.sd-pill-link:hover {
    background: rgba(37,99,235,0.08);
    border-color: rgba(37,99,235,0.18);
}

/* ===========================
   SEARCH BUTTON
   =========================== */

.sd-btn-search {
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: 0;
    padding: 0.8rem 1.2rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    min-width: 160px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sd-btn-search:hover {
    background: linear-gradient(135deg, #1d4ed8, #1d4ed8);
}

/* ===========================
   HOME SECTIONS + GRIDS
   =========================== */

.sd-home-section {
    padding: 3.25rem 0;
    background: #ffffff;
}

.sd-home-section-alt {
    background: #f8fafc;
}

.sd-section-head {
    margin-bottom: 1.25rem;
}

.sd-section-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
    color: rgba(15,23,42,0.92);
}

.sd-section-sub {
    margin: 0.25rem 0 0;
    color: rgba(15,23,42,0.62);
    font-weight: 600;
}

.sd-link-more {
    color: #1d4ed8;
    font-weight: 800;
    text-decoration: none;
}
.sd-link-more:hover { text-decoration: underline; }

/* Cities grid */
.sd-grid-cities {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.sd-city-card {
    text-decoration: none;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(15,23,42,0.08);
    box-shadow: 0 12px 30px rgba(15,23,42,0.07);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sd-city-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(15,23,42,0.11);
}

.sd-city-img img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.sd-city-body {
    padding: 0.8rem 0.9rem;
}

.sd-city-body .sd-city-name {
    font-weight: 900;
    color: rgba(15,23,42,0.92);
}

.sd-city-subtitle {
    margin-top: 0.15rem;
    color: rgba(15,23,42,0.60);
    font-weight: 600;
    font-size: 0.9rem;
}

.sd-city-meta {
    margin-top: 0.35rem;
    color: rgba(15,23,42,0.55);
    font-weight: 700;
    font-size: 0.85rem;
}

/* Hotels grid */
.sd-grid-hotels {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.sd-grid-hotels-compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.sd-hotel-card {
    text-decoration: none;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(15,23,42,0.08);
    box-shadow: 0 12px 30px rgba(15,23,42,0.07);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sd-hotel-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(15,23,42,0.11);
}

.sd-hotel-img img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}

.sd-hotel-body {
    padding: 0.85rem 0.95rem;
}

.sd-hotel-title {
    font-weight: 900;
    color: rgba(15,23,42,0.92);
    line-height: 1.2;
}

.sd-hotel-loc {
    margin-top: 0.25rem;
    color: rgba(15,23,42,0.58);
    font-weight: 650;
    font-size: 0.9rem;
}

.sd-hotel-price {
    margin-top: 0.55rem;
    color: rgba(15,23,42,0.88);
    font-weight: 900;
}

.sd-hotel-rating {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: rgba(15,23,42,0.60);
    font-weight: 700;
}

.sd-rate {
    background: rgba(34,197,94,0.14);
    color: rgba(15,23,42,0.90);
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-weight: 900;
    margin-right: 0.35rem;
}

/* ===========================
   RESPONSIVE TWEAKS
   =========================== */

@media (max-width: 991.98px) {
    .sd-hero-heading { margin-top: 3rem; }

    .sd-search-card {
        border-radius: 1rem;
        padding: 3rem 1.5rem 2rem;
    }

    .sd-grid-cities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sd-grid-hotels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sd-grid-hotels-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ======= MOBILE (stacked form like MMT) ======= */
@media (max-width: 767.98px) {

    .sd-hero {
        min-height: auto;
        background-position: center top;
    }

    .sd-hero-inner { padding: 0.75rem 0 2.25rem; }

    .sd-topbar {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .sd-hero-heading {
        margin-top: 1.75rem;
        padding: 0 0.75rem;
    }

    .sd-search-wrapper {
        margin-top: 1.75rem;
        padding: 0 0.75rem;
    }

    .sd-search-card {
        max-width: 100%;
        margin: 0 auto;
        border-radius: 0.9rem;
        padding: 2.2rem 1rem 1.5rem;
        box-shadow: 0 18px 45px rgba(15, 23, 42, 0.50);
    }

    /* Tabs sit directly on top, not too high */
    .sd-search-tabs-wrapper {
        position: static;
        transform: none;
        margin-bottom: 1rem;
        text-align: left;
    }

    .sd-search-tabs {
        width: 100%;
        justify-content: space-between;
        box-shadow: none;
        border-radius: 999px;
        padding: 0.18rem;
    }

    .sd-search-tab {
        flex: 1 1 33%;
        padding: 0.4rem 0.2rem;
        font-size: 0.75rem;
        justify-content: center;
    }

    .sd-search-tab .sd-tab-icon { font-size: 0.85rem; }

    /* “Up to 4 rooms / Group deals” row */
    .sd-search-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Hide the marketing text on mobile */
    .sd-search-options-text { display: none !important; }

    /* Main rows – full width, stacked */
    .sd-search-form-row {
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
        margin-top: 1rem;
    }

    .sd-search-form-row .sd-field,
    .sd-field-city,
    .sd-field-guests,
    .sd-field-price {
        width: 100%;
        position: relative;
        min-width: auto;
    }

    /* CITY FIELD: hide separate label; use placeholder */
    .sd-field-city .sd-field-label { display: none; }
    .sd-field-city .sd-field-input { padding-left: 1rem; }

    /* INLINE LABELS for date fields (NOT guests/price) */
    .sd-search-form .sd-field-label {
        position: absolute;
        top: 50%;
        left: 1rem;
        transform: translateY(-50%);
        margin: 0;
        font-size: 0.8rem;
        text-transform: none;
        letter-spacing: 0;
        color: #4b5563;
        pointer-events: none;
    }

    .sd-field-input,
    .sd-field-display {
        padding-left: 6.1rem;
        font-weight: 600;
    }

    /* For Rooms & Guests and Price: keep normal labels above (no inline) */
    .sd-field-guests .sd-field-label,
    .sd-field-price .sd-field-label {
        position: static;
        transform: none;
        margin-bottom: 0.35rem;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        pointer-events: auto;
    }

    .sd-field-guests .sd-field-input,
    .sd-field-guests .sd-field-display,
    .sd-field-price .sd-field-input,
    .sd-field-price .sd-field-display {
        padding-left: 1rem;
    }

    #sd-guests-toggle,
    #sd-price-toggle {
        width: 100%;
        text-align: left;
    }

    /* Search actions */
    .sd-search-actions {
        margin-top: 1.2rem;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    /* Hide Trending searches on mobile */
    .sd-search-trending { display: none !important; }

    .sd-btn-search {
        width: 100%;
        text-align: center;
    }

    /* Mobile menu panel */
    .sd-mobile-menu {
        position: absolute;
        top: 60px;
        right: 0.75rem;
        width: 60vw;
        max-width: 320px;
        z-index: 30;
    }

    .sd-mobile-menu-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 0.25rem;
    }

    .sd-mobile-menu-title {
        font-size: 0.9rem;
        font-weight: 600;
        color: #e5e7eb;
    }

    .sd-mobile-menu-close {
        border: 0;
        background: transparent;
        color: #e5e7eb;
        font-size: 1.4rem;
        line-height: 1;
        padding: 0;
        cursor: pointer;
    }

    .sd-grid-cities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sd-grid-hotels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sd-grid-hotels-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Even smaller phones */
@media (max-width: 575.98px) {
    .sd-hero-heading { margin-top: 1.4rem; }
    .sd-search-wrapper { padding: 0 0.5rem; }
    .sd-search-card { padding: 2rem 0.85rem 1.3rem; }
}
