/*
 Theme Name:   Calidad EASDA
 Author:       David Rizo
 Version:      1.0
 Text Domain:  calidad-easda
*/

body {
    font-family: "Source Sans 3", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400; /* regular */
    font-style: normal;
    font-size: 13px; /* 9.5 pt */
    color: #262626;
}

/* Header y site title */
header {
    padding: 0.6rem 2rem;
    border-bottom: 3px solid #fb0e32;
    margin-bottom: 1.5rem;
}

/* Propiedades comunes (h1 en portada, p en páginas internas) */
.site-title {
    margin: 0;
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    color: #fb0e32;
    line-height: 1.1;
}

/* Portada: tamaño grande (h1 hereda también los estilos globales de h1) */
h1.site-title { font-size: 32px; }

/* Páginas internas: compacto, claramente secundario respecto al h1 del contenido */
p.site-title {
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Remove link color & underline */
a,
a:visited,
a:hover,
a:active,
a:focus {
  color: inherit;         /* use the text color of the parent */
  text-decoration: none;  /* no underline */
}


/* "TFG" en guía actuaciones */
h1 {
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600; /* semibold */
    font-style: normal; 
    font-size: 32px; /* 24.5 pt */
    color: #fb0e32;
}

/* "Objeto" en guía de actuaciones */
h2 {
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500; /* medium */
    font-style: normal; 
    font-size: 22px; /* 16.5 pt */
    color: #fb0e32;
}

/* "4.1. Diagrama del proceso" en guía de actuaciones */
h3 {
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600; /* semibold */
    font-style: normal; 
    font-size: 16px; /* 12 pt */
    color: #fb0e32;
}

/* 1. Acciones de acogida a los alumnos de los CFGM, CFGS y los Estudios Superiores de Diseño:"*/
h4 {
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600; /* semibold */
    font-style: normal; 
    font-size: 12px; /* 9 pt */
    color: #fb0e32;
}

th {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px; /* 9 pt */
    color: #fb0e32;
}

td {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px; /* 9 pt */
    color: #000000;
}

/* ===== Single procedimiento ===== */

/* Metadatos (fecha, categoría, etiquetas) */
.proc-meta {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.15rem 1rem;
    margin: 0.75rem 0 1.25rem;
    font-size: 12px;
}
.proc-meta dt {
    font-weight: 700;
    color: #555;
    white-space: nowrap;
}
.proc-meta dd { margin: 0; }

/* PDF desplegable */
.entry-pdf { margin: 1.5rem 0; }

.pdf-toggle {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.pdf-toggle summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #f6f6f6;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    list-style: none;
    user-select: none;
}
.pdf-toggle summary::-webkit-details-marker { display: none; }
.pdf-toggle summary::before {
    content: '▶';
    font-size: 10px;
    color: #fb0e32;
    transition: transform 0.2s;
}
.pdf-toggle[open] summary::before { transform: rotate(90deg); }
.pdf-toggle summary:hover { background: #efefef; }

.pdf-toggle-icon { font-size: 15px; }
.pdf-toggle-hint { font-weight: 400; color: #888; font-size: 11px; }
.pdf-toggle[open] .pdf-toggle-hint { display: none; }

.pdf-viewer { padding: 0.75rem; }
.pdf-viewer object { border: 1px solid #e5e5e5; border-radius: 4px; display: block; }

.pdf-open-link { text-align: right; padding: 0.25rem 0.75rem 0.6rem; margin: 0; font-size: 12px; }

/* Secciones de contenido relacionado */
.related-section {
    margin-top: 1.75rem;
    border-top: 2px solid #fb0e32;
    padding-top: 0.6rem;
}
.related-section h2 {
    font-size: 1rem;
    margin: 0 0 0.6rem;
}
.related-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.related-list li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.related-list li:last-child { border-bottom: none; }
.related-list a:hover { color: #fb0e32; }

.related-normativas { border-top-color: #ccc; }
.related-normativas h2 { color: #666; font-size: 0.95rem; }

/* Permalink copy */
.permalink-copy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.permalink-copy__label {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

.permalink-copy__url {
    flex: 1;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #666;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    background: #f9f9f9;
}

.permalink-copy__btn {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #fff;
    background: #fb0e32;
    border: none;
    border-radius: 4px;
    padding: 0.3rem 0.75rem;
    cursor: pointer;
    white-space: nowrap;
}

.permalink-copy__btn:hover {
    background: #c80027;
}

/* Home */
#home {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 2rem;
}

.home-seccion h2 {
    border-bottom: 2px solid #fb0e32;
    padding-bottom: 0.25rem;
    margin-bottom: 0.75rem;
}

.home-lista {
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-lista li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.home-lista li:last-child {
    border-bottom: none;
}

.home-lista a:hover {
    color: #fb0e32;
}

/* ===== Front-page: buscador ===== */
.home-buscador {
    padding: 1.5rem 2rem 0.5rem;
}

.home-buscador form {
    display: flex;
    gap: 0.5rem;
    max-width: 540px;
}

.home-buscador input[type="search"] {
    flex: 1;
    padding: 0.4rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
}

.home-buscador button {
    padding: 0.4rem 1rem;
    background: #fb0e32;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

.home-buscador button:hover {
    background: #c50b28;
}

/* ===== Front-page: resultados de búsqueda ===== */
.home-resultados {
    padding: 1rem 2rem;
    background: #fafafa;
    border-left: 4px solid #fb0e32;
    margin: 1rem 2rem;
}

.home-resultados h2 {
    margin-top: 0;
}

.resultados-grupo {
    margin-bottom: 1.25rem;
}

.resultados-grupo h3 {
    font-size: 1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.2rem;
    margin-bottom: 0.4rem;
}

.sin-resultados {
    color: #888;
    font-style: italic;
    margin: 0.25rem 0;
}

/* ===== Front-page: enlaces a secciones ===== */
.home-enlaces {
    padding: 1rem 2rem;
}

.home-enlaces-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.home-enlaces-lista li a {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border: 1px solid #fb0e32;
    border-radius: 3px;
    color: #fb0e32;
    font-weight: 600;
    font-size: 13px;
}

.home-enlaces-lista li a:hover {
    background: #fb0e32;
    color: #fff;
}

/* ===== Front-page: criterios audit ===== */
.home-criterios {
    padding: 0.5rem 2rem 2rem;
}

.home-criterio {
    margin-bottom: 2rem;
}

.home-criterio h2 {
    font-size: 1rem;
    border-bottom: 2px solid #fb0e32;
    padding-bottom: 0.25rem;
    margin-bottom: 0.6rem;
}