/* أيام الحج - ملف CSS منفصل لتحسين الأداء */

:root {
    --primary-color: #076385;
    --secondary-color: #c3942d;
    --dark-bg: #0a1128;
    --light-text: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--primary-color) 100%);
    color: var(--light-text);
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Background Pattern */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="pattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23pattern)"/></svg>');
    opacity: 0.5;
    z-index: 1;
}

.container-fluid {
    height: 100vh;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.8s ease-out;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(255, 255, 255, 0.3));
    animation: logoPulse 3s ease-in-out infinite;
    will-change: transform;
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.title-section h1 {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(45deg, var(--secondary-color), #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGlow 2s ease-in-out infinite alternate;
}

/* Back Button */
.back-btn {
    background: rgba(195, 148, 45, 0.9);
    border: 2px solid var(--secondary-color);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(195, 148, 45, 0.5);
    color: white;
}

/* Days Navigation */
.days-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    flex-wrap: wrap;
    animation: fadeIn 1s ease-out 0.3s backwards;
}

/* Day button text - show full by default, short on mobile */
.day-btn .day-short {
    display: none;
}

.day-btn .day-full {
    display: inline;
}

.day-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--secondary-color);
    color: var(--light-text);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    will-change: transform;
}

.day-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--secondary-color);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.day-btn:hover::before,
.day-btn.active::before {
    width: 300px;
    height: 300px;
}

.day-btn:hover,
.day-btn.active {
    color: var(--dark-bg);
    border-color: #ffd700;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 30px rgba(195, 148, 45, 0.5);
}

/* Slider Section */
.slider-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

.slider-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    animation: slideIn 0.8s ease-out;
}

.slide.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 5px solid var(--secondary-color);
    animation: imageZoom 0.8s ease-out;
    will-change: transform;
}

/* Loading Spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 5;
}

.loading-spinner.hidden {
    display: none;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Navigation Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(195, 148, 45, 0.95);
    color: white;
    border: none;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.4s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    will-change: transform;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.nav-arrow:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 10px 30px rgba(195, 148, 45, 0.6);
}

.nav-arrow.prev {
    right: 40px;
}

.nav-arrow.next {
    left: 40px;
}

/* Info Button */
.info-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(195, 148, 45, 0.95);
    color: white;
    border: 2px solid var(--secondary-color);
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.info-btn:hover {
    background: var(--secondary-color);
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 8px 25px rgba(195, 148, 45, 0.5);
}

.info-btn i {
    font-size: 1.3rem;
}

/* Day Info Modal */
.day-info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.day-info-modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 40px;
    border-radius: 25px;
    border: 3px solid var(--secondary-color);
    max-width: 700px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease-out;
    max-height: 80vh;
    overflow-y: auto;
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #ffd700;
}

.modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.modal-close:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: rotate(90deg);
}

.modal-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 0 20px 0;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.day-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    text-align: right;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    border-right: 4px solid var(--secondary-color);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 50px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes imageZoom {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes textGlow {
    from {
        filter: drop-shadow(0 0 10px rgba(195, 148, 45, 0.5));
    }
    to {
        filter: drop-shadow(0 0 25px rgba(195, 148, 45, 0.8));
    }
}

/* Swipe Indicator */
.swipe-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
    animation: fadeOut 3s ease-out forwards;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes fadeOut {
    0%, 80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Progress Indicator */
.progress-dots {
    display: flex;
    position: absolute;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    gap: 10px;
    z-index: 5;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.progress-dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.progress-dot.active {
    background: var(--secondary-color);
    transform: scale(1.5);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .logo {
        width: 60px;
        height: 60px;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .title-section h1 {
        font-size: 1.8rem;
    }

    .days-nav {
        gap: 8px;
        padding: 10px;
    }

    .day-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    /* Show short version on tablets */
    .day-btn .day-full {
        display: none;
    }
    
    .day-btn .day-short {
        display: inline;
    }

    .slide img {
        max-width: 100%;
        width: 100%;
        border-radius: 15px;
        border: 3px solid var(--secondary-color);
    }

    .nav-arrow {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .nav-arrow.prev {
        right: 15px;
    }

    .nav-arrow.next {
        left: 15px;
    }

    .info-btn {
        padding: 10px 25px;
        font-size: 1rem;
        bottom: 20px;
    }
    
    .info-btn i {
        font-size: 1.1rem;
    }
    
    .info-btn span {
        font-size: 0.95rem;
    }
    
    .modal-content {
        padding: 30px 25px;
        width: 95%;
        max-height: 85vh;
    }
    
    .modal-content h3 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .day-description {
        font-size: 0.95rem;
        line-height: 1.6;
        padding: 15px;
    }

    .progress-dots {
        bottom: 80px;
        gap: 8px;
    }

    .progress-dot {
        width: 10px;
        height: 10px;
    }

    .back-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .title-section h1 {
        font-size: 1.5rem;
    }

    .logo {
        width: 50px;
        height: 50px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .days-nav {
        gap: 5px;
        padding: 8px;
    }

    .day-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .slide img {
        border-radius: 12px;
        border: 2px solid var(--secondary-color);
    }

    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .nav-arrow.prev {
        right: 10px;
    }

    .nav-arrow.next {
        left: 10px;
    }

    .info-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
        bottom: 15px;
    }
    
    .info-btn span {
        display: none;
    }
    
    .info-btn i {
        font-size: 1.3rem;
        margin: 0;
    }
    
    .modal-content {
        padding: 25px 20px;
        border-radius: 20px;
    }
    
    .modal-content h3 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .day-description {
        font-size: 0.85rem;
        line-height: 1.5;
        padding: 12px;
    }
    
    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .back-btn {
        padding: 6px 15px;
        font-size: 0.85rem;
    }
    
    .progress-dots {
        bottom: 70px;
    }
}

