/* الصفحة الرئيسية — ألوان البحر */
:root {
    --sea-deep: #0a4d68;
    --sea-primary: #088395;
    --sea-bright: #05bfdb;
    --sea-light: #a0e4f1;
    --sea-foam: #e8f7fa;
    --sea-sand: #f5e6ca;
    --sea-sand-dark: #b8956a;
    --sea-text: #0d3d52;
    --sea-muted: #5a8a9a;
    --home-card-shadow: 0 8px 32px rgba(10, 77, 104, 0.12);
}

body.page-home {
    background: var(--sea-foam);
}

body.page-home .navbar-wanasah.navbar-home {
    background: linear-gradient(180deg, #062a3a 0%, var(--sea-deep) 100%) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2) !important;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

body.page-home .navbar-home .navbar-brand {
    color: #fff !important;
}

body.page-home .navbar-home .nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 600;
    padding: 0.45rem 0.95rem !important;
    border-radius: 999px;
}

body.page-home .navbar-home .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.14) !important;
}

body.page-home .navbar-home .nav-link.active {
    background: linear-gradient(135deg, var(--sea-bright), var(--sea-primary)) !important;
    color: #062a3a !important;
    font-weight: 700;
}

body.page-home .navbar-home .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.45) !important;
}

body.page-home .navbar-home .navbar-toggler-icon {
    filter: invert(1);
}

body.page-home .navbar-home .brand-logo {
    height: 42px;
    width: auto;
}

body.page-home .navbar-home .navbar-brand span {
    display: none;
}

body.page-home .home-nav-actions {
    flex-wrap: wrap;
}

body.page-home .btn-nav-admin {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #fff !important;
    color: var(--sea-deep) !important;
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: background 0.2s, transform 0.15s;
}

body.page-home .btn-nav-admin:hover {
    background: var(--sea-light) !important;
    color: var(--sea-deep) !important;
    transform: translateY(-1px);
}

body.page-home .btn-lang-switch {
    display: inline-block;
    background: linear-gradient(135deg, var(--sea-bright), var(--sea-primary)) !important;
    color: #062a3a !important;
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

body.page-home .btn-lang-switch:hover {
    color: #062a3a !important;
    filter: brightness(1.05);
}

@media (max-width: 991px) {
    body.page-home .navbar-home .navbar-collapse {
        background: var(--sea-deep);
        border-radius: 12px;
        padding: 0.75rem;
        margin-top: 0.5rem;
    }

    body.page-home .home-nav-actions {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }
}

body.page-home main {
    padding-top: 0;
}

/* Hero */
.home-hero-wrap {
    position: relative;
    margin-top: 72px;
}

.home-hero-slider {
    position: relative;
    height: min(72vh, 560px);
    min-height: 380px;
    overflow: hidden;
    background: var(--sea-deep);
}

.home-hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: 0;
}

.home-hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.home-hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 50, 75, 0.35) 0%, rgba(8, 40, 60, 0.6) 100%);
}

.home-hero-caption {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 2rem;
    pointer-events: none;
}

.home-hero-caption h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.home-hero-caption p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.95;
    margin: 0;
}

.home-hero-dots {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 0.5rem;
}

.home-hero-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    padding: 0;
    cursor: pointer;
    opacity: 0.6;
}

.home-hero-dots button.is-active {
    background: var(--sea-bright);
    border-color: var(--sea-bright);
    opacity: 1;
}

/* Search */
.home-search-panel {
    position: relative;
    z-index: 10;
    max-width: 920px;
    margin: -3.5rem auto 0;
    padding: 0 1rem;
}

.home-search-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--home-card-shadow);
    border: 1px solid rgba(10, 131, 149, 0.12);
    padding: 1.5rem 1.75rem 1.75rem;
}

.home-search-card .search-icon-wrap {
    position: relative;
}

.home-search-card .search-icon-wrap i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sea-muted);
    pointer-events: none;
}

.home-search-card .form-control,
.home-search-card .form-select {
    border-radius: 10px;
    border-color: #cce8ef;
    padding: 0.65rem 1rem;
}

.home-search-card .form-control:focus,
.home-search-card .form-select:focus {
    border-color: var(--sea-bright);
    box-shadow: 0 0 0 0.2rem rgba(5, 191, 219, 0.2);
}

.home-search-card .search-name-input {
    padding-right: 2.75rem;
}

/* طريقة الحجز — قائمة منسدلة */
.home-booking-picker {
    position: relative;
}

.home-booking-picker-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border: 1px solid #cce8ef;
    border-radius: 10px;
    background: #fff;
    color: var(--sea-text);
    font-size: 0.95rem;
    text-align: right;
    cursor: pointer;
}

.home-booking-picker-btn:hover {
    border-color: var(--sea-bright);
}

.home-booking-picker-btn.is-open {
    border-color: var(--sea-primary);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.home-booking-picker-btn .picker-chevron {
    transition: transform 0.2s ease;
    color: var(--sea-primary);
}

.home-booking-picker-btn.is-open .picker-chevron {
    transform: rotate(180deg);
}

.home-booking-picker-panel {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 50;
    background: #fff;
    border: 1px solid var(--sea-primary);
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 12px 28px rgba(10, 77, 104, 0.15);
    max-height: 320px;
    overflow-y: auto;
}

.home-booking-picker-panel[hidden] {
    display: none !important;
}

.home-booking-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    margin: 0;
    cursor: pointer;
    border-bottom: 1px solid #eef6f8;
    transition: background 0.15s ease;
}

.home-booking-option:last-child {
    border-bottom: none;
}

.home-booking-option:hover {
    background: var(--sea-foam);
}

.home-booking-option input {
    margin-top: 0.2rem;
    accent-color: var(--sea-primary);
    flex-shrink: 0;
}

.home-booking-option .opt-body {
    flex: 1;
    text-align: right;
}

.home-booking-option .opt-title {
    display: block;
    font-weight: 700;
    color: var(--sea-text);
    font-size: 0.95rem;
}

.home-booking-option .opt-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--sea-muted);
    margin-top: 0.15rem;
}

.home-booking-option .opt-sub:empty {
    display: none;
}

.home-search-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.btn-home-search {
    background: linear-gradient(135deg, var(--sea-primary), var(--sea-deep));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 2.5rem;
    font-weight: 600;
    min-width: 120px;
}

.btn-home-search:hover {
    background: linear-gradient(135deg, var(--sea-deep), #073549);
    color: #fff;
}

.btn-home-clear {
    background: var(--sea-sand);
    color: var(--sea-sand-dark);
    border: none;
    border-radius: 10px;
    padding: 0.6rem 2.5rem;
    font-weight: 600;
    min-width: 120px;
}

.btn-home-clear:hover {
    background: #edd9b8;
    color: var(--sea-sand-dark);
}

/* Chalets */
.home-chalets-section {
    padding: 4rem 0 5rem;
}

.home-chalets-shell {
    width: 100%;
    max-width: 100%;
    padding-left: clamp(0.85rem, 2.5vw, 2rem);
    padding-right: clamp(0.85rem, 2.5vw, 2rem);
}

.home-chalets-grid,
#homeChaletsGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.15rem;
    width: 100%;
    margin: 0;
    direction: rtl;
}

html[dir="ltr"] .home-chalets-grid,
html[dir="ltr"] #homeChaletsGrid,
body.lang-en .home-chalets-grid,
body.lang-en #homeChaletsGrid {
    direction: ltr;
}

@media (max-width: 1399px) {
    .home-chalets-grid,
    #homeChaletsGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .home-chalets-grid,
    #homeChaletsGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .home-chalets-grid,
    #homeChaletsGrid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.home-chalet-item {
    min-width: 0;
}

.home-section-title {
    text-align: center;
    margin-bottom: 2.5rem;
}

.home-section-title h2 {
    font-size: clamp(1.65rem, 2.8vw, 2.15rem);
    font-weight: 800;
    color: #1a6b7c;
    margin-bottom: 0.55rem;
}

.home-section-title .title-underline {
    width: 56px;
    height: 3px;
    background: linear-gradient(90deg, #3d9fc4, #1a6b7c);
    border-radius: 999px;
    margin: 0 auto;
}

.home-chalet-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--home-card-shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(10, 131, 149, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-chalet-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(10, 77, 104, 0.16);
}

.home-chalet-card .card-img-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc, #eef5f9);
}

.home-chalet-card .card-img-wrap.is-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.home-chalet-card .card-img-wrap.is-hero img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.5s ease;
    will-change: transform;
}

.home-chalet-card:hover .card-img-wrap.is-hero img,
.home-chalet-link:focus-visible .card-img-wrap.is-hero img {
    transform: scale(1.1);
    filter: brightness(1.06);
}

.home-chalet-card .card-body {
    padding: 1.1rem 1.25rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.home-chalet-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--sea-text);
}

.home-chalet-card .card-desc {
    font-size: 0.88rem;
    color: var(--sea-muted);
    line-height: 1.65;
    flex: 1;
    margin-bottom: 1rem;
}

.home-chalet-link {
    color: inherit;
    display: block;
    height: 100%;
}

.home-chalet-card .chalet-card-title {
    text-align: right;
    margin-bottom: 0.65rem;
}

body.lang-en .home-chalet-card .chalet-card-title {
    text-align: left;
}

.home-chalet-card .card-desc {
    text-align: right;
    min-height: 3.25rem;
    margin-bottom: 0.85rem;
    font-size: 0.82rem;
    line-height: 1.55;
}

body.lang-en .home-chalet-card .card-desc {
    text-align: left;
}

.chalet-price-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: auto;
}

.chalet-price-grid .price-cell {
    background: #eef5f9;
    border-radius: 10px;
    padding: 0.5rem 0.55rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    min-height: 62px;
}

.chalet-price-grid .price-cell.is-empty {
    background: #f4f8fb;
    border: 1px dashed rgba(30, 95, 115, 0.12);
}

.chalet-price-grid .price-label {
    font-size: 0.82rem;
    font-weight: 800;
    color: #1e5f73;
}

.chalet-price-grid .price-value {
    font-size: clamp(0.95rem, 1.6vw, 1.2rem);
    font-weight: 900;
    color: #0f3d4c;
    line-height: 1.2;
}

.chalet-price-grid .price-caption {
    font-size: 0.72rem;
    color: #5b7f92;
    line-height: 1.45;
}

.home-chalet-item.is-hidden {
    display: none !important;
}

.home-chalets-grid .home-chalet-item.is-hidden {
    display: none !important;
}

.home-contact-section {
    background: linear-gradient(135deg, var(--sea-deep) 0%, var(--sea-primary) 55%, var(--sea-bright) 100%);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}

/* Wanasah 2026 home refresh — ذهبي + كحلي */
body.page-home {
    background:
        radial-gradient(circle at top right, rgba(201, 168, 108, 0.12), transparent 30rem),
        linear-gradient(180deg, #f9f7f4 0%, #f5f7fb 100%);
}

body.page-home .navbar-wanasah.navbar-home {
    background: rgba(255, 255, 255, 0.94) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.80);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.07) !important;
    backdrop-filter: blur(18px);
}

body.page-home .navbar-home .navbar-brand,
body.page-home .navbar-home .nav-link {
    color: var(--app-dark, #0f172a) !important;
}

body.page-home .navbar-home .nav-link {
    font-size: 0.94rem;
    font-weight: 800;
}

body.page-home .navbar-home .nav-link:hover,
body.page-home .navbar-home .nav-link.active {
    background: var(--app-primary-soft, rgba(201, 168, 108, 0.14)) !important;
    color: var(--navy, #1a2332) !important;
}

body.page-home .navbar-home .navbar-toggler-icon {
    filter: none;
}

body.page-home .navbar-home .navbar-toggler {
    border-color: var(--app-border, #e2e8f0) !important;
}

body.page-home .btn-nav-admin,
body.page-home .btn-lang-switch {
    background: linear-gradient(135deg, var(--gold, #c9a86c), var(--gold-light, #dcc99a)) !important;
    color: var(--navy-deep, #121820) !important;
    border-radius: 999px;
    box-shadow: 0 10px 22px rgba(201, 168, 108, 0.32);
}

.home-hero-wrap {
    margin-top: 76px;
}

.home-hero-slider {
    height: min(68vh, 620px);
    min-height: 440px;
    border-radius: 0 0 36px 36px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.home-hero-slide::after {
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.20) 0%, rgba(15, 23, 42, 0.62) 100%),
        radial-gradient(circle at center, rgba(201, 168, 108, 0.14), transparent 34rem);
}

.home-hero-caption h1 {
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    text-shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
}

.home-hero-caption p {
    max-width: 680px;
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    color: rgba(255, 255, 255, 0.92);
}

.home-search-panel {
    max-width: 1040px;
    margin-top: -4.5rem;
}

.home-search-card {
    border-radius: 28px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    padding: 1.4rem;
}

.home-search-card .form-control,
.home-search-card .form-select,
.home-booking-picker-btn {
    border-radius: 16px;
    border-color: var(--app-border, #e2e8f0);
    min-height: 48px;
}

.home-booking-picker-panel {
    border-color: var(--gold, #c9a86c);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

.btn-home-search,
.btn-home-clear {
    min-height: 46px;
    border-radius: 999px;
    font-weight: 900;
}

.btn-home-search {
    background: linear-gradient(135deg, var(--gold, #c9a86c), var(--gold-light, #dcc99a));
    color: var(--navy-deep, #121820);
    box-shadow: 0 12px 26px rgba(201, 168, 108, 0.32);
}

.btn-home-clear {
    background: #fff;
    color: #475569;
    border: 1px solid var(--app-border, #e2e8f0);
}

.home-chalets-section {
    padding-top: 5rem;
}

.home-section-title h2 {
    color: var(--app-dark, #0f172a);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 900;
}

.home-section-title .title-underline {
    width: 72px;
    background: linear-gradient(90deg, var(--gold, #c9a86c), var(--gold-light, #dcc99a));
    border-radius: 999px;
}

.home-chalet-card {
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.home-chalet-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 26px 65px rgba(15, 23, 42, 0.14);
}

.home-chalet-card .card-img-wrap {
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f9f7f4, #e8e4dd);
}

.home-chalet-card .card-body {
    padding: 1.25rem;
}

.home-chalet-card h3 {
    color: var(--app-dark, #0f172a);
    font-size: 1.18rem;
    font-weight: 900;
}

.home-chalet-card .card-desc {
    color: #64748b;
}

.home-chalet-card .chalet-price-grid .price-cell {
    background: #eef5f9;
}

.home-contact-section {
    background:
        radial-gradient(circle at 20% 20%, rgba(201, 168, 108, 0.12), transparent 18rem),
        linear-gradient(135deg, var(--navy-deep, #121820) 0%, var(--navy, #1a2332) 100%);
}

@media (max-width: 991px) {
    .home-hero-wrap {
        margin-top: 64px;
    }

    .home-search-panel {
        margin-top: -2rem;
    }
}
