/* Travorea Website - Main Stylesheet */
/* Travel • Trivia • Treat */

/* ========================================
   CSS Variables / Design Tokens
   ======================================== */
:root {
    /* Colors */
    --primary-blue: #1a5fb4;
    --primary-dark: #0d3a7a;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --text-muted: #888888;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-cream: #fdf8f3;
    --border-light: #e0e0e0;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 5rem;

    /* Container */
    --container-max: 1200px;
    --container-narrow: 800px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
    font-variant-numeric: lining-nums;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Layout
   ======================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ========================================
   Header / Navigation
   ======================================== */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

.logo-icon {
    height: 50px;
    width: auto;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo-text span {
    color: var(--primary-blue);
}

.logo-img {
    height: 36px;
    width: auto;
    min-width: 0;
    flex-shrink: 0;
}

.footer-logo-img {
    height: 60px;
    width: auto;
    margin-bottom: var(--spacing-sm);
}

.tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav a {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    padding: var(--spacing-xs) 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav a:hover,
.nav a.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

/* Mobile menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.5) 100%),
                url('../images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: var(--spacing-xxl) 0;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo {
    max-width: 200px;
    margin-bottom: var(--spacing-md);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-sm);
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero h1 span {
    color: #60a5fa;
}

.hero .tagline {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 3px;
}

.hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 650px;
    margin: 0 auto var(--spacing-lg);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.7;
}

/* ========================================
   Section Cards (Homepage)
   ======================================== */
.sections {
    padding: var(--spacing-xxl) 0;
}

.sections h2 {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.section-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.section-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0,0,0,0.3));
}

.card-badge {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    background: var(--primary-blue);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-content {
    padding: var(--spacing-md);
}

.card-content h3 {
    margin-bottom: var(--spacing-xs);
    color: var(--text-dark);
}

.card-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-sm);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.9rem;
}

.card-link::after {
    content: '→';
    transition: transform 0.2s ease;
}

.section-card:hover .card-link::after {
    transform: translateX(4px);
}

/* ========================================
   Destination Cards
   ======================================== */
.destinations {
    background: var(--bg-light);
    padding: var(--spacing-xxl) 0;
}

.destination-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.destination-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

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

.destination-card .card-content {
    padding: var(--spacing-md);
}

.destination-card h4 {
    margin-bottom: var(--spacing-xs);
}

.destination-card .country {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Coming Soon Ebook Cards */
.destination-card.coming-soon {
    pointer-events: none;
    position: relative;
    opacity: 0.55;
    filter: grayscale(40%);
}

.destination-card.coming-soon:hover {
    transform: none;
    box-shadow: var(--shadow);
}

.destination-card.coming-soon .card-image::after {
    content: 'Coming Soon';
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.destination-card.coming-soon .card-image {
    position: relative;
}

/* ========================================
   Article Page
   ======================================== */
.page-header {
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-light) 100%);
    padding: var(--spacing-xl) 0;
}

.page-header.has-bg {
    background-size: cover;
    background-position: center;
    position: relative;
    padding: var(--spacing-xxl) 0;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
}

.page-header.has-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.1) 100%);
}

.page-header.has-bg .container {
    position: relative;
    z-index: 1;
}

.page-header.has-bg h1 {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.page-header.has-bg .page-meta {
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.page-header.has-bg .breadcrumb,
.page-header.has-bg .breadcrumb a {
    color: rgba(255,255,255,0.8);
}

.page-header.has-bg .breadcrumb a:hover {
    color: #ffffff;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary-blue);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.page-meta {
    color: var(--text-light);
    font-size: 0.95rem;
}

.article-content {
    padding: var(--spacing-xl) 0;
}

.article-content h2 {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--border-light);
}

.article-content h3 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    color: var(--primary-blue);
}

.article-image {
    margin: var(--spacing-lg) 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.article-image img {
    width: 100%;
    display: block;
}

.article-image figcaption {
    padding: var(--spacing-sm);
    background: var(--bg-light);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* Info boxes */
.info-box {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-blue);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    border-radius: 0 8px 8px 0;
}

.info-box h4 {
    color: var(--primary-blue);
    margin-bottom: var(--spacing-xs);
}

.key-fact {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.key-fact strong {
    color: #856404;
}

/* Lists */
.article-content ul {
    margin: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
}

.article-content li {
    margin-bottom: var(--spacing-xs);
}

/* ========================================
   Trivia Page
   ======================================== */
.trivia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.trivia-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.trivia-card img {
    width: 100%;
    height: auto;
}

.trivia-card .card-content {
    padding: var(--spacing-md);
}

.trivia-card h3 {
    margin-bottom: var(--spacing-sm);
}

/* ========================================
   Ebook Page
   ======================================== */
.ebook-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    padding: var(--spacing-xl) 0;
}

.ebook-cover {
    text-align: center;
}

.ebook-cover img {
    max-width: 300px;
    box-shadow: var(--shadow-hover);
    border-radius: 8px;
}

.ebook-info h1 {
    margin-bottom: var(--spacing-md);
}

.ebook-info .description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
}

.ebook-features {
    list-style: none;
    padding: 0;
    margin-bottom: var(--spacing-lg);
}

.ebook-features li {
    padding: var(--spacing-xs) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.ebook-features li::before {
    content: '✓';
    color: var(--primary-blue);
    font-weight: bold;
}

.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--border-light);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--text-dark);
    color: var(--bg-light);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xxl);
}

.footer .container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-xl);
}

.footer-brand .logo-text {
    color: var(--bg-white);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.footer-brand .logo-text span {
    color: #5b9bd5;
}

.footer-brand p {
    color: #aaa;
    font-size: 0.9rem;
}

.footer h4 {
    color: var(--bg-white);
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: var(--spacing-xs);
}

.footer a {
    color: #aaa;
    font-size: 0.9rem;
}

.footer a:hover {
    color: var(--bg-white);
}

.footer-bottom {
    border-top: 1px solid #333;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    text-align: center;
    color: #666;
    font-size: 0.85rem;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .header .container {
        position: relative;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 12px 12px;
        z-index: 100;
    }

    .nav.open {
        display: flex;
    }

    .nav a {
        padding: 0.75rem 1rem;
        border-bottom: none;
        border-radius: 8px;
    }

    .nav a:hover {
        background: var(--bg-light);
    }

    .menu-toggle {
        display: block;
    }

    .logo-img {
        height: 40px;
    }

    .hero {
        min-height: 50vh;
        background-attachment: scroll;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .ebook-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer .container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .trivia-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Image Carousel
   ======================================== */
.card-carousel {
    height: 200px;
    position: relative;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.carousel-slides {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.carousel-slide::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0,0,0,0.3));
    pointer-events: none;
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dots .dot.active {
    background: white;
}

/* ========================================
   Search Box
   ======================================== */
.search-section {
    padding: var(--spacing-lg) 0;
    background: var(--bg-cream);
}

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: 50px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.search-input {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: 1rem 1.5rem;
    background: var(--primary-blue);
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* ========================================
   Destinations Page
   ======================================== */
.destinations-section {
    padding: var(--spacing-xxl) 0;
}

.destinations-section:nth-child(even) {
    background: var(--bg-light);
}

.section-description {
    text-align: center;
    color: var(--text-light);
    margin-bottom: var(--spacing-xl);
}

.destination-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

/* Coming Soon Cards */
.destination-card.coming-soon {
    opacity: 0.7;
    cursor: default;
    pointer-events: none;
}

.card-image-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #e0e0e0, #c0c0c0);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px 16px 0 0;
}

.coming-soon-badge {
    background: var(--text-muted);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Hidden cards during search */
.destination-card.hidden {
    display: none;
}

/* No results message */
.no-results {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-muted);
    display: none;
}

.no-results.show {
    display: block;
}

.no-results-message {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--text-muted);
    background: var(--bg-light);
    border-radius: 12px;
    margin-top: var(--spacing-md);
}

.no-results-message p {
    margin: 0.5rem 0;
}

.no-results-message .suggestion {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ========================================
   Header Search Component
   ======================================== */
.search-container {
    position: relative;
    margin-left: 1rem;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border-radius: 24px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.1);
}

.search-input-wrapper svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    margin-right: 0.5rem;
    flex-shrink: 0;
}

#searchInput {
    border: none;
    background: transparent;
    font-size: 0.9rem;
    width: 180px;
    outline: none;
    color: var(--text-dark);
    font-family: var(--font-body);
}

#searchInput::placeholder {
    color: var(--text-muted);
}

/* Search Results Dropdown */
#searchResults {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    max-height: 400px;
    overflow-y: auto;
}

#searchResults.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-result-item {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    border-bottom: 1px solid var(--bg-light);
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-light);
}

.search-result-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.search-result-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.search-result-country {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: 12px;
}

.search-result-desc {
    font-size: 0.85rem;
    color: var(--text-light);
}

.search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

/* Search overlay for mobile */
#searchOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
}

#searchOverlay.active {
    display: block;
}

/* Mobile search adjustments */
@media (max-width: 768px) {
    .search-container {
        position: fixed;
        top: 70px;
        left: 1rem;
        right: 1rem;
        margin: 0;
        display: none;
    }

    .search-container.active {
        display: block;
    }

    #searchInput {
        width: 100%;
    }

    #searchResults {
        min-width: auto;
        left: 0;
        right: 0;
    }

    .search-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--bg-light);
        border-radius: 50%;
        border: none;
        cursor: pointer;
        margin-left: 0.5rem;
    }

    .search-toggle svg {
        width: 20px;
        height: 20px;
        color: var(--text-dark);
    }
}

@media (min-width: 769px) {
    .search-toggle {
        display: none;
    }
}
