/* =============================================
   CATEGORIAS.CSS — Estilos exclusivos de
   páginas de categoría. No aplica a index.html
   ============================================= */

/* --- Hero --- */
.hero {
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 10%;
    color: white;
    position: relative;
    overflow: hidden;
    transition: background 0.5s ease;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    max-width: 600px;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    opacity: 0.9;
}

/* --- Sección de artículos --- */
.featured-section {
    padding: 4rem 10%;
}

.featured-section h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

/* --- Grid de artículos --- */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-img {
    height: 200px;
    background-color: #e2e8f0;
    width: 100%;
}

.article-content {
    padding: 1.5rem;
}

.article-content h3 {
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.article-content p {
    color: var(--secondary-text);
    font-size: 0.9rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
}

/* =====================================================
   Color del logo según la categoría activa
   ===================================================== */
.cat-medicina .logo {
    color: #a855f7 !important;
}

.cat-tech .logo {
    color: #87F5F5 !important;
}

.cat-cocina .logo {
    color: #d97706 !important;
}

.cat-estudio .logo {
    color: #F042FF !important;
}

.cat-comunidad .logo {
    color: #7226FF !important;
}

/* Ajustes en modo oscuro */
[data-theme='dark'] .cat-tech .logo {
    color: #38bdf8 !important;
}

[data-theme='dark'] .cat-medicina .logo {
    color: #c084fc !important;
}

[data-theme='dark'] .cat-estudio .logo {
    color: #e879f9 !important;
}

[data-theme='dark'] .cat-comunidad .logo {
    color: #a78bfa !important;
}

/* =============================================
   ESPECÍFICOS: CATEGORÍA COCINA (SISTEMA DUAL)
   ============================================= */

/* 1. Definición de colores según el tema */
.cat-cocina {
    --bakery-accent: #d97706;
    /* Dorado */
    --bakery-bg: #fdfbf7;
    /* Crema (Modo Claro) */
    --bakery-text: #1a1a1a;
    --bakery-card: #ffffff;
    --bakery-border: #e5e5e5;

    background-color: var(--bakery-bg);
    color: var(--bakery-text);
    transition: background-color 0.3s, color 0.3s;
}

/* Ajuste automático cuando se activa el modo oscuro */
[data-theme='dark'] .cat-cocina {
    --bakery-bg: #0a0a0a;
    /* Negro (Modo Oscuro) */
    --bakery-text: #e5e5e5;
    --bakery-card: #171717;
    --bakery-border: #262626;
}

/* 2. Estilos de los elementos (usan las variables de arriba) */
.cat-cocina .hero-cocina {
    height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('https://images.unsplash.com/photo-1509440159596-0249088772ff?q=80&w=1470&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-bottom: 2px solid var(--bakery-accent);
    color: white;
}

.cat-cocina .hero-cocina h1 {
    font-family: 'Newsreader', serif;
    font-size: 4rem;
    color: var(--bakery-accent);
}

.cat-cocina .cocina-grid {
    padding: 4rem 10%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.cat-cocina .recipe-card {
    background-color: var(--bakery-card);
    border: 1px solid var(--bakery-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s;
}

.cat-cocina .recipe-card:hover {
    transform: translateY(-5px);
}

.cat-cocina .recipe-info h3 {
    color: var(--bakery-accent);
    font-family: 'Newsreader', serif;
    margin-bottom: 1rem;
}

.cat-cocina .btn-view {
    background-color: var(--bakery-accent);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.cat-cocina .btn-view:hover {
    filter: brightness(1.1);
}

/* =============================================
   ESPECÍFICOS: CATEGORÍA ESTUDIO
   ============================================= */

/* Gradiente para Modo Claro */
.hero-estudio {
    background: linear-gradient(90deg, #FFE5F1 0%, #F042FF 100%);
    color: #1a1a1a;
    /* Texto oscuro para fondo claro */
}

/* Gradiente para Modo Oscuro */
[data-theme='dark'] .hero-estudio {
    background: linear-gradient(90deg, #701a75 0%, #a21caf 100%);
    color: white;
    /* Texto blanco para fondo oscuro */
}

/* =============================================
   ESPECÍFICOS: CATEGORÍA MEDICINA
   ============================================= */

/* Gradiente para Modo Claro */
.hero-medicina {
    background: linear-gradient(90deg, #1e4da1 0%, #a855f7 100%);
    color: white;
}

/* Gradiente para Modo Oscuro */
[data-theme='dark'] .hero-medicina {
    background: linear-gradient(90deg, #1e3a8a 0%, #6b21a8 100%);
    color: white;
}

/* =============================================
   ESPECÍFICOS: CATEGORÍA TECH
   ============================================= */

/* Gradiente para Modo Claro */
.hero-tech {
    background: linear-gradient(90deg, #87F5F5 0%, #FFE5F1 100%);
    color: #1a1a1a;
    /* Texto oscuro porque el fondo es muy claro */
}

/* Gradiente para Modo Oscuro */
[data-theme='dark'] .hero-tech {
    background: linear-gradient(90deg, #0891b2 0%, #be185d 100%);
    color: white;
    /* Texto blanco para fondo oscuro */
}