/* =========================================
   VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
:root { 
    --primary: #1E3A8A;           /* Azul Marino Corporativo */
    --primary-light: #2563EB;     /* Azul Eléctrico para enlaces/botones */
    --accent: #10B981;            /* Verde Esmeralda para "Crecimiento" */
    --dark: #111827; 
    --light: #F9FAFB; 
    --text: #374151; 
    --white: #ffffff;
    --gray-light: #F3F4F6;
    --border: #E5E7EB;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
}

body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    margin: 0; 
    color: var(--text); 
    background: var(--light); 
    line-height: 1.6; 
}

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

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }

/* =========================================
   HEADER Y NAVEGACIÓN
   ========================================= */
header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Buscador Moderno */
.search-form {
    display: flex;
    background: var(--gray-light);
    border-radius: 50px;
    padding: 5px 15px;
    border: 1px solid transparent;
}

.search-form:focus-within {
    border-color: var(--primary-light);
    background: var(--white);
}

.search-form input {
    border: none;
    background: transparent;
    padding: 8px;
    outline: none;
    color: var(--text);
}

/* Selector de Idiomas */
.lang-switcher a {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 4px;
    color: var(--text);
}

.lang-switcher a.active {
    background: var(--primary);
    color: var(--white);
}

/* Navegación de Categorías */
.cat-nav {
    background: var(--primary);
    padding: 10px 0;
}

.cat-list {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.cat-list::-webkit-scrollbar { display: none; }

.cat-list a {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    font-weight: 500;
}

.cat-list a:hover { color: var(--white); }

/* =========================================
   GRID DE ARTÍCULOS (PORTADA)
   ========================================= */
.section-title {
    margin: 40px 0 20px;
    font-size: 1.8rem;
    color: var(--dark);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

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

.card-body { padding: 20px; }

.card-body h2 {
    font-size: 1.25rem;
    margin: 0 0 10px;
    color: var(--dark);
    line-height: 1.3;
}

.resumen-preview {
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.8;
}

/* =========================================
   VISTA DE ARTÍCULO DETALLADO
   ========================================= */
.recipe-container {
    max-width: 850px;
    margin: 40px auto;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.recipe-header img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
}

.recipe-content { padding: 40px; }

.badge-container { margin-bottom: 15px; }

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 8px;
}

.badge-cat { background: var(--primary); color: var(--white); }

/* Estilo Tip Rápido */
.resumen-box {
    background-color: #F0F7FF;
    border-left: 5px solid var(--primary-light);
    padding: 25px;
    border-radius: 0 12px 12px 0;
    margin: 30px 0;
}

/* Estilo Ejemplo Práctico */
.ingredients-box {
    background: var(--gray-light);
    border: 2px dashed var(--border);
    padding: 30px;
    border-radius: 12px;
    margin: 40px 0;
}

.ingredients-box h3 { color: var(--primary); margin-top: 0; }

/* =========================================
   DISEÑO RESPONSIVE
   ========================================= */
@media (max-width: 850px) {
    .nav-container { flex-direction: column; gap: 15px; }
    .header-right { width: 100%; justify-content: center; flex-wrap: wrap; }
    .search-form { width: 100%; order: 3; }
    .recipe-content { padding: 25px; }
    .recipe-header img { height: 250px; }
}

@media (max-width: 480px) {
    .grid { grid-template-columns: 1fr; }
    .section-title { font-size: 1.5rem; }
    .card-body h2 { font-size: 1.1rem; }
}