:root {
    --primary: #FF5722;
    --primary-hover: #e64a19;
    --dark: #1a1a1a;
    --light: #f9f9f9;
    --white: #ffffff;
    --gray: #666666;
    --border-radius: 14px;
    --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Urbanist', sans-serif; background-color: var(--light); color: var(--dark); line-height: 1.6; }
.container { width: 90%; max-width: var(--max-width); margin: 0 auto; }

/* ENCABEZADO Y BUSCADOR COMPACTO */
.main-header { background-color: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100; padding: 15px 0; }
.header-flex { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.logo { font-size: 24px; font-weight: 800; color: var(--dark); text-decoration: none; }
.logo span { color: var(--primary); }
.main-nav ul { display: flex; list-style: none; gap: 20px; align-items: center; }
.main-nav a { text-decoration: none; color: var(--gray); font-weight: 600; transition: color 0.3s; }
.main-nav a:hover, .main-nav a.active { color: var(--primary); }
.search-bar { display: flex; align-items: center; background: #f0f0f0; border-radius: 20px; padding: 5px 15px; }
.search-bar input { border: none; background: transparent; outline: none; padding: 8px; font-family: inherit; font-size: 14px; width: 200px; }
.search-bar button { border: none; background: transparent; cursor: pointer; font-size: 16px; }

/* HERO SLIDER ANIMADO */
.slider-container { position: relative; width: 100%; height: 60vh; overflow: hidden; background-color: var(--dark); }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s ease-in-out; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; text-align: center; }
.slide.active { opacity: 1; z-index: 10; }
.slide-content { max-width: 800px; padding: 20px; color: var(--white); }
.slide-content h1 { font-size: 48px; font-weight: 800; line-height: 1.1; margin-bottom: 20px; text-shadow: 1px 1px 8px rgba(0,0,0,0.8); }
.slide-content h1 span { color: var(--primary); }
.slide-content p { font-size: 18px; text-shadow: 1px 1px 6px rgba(0,0,0,0.8); }

/* BOTONERA FLEXIBLE DINÁMICA (5 CATEGORÍAS) */
.category-triggers { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-top: -35px; position: relative; z-index: 20; padding-bottom: 40px; }
.trigger-btn { flex: 1 1 180px; max-width: 220px; background-color: var(--white); border: none; padding: 25px 15px; border-radius: var(--border-radius); box-shadow: 0 10px 25px rgba(0,0,0,0.08); font-weight: 700; font-size: 16px; color: var(--dark); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 10px; border-bottom: 4px solid transparent; transition: 0.3s; font-family: inherit; }
.trigger-btn .icon { font-size: 32px; }
.trigger-btn:hover { transform: translateY(-5px); border-bottom: 4px solid var(--primary); }

/* CUADRÍCULA DE TARJETAS Y TOP POPULARES */
.section-padding { padding: 60px 0; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 32px; font-weight: 800; }
.recipes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.recipe-card { background-color: var(--white); border-radius: var(--border-radius); overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.04); display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: 0.3s; position: relative; }
.recipe-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.recipe-info { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.recipe-info h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.recipe-macros { display: flex; justify-content: space-between; background-color: var(--light); padding: 12px; border-radius: 8px; margin-top: 15px; font-size: 12px; font-weight: 600; text-align: center; color: var(--gray); }
.macro span { display: block; color: var(--primary); font-size: 16px; font-weight: 800; }
.btn-ver-pasos { display: block; text-align: center; background-color: var(--primary); color: var(--white); padding: 12px; border-radius: 8px; text-decoration: none; font-weight: 700; margin-top: 15px; }
.badge-popular { position: absolute; top: 15px; right: 15px; background: #FFC107; color: #000; font-weight: 800; font-size: 13px; padding: 5px 12px; border-radius: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); z-index: 2; }

/* ESTRUCTURA MAQUETACIÓN SEO (PÁGINA DETALLE INDIVIDUAL) */
.layout-receta { display: grid; grid-template-columns: 2.5fr 1fr; gap: 40px; margin-top: 30px; }
.receta-contenido-seo h1 { font-size: 38px; font-weight: 800; margin-bottom: 15px; line-height: 1.2; }
.receta-etiquetas { display: flex; gap: 10px; margin-bottom: 20px; }
.tag { background: var(--primary); color: white; padding: 5px 12px; border-radius: 20px; font-size: 13px; font-weight: bold; }
.imagen-receta-hero { width: 100%; height: 400px; object-fit: cover; border-radius: var(--border-radius); margin-bottom: 30px; }
.seo-seccion { background: var(--white); padding: 30px; border-radius: var(--border-radius); margin-bottom: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.seo-seccion h2 { font-size: 24px; color: var(--primary); border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 20px; }
.seo-seccion ul, .seo-seccion ol { padding-left: 20px; margin-bottom: 15px; }
.seo-seccion li { margin-bottom: 10px; font-size: 16px; color: #444; }
.faq-item { margin-bottom: 15px; }
.faq-item strong { display: block; color: var(--dark); font-size: 16px; margin-bottom: 5px; }

/* BARRA LATERAL (SIDEBAR) ASIGNADA A ANUNCIOS */
.sidebar-receta .caja-macros-sidebar { background: var(--white); padding: 25px; border-radius: var(--border-radius); box-shadow: 0 4px 15px rgba(0,0,0,0.03); margin-bottom: 30px; position: sticky; top: 100px; }
.caja-macros-sidebar h3 { text-align: center; margin-bottom: 20px; font-size: 20px; }
.macro-big { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #eee; font-size: 16px; }
.macro-big strong { color: var(--primary); }

/* FORO DE RESEÑAS SEGURO */
.comentarios-section { background-color: #fafafa; padding: 25px; border-radius: var(--border-radius); border: 1px solid #f0f0f0; }
.lista-comentarios { display: flex; flex-direction: column; gap: 15px; margin-bottom: 25px; max-height: 400px; overflow-y: auto; padding-right: 10px; }
.comentario-item { background-color: var(--white); padding: 15px; border-radius: 8px; border-left: 4px solid var(--primary); box-shadow: 0 2px 5px rgba(0,0,0,0.03); }
.comentario-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 14px; }
.estrellas-selector { font-size: 24px; color: #ccc; cursor: pointer; margin-bottom: 10px; user-select: none; }
.estrellas-selector .activa, .comentario-estrellas { color: #FFC107; }
.btn-primary.btn-comentar { margin-top: 10px; border: none; width: 100%; padding: 12px; cursor: pointer; }
.input-comentario, .textarea-comentario { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 8px; font-family: inherit; }
.comentario-acciones { margin-top: 12px; display: flex; gap: 15px; border-top: 1px dashed #eee; padding-top: 8px; }
.btn-accion { background: none; border: none; font-size: 13px; cursor: pointer; font-weight: 600; }
.btn-accion.borrar { color: #d32f2f; }

/* SOPORTES DE BANNER PUBLICITARIO ADSENSE */
.adsense-holder { background-color: #f0f0f0; border: 1px dashed #ccc; text-align: center; padding: 10px; margin: 20px auto; display: flex; align-items: center; justify-content: center; min-height: 90px; }
.ads-label { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 1px; }
.main-footer { background-color: var(--dark); color: var(--white); padding: 40px 0 20px 0; margin-top: 60px; text-align: center; }

/* PANEL DE PRIVACIDAD COOKIES */
.cookie-banner { position: fixed; bottom: 0; left: 0; width: 100%; background-color: var(--dark); color: var(--white); z-index: 9999; padding: 15px 0; display: none; box-shadow: 0 -5px 15px rgba(0,0,0,0.2); }
.cookie-banner.show { display: block; animation: slideUp 0.5s ease-out; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.cookie-content { width: 90%; max-width: var(--max-width); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.cookie-content p { font-size: 14px; margin: 0; }
.cookie-content a { color: var(--primary); text-decoration: underline; }
.btn-cookie { padding: 10px 20px; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; background-color: var(--primary); color: var(--white); font-family: inherit; transition: 0.3s; }
.btn-cookie:hover { background-color: var(--primary-hover); }

/* PÁGINAS LEGALES Y CONTACTO */
.legal-content, .contacto-container { max-width: 800px; margin: 40px auto; background: white; padding: 40px; border-radius: var(--border-radius); box-shadow: 0 4px 15px rgba(0,0,0,0.04); }
.legal-content h3 { margin: 25px 0 10px 0; color: var(--dark); font-size: 20px; font-weight: 700; }
.legal-content p, .legal-content li { color: #555; font-size: 15px; margin-bottom: 12px; }
.legal-content ul { padding-left: 20px; margin-bottom: 15px; }
.form-group { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-weight: 700; font-size: 14px; color: var(--dark); }
.form-control { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-family: inherit; font-size: 14px; outline: none; }
.form-control:focus { border-color: var(--primary); }

@media (max-width: 900px) {
    .layout-receta { grid-template-columns: 1fr; }
    .sidebar-receta .caja-macros-sidebar { position: static; }
    .category-triggers { grid-template-columns: repeat(2, 1fr); }
    .search-bar { width: 100%; margin-top: 10px; }
    .cookie-content { flex-direction: column; text-align: center; }
    .btn-cookie { width: 100%; }
}