/* ================ أنماط صفحة المنتجعات والأكواخ (resorts.css) ================ */

/* ================ قسم العنوان الرئيسي مع تأثيرات متقدمة ================ */
.main-page-header {
    padding: 140px 0 60px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 5px solid #667eea;
    position: relative;
    overflow: hidden;
}

.main-page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(13, 71, 161, 0.03) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.page-main-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(46, 125, 50, 0.1);
}

.page-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #9feeec;
    font-weight: 500;
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

/* ================ قسم الفلتر المحسّن بتصميم حديث ================ */
.hotel-filters {
    padding: 40px 0 50px;
    background: var(--bg-light);
}

.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-section);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.filter-tabs .tab {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-light);
    padding: 12px 28px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-smooth);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.filter-tabs .tab::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    transition: all 0.6s ease;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.filter-tabs .tab:hover::before {
    width: 300px;
    height: 300px;
}

.filter-tabs .tab:hover {
    color: white;
    border-color: #2e7d32;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.25);
}

.filter-tabs .tab i,
.filter-tabs .tab span {
    position: relative;
    z-index: 1;
}

.filter-tabs .tab.active {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    border-color: #2e7d32;
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.35);
    transform: scale(1.05);
}

.filter-tabs .divider {
    width: 2px;
    height: 35px;
    background: linear-gradient(to bottom, transparent, var(--border-light), transparent);
    margin: 0 10px;
    align-self: center;
}

/* ================ تنسيق الشبكة مع تأثيرات Stagger ================ */
.all-hotels-grid-section {
    padding: 60px 0 100px;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-section) 100%);
}

.hotels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
    position: relative;
}

/* ================ بطاقة المنتجع/الكوخ المحسّنة مع تأثيرات 3D ================ */
.hotel-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
    border: 1px solid var(--border-light);
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.hotel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    z-index: 0;
    border-radius: var(--radius-xl);
}

.hotel-card:hover {
    transform: translateY(-12px) rotateX(2deg);
    box-shadow: 0 20px 50px rgba(46, 125, 50, 0.25);
    border-color: #2e7d32;
}

.hotel-card:hover::before {
    opacity: 0.03;
}

.card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 1;
    transition: opacity var(--transition-base);
}

.hotel-card:hover .card-image::after {
    opacity: 0.7;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.hotel-card:hover .card-image img {
    transform: scale(1.15) rotate(2deg);
}

/* شارات النوع المحسّنة */
.type-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    z-index: 5;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all var(--transition-base);
}

.hotel-card:hover .type-badge {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.resort-badge {
    background: linear-gradient(135deg, #0d47a1 0%, #01579b 100%);
}

.cabin-badge {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
}

.card-content {
    padding: 25px;
    position: relative;
    z-index: 2;
}

.star-rating {
    color: #ffd700;
    font-size: 1rem;
    margin-bottom: 10px;
    direction: ltr;
    display: flex;
    gap: 2px;
    text-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.star-rating i {
    animation: starPulse 2s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.1s);
}

.star-rating i:nth-child(1) { --i: 0; }
.star-rating i:nth-child(2) { --i: 1; }
.star-rating i:nth-child(3) { --i: 2; }
.star-rating i:nth-child(4) { --i: 3; }
.star-rating i:nth-child(5) { --i: 4; }

@keyframes starPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.hotel-card:hover .star-rating i {
    animation: starPulse 0.6s ease-in-out infinite;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.3;
    transition: color var(--transition-base);
}

.hotel-card:hover .card-title {
    color: #2e7d32;
}

.card-location {
    color: var(--text-medium);
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-location i {
    color: #2e7d32;
    font-size: 1.1rem;
    transition: transform var(--transition-base);
}

.hotel-card:hover .card-location i {
    transform: scale(1.2) translateY(-2px);
}

.card-amenities {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: #2e7d32;
    padding: 15px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.card-amenities span {
    position: relative;
    cursor: help;
    transition: all var(--transition-base);
}

.card-amenities span:hover {
    transform: translateY(-5px) scale(1.2);
    color: #1b5e20;
}

.card-amenities span::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: rgba(15, 23, 42, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transition: all var(--transition-base);
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-amenities span:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* زر "شاهد التفاصيل" المحسّن */
.btn-secondary {
    width: 100%;
    padding: 14px 30px;
    background: white;
    color: #2e7d32;
    border: 2px solid #2e7d32;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.05rem;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    transition: left 0.5s ease;
    z-index: -1;
}

.btn-secondary:hover {
    color: white;
    border-color: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(46, 125, 50, 0.3);
}

.btn-secondary:hover::before {
    left: 0;
}

.hotel-card.hidden {
    display: none;
}

/* تأثير ظهور البطاقات بشكل متتابع */
.hotel-card {
    animation: fadeInUp 0.6s ease backwards;
}

.hotel-card:nth-child(1) { animation-delay: 0.1s; }
.hotel-card:nth-child(2) { animation-delay: 0.2s; }
.hotel-card:nth-child(3) { animation-delay: 0.3s; }
.hotel-card:nth-child(4) { animation-delay: 0.4s; }
.hotel-card:nth-child(5) { animation-delay: 0.5s; }
.hotel-card:nth-child(6) { animation-delay: 0.6s; }
.hotel-card:nth-child(7) { animation-delay: 0.7s; }
.hotel-card:nth-child(8) { animation-delay: 0.8s; }
.hotel-card:nth-child(9) { animation-delay: 0.9s; }
.hotel-card:nth-child(10) { animation-delay: 1.0s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ================ تحسينات الفوتر ================ */
.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding-bottom: 60px;
}

.footer-col {
    flex: 1 1 220px;
    min-width: 220px;
}

.about-col {
    flex: 2 1 320px;
}

/* ================ التصميم المتجاوب المحسّن ================ */
@media (max-width: 1200px) {
    .hotels-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .main-page-header {
        padding: 120px 0 50px;
    }
    
    .filter-tabs {
        padding: 15px;
        gap: 10px;
    }
    
    .filter-tabs .tab {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .hotels-grid {
        gap: 25px;
    }
    
    .footer-content {
        gap: 35px;
    }
    
    .about-col {
        flex: 1 1 100%;
        text-align: center;
        order: -1;
    }
    
    .about-col .social-links {
        justify-content: center;
    }
    
    .footer-col {
        min-width: 45%;
    }
}

@media (max-width: 768px) {
    .main-page-header {
        padding: 100px 0 40px;
    }
    
    .page-main-title {
        font-size: 2.2rem;
    }
    
    .filter-tabs {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    
    .filter-tabs .divider {
        display: none;
    }
    
    .filter-tabs .tab {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
    
    .hotels-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .card-image {
        height: 220px;
    }
    
    .footer-col {
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    .main-page-header {
        padding: 90px 0 35px;
    }
    
    .page-main-title {
        font-size: 1.8rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .card-image {
        height: 200px;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .card-amenities {
        gap: 12px;
        font-size: 1.15rem;
    }
}

/* ================ تحسينات إضافية للأداء ================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

html {
    scroll-behavior: smooth;
}

.hotel-card {
    will-change: transform;
}

.hotel-card:hover {
    will-change: transform, box-shadow;
}