* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #0f766e;
    --primary-dark: #115e59;
    --secondary: #f59e0b;
    --dark: #172033;
    --text: #4b5563;
    --light: #f7f9fc;
    --white: #ffffff;
    --border: #e5e7eb;
    --danger: #dc2626;
    --success: #15803d;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Tahoma, Arial, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input {
    font-family: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}


/* Header */

.site-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-weight: 800;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav a {
    color: var(--text);
    font-size: 15px;
    transition: 0.2s;
}

.main-nav a:hover {
    color: var(--primary);
}


/* Hero */

.hero {
    padding: 80px 0 60px;
    background:
        linear-gradient(
            180deg,
            #eefaf8 0%,
            #f7f9fc 100%
        );
}

.hero-content {
    max-width: 760px;
    margin-bottom: 35px;
}

.hero-badge {
    display: inline-block;
    background: #d9f5ef;
    color: var(--primary-dark);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero p {
    color: var(--text);
    font-size: 19px;
}


/* Search */

.search-box {
    background: white;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(23, 32, 51, 0.08);
}

.search-fields {
    display: grid;
    grid-template-columns:
        1.25fr
        1fr
        1fr
        1.3fr
        1fr;
    gap: 12px;
    align-items: end;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field label {
    font-size: 13px;
    color: var(--text);
    font-weight: 700;
}

.field input {
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 14px;
    outline: none;
    background: #fff;
}

.field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08);
}

.guest-controls {
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 0 10px;
}

.guest-controls > div {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.guest-controls > div > span:first-child {
    color: var(--text);
}

.guest-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.guest-btn:hover {
    background: var(--light);
}

.search-button {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
}

.search-button:hover {
    background: var(--primary-dark);
}

.search-button:disabled {
    opacity: 0.7;
    cursor: wait;
}


/* Results */

.results-section {
    padding: 70px 0;
}

.results-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.results-header h2 {
    font-size: 30px;
    margin-bottom: 6px;
}

.results-header p {
    color: var(--text);
}

.results-count {
    font-weight: 800;
    color: var(--primary);
}


/* Hotels */

.hotel-results {
    display: grid;
    gap: 20px;
}

.hotel-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
}

.hotel-main {
    padding: 25px;
}

.hotel-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.hotel-title h3 {
    font-size: 23px;
    margin-bottom: 5px;
}

.hotel-location {
    color: var(--text);
    font-size: 14px;
}

.hotel-description {
    margin-top: 12px;
    color: var(--text);
    font-size: 14px;
}

.hotel-booking-status {
    white-space: nowrap;
    color: var(--success);
    font-size: 13px;
    font-weight: 800;
    background: #ecfdf3;
    padding: 7px 12px;
    border-radius: 999px;
    height: fit-content;
}


/* Rooms */

.room-list {
    border-top: 1px solid var(--border);
}

.room-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr auto;
    gap: 20px;
    align-items: center;
}

.room-item:last-child {
    border-bottom: 0;
}

.room-name {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 4px;
}

.room-description {
    color: var(--text);
    font-size: 13px;
}

.room-capacity {
    color: var(--text);
    font-size: 14px;
}

.room-price {
    text-align: right;
}

.room-price strong {
    display: block;
    font-size: 21px;
}

.room-price small {
    color: var(--text);
}

.room-availability {
    color: var(--success);
    font-size: 13px;
    margin-top: 4px;
    font-weight: 700;
}

.room-book-btn {
    border: 0;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 800;
}

.room-book-btn:hover {
    background: var(--primary-dark);
}

.room-book-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* States */

.state-box {
    padding: 50px 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    text-align: center;
}

.state-box.error {
    color: var(--danger);
}

.hidden {
    display: none !important;
}

.loader {
    width: 38px;
    height: 38px;
    margin: 0 auto 15px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* Hotel section */

.hotel-section {
    padding: 80px 0;
    background: white;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 35px;
}

.section-heading > span,
.about-content > span {
    color: var(--primary);
    font-weight: 800;
    font-size: 14px;
}

.section-heading h2 {
    font-size: 34px;
    margin: 8px 0 12px;
}

.section-heading p {
    color: var(--text);
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.feature-card {
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 18px;
}

.feature-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #d9f5ef;
    color: var(--primary);
    font-weight: 900;
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text);
    font-size: 14px;
}


/* About */

.about-section {
    padding: 80px 0;
}

.about-content {
    max-width: 760px;
}

.about-content h2 {
    font-size: 34px;
    margin: 8px 0 15px;
}

.about-content p {
    color: var(--text);
    font-size: 17px;
}


/* Footer */

footer {
    background: #111827;
    color: white;
    padding: 35px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    align-items: center;
}

.footer-logo {
    color: white;
}

footer p {
    color: #cbd5e1;
}


/* Responsive */

@media (max-width: 1000px) {

    .search-fields {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-button-wrapper {
        grid-column: span 2;
    }

    .room-item {
        grid-template-columns: 1fr 1fr;
    }

    .room-price {
        text-align: right;
    }

    .features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {

    .header-inner {
        flex-direction: column;
        justify-content: center;
        padding: 14px 0;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .hero {
        padding-top: 50px;
    }

    .search-fields {
        grid-template-columns: 1fr;
    }

    .search-button-wrapper {
        grid-column: auto;
    }

    .results-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .hotel-top {
        flex-direction: column;
    }

    .room-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .room-price {
        text-align: right;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/*
مهم لكي تظهر الصور والفلاتر من بيانات الفندق:

في availability.php يجب أن ترجع بيانات اختيارية مثل:

"image": "uploads/settings/exterior_image.webp",
"rating": 4.5,

"meal_plans": {
    "breakfast": true,
    "breakfast_dinner": false,
    "all_inclusive": false
},

"amenities": {
    "airport_transfer": true,
    "parking": true,
    "pool": false,
    "wifi": true,
    "air_conditioning": true,
    "private_bathroom": true,
    "kitchen": false,
    "balcony": true
},

"payment_methods": {
    "cash": true
}

وعند عدم وجود هذه البيانات ستظل البطاقة تعمل
بصورة بديلة وبدون كسر الواجهة.
*/