/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    /* Brand Colors */
    --primary-color: #5624d0; /* Purple from your screenshot */
    --primary-hover: #401b9c;
    --text-dark: #1c1d1f;
    --text-light: #6a6f73;
    --bg-light: #f7f9fa;
    --border-color: #d1d7dc;
    --white: #ffffff;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

body {
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* =========================================
   2. NAVBAR / HEADER
   ========================================= */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    background-color: var(--white);
    z-index: 100;
    height: 72px;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.nav-link {
    font-size: 14px;
    color: var(--text-dark);
    transition: color 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Search Bar */
.search-container {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 600px;
    margin: 0 24px;
    border: 1px solid var(--text-dark);
    border-radius: 24px;
    padding: 10px 20px;
    background-color: var(--bg-light);
    transition: background-color 0.2s ease;
}

.search-container:focus-within {
    background-color: var(--white);
    box-shadow: 0 0 0 2px rgba(86, 36, 208, 0.2);
}

.search-icon {
    color: var(--text-light);
    margin-right: 12px;
    font-size: 16px;
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: var(--text-dark);
}

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

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero-section {
    position: relative;
    width: 100%;
    height: 480px;
    /* Replace this URL with your actual Santa María la Ribera image */
    background-image: url('https://images.unsplash.com/photo-1512813195386-6cf811ad3542?q=80&w=1600&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 0 48px;
}

/* Dark overlay to make text readable (optional but recommended) */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.15); 
    z-index: 1;
}

/* The White Promo Box */
.promo-card {
    position: relative;
    z-index: 2; /* Sits above the overlay */
    background-color: var(--white);
    padding: 32px 40px;
    max-width: 460px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-radius: 4px;
}

.promo-card h1 {
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.promo-card p {
    font-size: 16px;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

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

/* Hero Navigation Arrows */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--white);
    border: 1px solid var(--border-color);
    width: 48px;
    height: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    color: var(--text-dark);
    font-size: 18px;
}

.hero-arrow:hover {
    background-color: #f1f1f1;
}

.left-arrow {
    left: 0;
    border-radius: 0 32px 32px 0;
    border-left: none;
}

.right-arrow {
    right: 0;
    border-radius: 32px 0 0 32px;
    border-right: none;
    display: none; /* Hidden by default, matches screenshot */
}

/* =========================================
   4. BOTTOM CONTENT / CATEGORY CARDS
   ========================================= */
.recommendations {
    padding: 48px 24px;
    max-width: 1340px;
    margin: 0 auto;
}

.recommendations h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.card-grid {
    display: flex;
    gap: 24px;
    overflow-x: hidden; /* Hides cards that overflow the container */
}

.card {
    flex: 1;
    min-width: 280px;
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Optional: Make them simple image cards */
.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Optional: Styles for Category Cards with Text Overlays */
/* (Remove the comments below if you use the HTML with card-overlay) */
/*
.category-card {
    height: 250px;
}
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 24px 20px 20px 20px;
    color: var(--white);
}
.card-overlay h3 {
    font-size: 20px;
    margin: 0;
    font-weight: bold;
}
*/

/* =========================================
   5. RESPONSIVE DESIGN (Mobile & Tablets)
   ========================================= */
@media (max-width: 1024px) {
    .nav-right {
        display: none; /* Hide right links on smaller screens */
    }
    .hero-section {
        padding: 0 24px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 12px;
        gap: 12px;
    }
    
    .nav-left {
        flex: 1;
    }
    
    .search-container {
        order: 3;
        width: 100%;
        margin: 8px 0 0 0;
        max-width: 100%;
    }

    .hero-section {
        height: auto;
        min-height: 400px;
        padding: 40px 20px;
        justify-content: center; /* Center the promo card on mobile */
    }

    .promo-card {
        padding: 24px;
        max-width: 100%;
    }

    .promo-card h1 {
        font-size: 26px;
    }

    .card-grid {
        flex-direction: column; /* Stack cards vertically on mobile */
    }

    .card {
        height: 200px;
        width: 100%;
    }
    
    .left-arrow, .right-arrow {
        display: none; /* Hide arrows on mobile */
    }
}
