/* --- ESTILOS PREMIUM PARA SECCIÓN DE GUÍAS --- */

/* Cabecera / Hero Banner */
.guides-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    overflow: hidden;
    padding: 4.5rem 2rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-md), 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.guides-banner .banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(9, 13, 22, 0.85) 100%);
    z-index: 1;
}

.guides-banner .banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.guides-banner .banner-title {
    font-size: 2.8rem;
    font-weight: 850;
    color: #ffffff;
    margin-bottom: 1rem;
    font-family: var(--font-secondary), sans-serif;
    letter-spacing: -1px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.guides-banner .banner-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Categorías Tabs */
.guides-categories-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 35px;
    flex-wrap: wrap;
    justify-content: center;
}

.guide-tab-btn {
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 22px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all var(--transition-fast) cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.guide-tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.guide-tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff !important;
    box-shadow: 0 6px 20px var(--primary-glow);
}

/* Rejilla de Tarjetas de Guías */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.guide-card-premium {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.guide-card-premium:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), 0 12px 30px rgba(0, 0, 0, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

.guide-card-media {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.guide-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal) ease;
}

.guide-card-premium:hover .guide-card-img {
    transform: scale(1.06);
}

.guide-card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 2;
}

.guide-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.guide-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.4;
    color: var(--text-main);
    margin-bottom: 12px;
    font-family: var(--font-secondary);
}

.guide-card-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.guide-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: auto;
}

.guide-author-info {
    font-size: 13px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Detalle de la Guía */
.guide-detail-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
}

.guide-detail-title {
    font-size: 2.2rem;
    font-weight: 850;
    line-height: 1.25;
    margin-top: 12px;
    margin-bottom: 15px;
    color: var(--text-main);
    font-family: var(--font-secondary);
    letter-spacing: -0.5px;
}

/* Tabla de Contenidos (TOC) */
.toc-box {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 35px;
    max-width: 100%;
}

.toc-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toc-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toc-item a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14.5px;
    transition: color 0.2s ease;
    display: inline-block;
    line-height: 1.4;
}

.toc-item a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.toc-item.toc-h2 {
    font-weight: 700;
}

.toc-item.toc-h3 {
    padding-left: 18px;
    font-size: 13.5px;
    position: relative;
}

.toc-item.toc-h3::before {
    content: "•";
    position: absolute;
    left: 6px;
    color: var(--text-muted);
}

/* Cuerpo de la Guía */
.guide-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-main);
}

.guide-body h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-top: 2.2rem;
    margin-bottom: 1.1rem;
    color: var(--text-main);
    border-left: 4px solid var(--primary);
    padding-left: 14px;
    font-family: var(--font-secondary);
    scroll-margin-top: 100px; /* Evita que el navbar sticky lo tape */
}

.guide-body h3 {
    font-size: 1.25rem;
    font-weight: 750;
    margin-top: 1.8rem;
    margin-bottom: 0.9rem;
    color: var(--text-main);
    font-family: var(--font-secondary);
    scroll-margin-top: 100px;
}

.guide-body p {
    margin-bottom: 1.4rem;
}

.guide-body ul, .guide-body ol {
    margin-bottom: 1.5rem;
    padding-left: 24px;
}

.guide-body li {
    margin-bottom: 8px;
}

.guide-body strong {
    color: var(--text-main);
    font-weight: 700;
}

/* Cajas de Consejos Destacadas */
.guide-tip-box {
    background: rgba(180, 83, 9, 0.04);
    border: 1px solid rgba(180, 83, 9, 0.15);
    border-left: 5px solid var(--accent-text);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
}

.guide-tip-title {
    font-weight: 800;
    color: var(--accent-text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* Enlazado Interno Inteligente */
.related-guides-section {
    margin-top: 45px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.related-guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.related-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.related-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.related-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 8px;
}

.related-card-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: auto;
}

/* FAQs */
.faq-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px dashed var(--border-color);
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    background: var(--bg-card);
}

.faq-question {
    padding: 16px 20px;
    font-weight: 750;
    font-size: 15px;
    cursor: pointer;
    background: var(--bg-card);
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
    user-select: none;
}

.faq-question:hover {
    background: var(--bg-body);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), padding 0.3s ease;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    border-top: 1px solid transparent;
}

.faq-item.active .faq-question {
    background: var(--bg-body);
}

.faq-item.active .faq-answer {
    padding: 16px 20px;
    max-height: 500px;
    border-top-color: var(--border-color);
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 600;
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs i {
    font-size: 10px;
    opacity: 0.7;
}

.breadcrumbs span {
    color: var(--text-main);
}
