/* --- Variables y Reset --- */
:root {
    --primary-color: #ff5e00; /* Naranja vibrante */
    --primary-dark: #cc4b00;
    --secondary-color: #000000; /* Negro suave */
    --text-light: #f3ebeb;
    --text-dark: #333333;
    --bg-light: #ffffff;
    --bg-gray: #f9f9f9;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

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

ul {
    list-style: none;
}

/* --- Header & Navegación --- */
header {
    background-color: var(--secondary-color);
    color: var(--text-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    padding: 0.5rem 0;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

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

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* --- Hero Section --- */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.7)), url('img/camara.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    padding: 0 1rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--text-light);
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 94, 0, 0.4);
}

/* --- Categorías --- */
.categories {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: -50px auto 0 auto; /* Superposición al Hero */
    position: relative;
    z-index: 10;
}

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

.category-card {
    background: var(--bg-light);
    padding: 2rem;
    text-align: center;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    border-bottom: 4px solid var(--primary-color);
}

.category-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1rem;
    color: var(--secondary-color);
}

/* --- Sección de Recetas (Showcase) --- */
.recipes {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.section-header .divider {
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto;
}

/* Filtros */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid #ddd;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Grid Recetas */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.recipe-card {
    background: var(--bg-light);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 1;
    transform: scale(1);
}

/* Animación para filtrado JS */
.recipe-card.hide {
    display: none;
}

.recipe-card.animate {
    animation: fadeIn 0.5s ease-in-out;
}

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

.recipe-img-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.recipe-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.recipe-card:hover .recipe-img-container img {
    transform: scale(1.1);
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1rem;
}

.recipe-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.recipe-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
}

/* --- Newsletter --- */
.newsletter {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 4rem 2rem;
    text-align: center;
}

.newsletter-container {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter h2 {
    margin-bottom: 1rem;
}

.subscribe-form {
    display: flex;
    gap: 10px;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.subscribe-form input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 30px;
    border: none;
    outline: none;
}

.subscribe-form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
}

.subscribe-form button:hover {
    background-color: white;
    color: var(--primary-color);
}

/* --- Footer --- */
footer {
    background-color: #111;
    color: #aaa;
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.social-icons a {
    color: #aaa;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--primary-color);
}

.copyright {
    font-size: 0.9rem;
    border-top: 1px solid #333;
    padding-top: 1.5rem;
    width: 100%;
    text-align: center;
}

/* --- Toast Notification (No Native Alert) --- */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--secondary-color);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transform: translateX(200%);
    transition: transform 0.4s ease-in-out;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    transform: translateX(0);
}

/* --- Media Queries --- */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background-color: var(--secondary-color);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transition: 0.4s;
    }

    .nav-links.active {
        left: 0;
    }
}