/* 1. Global Styles & Setup */
:root {
    --deep-navy-blue: #001C3D;
    --strong-blue: #104387;
    --off-white: #FFFEF5;
    --warm-gold: #E9B02C;
    --dark-desaturated-blue: #1D3457;
    --black: #000000;
    --white: #FFFFFF;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', 'Montserrat', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background-color: var(--off-white);
    color: var(--black);
    /* overflow-x: hidden; <-- This was removed to ensure sticky positioning works correctly */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 4rem 0;
    position: relative;
    z-index: 1;
}

h1, h2, h3 { line-height: 1.2; }

h2 {
    font-size: 2.5rem;
    color: var(--deep-navy-blue);
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.pattern-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('https://www.transparenttextures.com/patterns/arabesque.png');
    opacity: 0.08;
    z-index: -1;
}

.section-title-wrapper {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    display: inline-block;
    position: relative;
    padding-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--warm-gold);
    border-radius: 2px;
}

.section-divider {
    text-align: center;
    padding: 0;
}

.section-divider svg {
    width: 100%;
    max-width: 400px;
    height: auto;
    color: var(--warm-gold);
}

/* 2. Header & Navigation - FINAL PATCHED VERSION */
.main-header {
    background-color: var(--deep-navy-blue);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    height: 90px;
    display: flex;
    align-items: center;
}

.header-container {
    width: 100%;
    align-items: center;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "title logo lang";
    gap: 1rem;
}

.header-title { grid-area: title; }
.main-header-logo { grid-area: logo; }
.header-lang { grid-area: lang; }

.header-title { justify-content: flex-start; display: flex; }
.header-lang { justify-content: flex-end; display: flex; }

html[dir="rtl"] .header-container {
    grid-template-areas: "logo title lang";
}

.header-title-link {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--warm-gold);
    text-align: center;
    white-space: nowrap;
}
.main-header-logo img {
    height: 70px;
    width: auto;
    display: inline-block;
}

.lang-switcher-container { position: relative; }
.lang-switcher-button {
    background: none; border: none;
    color: var(--off-white); cursor: pointer;
    padding: 0.5rem;
}
.lang-dropdown {
    display: none; position: absolute;
    top: 150%; right: 0;
    background-color: var(--dark-desaturated-blue);
    border-radius: 8px; overflow: hidden;
    z-index: 1010; box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    min-width: 120px;
}
html[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
.lang-dropdown a {
    display: block; padding: 0.75rem 1.5rem;
    color: var(--off-white); transition: background-color 0.2s ease;
}
.lang-dropdown a:hover, .lang-dropdown a.active {
    background-color: var(--strong-blue);
}

.sub-nav {
    background-color: var(--deep-navy-blue);
    padding: 0.75rem 0;
    position: sticky;
    top: 90px;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.sub-nav .container {
    display: flex; 
    justify-content: space-around;
}
.sub-nav a {
    color: var(--off-white); 
    padding: 0.5rem 0.5rem;
    border-radius: 50px; 
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid transparent;
    flex-grow: 1;
    text-align: center;
    white-space: nowrap;
}
.sub-nav a:hover { background-color: var(--dark-desaturated-blue); }
.sub-nav a.active {
    background-color: var(--warm-gold);
    color: var(--deep-navy-blue);
    font-weight: 700;
}


/* 3. Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--off-white);
    padding: 0;
    overflow: hidden;
}

.hero-bg-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

.hero-bg-image {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    animation-duration: 20s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.hero-bg-image.active { opacity: 1; }
.hero-bg-image.active:nth-child(1) { animation-name: kenburns-1; }
.hero-bg-image.active:nth-child(2) { animation-name: kenburns-2; }
.hero-bg-image.active:nth-child(3) { animation-name: kenburns-3; }

.hero-bg-container::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.5rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

@keyframes kenburns-1 {
    0% { transform: scale(1.1) translateX(0); }
    50% { transform: scale(1.2) translateX(-5%); }
    100% { transform: scale(1.1) translateX(0); }
}
@keyframes kenburns-2 {
    0% { transform: scale(1.1) translateY(0); }
    50% { transform: scale(1.2) translateY(5%); }
    100% { transform: scale(1.1) translateY(0); }
}
@keyframes kenburns-3 {
    0% { transform: scale(1.2) translateX(5%); }
    50% { transform: scale(1.1) translateX(0); }
    100% { transform: scale(1.2) translateX(5%); }
}

/* 4. Info Section */
#info {
    background-color: var(--white);
    padding-bottom: 2rem;
}
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.info-image-wrapper {
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}
.info-image-wrapper img { transition: opacity 0.3s ease-in-out; }

.info-content h2 { margin-bottom: 1.5rem; transition: opacity 0.3s ease-in-out; }
.info-content p { margin-bottom: 2rem; min-height: 120px; transition: opacity 0.3s ease-in-out; }

.info-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.info-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--strong-blue);
    border-radius: 8px;
    cursor: pointer;
    background-color: var(--strong-blue);
    color: var(--off-white);
    font-weight: 700;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.info-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--warm-gold);
    transition: width 0s;
    z-index: 0;
}

.info-btn span {
    position: relative;
    z-index: 1;
}

.info-btn.active {
    color: var(--deep-navy-blue);
    border-color: var(--warm-gold);
    background-color: transparent;
}

.info-btn.active::before {
    width: 100%;
    transition: width 15s linear;
}

.info-btn:hover {
    background-color: var(--dark-desaturated-blue);
    border-color: var(--dark-desaturated-blue);
}

.info-btn.active:hover {
    background-color: transparent;
}


/* 5. Destinations Section */
.destinations-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.destination-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.destination-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.destination-card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0, 28, 61, 0.8) 0%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
}
.destination-card-overlay h3 {
    color: var(--off-white);
    font-size: 1.5rem;
    transform: translateY(0);
    transition: transform 0.4s ease;
    opacity: 1;
}
.destination-card:hover img { transform: scale(1.1); }

/* 6. Events & News Sections */
.scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0 2rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.scroll-container::-webkit-scrollbar { display: none; }
.content-card {
    flex: 0 0 320px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.content-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}
.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark-desaturated-blue);
}
.card-content small {
    color: #777;
    display: block;
    margin-bottom: 1rem;
}
.card-content p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}
.card-btn {
    display: inline-block;
    background-color: var(--warm-gold);
    color: var(--deep-navy-blue);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    margin-top: auto;
    align-self: flex-start;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.card-btn:hover {
    background-color: #d8a125;
    transform: translateY(-2px);
}

/* 7. Footer */
footer {
    background-color: var(--deep-navy-blue);
    color: var(--off-white);
    padding: 4rem 0 2rem 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-column h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--warm-gold);
}
.footer-column ul { list-style: none; }
.footer-column li { margin-bottom: 0.8rem; }
.footer-column a { transition: color 0.3s ease; }
.footer-column a:hover { color: var(--warm-gold); }

.social-icons {
    display: flex;
    flex-direction: column; 
    gap: 1rem; 
    margin-top: 1.5rem;
    align-items: flex-start; 
}
.social-icons a { 
    font-size: 1.8rem; 
    display: inline-flex;
    align-items: center;
}
.social-icons svg {
    width: 28px; 
    height: 28px;
}



/* [إضافة جديدة] لضبط حجم أيقونات SVG المستخدمة كـ <img> */
.social-icons a img {
    width: 28px;
    height: 28px;
}

.footer-map-wrapper {
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
    border: 2px solid var(--dark-desaturated-blue);
}
.footer-credit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--dark-desaturated-blue);
    font-size: 0.9rem;
    color: #ccc;
}
.developer-link {
    color: #ccc;
    transition: color 0.3s ease;
}
.developer-link:hover { color: var(--warm-gold); }

/* 8. Modal Window */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 28, 61, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background-color: var(--off-white);
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.modal-overlay.visible .modal-content { transform: scale(1); }
.modal-close-btn {
    position: absolute;
    top: 1rem; right: 1rem;
    background: transparent; border: none;
    cursor: pointer;
    color: var(--deep-navy-blue);
}
html[dir="rtl"] .modal-close-btn { right: auto; left: 1rem; }
.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
.modal-title {
    font-size: 2rem;
    color: var(--deep-navy-blue);
    margin-bottom: 0.5rem;
}
.modal-date {
    display: block;
    color: #777;
    margin-bottom: 1.5rem;
}
.modal-text {
    line-height: 1.8;
    color: var(--black);
}

.loader {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid var(--strong-blue);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 9. Responsive Design */
@media (max-width: 992px) {
    .destinations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h2 { font-size: 2rem; }
    .hero-content {
        padding: 0 1rem;
    }
    .hero-content h1 { font-size: 2.8rem; }
    .hero-content p { font-size: 1.2rem; }
    
    .main-header { height: 75px; }
    .sub-nav { top: 75px; }
    
    .sub-nav a { 
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }

    .info-grid {
       grid-template-columns: 1fr;
    }
    .info-image-wrapper { order: -1; margin-bottom: 2rem; }
    .info-content h2 { text-align: center; }
    .info-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .destinations-grid { grid-template-columns: 1fr; }
    .content-card { flex: 0 0 280px; }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }
    .social-icons {
        flex-direction: row;
        justify-content: center;
        align-items: center; 
    }
    .footer-map-wrapper { max-width: 300px; margin: 1rem auto; }

    .footer-credit {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .header-container {
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "lang title logo";
        gap: 0.5rem;
    }
    
    .header-title {
        justify-content: center;
    }
    
    .lang-dropdown {
        right: auto;
        left: 0;
    }

    .header-title-link { font-size: 0.9rem; }
    .main-header-logo img { height: 55px; }

    .modal-content { padding: 1.5rem; }
    .modal-title { font-size: 1.5rem; }
}

