/* ====== خلفية هيرو متحركة من قاعدة البيانات ====== */
.unit-hero {
    position: relative;
    padding: 160px 0 80px;
    overflow: hidden;
    min-height: 700px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 20px 20px;
    margin-bottom: 40px;
}

/* الخلفية المتحركة */
.hero-background {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* كل شريحة خلفية */
.bg-slide {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: slideShow 16s infinite;
}

/* حركة الانتقال بين الصور - أسرع */
@keyframes slideShow {
    0% {
        opacity: 0;
        transform: scale(1);
    }

    15% {
        opacity: 1;
        transform: scale(1.03);
    }

    30% {
        opacity: 1;
        transform: scale(1.03);
    }

    45% {
        opacity: 0;
        transform: scale(1.06);
    }

    100% {
        opacity: 0;
        transform: scale(1);
    }
}

/* الطبقة البيضاء الشفافة فوق الخلفية */
.hero-white-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.85) 0%,
            rgba(255, 255, 255, 0.65) 50%,
            rgba(255, 255, 255, 0.45) 100%);
    z-index: 1;
}

/* المحتوى فوق الخلفية */
.hero-content {
    position: relative;
    z-index: 2;
    color: #222;
    max-width: 800px;
}

/* تصميم النصوص */
.unit-title {
    font-weight: 900;
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #222;
    line-height: 1.1;
    position: relative;
    display: inline-block;
}

.unit-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 80px;
    height: 4px;
    background: #d4af37;
    border-radius: 2px;
}

.unit-subtitle {
    font-size: 1.5rem;
    color: #b8941f;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.unit-subtitle i {
    margin-left: 12px;
    font-size: 1.8rem;
}

.unit-description {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 40px;
    max-width: 90%;
    padding: 25px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-right: 4px solid #d4af37;
}

/* الأزرار */
.action-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.booking-btn,
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.booking-btn {
    background: #d4af37;
    color: white;
    border: 2px solid #d4af37;
}

.booking-btn:hover {
    background: #b8941f;
    border-color: #b8941f;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.whatsapp-btn {
    background: #25D366;
    color: white;
    border: 2px solid #25D366;
}

.whatsapp-btn:hover {
    background: #128C7E;
    border-color: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.action-buttons i {
    margin-left: 10px;
    font-size: 1.2rem;
}

/* الإحصائيات */
.hero-stats {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-top: 3px solid #d4af37;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 120px;
    position: relative;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -25px;
    transform: translateY(-50%);
    width: 1px;
    height: 40px;
    background: rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #d4af37;
    display: block;
    line-height: 1;
}

.stat-text {
    font-size: 1rem;
    color: #555;
    margin-top: 5px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 992px) {
    .unit-hero {
        padding: 140px 0 70px;
        min-height: 600px;
    }

    .unit-title {
        font-size: 3rem;
    }

    .unit-description {
        max-width: 100%;
        padding: 20px;
    }

    .hero-stats {
        gap: 30px;
    }

    .stat-item:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .unit-hero {
        padding: 120px 0 60px;
        min-height: 500px;
    }

    .unit-title {
        font-size: 2.5rem;
    }

    .unit-subtitle {
        font-size: 1.3rem;
    }

    .unit-description {
        font-size: 1.1rem;
        padding: 15px;
    }

    .action-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .booking-btn,
    .whatsapp-btn {
        width: 100%;
        max-width: 300px;
    }

    .hero-stats {
        gap: 20px;
        padding: 20px;
    }

    .stat-number {
        font-size: 2.2rem;
    }
}

@media (max-width: 576px) {
    .unit-hero {
        padding: 100px 0 50px;
        min-height: 450px;
    }

    .unit-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 25px;
    }

    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 10px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .stat-item:last-child {
        border-bottom: none;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-text {
        font-size: 0.9rem;
    }
}

/* تحسين للأجهزة اللوحية */
@media (min-width: 769px) and (max-width: 992px) {
    .hero-stats {
        gap: 40px;
    }

    .stat-item {
        min-width: 100px;
    }
}

/*  تنسيق المنتجع  */
.gallery-section {
    padding: 40px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.gallery-item::before {
    content: "";
    display: block;
    padding-top: 75%;
    /* نسبة 4:3 */
}

.gallery-item a {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    text-decoration: none;
}

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

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

.gallery-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-caption {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.view-more-btn {
    background-color: transparent;
    border: 2px solid var(--gold-color);
    color: var(--gold-color);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
    margin: 10px auto 0;
    cursor: pointer;
    font-size: 1rem;
}

.view-more-btn:hover {
    background-color: var(--gold-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.hidden-gallery-item {
    display: none !important;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gallery-item::before {
        padding-top: 100%;
        /* مربع على الجوال */
    }

    .view-more-btn {
        padding: 10px 25px;
        font-size: 0.9rem;
        margin-top: 15px;
    }

    .gallery-overlay {
        padding: 10px;
    }

    .gallery-caption {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

.gallery-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.gallery-section .section-title {
    text-align: center;
    margin-bottom: 30px;
}

/* Unit Details Section */
.unit-details-section {
    padding: 60px 0;
    background: var(--light-bg);
}

.details-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    border-right: 4px solid var(--gold-color);
}

.details-title {
    font-weight: 700;
    color: var(--gold-color);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.details-list {
    list-style: none;
    padding: 0;
}

.details-list li {
    margin-bottom: 15px;
    padding-right: 30px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.details-list li:last-child {
    border-bottom: none;
}

.details-list li::before {
    content: '•';
    color: var(--gold-color);
    font-weight: bold;
    position: absolute;
    right: 0;
    font-size: 1.5rem;
}

.detail-label {
    font-weight: 600;
    color: #555;
}

.detail-value {
    color: #333;
    font-weight: 500;
}

/* Price Table Section */
.price-section {
    padding: 60px 0;
    background: white;
}

.price-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
    border-top: 4px solid var(--gold-color);
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: #fff8e1;
    border-radius: 10px;
    overflow: hidden;
}

.price-table th {
    background-color: #ffecb3;
    color: #5d4037;
    padding: 15px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.price-table td {
    padding: 15px;
    border-bottom: 1px solid #ffe0b2;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.price-table tr:last-child td {
    border-bottom: none;
}

.price-highlight {
    background: var(--light-gold);
    color: var(--gold-dark);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.2rem;
    display: inline-block;
    margin: 15px 0;
}

/* Policy Section */
.policy-section {
    padding: 60px 0;
    background: var(--light-bg);
}

.policy-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-right: 4px solid var(--gold-color);
}

.policy-title {
    font-weight: 700;
    color: var(--gold-color);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.policy-list {
    list-style: none;
    padding: 0;
}

.policy-list li {
    margin-bottom: 12px;
    padding-right: 25px;
    position: relative;
}

.policy-list li::before {
    content: '•';
    color: var(--gold-color);
    font-weight: bold;
    position: absolute;
    right: 0;
}

/* Contact Section */
.contact-section {
    padding: 60px 0;
    background: white;
}

.contact-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
    border-top: 4px solid var(--gold-color);
    height: 100%;
}

.contact-icon {
    font-size: 3rem;
    color: var(--gold-color);
    margin-bottom: 20px;
}

.contact-title {
    font-weight: 700;
    margin-bottom: 20px;
    color: #222;
}



/* Responsive Adjustments */
@media (max-width: 1200px) {
    .unit-title {
        font-size: 2.5rem;
    }

    .facebook-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .unit-title {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .facebook-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-stats {
        justify-content: center;
    }

    .modal-nav {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .modal-prev {
        right: 15px;
    }

    .modal-next {
        left: 15px;
    }
}

@media (max-width: 768px) {
    .unit-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .facebook-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .booking-btn,
    .whatsapp-btn {
        width: 100%;
        justify-content: center;
    }

    .details-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        top: 15px;
        left: 15px;
    }
}

@media (max-width: 576px) {
    .unit-title {
        font-size: 1.8rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .details-card,
    .price-card,
    .policy-card {
        padding: 25px;
    }

    .facebook-gallery {
        grid-template-columns: 1fr;
    }

    .modal-image {
        max-width: 95%;
        max-height: 80%;
    }
}

@media (max-width: 400px) {
    .hero-stats {
        gap: 20px;
    }

    .stat-item {
        flex: 1;
        min-width: 45%;
    }
}