:root {
    --primary-blue: #1a1a2e;
    --gold: #D4AF37;
    --white: #ffffff;
    --light-gray: #f4f4f4;
    --text-color: #333;
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    background: transparent;
    transition: 0.4s;
    z-index: 1000;
}

.navbar.scrolled {
    background: var(--primary-blue);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--white);
    font-weight: bold;
}

.logo span {
    color: var(--gold);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    color: var(--white);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links li a:hover {
    color: var(--gold);
}

.btn-gold {
    background: var(--gold);
    color: var(--white);
    text-decoration: none;
    padding: 9px 25px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    height: 100vh;
    background: var(--primary-blue);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
}

/* Rotating photos of Algeria behind the hero (see home-slides.js) */
.hero-slides {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.is-active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Dark layer so the title and search stay readable on every photo */
.hero-slides::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(26, 26, 46, 0.55), rgba(26, 26, 46, 0.7));
}

.hero-content {
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* No shadow on the dark text inside the white search box */
.hero-content .search-box {
    text-shadow: none;
}

.hero-credit {
    position: absolute;
    bottom: 12px;
    inset-inline-end: 15px;
    z-index: 1;
    max-width: calc(100% - 30px);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.75);
    text-align: end;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.hero-credit a {
    color: rgba(255, 255, 255, 0.9);
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        transition: none;
    }
}

.logo-large {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    margin-bottom: 10px;
}

.logo-large span {
    color: var(--gold);
}

.hero h1 {
    font-size: 3rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 20px;
}

/* Search Box */
.search-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.search-box {
    background: var(--white);
    padding: 10px;
    border-radius: 50px;
    display: flex;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 800px;
}

.input-group {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    flex: 1;
    border-right: 1px solid #ddd;
}

.input-group:last-of-type {
    border-right: none;
}

.input-group i {
    color: var(--gold);
    margin-right: 10px;
}

.input-group input,
.input-group select {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1rem;
}

.input-group select {
    font-family: inherit;
    color: var(--text-color);
    background: transparent;
    cursor: pointer;
}

.search-message {
    margin-top: 12px;
    min-height: 1.6em;
    color: var(--gold);
    font-weight: 500;
}

.btn-search {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 15px 35px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
}

/* Categories */
.categories {
    padding: 60px 0;
    background: var(--white);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.cat-card {
    text-align: center;
    padding: 25px;
    border-radius: 15px;
    background: var(--light-gray);
    transition: 0.3s;
    cursor: pointer;
    border: 1px solid transparent;
}

.cat-card i {
    font-size: 2rem;
    color: var(--primary-blue);
    display: block;
    margin-bottom: 10px;
}

.cat-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    background: var(--white);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.cat-card:hover i {
    color: var(--gold);
}

/* Destinations */
.destinations {
    padding: 80px 0;
    background: #fafafa;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
}

.destination-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 30px;
}

.dest-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    background: var(--white);
    transition: 0.3s;
}

.dest-card:hover {
    transform: scale(1.03);
}

.dest-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.dest-info {
    padding: 20px;
}

.gold { color: var(--gold); }

/* Footer */
.footer {
    background: #111;
    color: #888;
    padding: 50px 0;
    text-align: center;
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 20px;
}

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    margin: 0 15px;
    transition: 0.3s;
}

.social-links a:hover {
    color: var(--gold);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2rem; }
    .search-box { flex-direction: column; border-radius: 20px; }
    .input-group { border-right: none; border-bottom: 1px solid #ddd; }
}

/* ===== Phase 1 additions ===== */

/* Category card used as a link (Hotels) */
a.cat-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Mobile menu button (hidden on desktop) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.6rem;
    cursor: pointer;
}

.menu-toggle:hover {
    color: var(--gold);
}

@media (max-width: 768px) {
    .menu-toggle { display: block; order: 1; }
    .navbar .container { flex-wrap: wrap; }
    .navbar.menu-open {
        height: auto;
        min-height: 80px;
        padding: 20px 0;
        background: var(--primary-blue);
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    }
    .navbar.menu-open .nav-links {
        display: flex;
        flex-direction: column;
        order: 2;
        width: 100%;
        margin-top: 15px;
    }
    .navbar.menu-open .nav-links li a {
        display: block;
        margin: 0;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}


/* ===== Phase 2: Discover Algeria ===== */

.algeria {
    background: var(--white);
}

.section-subtitle {
    text-align: center;
    color: #666;
    max-width: 650px;
    margin: -35px auto 30px;
}

/* Type filter buttons */
.dest-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-chip {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--white);
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: 0.3s;
}

.filter-chip i {
    color: var(--gold);
    margin-right: 4px;
}

.filter-chip:hover {
    border-color: var(--gold);
}

.filter-chip.active {
    background: var(--primary-blue);
    color: var(--white);
}

/* Algeria destination cards */
.algeria-card {
    display: flex;
    flex-direction: column;
}

.algeria-card.is-hidden {
    display: none;
}

.algeria-card .dest-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dest-image {
    position: relative;
}

.dest-image img {
    display: block;
}

.unesco-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gold);
    color: var(--primary-blue);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.dest-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.dest-tags span {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-blue);
    background: var(--light-gray);
    padding: 2px 10px;
    border-radius: 20px;
}

.algeria-card h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-blue);
}

.dest-location {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 10px;
}

.dest-description {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.btn-hotels {
    align-self: flex-start;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-blue);
    text-decoration: none;
    border: 1px solid var(--gold);
    padding: 7px 16px;
    border-radius: 5px;
    margin-bottom: 15px;
    transition: 0.3s;
}

.btn-hotels i {
    color: var(--gold);
    margin-right: 5px;
}

.btn-hotels:hover {
    background: var(--gold);
}

.btn-hotels:hover i {
    color: var(--primary-blue);
}

.photo-credit {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 0.7rem;
    color: #999;
}

.photo-credit a {
    color: #888;
}


/* ===== Phase 3: Language switcher (added by i18n.js) ===== */

.lang-switcher {
    display: flex;
    gap: 4px;
    margin-inline-start: 15px;
}

.lang-switcher button {
    font-family: 'Poppins', 'Cairo', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 34px;
    padding: 5px 8px;
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.lang-switcher button:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.lang-switcher button.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--primary-blue);
}

@media (max-width: 768px) {
    .lang-switcher {
        order: 1;
        margin-inline-start: auto;
        margin-inline-end: 12px;
    }
}


/* ===== In-app browser banner (added by inapp.js) ===== */

.inapp-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    background: var(--primary-blue);
    color: var(--white);
    border-bottom: 2px solid var(--gold);
    font-size: 0.8rem;
    line-height: 1.45;
}

/* Push the page and the navbar below the banner (height set by inapp.js) */
body.has-inapp-banner {
    padding-top: var(--inapp-offset, 0px);
}

/* Only the colours animate here, so the navbar does not slide down on page load */
body.has-inapp-banner .navbar {
    top: var(--inapp-offset, 0px);
    transition: background 0.4s, box-shadow 0.4s;
}

.inapp-icon {
    flex: none;
    margin-top: 3px;
    color: var(--gold);
    font-size: 1.1rem;
}

.inapp-body {
    flex: 1;
    min-width: 0;
}

.inapp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    margin-top: 6px;
}

.inapp-copy {
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    background: var(--gold);
    color: var(--primary-blue);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.inapp-copy:hover {
    background: var(--white);
}

.inapp-feedback {
    color: var(--gold);
    font-size: 0.8rem;
}

.inapp-url {
    font-family: inherit;
    font-size: 0.8rem;
    width: 100%;
    max-width: 420px;
    padding: 6px 10px;
    border: 1px solid var(--gold);
    border-radius: 5px;
    background: var(--white);
    color: var(--text-color);
}

.inapp-close {
    flex: none;
    padding: 2px 6px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: 0.3s;
}

.inapp-close:hover {
    color: var(--gold);
}

/* Same message inside a "near me" status box, when location fails */
.inapp-notice {
    flex-direction: column;
}

.inapp-notice .inapp-actions {
    justify-content: center;
    margin-top: 0;
}

.inapp-notice .inapp-feedback {
    color: inherit;
    font-weight: 600;
}

/* Footer links (privacy page) */
.footer-links {
    margin: 15px 0 10px;
}

.footer-links a {
    color: #bbb;
    font-size: 0.9rem;
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-underline-offset: 4px;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--gold);
}
