:root {
    --font-display: "Bebas Neue", sans-serif;
    --font-body: "Nunito", sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    margin: 0;
    background: linear-gradient(180deg, #F9F6F0 0%, #E6D5B8 100%);
    background-attachment: fixed;
}

.container {
    width: 100%;
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.navbar {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 3rem;
    flex-wrap: nowrap;
    background-color: #6F1F2B;
    padding: 1.5rem 1rem;
    border-bottom: 4px solid #580900;
    position: sticky;
    top: 0;
    z-index: 1002;
    transition: padding 0.3s ease-out;
}

.logo {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img { width: 7rem; height: 4.5rem; display: block; }

.textlogo { display: flex; flex-direction: column; justify-content: center; gap: 0; }

.text-en {
    margin: 0;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.2rem;
    line-height: 0.9;
    display: block;
}

.text-ar {
    margin: 0;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.76rem;
    opacity: 0.8;
    line-height: 1;
    display: block;
}

.nav-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 3rem;
    flex-wrap: nowrap;
    position: relative;
}

.navbar.nav-open .nav-links { right: 0; }

/* REMOVED: .navbar.nav-open::before — was creating a competing overlay */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.nav-indicator {
    position: absolute;
    bottom: 0;
    height: 2px;
    background: #ffffff;
    transition: left 0.3s ease-out, width 0.3s ease-out;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 1.6rem;
    cursor: pointer;
    position: relative;
    z-index: 1003;
}

.nav-close { display: none; }

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.navbar a, .navbar a:visited {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0.1rem;
    opacity: 0.6;
    padding-bottom: 0.3rem;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    display: inline-block;
}

.navbar a:hover { opacity: 1; color: #ffffff; text-decoration: none !important; transform: none; }
.navbar a.active { opacity: 1; color: #ffffff; }

.navbar.scrolled {
    background-color: #6F1F2B !important;
    border-bottom-color: #580900 !important;
}

.titles {
    width: 100%;
    padding: 10rem 2rem;
    min-height: 360px;
    text-align: center;
    background-image:
        linear-gradient(rgba(14, 18, 28, 0.45), rgba(14, 18, 28, 0.45)),
        url("https://images.unsplash.com/photo-1512453979798-5ea266f8880c?auto=format&fit=crop&w=2200&q=80");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #F5EFE6;
    position: relative;
    border-bottom: 5px solid rgb(138, 109, 30);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.titles::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, transparent, #ffd5a34b);
    pointer-events: none;
}

.btn-30sec {
    position: relative;
    z-index: 1;
}

.titles h1 {
    letter-spacing: 0.75rem;
    font-size: 3.5rem;
    text-shadow: 0.2rem 0.2rem 1rem black;
    animation: fadeInUp 1s ease-out;
}

.titles h1, .card-overlay h2 { font-family: var(--font-display); font-weight: 700; }
.titles p { font-family: var(--font-body); font-weight: 400; }

.categories {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: stretch;
    flex: 1;
    margin: 0 auto;
    padding: 6rem 5%;
    background-color: transparent;
}

.card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    text-decoration: none;
    display: block;
    min-height: 400px;
    height: 100%;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1), 0 6px 6px rgba(0,0,0,0.1);
    border: 4px solid rgba(138, 109, 30, 0.36);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease-out;
}

.card:hover img { transform: translateY(-5px); box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); }

.card-overlay {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    padding: 2rem 1.5rem;
    background: linear-gradient(transparent, rgba(14, 18, 28, 0.85));
    color: #F5EFE6;
    transition: background 0.3s ease-out;
}

.card:hover .card-overlay { background: linear-gradient(transparent, rgba(111, 31, 43, 0.9)); }
.card-overlay h2 { margin: 0 0 0.3rem 0; font-size: 1.5rem; letter-spacing: 0.1rem; }
.card-overlay p { margin: 0; font-size: 0.85rem; opacity: 0.8; }

.card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.2), transparent);
    pointer-events: none;
}

.footer {
    width: 100%;
    background-color: #141414;
    padding: 4rem 2rem 1.5rem;
    border-top: 5px solid rgba(201, 168, 76, 0.3);
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h3 {
    font-family: var(--font-display);
    color: #C9A84C;
    font-size: 1.2rem;
    letter-spacing: 0.3rem;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(201, 168, 76, 0.3);
}

.footer-col a {
    display: block;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.4rem 0;
    transition: color 0.2s ease-out, padding-left 0.2s ease-out;
}

.footer-col a:hover { color: #ffffff; padding-left: 0.5rem; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.5rem 0; text-align: center; }
.footer-bottom p { color: rgba(255,255,255,0.3); font-size: 0.8rem; margin: 0; }

@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }
    .nav-indicator { display: none; }

    .navbar{
        padding: 1rem;
    }

    .logo{
        bottom: 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        background-color: #1a0a0d;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 3rem 2rem;
        gap: 0;
        transition: right 0.35s cubic-bezier(.77,0,.18,1);
        z-index: 1003;
        display: flex;
        overflow-y: auto;
    }

    .nav-links a {
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        color: #ffffff !important;
        opacity: 0.75;
        transition: none;
    }

    .nav-links a:hover, .nav-links a.active { opacity: 1 !important; color: #ffffff !important; }
    .nav-links a:first-of-type { border-top: 1px solid rgba(255,255,255,0.15); }

    .nav-close {
        display: block;
        position: absolute;
        top: 1.2rem; right: 1.2rem;
        background: transparent;
        border: none;
        color: #ffffff !important;
        font-size: 1.4rem;
        cursor: pointer;
    }

    .navbar.nav-open .nav-links { right: 0; }
    .nav-links a:hover { transform: none; text-decoration: underline; color: #ffffff; }
    .categories { grid-template-columns: 1fr; margin: 2rem 0; padding: 2rem 5%; }
    .card { aspect-ratio: 16/9; min-height: unset; height: auto; }
    .footer-content { grid-template-columns: 1fr; gap: 2rem; }

    body.nav-is-open .dark-toggle,
    body.nav-is-open #chat-bubble {
        opacity: 0;
        pointer-events: none;
    }
}

@media (max-width: 600px) {
    .navbar { padding: 1rem; }
    .logo { left: 1rem; }
    .titles { padding: 3rem 1.5rem; }
    .titles h1 { font-size: 2.5rem; letter-spacing: 0.4rem; }
}

@media (min-width: 901px) { .card-overlay h2 { white-space: nowrap; } }
@media (min-width: 768px) { .container { padding: 0; } }
@media (min-width: 1024px) { .container { padding: 0; } }

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

.card.nature { animation-delay: 0.4s; }
.card.modern { animation-delay: 0.6s; }
.card.historical { animation-delay: 0.8s; }

.chat-bubble {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: #6F1F2B;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    border: 2px solid #C9A84C;
    transition: transform 0.2s ease-out;
}

.chat-bubble:hover { transform: scale(1.1); }

.chat-window {
    position: fixed;
    bottom: 6rem;
    left: 2rem;
    width: 320px;
    height: 420px;
    background: #1a0a0d;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    border: 1px solid rgba(201, 168, 76, 0.3);
    overflow: hidden;
    transform: scale(0.8);
    opacity: 0;
    pointer-events: none;
    transform-origin: bottom left;
    transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), opacity 0.2s ease;
}

.chat-window.open { display: flex; transform: scale(1); opacity: 1; pointer-events: all; }

.chat-header {
    background: #6F1F2B;
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.1rem;
    border-bottom: 2px solid #C9A84C;
}

.chat-header button { background: transparent; border: none; color: #ffffff; cursor: pointer; font-size: 1rem; }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-msg {
    max-width: 80%;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
    font-family: var(--font-body);
}

.chat-msg.bot { background: rgba(255,255,255,0.1); color: #F5EFE6; align-self: flex-start; border-bottom-left-radius: 2px; }
.chat-msg.user { background: #6F1F2B; color: #ffffff; align-self: flex-end; border-bottom-right-radius: 2px; }

.chat-input-row { display: flex; padding: 0.75rem; gap: 0.5rem; border-top: 1px solid rgba(255,255,255,0.1); }

.chat-input-row input {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
}

.chat-input-row input::placeholder { color: rgba(255,255,255,0.4); }

.chat-input-row button {
    background: #6F1F2B;
    border: none;
    color: #ffffff;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.chat-input-row button:hover { background: #8a2535; }

.chat-msg.bot.thinking { display: flex; align-items: center; gap: 4px; padding: 0.8rem 1rem; }

.chat-msg.bot.thinking span {
    width: 7px; height: 7px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.2s infinite ease-in-out;
}

.chat-msg.bot.thinking span:nth-child(2) { animation-delay: 0.2s; }
.chat-msg.bot.thinking span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}