/* ============================================
   Variables CSS - Colores Corporativos UPV
   ============================================ */
:root {
    /* Grises UPV */
    --grey-UPV-light: #C5C8C8;
    --grey-UPV: #424445;
    --grey-UPV-dark: #3F4444;
    --grey-darkest: #363636;
    --grey-dark: #6B6B6B;
    --grey-medium: #C1C1C1;
    --grey-light: #F1F1F1;

    /* Rojos UPV */
    --red: #E5564F;
    --red-dark: #D73333;
    --red-darkest: #A40E0E;

    /* Amarillos UPV */
    --yellow: #FFD100;
    --yellow-dark: #B4A500;
    --yellow-darkest: #8D8400;

    /* Azules UPV */
    --blue: #38DFC2;
    --blue-dark: #25BFC2;
    --blue-darkest: #01A0A0;

    /* Verdes para feedback */
    --green: #28a745;
    --green-dark: #1e7e34;

    /* Neutros */
    --white: #FFFFFF;
    --black: #111111;
}

/* ============================================
   Reset y Base
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--grey-darkest);
    background-color: var(--grey-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Tipografia
   ============================================ */
h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: var(--grey-darkest);
}

h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--grey-darkest);
    margin-bottom: 16px;
}

h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--grey-UPV-dark);
    margin-bottom: 8px;
}

p {
    margin-bottom: 12px;
}

/* ============================================
   Layout
   ============================================ */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Top Bar
   ============================================ */
.top-bar {
    background-color: var(--grey-UPV-dark);
    padding: 8px 0;
    font-size: 13px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-links a,
.language-selector a {
    color: var(--white);
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.3s ease;
}

.top-links a:hover,
.language-selector a:hover {
    color: var(--grey-UPV-light);
}

.language-selector a.active {
    font-weight: 600;
}

/* ============================================
   Header
   ============================================ */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo img {
    height: 52px;
}

.logo-separator {
    width: 1px;
    height: 40px;
    background-color: var(--grey-medium);
}

.app-title {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--grey-UPV-dark);
}

/* ============================================
   Main Content
   ============================================ */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* ============================================
   Botones
   ============================================ */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--red-dark);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--red-darkest);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--red-dark);
    border: 2px solid var(--red-dark);
}

.btn-secondary:hover {
    background-color: var(--red-dark);
    color: var(--white);
}

.btn:disabled {
    background-color: var(--grey-medium);
    color: var(--grey-dark);
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: var(--grey-UPV-dark);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    margin-top: auto;
}

.footer-logo {
    height: 40px;
    margin-bottom: 12px;
}

.footer p {
    font-size: 14px;
    margin: 0;
    color: var(--grey-UPV-light);
}

/* ============================================
   Spinner
   ============================================ */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--grey-light);
    border-top-color: var(--red-dark);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Formularios
   ============================================ */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    font-size: 14px;
    color: var(--grey-UPV-dark);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--grey-medium);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--red-dark);
    box-shadow: 0 0 0 3px rgba(215, 51, 51, 0.1);
}

.form-input-sm {
    padding: 8px 12px;
    font-size: 13px;
}

/* Combo select con busqueda */
.combo-select {
    position: relative;
}

.combo-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--grey-medium);
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
}

.combo-option {
    padding: 8px 16px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
}

.combo-option:hover {
    background-color: var(--grey-light);
}

.combo-option-default {
    color: var(--grey-dark);
}

.combo-no-results {
    color: var(--grey-dark);
    font-style: italic;
    cursor: default;
}

/* ============================================
   SECCION DE FILTROS
   ============================================ */
.filter-section {
    background-color: var(--white);
    padding: 24px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: end;
}

.filters-row-2col {
    grid-template-columns: 1fr 1fr auto;
}

.filter-actions {
    display: flex;
    gap: 12px;
    align-items: end;
    padding-bottom: 1px;
}

/* ============================================
   SECCION DEL GRAFO
   ============================================ */
.graph-section {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.graph-wrapper {
    position: relative;
    flex: 1;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    min-height: 600px;
}

#graphContainer {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Panel de informacion */
.graph-info-panel {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    background: var(--white);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    max-width: 350px;
    max-height: calc(100% - 80px);
    overflow-y: auto;
}

.graph-info-panel h3 {
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--red-dark);
}

.graph-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--grey-dark);
    margin-top: 8px;
}

.graph-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.node-icon {
    color: var(--red-dark);
    font-size: 10px;
}

.edge-icon {
    color: var(--grey-medium);
    font-size: 10px;
}

/* Detalle de nodo seleccionado */
.node-details {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--grey-light);
}

.node-details h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--grey-darkest);
    margin-bottom: 4px;
}

.node-details h5 {
    font-size: 13px;
    font-weight: 600;
    color: var(--grey-UPV-dark);
    margin-bottom: 6px;
    margin-top: 12px;
}

.node-detail-id {
    font-size: 12px;
    color: var(--grey-dark);
    margin-bottom: 4px;
}

.node-detail-count {
    font-size: 13px;
    color: var(--red-dark);
    font-weight: 600;
    margin-bottom: 0;
}

.node-detail-neighbors ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.node-detail-neighbors li {
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
    font-size: 13px;
    color: var(--grey-darkest);
}

.node-detail-neighbors li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    width: 6px;
    height: 6px;
    background-color: var(--blue-dark);
    border-radius: 50%;
}

.node-detail-neighbors .node-detail-id {
    font-size: 11px;
}

.no-relations {
    font-size: 13px;
    color: var(--grey-dark);
    font-style: italic;
    margin: 0;
}

/* Controles del grafo */
.graph-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--grey-medium);
    border-radius: 6px;
    cursor: pointer;
    color: var(--grey-UPV-dark);
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.btn-icon:hover {
    background: var(--red-dark);
    color: var(--white);
    border-color: var(--red-dark);
}

.layout-selector {
    background: var(--white);
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border: 1px solid var(--grey-medium);
}

.layout-selector label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--grey-dark);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.layout-selector select {
    width: 100%;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--grey-darkest);
    cursor: pointer;
    background: transparent;
}

.layout-selector select:focus {
    outline: none;
}

/* Leyenda */
.graph-legend {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 10;
    display: flex;
    gap: 16px;
    background: var(--white);
    padding: 10px 16px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 12px;
    color: var(--grey-dark);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-dot-selected {
    background-color: var(--yellow);
    border: 2px solid var(--yellow-darkest);
}

.legend-dot-prereq {
    background-color: #00C000;
    border: 2px solid #008000;
}

.legend-dot-dep {
    background-color: #E04040;
    border: 2px solid #A00000;
}

.legend-line {
    width: 20px;
    height: 2px;
    background-color: var(--grey-medium);
    flex-shrink: 0;
}

/* Placeholder inicial del grafo */
.graph-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--grey-dark);
}

.graph-placeholder i {
    font-size: 64px;
    color: var(--grey-medium);
    margin-bottom: 16px;
    display: block;
}

.graph-placeholder p {
    font-size: 16px;
    max-width: 400px;
}

/* Loading overlay del grafo */
.graph-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    gap: 16px;
}

.graph-loading p {
    font-size: 15px;
    color: var(--grey-dark);
    margin: 0;
}

/* ============================================
   Boton emergente: expandir asignaturas de Materia
   ============================================ */
@keyframes materiaHeartbeat {
    0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(215, 51, 51, 0.6); }
    30%  { transform: scale(1.18); box-shadow: 0 0 0 6px rgba(215, 51, 51, 0); }
    60%  { transform: scale(1); box-shadow: 0 0 0 0 rgba(215, 51, 51, 0); }
    80%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.materia-expand-btn {
    position: absolute;
    height: 28px;
    border-radius: 14px;
    background-color: var(--red-dark);
    color: var(--white);
    border: 2px solid var(--red-darkest);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: materiaHeartbeat 1.4s ease-in-out infinite;
    transition: background-color 0.2s ease;
    padding: 0 10px;
    line-height: 1;
    pointer-events: all;
    white-space: nowrap;
}

.materia-expand-btn:hover {
    background-color: var(--red-darkest);
    animation-play-state: paused;
    transform: scale(1.15);
}

/* ============================================
   Responsive - Tablet
   ============================================ */
@media (max-width: 1030px) {
    h1 {
        font-size: 32px;
    }
}

/* ============================================
   Modal de instrucciones del grafo
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--grey-light);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-body {
    padding: 20px 24px;
}

.modal-body h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    margin: 16px 0 8px 0;
    color: var(--grey-darkest);
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body p {
    font-size: 13px;
    color: var(--grey-dark);
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.tabla-instrucciones {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 16px;
}

.tabla-instrucciones th {
    text-align: left;
    padding: 8px 12px;
    background: var(--grey-light);
    font-weight: 600;
    color: var(--grey-darkest);
    border-bottom: 2px solid var(--grey-medium);
}

.tabla-instrucciones td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--grey-light);
    vertical-align: middle;
}

.tabla-instrucciones tr:last-child td {
    border-bottom: none;
}

.legend-dot-lg {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 6px;
}

/* ============================================
   Responsive - Mobile
   ============================================ */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .logo {
        flex-direction: column;
        text-align: center;
    }

    .logo-separator {
        display: none;
    }

    .filters-row,
    .filters-row-2col {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        justify-content: center;
    }

    .graph-section {
        padding: 10px;
    }

    .graph-wrapper {
        min-height: 450px;
    }

    .graph-info-panel {
        position: relative;
        top: auto;
        left: auto;
        max-width: 100%;
        border-radius: 8px 8px 0 0;
        box-shadow: none;
        border-bottom: 1px solid var(--grey-light);
    }

    .graph-controls {
        top: auto;
        bottom: 60px;
        right: 10px;
    }

    .graph-legend {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        display: none;
    }

    .container {
        padding: 0 15px;
    }

    h1 {
        font-size: 24px;
    }

    .filter-actions {
        flex-direction: column;
    }

    .filter-actions .btn {
        width: 100%;
    }

    .graph-legend {
        display: none;
    }
}

/* ============================================
   Pagina de Detalle de Guia Docente
   ============================================ */

/* Cabecera de la asignatura */
.guia-header-section {
    background: var(--white);
    border-bottom: 1px solid var(--grey-light);
    padding: 24px 0 20px;
}

.guia-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--red-dark);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    transition: color 0.2s ease;
}
.guia-back-link:hover {
    color: var(--red-darkest);
    text-decoration: underline;
}

.guia-titulo {
    font-family: 'Poppins', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--grey-darkest);
    margin-bottom: 12px;
    line-height: 1.3;
}

.guia-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
}

.badge-code {
    background: var(--grey-darkest);
    color: var(--white);
}

.badge-info {
    background: var(--grey-light);
    color: var(--grey-UPV);
    border: 1px solid var(--grey-medium);
}

.badge-ects {
    background: var(--blue-dark);
    color: var(--white);
}

.badge-validated {
    background: #28a745;
    color: var(--white);
}

/* Layout de dos columnas */
.guia-body-section {
    padding: 32px 0 48px;
    background: var(--grey-light);
    min-height: 60vh;
}

.guia-layout {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 24px;
    align-items: start;
}

/* Columna principal */
.guia-main-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Tarjetas */
.guia-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 24px;
}

.guia-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--grey-darkest);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--red-dark);
    padding-bottom: 10px;
}

.guia-card-title i {
    color: var(--red-dark);
    font-size: 15px;
}

.guia-card-count {
    margin-left: auto;
    background: var(--grey-light);
    color: var(--grey-dark);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
}

/* Lista de info institucional */
.guia-info-list {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
}

.guia-info-list dt {
    font-weight: 600;
    color: var(--grey-UPV);
}

.guia-info-list dd {
    color: var(--grey-darkest);
}

.guia-tit-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.guia-tit-link {
    color: var(--red-dark);
    text-decoration: none;
    font-weight: 500;
}
.guia-tit-link:hover {
    text-decoration: underline;
    color: var(--red-darkest);
}

/* Secciones de contenido */
.guia-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--grey-light);
}
.guia-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.guia-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--grey-UPV);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.guia-text {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--grey-darkest);
    line-height: 1.7;
}

/* Temario */
.temario-list,
.temario-sublist {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--grey-darkest);
    line-height: 1.8;
    padding-left: 20px;
}

.temario-sublist {
    font-size: 14px;
    margin-top: 4px;
}

/* Competencias */
.guia-competencias-list {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--grey-darkest);
    line-height: 1.7;
    padding-left: 20px;
}

.guia-competencias-list li {
    margin-bottom: 6px;
}

/* Mensaje vacio */
.guia-empty {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--grey-dark);
    font-style: italic;
    padding: 16px 0;
}

/* Error */
.guia-error {
    text-align: center;
    padding: 60px 20px;
    color: var(--grey-dark);
    font-family: 'Inter', sans-serif;
}
.guia-error i {
    font-size: 48px;
    color: var(--red-dark);
    margin-bottom: 16px;
    display: block;
}
.guia-error p {
    font-size: 18px;
    margin-bottom: 24px;
}

/* Sidebar */
.guia-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guia-sidebar-card {
    padding: 20px;
}

.guia-related-scroll {
    max-height: 280px;
    overflow-y: auto;
    margin-top: 4px;
}

.guia-related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guia-related-list li {
    border-bottom: 1px solid var(--grey-light);
}
.guia-related-list li:last-child {
    border-bottom: none;
}

.guia-related-link {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 4px;
    text-decoration: none;
    color: var(--grey-darkest);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    transition: background 0.15s ease, color 0.15s ease;
    border-radius: 4px;
}
.guia-related-link:hover {
    background: var(--grey-light);
    color: var(--red-dark);
    padding-left: 8px;
}

.guia-related-id {
    font-size: 11px;
    color: var(--grey-dark);
    white-space: nowrap;
    flex-shrink: 0;
}

.guia-materia-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--grey-UPV-dark);
    background: var(--grey-light);
    padding: 6px 12px;
    margin-top: 8px;
    border-left: 3px solid var(--red-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Links en el panel del grafo */
.subject-link {
    color: var(--grey-darkest);
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 3px 0;
    transition: color 0.15s ease;
}
.subject-link:hover {
    color: var(--red-dark);
    text-decoration: underline;
}

.subject-link-title {
    color: var(--grey-darkest);
    text-decoration: none;
}
.subject-link-title:hover {
    color: var(--red-dark);
    text-decoration: underline;
}

/* Responsive para pagina de detalle */
@media (max-width: 900px) {
    .guia-layout {
        grid-template-columns: 1fr;
    }

    .guia-sidebar {
        order: -1;
    }

    .guia-titulo {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .guia-header-section {
        padding: 16px 0 12px;
    }

    .guia-info-list {
        grid-template-columns: 1fr;
    }

    .guia-info-list dt {
        margin-top: 8px;
    }

    .guia-related-scroll {
        max-height: 200px;
    }
}
