/*=============== VARIABLES CSS ===============*/
:root {
    --header-height: 4.75rem;

    /* Colors — photography-led, minimal (inspired by Visit Iceland / Visit Finland / NYCGo) */
    --ink: #12100D;
    --ink-soft: #2B261E;
    --stone: #FFFFFF;
    --stone-deep: #F2F0EA;
    --paper: #FFFFFF;
    --gold: #A9812E;
    --gold-bright: #C1440E;
    --lapis: #1F4C6B;
    --lapis-deep: #123449;
    --clay: #9C4A2C;
    --text: #232019;
    --text-light: #6b6558;
    --line: rgba(18,16,13, 0.1);
    --line-on-dark: rgba(255,255,255, 0.22);

    /* Typography */
    --font-display: 'Cairo', sans-serif;
    --font-body: 'Cairo', sans-serif;

    --size-hero: clamp(2.8rem, 7vw, 5.6rem);
    --size-h2: clamp(1.8rem, 3vw, 2.6rem);
    --size-h3: 1.35rem;

    --transition: 0.25s ease;
}

/*=============== BASE ===============*/
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: var(--stone);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--ink);
    font-weight: 700;
    line-height: 1.25;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; outline: none; font-family: var(--font-body); background: none; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section { padding: 5.5rem 0; }

.section__header {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.section__title {
    font-size: var(--size-h2);
    margin-bottom: 0.5rem;
}

.section__description {
    color: var(--text-light);
    max-width: 46ch;
}

/*=============== BUTTONS ===============*/
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.2rem;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: var(--transition);
    border-radius: 2px;
}

.btn-primary {
    background: #fff;
    color: var(--ink);
}
.btn-primary:hover { background: var(--gold-bright); color: #fff; }

.btn-secondary {
    background: transparent;
    color: var(--stone);
    border: 1px solid var(--line-on-dark);
}
.btn-secondary:hover {
    border-color: var(--gold-bright);
    color: var(--gold-bright);
}

/*=============== HEADER & NAV ===============*/
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: var(--header-height);
    background: transparent;
    z-index: 100;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    border-bottom-color: var(--line);
}

.nav {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--stone);
}
.header.scrolled .nav__logo { color: var(--ink); }
.header.scrolled .nav__link { color: var(--ink); opacity: 0.75; }
.header.scrolled .nav__toggle { color: var(--ink); }

.nav__logo-mark { color: var(--gold-bright); flex-shrink: 0; }

.nav__logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--stone);
}
.header.scrolled .nav__logo-text { color: var(--ink); }
.nav__logo-text em { font-style: normal; color: var(--gold-bright); }

.nav__list {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav__link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--stone);
    opacity: 0.9;
    transition: var(--transition);
    position: relative;
}

.nav__link:hover, .nav__link.active-link { opacity: 1; color: var(--gold-bright); }

.nav__toggle, .nav__close {
    font-size: 1.4rem;
    color: var(--stone);
    cursor: pointer;
    display: none;
}

/*=============== HERO ===============*/
.hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    color: #fff;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(to top, rgba(10,8,6,0.88) 0%, rgba(10,8,6,0.25) 45%, rgba(10,8,6,0.08) 65%),
        url('https://www.worldhistory.org/uploads/images/15448.jpg');
    background-size: cover;
    background-position: center 35%;
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 780px;
    padding-block: 3rem 6rem;
}

.hero__title {
    font-size: var(--size-hero);
    font-weight: 900;
    letter-spacing: -0.01em;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.hero__description {
    font-size: 1.1rem;
    color: #fff;
    opacity: 0.92;
    margin-bottom: 2.25rem;
    line-height: 1.8;
    max-width: 50ch;
}

.hero__buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero__scrollcue {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    font-size: 0.78rem;
    color: #fff;
    opacity: 0.8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}
.hero__scrollcue::after {
    content: '';
    width: 1px;
    height: 42px;
    background: rgba(255,255,255,0.5);
}

/*=============== SEARCH & FILTER ===============*/
.search {
    padding: 2.75rem 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.search__container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search__box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 560px;
    border-bottom: 1.5px solid var(--ink);
    padding-bottom: 0.6rem;
}

.search__icon { font-size: 1.2rem; color: var(--text-light); transform: scaleX(-1); }

.search__input {
    flex: 1;
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    color: var(--text);
}
.search__input::placeholder { color: var(--text-light); }

.filter__tags {
    display: flex;
    gap: 1.75rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding-top: 1.25rem;
}

.filter__tag {
    padding: 0.2rem 0;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.filter__tag:hover { color: var(--text); }

.filter__tag.active {
    color: var(--ink);
    border-bottom-color: var(--gold-bright);
    font-weight: 700;
}

/*=============== DESTINATIONS ===============*/
.destinations { background: var(--stone); }

.destinations__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 280px;
    gap: 2px;
    background: var(--line);
}

.destination__card:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.destination__card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: #fff;
}

.destination__media {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}

.destination__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,8,6,0.82) 0%, rgba(10,8,6,0.35) 35%, transparent 62%);
    transition: var(--transition);
}

.destination__card:hover .destination__media { transform: scale(1.07); }

.destination__icon {
    position: relative;
    z-index: 1;
    font-size: 4.5rem;
    opacity: 0.5;
}

.destination__media.no-photo {
    background-image:
        repeating-linear-gradient(135deg, rgba(255,255,255,0.07) 0 2px, transparent 2px 22px),
        var(--fallback-bg, none);
}
.destination__media.no-photo::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}
.destination__icon-ring {
    position: relative;
    z-index: 1;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}
.destination__icon-ring .destination__icon { font-size: 2.6rem; opacity: 0.85; }

.destination__ribbon {
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    z-index: 2;
    background: rgba(255,255,255,0.92);
    color: var(--ink);
    padding: 0.35rem 0.9rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.destination__scrim {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    z-index: 2;
    padding: 1.35rem 1.5rem;
    color: #fff;
}

.destination__region {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.destination__title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0;
    display: inline-block;
    position: relative;
    padding-bottom: 3px;
    background-image: linear-gradient(#fff, #fff);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 1.5px;
    transition: background-size 0.35s ease;
}
.destination__card:nth-child(1) .destination__title { font-size: 1.7rem; }

.destination__card:hover .destination__title { background-size: 100% 1.5px; }

.destination__description,
.destination__link {
    display: none;
}

/*=============== REGIONS (index-style list) ===============*/
.regions { background: var(--paper); }

.regions__list {
    display: flex;
    flex-direction: column;
}

.region__row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 1.15rem 0.25rem;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    transition: var(--transition);
}

.region__row:first-child { border-top: 1px solid var(--line); }

.region__row:hover { padding-inline-start: 0.75rem; background: rgba(169, 129, 46, 0.06); }

.region__name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--ink);
    white-space: nowrap;
}

.region__leader {
    flex: 1;
    border-bottom: 1px dotted var(--line);
    height: 0.6em;
    align-self: flex-end;
}

.region__count {
    font-size: 0.85rem;
    color: var(--text-light);
    white-space: nowrap;
}

/*=============== ABOUT ===============*/
.about { background: var(--stone); }

.about__container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about__text {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.85;
    max-width: 55ch;
}

.about__list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about__list li {
    display: flex;
    gap: 1.25rem;
    align-items: baseline;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}
.about__list li:first-child { padding-top: 0; border-top: none; }

.about__list-num {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--gold);
    flex-shrink: 0;
}

.about__list h4 {
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
}

.about__list p {
    font-size: 0.88rem;
    color: var(--text-light);
}

.about__panel {
    background: var(--ink);
    padding: 3rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    position: relative;
    overflow: hidden;
}
.about__panel::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.5;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}
.about__panel-inner { position: relative; z-index: 1; }

.about__panel-inner { text-align: center; }

.about__panel-number {
    display: block;
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--gold-bright);
    margin-bottom: 0.5rem;
}

.about__panel-label {
    font-size: 0.9rem;
    color: var(--stone);
    opacity: 0.8;
}

/*=============== FOOTER ===============*/
.footer {
    background: var(--ink);
    color: var(--stone);
    padding: 4rem 0 1.5rem;
    border-top: 1px solid var(--gold);
}

.footer__container {
    display: grid;
    grid-template-columns: 1.3fr 2fr;
    gap: 3rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--line-on-dark);
}

.footer__logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    display: block;
    margin-bottom: 1rem;
}
.footer__logo em { font-style: normal; color: var(--gold-bright); }

.footer__brand p {
    opacity: 0.65;
    line-height: 1.8;
    max-width: 40ch;
    font-size: 0.9rem;
}

.footer__links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer__links-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__links-group h4 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--gold-bright);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.footer__links-group a {
    opacity: 0.65;
    transition: var(--transition);
    font-size: 0.9rem;
}
.footer__links-group a:hover { opacity: 1; color: var(--gold-bright); }

.footer__bottom {
    text-align: center;
    opacity: 0.5;
    font-size: 0.82rem;
}

/*=============== MODAL ===============*/
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(22, 19, 15, 0.7);
    backdrop-filter: blur(6px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active { display: flex; }

.modal__content {
    background: var(--paper);
    max-width: 680px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal__close {
    position: absolute;
    top: 1rem;
    inset-inline-start: 1rem;
    width: 38px;
    height: 38px;
    background: var(--ink);
    color: var(--stone);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 10;
    transition: var(--transition);
}
.modal__close:hover { background: var(--gold-bright); color: var(--ink); }

.modal__body { padding: 0; }

.modal__hero {
    height: 260px;
    display: flex;
    align-items: flex-end;
    font-size: 5rem;
    color: var(--stone);
    position: relative;
    padding: 1.5rem 2rem;
}

.modal__hero-badge {
    background: var(--ink);
    color: var(--gold-bright);
    padding: 0.4rem 1.1rem;
    font-size: 0.8rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.modal__info { padding: 2rem; }

.modal__title { font-size: 1.7rem; margin-bottom: 0.5rem; }

.modal__region {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--gold);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
}

.modal__description {
    color: var(--text);
    line-height: 1.9;
    margin-bottom: 1.75rem;
}

.modal__details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 1.75rem;
    border-top: 1px solid var(--line);
    border-inline-start: 1px solid var(--line);
}

.modal__detail {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
    border-inline-end: 1px solid var(--line);
}

.modal__detail-label {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.modal__detail-value {
    font-weight: 600;
    color: var(--ink);
    font-size: 0.95rem;
}

.modal__tips {
    background: rgba(169, 129, 46, 0.08);
    border-inline-start: 3px solid var(--gold);
    padding: 1.25rem 1.5rem;
}

.modal__tips h4 {
    font-family: var(--font-body);
    color: var(--gold);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.modal__tips p {
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.7;
}

/*=============== LANGUAGE TOGGLE / i18n ===============*/
html[lang="en"] {
    --font-display: 'Cairo', sans-serif;
}

.t-en { display: none; }
html[lang="en"] .t-ar { display: none; }
html[lang="en"] .t-en { display: revert; }

.lang-toggle {
    border: 1px solid var(--line-on-dark);
    color: var(--stone);
    padding: 0.4rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: var(--transition);
}
.lang-toggle:hover { border-color: var(--gold-bright); color: var(--gold-bright); }

/*=============== SCROLLBAR ===============*/
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--stone); }
::-webkit-scrollbar-thumb { background: var(--gold); }

/*=============== RESPONSIVE ===============*/
@media screen and (max-width: 968px) {
    .hero__container { max-width: 100%; }
    .hero__motif { opacity: 0.15; width: 260px; }
    .about__container { grid-template-columns: 1fr; gap: 3rem; }
    .about__panel { min-height: 220px; }
    .footer__container { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media screen and (max-width: 768px) {
    .nav__menu {
        position: fixed;
        top: 0; inset-inline-end: -100%;
        width: 75%; height: 100%;
        background: var(--ink);
        padding: 6rem 2rem 2rem;
        transition: var(--transition);
    }
    .nav__menu.show-menu { inset-inline-end: 0; }
    .nav__list { flex-direction: column; gap: 2rem; }
    .nav__toggle, .nav__close { display: block; }
    .nav__close { position: absolute; top: 1.5rem; inset-inline-start: 1.5rem; }

    .destinations__grid { grid-template-columns: 1fr; grid-auto-rows: 260px; }
    .destination__card:nth-child(1) { grid-column: span 1; grid-row: span 1; }
    .footer__links { grid-template-columns: repeat(2, 1fr); }
    .modal__details { grid-template-columns: 1fr; }
    .region__name { font-size: 1.1rem; }
}

@media screen and (max-width: 480px) {
    .container { padding: 0 1.25rem; }
    .hero__buttons { flex-direction: column; width: 100%; }
    .btn { justify-content: center; }
    .filter__tags { gap: 1rem 1.25rem; }
    .footer__links { grid-template-columns: 1fr; }
}

/*=============== ANIMATION ===============*/
.fade-in { animation: fadeIn 0.4s ease forwards; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
