/* ==========================================================================
   FLDM CENTRO DE AYUDA — INSTITUTIONAL DESIGN SYSTEM THEME
   Language: Vanilla CSS
   Aligned with https://staging.fldm.edu.mx/ & FLDM Core Design Tokens
   ========================================================================== */

/* 1. DESIGN TOKENS */
:root {
    /* Colores Institucionales Primarios */
    --fldm-wine: #8B2332;
    --fldm-wine-editorial: #7B1E2B;
    --fldm-wine-dark: #5A141E;
    --fldm-wine-deep: #4A081D;
    --fldm-wine-light: #B23245;

    /* Gris Institucional y Neutrales */
    --fldm-gray: #8A8A8D;
    --fldm-gray-dark: #525254;
    --fldm-gray-light: #E0DFE1;

    /* Superficies y Fondos */
    --bg-body: #FAF9F7;
    --bg-surface: #FFFFFF;
    --bg-recessed: #F4F3F1;
    --bg-header: #FFFFFF;

    /* Tipografía y Textos */
    --text-primary: #1A1C1B;
    --text-secondary: #564242;
    --text-muted: #8A8A8D;
    --text-on-dark: #FFFFFF;

    /* Bordes y Líneas */
    --border-color: #E5E3DD;
    --border-hairline: #E5E3DD;
    --border-accent: rgba(139, 35, 50, 0.25);

    /* Geometría Institucional (Disciplina 0px) */
    --radius-card: 0px;
    --radius-btn: 0px;
    --radius-input: 0px;
    --radius-badge: 0px;

    /* Sombras Discretas */
    --shadow-subtle: 0 4px 12px rgba(26, 28, 27, 0.04);
    --shadow-hover: 0 8px 24px -4px rgba(26, 28, 27, 0.08);

    /* Anchos y Contenedores */
    --max-width-wide: 1240px;
    --max-width-narrow: 840px;
}

/* 2. RESET Y BASE */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Accesibilidad y Foco */
a:focus-visible, 
button:focus-visible, 
input:focus-visible, 
select:focus-visible, 
textarea:focus-visible {
    outline: 3px solid var(--fldm-wine) !important;
    outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Tipografía Editorial */
h1, h2, h3 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(34px, 4.5vw, 52px);
    font-weight: 700;
}

h2 {
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
}

h3 {
    font-size: clamp(19px, 2.2vw, 24px);
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Contenedores */
.container {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: 0 32px;
    width: 100%;
}

.container-narrow {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: 0 32px;
    width: 100%;
}

@media (max-width: 768px) {
    .container, .container-narrow {
        padding: 0 20px;
    }
}

/* 3. HEADER INSTITUCIONAL */
.site-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(26, 28, 27, 0.03);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    min-height: 72px;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.brand-logo-img {
    height: 48px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    display: block;
}

.brand-divider {
    height: 32px;
    width: 1px;
    background-color: var(--border-color);
    display: inline-block;
}

.brand-title-group {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--fldm-wine);
    line-height: 1.2;
}

.brand-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 600;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Botones Institucionales */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-btn);
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--fldm-wine);
    color: #FFFFFF !important;
    border-color: var(--fldm-wine);
    box-shadow: 0 2px 6px rgba(139, 35, 50, 0.15);
}

.btn-primary:hover {
    background-color: var(--fldm-wine-dark);
    border-color: var(--fldm-wine-dark);
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 35, 50, 0.25);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--fldm-wine);
    color: var(--fldm-wine) !important;
}

.btn-secondary:hover {
    background-color: var(--fldm-wine);
    color: #FFFFFF !important;
    transform: translateY(-1px);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #FFFFFF;
    color: var(--text-primary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 13.5px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-subtle);
    transition: all 0.15s ease;
}

.btn-back:hover {
    background-color: var(--fldm-wine);
    color: #FFFFFF;
    border-color: var(--fldm-wine);
    transform: translateX(-3px);
}

/* 4. HERO SECTION */
.hero {
    position: relative;
    color: #FFFFFF;
    padding: 5.5rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 380px;
    background-color: var(--fldm-wine-deep);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
    opacity: 0.65;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 35, 50, 0.88), rgba(90, 20, 30, 0.92));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(32px, 4vw, 48px);
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Search Box */
.search-container {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 1.15rem 1.25rem 1.15rem 3.4rem;
    border-radius: var(--radius-input);
    border: 1px solid var(--border-color);
    font-size: 1.05rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background-color: #FFFFFF;
    box-sizing: border-box;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-box input:focus {
    border-color: var(--fldm-wine);
    box-shadow: 0 8px 24px rgba(139, 35, 50, 0.25);
    outline: 2px solid var(--fldm-wine);
}

.search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-radius: var(--radius-card);
    box-shadow: 0 12px 32px rgba(26, 28, 27, 0.12);
    margin-top: 0.5rem;
    text-align: left;
    overflow: hidden;
    z-index: 100;
    border: 1px solid var(--border-color);
    max-height: 400px;
    overflow-y: auto;
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.15s ease;
}

.search-result-item:hover {
    background-color: var(--bg-recessed);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: 600;
    color: var(--fldm-wine);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.search-result-category {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* 5. SECCIÓN PRINCIPAL / CONTENIDO */
.main-content {
    flex: 1;
    padding: 4.5rem 0;
}

.section-header {
    margin-bottom: 2.5rem;
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(24px, 3vw, 32px);
    color: var(--text-primary);
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background-color: var(--fldm-wine);
}

/* 6. GRID DE CATEGORÍAS */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.category-card {
    background: #FFFFFF;
    padding: 2rem;
    border-radius: var(--radius-card);
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: var(--fldm-wine);
    box-shadow: var(--shadow-hover);
}

.category-icon-wrapper {
    background-color: var(--bg-recessed);
    color: var(--fldm-wine);
    padding: 14px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.category-card:hover .category-icon-wrapper {
    background-color: var(--fldm-wine);
    color: #FFFFFF;
    border-color: var(--fldm-wine);
}

.category-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    line-height: 1.35;
}

.category-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.55;
}

/* 7. ARTÍCULOS RECIENTES */
.recent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 1.5rem;
}

.article-card {
    background: #FFFFFF;
    padding: 1.75rem;
    border-radius: var(--radius-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-subtle);
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
    border-color: var(--fldm-wine);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.article-card-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--text-primary);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.article-card-title i,
.article-card-title svg {
    color: var(--fldm-wine);
    flex-shrink: 0;
    margin-top: 2px;
}

.article-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--bg-recessed);
    padding-top: 12px;
}

/* Badges Institucionales */
.badge-level {
    padding: 3px 8px;
    border-radius: var(--radius-badge);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-recessed);
    color: var(--text-primary);
}

.level-basico {
    border-color: #C8E6C9;
    background-color: #E8F5E9;
    color: #1B5E20;
}

.level-intermedio {
    border-color: #FFE082;
    background-color: #FFF8E1;
    color: #B78103;
}

.level-avanzado {
    border-color: #FFCDD2;
    background-color: #FFEBEE;
    color: #B71C1C;
}

/* 8. SUPPORT BANNER (CTA FINAL) */
.support-banner {
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--fldm-wine);
    border-radius: var(--radius-card);
    padding: 3.5rem 2rem;
    text-align: center;
    margin-top: 5rem;
    box-shadow: var(--shadow-subtle);
}

.support-banner h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--fldm-wine);
    margin-bottom: 0.75rem;
    font-size: clamp(24px, 3vw, 30px);
}

.support-banner p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.05rem;
}

/* 9. VISTA DE CATEGORÍA */
.page-hero {
    background-color: var(--fldm-wine-deep);
    color: #FFFFFF;
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.page-hero h1 {
    color: #FFFFFF;
    font-size: clamp(28px, 3.5vw, 42px);
    margin-bottom: 0.75rem;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.1rem;
    margin-bottom: 0;
    max-width: 800px;
}

.articles-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 2rem;
}

.article-list-item {
    background: #FFFFFF;
    padding: 1.75rem;
    border-radius: var(--radius-card);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    display: block;
    box-shadow: var(--shadow-subtle);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.article-list-item:hover {
    border-color: var(--fldm-wine);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.article-list-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--fldm-wine);
    line-height: 1.4;
}

.article-list-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 10. VISTA DE ARTÍCULO INDIVIDUAL */
.article-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.toc-sidebar {
    width: 280px;
    position: sticky;
    top: 90px;
    flex-shrink: 0;
    background: #FFFFFF;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-subtle);
}

.toc-sidebar h4 {
    font-family: 'Inter', sans-serif;
    margin-top: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    font-weight: 700;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid var(--border-color);
}

.toc-list li a {
    display: block;
    padding: 0.4rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.15s ease;
    position: relative;
    left: -2px;
    border-left: 2px solid transparent;
}

.toc-list li a:hover, 
.toc-list li a.active {
    color: var(--fldm-wine);
    border-left-color: var(--fldm-wine);
    font-weight: 600;
}

.article-main-container {
    flex: 1;
    background: #FFFFFF;
    padding: 3rem;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-subtle);
    border: 1px solid var(--border-color);
    min-width: 0;
}

.article-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(28px, 3.2vw, 40px);
    color: var(--text-primary);
    margin: 0 0 1.25rem 0;
    font-weight: 700;
    line-height: 1.25;
}

.article-meta-bar {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Formato del contenido HTML del artículo */
.article-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-primary);
}

.article-content h2 {
    font-family: 'Playfair Display', Georgia, serif;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--fldm-wine);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    font-size: 1.6rem;
}

.article-content h3 {
    font-family: 'Inter', sans-serif;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.article-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.article-content ul, 
.article-content ol {
    padding-left: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content a {
    color: var(--fldm-wine);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}

.article-content a:hover {
    color: var(--fldm-wine-dark);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-subtle);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.article-content th, 
.article-content td {
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    text-align: left;
}

.article-content th {
    background-color: var(--bg-recessed);
    color: var(--text-primary);
    font-weight: 600;
}

.article-content blockquote {
    border-left: 4px solid var(--fldm-wine);
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    background: var(--bg-recessed);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-subtle);
}

.video-container iframe, 
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Attachments */
.attachments-box {
    background: var(--bg-recessed);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin: 3rem 0;
}

.attachments-box h4 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.attachment-item a {
    color: var(--fldm-wine);
    text-decoration: underline;
    font-weight: 500;
}

/* Feedback Section */
.feedback-section {
    margin-top: 3.5rem;
    padding: 2.5rem;
    background: var(--bg-recessed);
    border: 1px solid var(--border-color);
    text-align: center;
}

.feedback-section h3 {
    font-family: 'Playfair Display', Georgia, serif;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.35rem;
}

.vote-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-vote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border: 1px solid var(--border-color);
    background: #FFFFFF;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.15s ease;
    min-height: 44px;
}

.btn-vote:hover {
    border-color: var(--fldm-wine);
    color: var(--fldm-wine);
    box-shadow: var(--shadow-subtle);
    transform: translateY(-2px);
}

/* 11. FORMULARIO DE TICKET */
.ticket-container {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    padding: 3rem;
    box-shadow: var(--shadow-subtle);
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-input);
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    background-color: #FFFFFF;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    border-color: var(--fldm-wine);
    box-shadow: 0 0 0 2px rgba(139, 35, 50, 0.15);
    outline: none;
}

textarea.form-control {
    resize: vertical;
    min-height: 130px;
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-col {
    flex: 1;
}

.alert {
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid transparent;
    font-size: 0.95rem;
    line-height: 1.5;
}

.alert-success {
    background-color: #E8F5E9;
    color: #1B5E20;
    border-color: #C8E6C9;
}

.alert-error {
    background-color: #FFEBEE;
    color: #B71C1C;
    border-color: #FFCDD2;
}

/* 12. FOOTER INSTITUCIONAL FLDM */
.site-footer {
    background-color: var(--fldm-wine);
    color: #FFFFFF;
    padding: 4.5rem 0 2rem 0;
    margin-top: auto;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 3rem;
}

.footer-logo-img {
    height: 52px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
    display: block;
    margin-bottom: 1.25rem;
}

.footer-brand-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 17px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 8px;
}

.footer-text {
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 0;
}

.footer-col-title {
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 1.25rem;
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a,
.footer-contact-link {
    color: #FFFFFF !important;
    text-decoration: none;
    font-size: 13.5px;
    transition: opacity 0.15s ease, text-decoration 0.15s ease;
}

.footer-links a:hover,
.footer-contact-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
    opacity: 0.95;
}

.footer-contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.9);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.8);
}

/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--fldm-wine);
    color: #FFFFFF;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-btn);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background-color: var(--fldm-wine-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(139, 35, 50, 0.35);
}

/* 13. RESPONSIVE BREAKPOINTS (1440, 1024, 768, 390, 320) */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .recent-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .article-layout {
        flex-direction: column;
    }
    .toc-sidebar {
        width: 100%;
        position: static;
    }
    .article-main-container {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
        text-align: center;
    }
    .brand-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    .brand-divider {
        display: none;
    }
    .header-nav {
        width: 100%;
        justify-content: center;
    }
    .header-nav .btn-primary {
        width: 100%;
    }
    .hero {
        padding: 3.5rem 1rem;
        min-height: 300px;
    }
    .categories-grid {
        grid-template-columns: 1fr;
    }
    .recent-grid {
        grid-template-columns: 1fr;
    }
    .articles-list-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .ticket-container {
        padding: 1.5rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .search-box input {
        font-size: 16px; /* Evita zoom automático en iOS */
        padding: 1rem 1rem 1rem 3rem;
    }
    .category-card {
        padding: 1.5rem;
    }
    .support-banner {
        padding: 2rem 1.25rem;
    }
}
