/* =========================================================
   BASE RESET
========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #f3f4f6;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
}

/* =========================================================
   PAGE CONTAINER
========================================================= */
.page {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* =========================================================
   HEADER + NAVIGATION
========================================================= */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e5e7eb;
    z-index: 20;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 26px;
    gap: 16px;
}

.brand-link {
    text-decoration: none;
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
}

/* Main nav */
.main-nav {
    display: flex;
    gap: 22px;
}

.nav-link {
    text-decoration: none;
    color: #4b5563;
    font-size: 0.95rem;
    position: relative; /* needed for underline effect */
}

.nav-link:hover {
    color: #111827;
}

/* "Hangover" underline effect */
.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 2px;
    background: #2563eb;
    transition: width 0.2s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* =========================================================
   LANGUAGE SWITCHER (FINAL, FIXED)
========================================================= */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-btn {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.flag {
    width: 22px;
    height: 16px;
    display: block;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 0 3px rgba(0,0,0,0.25);
}

/* Prevent any inherited transforms */
.lang-btn:hover .flag {
    transform: none;
}

/* =========================================================
   HERO
========================================================= */
.hero {
    position: relative;
    width: 100%;
    height: 360px;
    overflow: hidden;
}

.hero-video,
.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-text {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.hero-text h1 {
    font-size: 3rem;
    margin: 0;
    font-weight: 700;
}

.hero-text h2 {
    margin-top: 8px;
    font-size: 1.35rem;
    opacity: 0.9;
}

/* =========================================================
   MAIN CONTENT
========================================================= */
.main-content {
    padding: 32px 26px 40px;
    flex: 1;
}

.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.55rem;
    font-weight: 600;
    margin-bottom: 16px;
}

/* =========================================================
   GENERIC TEXT PAGE (ABOUT + TERMS)
========================================================= */
.text-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.text-page h1,
.text-page h2 {
    margin-bottom: 22px;
    font-size: 1.9rem;
    font-weight: 600;
}

.text-page h3 {
    margin-top: 32px;
    font-size: 1.35rem;
}

.text-page p {
    margin-bottom: 18px;
    line-height: 1.7;
    color: #374151;
}

/* =========================================================
   ABOUT – BIO
========================================================= */
.about-bio {
    margin-top: 28px;
}

/* =========================================================
   MAP SECTION (CLEAN, EDGELESS)
========================================================= */
.map-section-full {
    width: 100%;
    padding: 24px 0 20px;
}

.map-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.map-full-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 0;
    box-shadow: none;
}

.map-full-iframe {
    width: 100%;
    height: 750px;
    border: none;
    display: block;
}

/* =========================================================
   BREADCRUMB (GALLERY MENU)
========================================================= */
.gallery_menu {
    max-width: 1100px;
    margin: 10px auto 18px;
    padding: 0 6px;
    color: #6b7280;
    font-size: 0.95rem;
}

.gallery_menu_text {
    color: #2563eb;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    background: none;
    border: none;
    padding: 0;
    font-weight: 500;
}

/* Avoid purple visited links in breadcrumb */
.gallery_menu_text:visited {
    color: #2563eb;
}

.gallery_menu_text:hover {
    opacity: 0.85;
}

/* =========================================================
   PLACE DESCRIPTION (CARD LIKE BEFORE)
========================================================= */
.place-description {
    max-width: 820px;
    margin: 18px auto 30px;
    padding: 20px 26px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
    line-height: 1.7;
    color: #374151;
}

.place-description h2 {
    margin-top: 28px;
    font-size: 1.55rem;
    font-weight: 600;
    color: #111827;
}

.place-description ul {
    margin-top: 10px;
    padding-left: 22px;
}

.place-description li {
    margin-bottom: 8px;
}

/* Link style inside place description (your canonical style) */
.place-description a[href] {
    color: #2563eb !important;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-weight: 500;
    cursor: pointer;
}

.place-description a[href]:visited {
    color: #2563eb !important;
}

.place-description a[href]:hover {
    opacity: 0.85;
}

/* AI disclaimer */
.ai-disclaimer {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-left: 4px solid #9ca3af;
    background: #f9fafb;
    color: #374151;
    font-size: 0.95rem;
    font-style: italic;
    border-radius: 8px;
}

/* =========================================================
   GALLERY GRID (RESTORE YOUR GRID)
========================================================= */
#gallery-listing {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 6px 30px;
}

.lists_museum {
    max-width: 1100px;
    margin: 0 auto 18px;
    padding: 0 6px;
    font-size: 1.9rem;
    font-weight: 700;
    color: #111827;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 26px;
    margin: 12px 0 26px;
    width: 100%;
}

.gallery-thumb,
.video-thumb video {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    display: block;
}

.gallery-item a {
    text-decoration: none;
}

.video-thumb {
    position: relative;
}

.video-badge {
    position: absolute;
    bottom: 10px;
    right: 12px;
    background: rgba(0,0,0,0.65);
    padding: 5px 9px;
    color: white;
    border-radius: 5px;
    font-size: 0.9rem;
}

/* =========================================================
   PAGINATION ARROWS
========================================================= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    margin-top: 10px;
}

.page-arrow img {
    width: 32px;
    height: 32px;
    transition: transform .2s ease, opacity .2s ease;
}

.page-arrow:hover img {
    transform: scale(1.15);
    opacity: 0.85;
}

.page-number {
    font-size: 1.05rem;
    color: #374151;
}

/* =========================================================
   MODAL (RESTORE PROPER FULLSCREEN OVERLAY)
========================================================= */
#media-modal {
    display: none;
    opacity: 0;
    pointer-events: none;

    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    z-index: 5000;

    justify-content: center;
    align-items: center;

    transition: opacity 0.25s ease;
}

#media-modal.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.media-modal-inner {
    background: #000;
    width: min(1200px, 92vw);
    height: min(820px, 88vh);
    border-radius: 12px;
    padding: 10px;
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

#media-modal-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#media-modal-content img,
#media-modal-content video {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
}

.media-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    z-index: 6000;
}

/* Lock scroll behind modal */
body.modal-open {
    overflow: hidden !important;
}

/* =========================================================
   TOWNS + PLACES LISTING (POLISHED)
========================================================= */
.Gallery {
    max-width: 900px;
    margin: 10px auto 30px;
    padding: 0 10px;

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.lists {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.lists_text {
    display: block;
    color: #111827;
    text-decoration: none;
    font-weight: 600;
}

.lists_text:hover {
    text-decoration: underline;
}

/* remove visited purple everywhere for these lists */
.lists_text:visited {
    color: #111827;
}

/* =========================================================
   HOME PAGE (SLIDER PRESERVED)
========================================================= */
.latest-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}

.latest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.latest-info {
    max-width: 40%;
}

.latest-title a {
    text-decoration: none;
    color: #111827;
    font-size: 1.9rem;
    font-weight: 700;
}

.latest-title a:hover {
    text-decoration: underline;
}

.latest-date {
    margin-top: 8px;
    font-size: 1.1rem;
    color: #4b5563;
}

.latest-slider {
    width: 55%;
    overflow: hidden;
    border-radius: 10px;
}

.slider-track {
    display: flex;
    gap: 12px;
    animation: slidePhotos 12s linear infinite;
}

.slider-photo {
    width: 140px;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

@keyframes slidePhotos {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =========================================================
   RTL SUPPORT
========================================================= */
.rtl {
    direction: rtl;
    text-align: right;
    font-family: "IBM Plex Sans Arabic", sans-serif;
}
/* =========================================================
   FOOTER – CENTERED & CLEAN (FINAL)
========================================================= */
.site-footer {
    text-align: center;
}

/* Ensure footer paragraphs are centered blocks */
.site-footer p {
    margin: 6px 0;
    text-align: center;
}

/* Center the links row explicitly */
.site-footer p:last-child {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Footer links – force clean style */
.site-footer a,
.site-footer a:visited {
    color: #374151 !important;
    text-decoration: none !important;
    font-weight: 500;
    position: relative;
}

/* Hover underline animation */
.site-footer a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 1px;
    background: #2563eb;
    transition: width 0.2s ease;
}

.site-footer a:hover {
    color: #111827 !important;
}

.site-footer a:hover::after {
    width: 100%;
}


/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 900px) {
    .latest-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .latest-info {
        max-width: 100%;
    }

    .latest-slider {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .page {
        box-shadow: none;
    }

    .hero {
        height: 260px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text h2 {
        font-size: 1rem;
    }

    .main-content {
        padding: 26px 16px 34px;
    }

    .text-page {
        padding: 30px 18px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }S

    .gallery-thumb,
    .video-thumb video {
        height: 190px;
    }
}


/* RTL pagination arrow fix (Arabic) — add at END of your CSS */
.rtl .page-arrow img {
    transform: scaleX(-1);
}

.rtl .page-arrow:hover img {
    transform: scaleX(-1) scale(1.15);
}

/* =========================================================
   COOKIE BANNER – FIXED & POLISHED
========================================================= */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 14px 20px;
    background: rgba(17, 24, 39, 0.95); /* slate-900 */
    color: #f9fafb;

    font-size: 0.85rem;
    line-height: 1.5;

    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
}

/* Text */
#cookie-banner p {
    margin: 0;
    max-width: 800px;
}

/* Links inside banner */
#cookie-banner a {
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#cookie-banner a:hover {
    opacity: 0.9;
}

/* Buttons */
#cookie-banner button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

#cookie-banner button:hover {
    background: #1d4ed8;
}

/* Optional reject / secondary button */
#cookie-banner .secondary {
    background: transparent;
    color: #e5e7eb;
    border: 1px solid rgba(255,255,255,0.3);
}

#cookie-banner .secondary:hover {
    background: rgba(255,255,255,0.1);
}

/* Mobile layout */
@media (max-width: 640px) {
    #cookie-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    #cookie-banner button {
        width: 100%;
        text-align: center;
    }
}

.rtl #cookie-banner {
    direction: rtl;
    text-align: right;
}
