/*
Theme Name: Sano Express
Theme URI: https://sanoexpress.com
Author: Promedia Digital
Author URI: https://promedia.digital/
Description: Tema personalizado para Sano Express. Aprende a cocinar saludable de forma rápida y económica.
Version: 1.0.0
Text Domain: sanoexpress
*/

:root {
    --sx-green: #2dd4bf;
    --sx-green-dark: #14b8a6;
    --sx-orange: #f97316;
    --sx-dark: #1f2937;
    --sx-text: #4b5563;
    --sx-light: #f9fafb;
    --sx-white: #ffffff;
    --sx-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --sx-radius: 16px;
}

* { box-sizing: border-box; }
body {
    font-family: 'Inter', sans-serif;
    color: var(--sx-text);
    margin: 0;
    background-color: var(--sx-light);
    line-height: 1.6;
}

h1, h2, h3 { font-family: 'Poppins', sans-serif; color: var(--sx-dark); margin: 0; }

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

/* HEADER */
.sx-header {
    background: var(--sx-white);
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sx-nav { display: flex; justify-content: space-between; align-items: center; }
.sx-logo { font-size: 1.5rem; font-weight: 700; color: var(--sx-green); text-decoration: none; }
.sx-logo span { color: var(--sx-dark); font-style: italic; }

/* Menu styles */
.sx-nav-links ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.sx-nav-links a { text-decoration: none; color: var(--sx-dark); font-weight: 600; transition: color 0.3s; }
.sx-nav-links a:hover { color: var(--sx-green); }

/* HERO SECTION - Optimizada para el buscador */
.sx-hero {
    background: var(--sx-white);
    padding: 80px 0;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.sx-hero h1 { font-size: 3rem; margin-bottom: 20px; letter-spacing: -1px; }
.sx-hero h1 mark { background: none; color: var(--sx-green); }
.sx-hero p { font-size: 1.1rem; color: #6b7280; max-width: 600px; margin: 0 auto 40px; }

.sx-search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.sx-search-input {
    width: 100%;
    padding: 18px 30px;
    border-radius: 50px;
    border: 2px solid #e5e7eb;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
    box-shadow: var(--sx-shadow);
}

.sx-search-input:focus { border-color: var(--sx-green); }

/* CATEGORY SILOS - Crucial para SEO */
.sx-silos {
    padding: 40px 0;
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scrollbar-width: none;
}
.sx-silos::-webkit-scrollbar { display: none; }

.sx-silo-card {
    background: var(--sx-white);
    padding: 15px 25px;
    border-radius: 50px;
    text-decoration: none;
    color: var(--sx-dark);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    border: 1px solid #eee;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sx-silo-card:hover { border-color: var(--sx-green); color: var(--sx-green); transform: translateY(-2px); }

/* GRID DE RECETAS */
.sx-section-title { margin-bottom: 30px; font-size: 1.8rem; display: flex; align-items: center; justify-content: space-between; }
.sx-view-all { font-size: 0.9rem; color: var(--sx-green); text-decoration: none; }

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

.sx-card {
    background: var(--sx-white);
    border-radius: var(--sx-radius);
    overflow: hidden;
    box-shadow: var(--sx-shadow);
    text-decoration: none;
    transition: 0.3s;
    display: block;
}

.sx-card:hover { transform: translateY(-10px); box-shadow: 0 10px 30px rgba(0,0,0,0.12); }
.sx-card:hover .sx-card-img { transform: scale(1.05); }

.sx-card-img { width: 100%; height: 220px; object-fit: cover; transition: transform 0.5s ease; }
.sx-card-body { padding: 20px; }
.sx-card-tag { color: var(--sx-green); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 10px; display: block; }
.sx-card-title { font-size: 1.2rem; margin-bottom: 15px; line-height: 1.3; color: var(--sx-dark); }
.sx-card-meta { display: flex; gap: 15px; font-size: 0.85rem; color: #9ca3af; }

/* CTA SECTION - Preparado para WooCommerce o Leads */
.sx-cta-box {
    background: var(--sx-dark);
    border-radius: var(--sx-radius);
    padding: 60px 40px;
    color: white;
    text-align: center;
    margin-top: 40px;
}

.sx-cta-box h2 { color: white; margin-bottom: 15px; }
.sx-cta-box p { color: #d1d5db; margin-bottom: 20px; }

.sx-btn-primary {
    background: var(--sx-green);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    margin-top: 20px;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.sx-btn-primary:hover { background: var(--sx-green-dark); }

/* SINGLE POST LAYOUT */
.sx-single-header {
    text-align: center;
    padding: 60px 20px;
    background: var(--sx-white);
    border-bottom: 1px solid #f0f0f0;
}
.sx-single-category {
    display: inline-block;
    color: var(--sx-green);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    margin-bottom: 15px;
}
.sx-single-title {
    font-size: 3rem;
    max-width: 800px;
    margin: 0 auto 20px;
    line-height: 1.2;
    letter-spacing: -1px;
}
.sx-single-meta {
    color: #6b7280;
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}
.sx-single-featured-img-wrap {
    width: 100%;
    max-width: 1000px;
    margin: -40px auto 40px;
    position: relative;
    z-index: 10;
    border-radius: var(--sx-radius);
    overflow: hidden;
    box-shadow: var(--sx-shadow);
}
.sx-single-featured-img {
    width: 100%;
    height: auto;
    display: block;
}
.sx-single-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 80px;
    font-size: 1.15rem;
    color: var(--sx-dark);
    line-height: 1.8;
}
.sx-single-content h2, .sx-single-content h3 { margin-top: 40px; margin-bottom: 20px; color: var(--sx-dark); }
.sx-single-content img { max-width: 100%; height: auto; border-radius: var(--sx-radius); margin: 30px 0; }
.sx-single-content ul, .sx-single-content ol { margin-bottom: 30px; padding-left: 20px; }
.sx-single-content li { margin-bottom: 10px; }
.sx-single-content blockquote {
    border-left: 4px solid var(--sx-green);
    margin: 30px 0;
    padding: 20px;
    background: var(--sx-white);
    font-style: italic;
    font-size: 1.2rem;
    color: #4b5563;
    border-radius: 0 var(--sx-radius) var(--sx-radius) 0;
}

/* ADVANCED FOOTER */
.sx-footer {
    background: #1f2937 !important;
    color: #9ca3af;
    padding: 80px 0 30px;
    font-size: 0.95rem;
}

/* Asegurar que el contenedor de WP no rompa el fondo */
.sx-footer * { box-sizing: border-box; }

.sx-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 60px;
}

/* Columna 1: Marca */
.sx-footer-brand .sx-logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    display: block;
    margin-bottom: 15px;
}
.sx-footer-brand .sx-logo span { color: var(--sx-green); }
.sx-footer-brand > p { 
    color: #9ca3af;
    margin-bottom: 25px; 
    line-height: 1.7; 
    font-size: 0.95rem;
}

/* Redes sociales */
.sx-social-links { display: flex; gap: 12px; margin-top: 5px; }
.sx-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    border-radius: 50%;
    transition: 0.3s;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0;
    border: 1px solid rgba(255,255,255,0.1);
}
.sx-social-links a:hover { 
    background: var(--sx-green); 
    border-color: var(--sx-green);
    transform: translateY(-3px); 
}

/* Widgets del footer (columnas 2, 3, 4) */
.sx-footer-widget h4 {
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0 0 22px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Menús de WP - anula estilos del navegador */
.sx-footer-widget .sx-footer-menu,
.sx-footer-widget .menu { 
    list-style: none !important; 
    padding: 0 !important; 
    margin: 0 !important; 
}
.sx-footer-widget .sx-footer-menu li,
.sx-footer-widget .menu li { 
    margin-bottom: 12px !important;
    list-style: none !important;
}
.sx-footer-widget .sx-footer-menu a,
.sx-footer-widget .menu a {
    color: #9ca3af !important;
    text-decoration: none;
    transition: color 0.25s, transform 0.25s;
    display: inline-block;
    font-size: 0.95rem;
    line-height: 1.5;
}
.sx-footer-widget .sx-footer-menu a:hover,
.sx-footer-widget .menu a:hover { 
    color: var(--sx-green) !important; 
    transform: translateX(4px); 
}

/* WP agrega un div contenedor al menú — hay que quitarle el estilo */
.sx-footer-widget .menu-footer-explorar-container,
.sx-footer-widget .menu-footer-legal-container,
.sx-footer-widget div[class*="menu-"] {
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Columna 4: Email newsletter */
.sx-footer-widget p {
    color: #9ca3af;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 18px;
}
.sx-footer-email-form {
    display: flex;
    gap: 8px;
}
.sx-footer-email-form input[type="email"] {
    flex: 1;
    padding: 12px 18px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    font-size: 0.9rem;
    outline: none;
    transition: 0.3s;
}
.sx-footer-email-form input[type="email"]::placeholder { color: #6b7280; }
.sx-footer-email-form input[type="email"]:focus { border-color: var(--sx-green); background: rgba(255,255,255,0.12); }
.sx-footer-email-form button {
    background: var(--sx-green);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    flex-shrink: 0;
}
.sx-footer-email-form button:hover { background: var(--sx-green-dark); transform: scale(1.05); }

/* Barra inferior */
.sx-footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: #6b7280;
    font-size: 0.875rem;
}

@media (max-width: 992px) {
    .sx-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .sx-hero h1 { font-size: 2.2rem; }
    .sx-grid { grid-template-columns: 1fr; }
    .sx-single-title { font-size: 2.2rem; }
    .sx-single-featured-img-wrap { margin-top: 20px; border-radius: 0; }
    .sx-footer-grid { grid-template-columns: 1fr; text-align: center; }
    .sx-social-links { justify-content: center; }
    .sx-footer-menu a:hover { transform: translateX(0); color: var(--sx-green); }
}

/* ─────────────────────────────────────────
   COMMENTS SECTION
───────────────────────────────────────── */
.sx-comments-section {
    margin-top: 70px;
    padding-top: 50px;
    border-top: 2px solid #f0f0f0;
}

/* ── Title ── */
.sx-comments-title {
    font-size: 1.5rem;
    font-family: 'Poppins', sans-serif;
    color: var(--sx-dark);
    margin: 0 0 36px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sx-comments-icon {
    font-size: 1.3rem;
}

/* ── Comment List ── */
.sx-comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sx-comment {
    background: var(--sx-white);
    border-radius: var(--sx-radius);
    padding: 28px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    transition: box-shadow 0.3s;
}
.sx-comment:hover {
    box-shadow: 0 6px 28px rgba(0,0,0,0.1);
}

/* Nested replies */
.sx-comment-list .children {
    list-style: none;
    margin: 20px 0 0 0;
    padding-left: 30px;
    border-left: 3px solid var(--sx-green);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.sx-comment-list .children .sx-comment {
    background: var(--sx-light);
    box-shadow: none;
    border-color: #e5e7eb;
}

/* ── Comment Body Layout ── */
.sx-comment-body {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

/* ── Avatar ── */
.sx-comment-avatar {
    flex-shrink: 0;
}
.sx-comment-avatar img {
    border-radius: 50%;
    width: 56px;
    height: 56px;
    object-fit: cover;
    border: 3px solid var(--sx-green);
    display: block;
}

/* ── Content ── */
.sx-comment-content {
    flex: 1;
    min-width: 0;
}
.sx-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.sx-comment-author {
    font-weight: 700;
    font-size: 1rem;
    color: var(--sx-dark);
    text-decoration: none;
}
.sx-comment-author a {
    color: var(--sx-dark);
    text-decoration: none;
}
.sx-comment-author a:hover {
    color: var(--sx-green);
}
.sx-comment-date {
    font-size: 0.82rem;
    color: #9ca3af;
    white-space: nowrap;
}
.sx-comment-awaiting {
    background: #fef9c3;
    border: 1px solid #fde047;
    color: #78350f;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.88rem;
    margin: 0 0 10px;
}
.sx-comment-text {
    color: var(--sx-text);
    font-size: 1rem;
    line-height: 1.75;
}
.sx-comment-text p {
    margin: 0 0 10px;
}
.sx-comment-text p:last-child {
    margin-bottom: 0;
}

/* ── Reply link ── */
.sx-comment-actions {
    margin-top: 14px;
}
.sx-reply-link a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sx-green);
    text-decoration: none;
    padding: 5px 14px;
    border: 1.5px solid var(--sx-green);
    border-radius: 50px;
    transition: 0.25s;
}
.sx-reply-link a:hover {
    background: var(--sx-green);
    color: var(--sx-white);
    transform: translateX(2px);
}

/* ── Pagination ── */
.sx-comment-nav {
    margin-top: 32px;
    display: flex;
    gap: 10px;
    justify-content: center;
}
.sx-comment-nav a,
.sx-comment-nav span {
    padding: 8px 18px;
    border-radius: 50px;
    border: 1.5px solid #e5e7eb;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--sx-text);
    transition: 0.2s;
}
.sx-comment-nav a:hover {
    border-color: var(--sx-green);
    color: var(--sx-green);
}

/* ── No comments message ── */
.sx-no-comments {
    background: var(--sx-light);
    border-radius: var(--sx-radius);
    padding: 20px 28px;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

/* ────────────────────────────────────────
   COMMENT FORM
──────────────────────────────────────── */
#respond {
    margin-top: 50px;
    background: var(--sx-white);
    border-radius: var(--sx-radius);
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    border: 1px solid #f0f0f0;
}

.sx-form-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    color: var(--sx-dark);
    margin: 0 0 32px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sx-cancel-reply {
    margin-left: 16px;
}
.sx-cancel-reply a {
    font-size: 0.85rem;
    color: #9ca3af;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s;
}
.sx-cancel-reply a:hover {
    color: var(--sx-orange);
}

/* ── Two-column inputs row ── */
.sx-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ── Individual field ── */
.sx-form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 20px;
}
.sx-form-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--sx-dark);
}
.sx-required {
    color: var(--sx-orange);
    margin-left: 2px;
}
.sx-form-group input[type="text"],
.sx-form-group input[type="email"],
.sx-form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.97rem;
    color: var(--sx-dark);
    background: var(--sx-light);
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    resize: vertical;
}
.sx-form-group input[type="text"]:focus,
.sx-form-group input[type="email"]:focus,
.sx-form-group textarea:focus {
    border-color: var(--sx-green);
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12);
    background: var(--sx-white);
}
.sx-form-group input::placeholder,
.sx-form-group textarea::placeholder {
    color: #b0b8c4;
}
.sx-form-group textarea {
    min-height: 160px;
}

/* ── Cookies checkbox ── */
.sx-form-cookies {
    margin-bottom: 24px;
}
.sx-form-cookies label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.87rem;
    color: #6b7280;
    cursor: pointer;
}
.sx-form-cookies input[type="checkbox"] {
    accent-color: var(--sx-green);
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ── Submit row ── */
.sx-submit-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.sx-submit-row .sx-btn-primary {
    padding: 14px 36px;
    font-size: 1rem;
    border-radius: 50px;
    letter-spacing: 0.02em;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .sx-form-row {
        grid-template-columns: 1fr;
    }
    #respond {
        padding: 28px 20px;
    }
    .sx-comment-body {
        flex-direction: row;
        gap: 14px;
    }
    .sx-comment-avatar img {
        width: 44px;
        height: 44px;
    }
    .sx-comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .sx-comment-list .children {
        padding-left: 16px;
    }
}

/* ============================================================
   FICHA DE RECETA SANO EXPRESS (ESTRUCTURA REAL)
   ============================================================ */

#rank-math-rich-snippet-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 6px solid #2dd4bf;
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    font-family: 'Inter', sans-serif;
}

/* Título de la Ficha */
.rank-math-title {
    font-family: 'Poppins', sans-serif !important;
    color: #1a1a1a !important;
    font-size: 1.8rem !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    line-height: 1.2;
}

/* Contenedor de Imagen */
.rank-math-review-image {
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 400px;
}

.rank-math-review-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* CONTENEDOR DE DATOS (Descripción y Metadatos) */
.rank-math-review-data {
    color: #475569;
}

/* La descripción inicial */
.rank-math-review-data > p:first-of-type {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #334155;
    font-style: italic;
}

/* ORGANIZACIÓN DE LOS METADATOS (Tipo, Cocina, etc.) */
.rank-math-review-data p {
    margin-bottom: 10px;
    font-size: 1rem;
}

.rank-math-review-data p strong {
    color: #f97316;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    min-width: 100px;
}

/* Estilo para los bloques de listas */
#rank-math-rich-snippet-wrapper ul,
#rank-math-rich-snippet-wrapper ol {
    margin-top: 25px;
    padding-left: 0;
}

#rank-math-rich-snippet-wrapper h3 {
    font-family: 'Poppins', sans-serif;
    color: #1e293b;
    font-size: 1.4rem;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
}

/* Responsive */
@media (max-width: 600px) {
    #rank-math-rich-snippet-wrapper {
        padding: 20px;
        border-left: 4px solid #2dd4bf;
    }
    .rank-math-title {
        font-size: 1.4rem !important;
    }
    .rank-math-review-data p strong {
        display: block;
        margin-bottom: 2px;
    }
}
