/* ==========================================================================
   SISTEMA DE ESTILOS PREMIUM PARA EL BLOG GASTRONÓMICO
   ========================================================================== */

/* tipografías y variables comunes heredadas del portal principal */
:root {
    --bg-color: #faf8f5;
    --card-bg: #ffffff;
    --text-main: #2c2520;
    --text-muted: #6e6259;
    --accent-gold: #e5a93b;
    --accent-gold-hover: #cb9226;
    --accent-red: #a93226;
    --accent-green: #2e7d32;
    --border-color: #ede9e4;
    --shadow-sm: 0 4px 6px -1px rgba(44, 37, 32, 0.05), 0 2px 4px -1px rgba(44, 37, 32, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(44, 37, 32, 0.08), 0 4px 6px -2px rgba(44, 37, 32, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(44, 37, 32, 0.1), 0 10px 10px -5px rgba(44, 37, 32, 0.04);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-color: #120e0c;
    --card-bg: #1e1815;
    --text-main: #f5f0eb;
    --text-muted: #aba096;
    --accent-gold: #f4be5e;
    --accent-gold-hover: #ffd27f;
    --border-color: #2e2621;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.7;
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* PUBLICIDAD PREMIUM SUPERIOR */
.ad-banner-top {
    background: linear-gradient(135deg, #1e1815 0%, #2c2520 100%);
    color: #ffffff;
    padding: 10px 20px;
    text-align: center;
    font-size: 0.85rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    border-bottom: 2px solid var(--accent-gold);
    position: relative;
    z-index: 10;
}

.ad-banner-top span.ad-badge {
    background-color: var(--accent-gold);
    color: #120e0c;
    font-weight: 800;
    font-size: 0.65rem;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.ad-banner-top a.ad-link {
    color: var(--accent-gold);
    font-weight: 700;
    text-decoration: underline;
    transition: var(--transition);
}

.ad-banner-top a.ad-link:hover {
    color: #ffffff;
}

/* CABECERA (MAIN HEADER) */
.main-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo span {
    color: var(--accent-gold);
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-gold);
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: scale(1.05);
}

/* PORTADA DEL BLOG */
.blog-header {
    text-align: center;
    padding: 60px 20px 30px;
}

.blog-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.blog-header p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 750px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

/* BUSCADOR Y FILTROS */
.blog-controls {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 50px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.4s ease-out;
}

.blog-search-box {
    position: relative;
    width: 100%;
}

.blog-search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.blog-search-input {
    width: 100%;
    padding: 16px 20px 16px 55px;
    font-family: inherit;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-color);
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
}

.blog-search-input:focus {
    border-color: var(--accent-gold);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(229, 169, 59, 0.15);
}

.blog-filter-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.blog-filter-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.chip {
    padding: 8px 18px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.chip:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateY(-1px);
}

.chip.active {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    color: #120e0c;
    box-shadow: 0 4px 10px rgba(229, 169, 59, 0.3);
}

/* REJILLA DE ARTÍCULOS */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

@media (max-width: 950px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

.blog-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-gold);
}

.blog-card-img-wrap {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img {
    transform: scale(1.05);
}

.blog-card-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--accent-gold);
    color: #120e0c;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 40px;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.blog-card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
    line-height: 1.3;
    transition: var(--transition);
}

.blog-card:hover .blog-card-title {
    color: var(--accent-gold);
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.blog-card-readmore {
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    transition: var(--transition);
}

.blog-card:hover .blog-card-readmore {
    gap: 8px;
}

/* ==========================================================================
   ESTILOS DE LECTURA DEL ARTÍCULO INDIVIDUAL
   ========================================================================== */

.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 80px;
}

@media (max-width: 990px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
}

.article-main {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.article-hero {
    height: 420px;
    position: relative;
}

@media (max-width: 600px) {
    .article-hero {
        height: 280px;
    }
}

.article-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(18, 14, 12, 0.9) 0%, rgba(18, 14, 12, 0.4) 60%, rgba(18, 14, 12, 0.15) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
    color: #ffffff;
}

@media (max-width: 600px) {
    .article-hero-overlay {
        padding: 20px;
    }
}

.article-category {
    align-self: flex-start;
    background-color: var(--accent-gold);
    color: #120e0c;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 14px;
    border-radius: 40px;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.article-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px) {
    .article-title {
        font-size: 1.7rem;
    }
}

.article-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    opacity: 0.9;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-body {
    padding: 50px 45px;
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-main);
}

@media (max-width: 600px) {
    .article-body {
        padding: 30px 20px;
    }
}

.article-body p {
    margin-bottom: 25px;
}

.article-body h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    margin-top: 40px;
    margin-bottom: 18px;
    color: var(--text-main);
    border-left: 4px solid var(--accent-gold);
    padding-left: 15px;
}

.article-body blockquote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.3rem;
    color: var(--text-muted);
    border-left: 4px solid var(--accent-gold);
    padding: 10px 20px;
    margin: 30px 0;
    background-color: var(--bg-color);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.article-body ol, .article-body ul {
    margin-left: 25px;
    margin-bottom: 25px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body strong {
    font-weight: 700;
}

.article-body em {
    font-style: italic;
}

/* AFILIADO DE ALTO NIVEL */
.blog-affiliate-banner {
    background-color: var(--bg-color);
    border: 2px solid var(--accent-gold);
    border-radius: var(--radius-md);
    padding: 30px;
    margin: 40px 0;
    display: flex;
    gap: 25px;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

@media (max-width: 700px) {
    .blog-affiliate-banner {
        flex-direction: column;
        text-align: center;
        padding: 35px 20px 25px;
    }
}

.blog-affiliate-banner::before {
    content: 'RECOMENDACIÓN';
    position: absolute;
    top: 15px;
    right: -35px;
    background-color: var(--accent-gold);
    color: #120e0c;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 4px 35px;
    transform: rotate(45deg);
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.5px;
}

.blog-affiliate-img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.blog-affiliate-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.blog-affiliate-brand {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--accent-gold);
    letter-spacing: 0.5px;
}

.blog-affiliate-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.blog-affiliate-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--accent-gold);
}

.blog-affiliate-rating span {
    color: var(--text-muted);
    margin-left: 8px;
    font-weight: 600;
}

.blog-affiliate-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.blog-affiliate-btn {
    align-self: flex-start;
    background-color: var(--accent-gold);
    color: #120e0c;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 22px;
    border-radius: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    margin-top: 5px;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 700px) {
    .blog-affiliate-btn {
        align-self: center;
    }
}

.blog-affiliate-btn:hover {
    background-color: var(--accent-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(229, 169, 59, 0.4);
}

/* BARRA LATERAL DEL ARTÍCULO */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-gold);
}

/* AUTOR */
.author-widget {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.author-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-gold);
}

.author-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1rem;
}

.author-bio {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ARTÍCULOS RELACIONADOS */
.related-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.related-item:hover {
    transform: translateX(4px);
}

.related-item-img {
    width: 65px;
    height: 65px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.related-item-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.related-item-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    transition: var(--transition);
}

.related-item:hover .related-item-title {
    color: var(--accent-gold);
}

.related-item-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* WIDGET PUBLICIDAD */
.ad-sidebar {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.ad-sidebar-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(30, 24, 21, 0.7);
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.ad-sidebar-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
}

.ad-sidebar-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.4;
}

.ad-sidebar-link {
    display: block;
    background-color: var(--text-main);
    color: var(--card-bg);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.ad-sidebar-link:hover {
    background-color: var(--accent-gold);
    color: #120e0c;
}

/* RETORNO A RECETAS / BLOG */
.back-to-blog-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px 24px;
    border-radius: 40px;
    text-decoration: none;
    margin-bottom: 30px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.back-to-blog-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateX(-4px);
    box-shadow: var(--shadow-md);
}

/* FOOTER */
footer {
    text-align: center;
    padding: 50px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    background-color: var(--card-bg);
    margin-top: 40px;
    transition: var(--transition);
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 15px;
}

.footer-logo span {
    color: var(--accent-gold);
}

/* ANIMACIONES */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── MONETIZACIÓN Y ENLACES DE AFILIADOS (AMAZON) ── */
.affiliate-utensil-link {
    color: var(--accent-gold);
    text-decoration: none;
    border-bottom: 1.5px dotted var(--accent-gold);
    padding-bottom: 1px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.affiliate-utensil-link::after {
    content: '\f291'; /* Icono de cesta de compra en FontAwesome */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    margin-left: 4px;
    opacity: 0.6;
    transition: var(--transition);
    display: inline-block;
}

.affiliate-utensil-link:hover {
    color: var(--accent-gold-hover);
    border-bottom-style: solid;
    transform: translateY(-1px);
}

.affiliate-utensil-link:hover::after {
    opacity: 1;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .ad-banner-top {
        flex-direction: column;
        gap: 8px;
        padding: 12px 15px;
        font-size: 0.78rem;
        text-align: center;
    }
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }
    .nav-links {
        gap: 20px;
        width: 100%;
        justify-content: center;
    }
}
@media (max-width: 480px) {
    .logo span {
        display: none; 
    }
    .nav-links a {
        font-size: 0.85rem;
        gap: 5px;
    }
}
