/* Estilos compartidos extraídos de los HTML */

/* Fuentes Roboto locales */
@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto/roboto-v30-latin-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto/roboto-v30-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto/roboto-v30-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto/roboto-v30-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --azul1: #00335e;
  --azul2: #366eaf;
  --guinda: #701b40;
  --naranja: #ea5932;
  --gris: #b1b3b3;
  --fondo: #f2f4f4;
  --texto: #333333;
  --muted: #666666;
}

body {
  font-family: "Roboto", Arial, sans-serif;
  color: var(--texto);
  line-height: 1.6;
  background-color: var(--fondo);
  position: relative;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-color: transparent;
  background-image: url("../img/fondo-rgb.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0.015;
  z-index: -1;
  pointer-events: none;
}

.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 0 0 auto;
}

/* HEADER */
header {
  background: #ffffff;
  border-bottom: 3px solid var(--azul1);
}

.header-top {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-reniec {
  height: 48px;
}

.app-title {
  display: flex;
  flex-direction: column;
}

.app-title span:first-child {
  font-size: 18px;
  font-weight: 700;
  color: var(--azul1);
}

.app-title span:last-child {
  font-size: 13px;
  color: var(--gris);
}

.search-input {
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid var(--gris);
  font-size: 14px;
}

/* Larger, oval search near Transparencia on desktop */
@media (min-width: 901px) {
  .search-input {
    width: 340px;
    padding: 8px 14px 8px 40px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background-color: #fff;
    background-image: url("../img/search-icon.svg");
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 20px 20px;
    margin-left: auto; /* push to the right, next to Transparencia */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }

  .ghost-btn {
    margin-left: 8px;
    padding: 8px 12px;
    border-radius: 8px;
  }
}

@media (max-width: 900px) {
  .search-input {
    width: auto;
    border-radius: 8px;
    padding-left: 36px;
    background-position: 10px center;
  }
}

/* NAV PRINCIPAL */
.main-nav {
  background: var(--azul1);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  padding: 8px 24px;
}

.main-nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  padding: 4px 0;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--naranja);
  transition: width 0.2s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.main-nav a.active {
  font-weight: 500;
}
.main-nav a.active::after {
  width: 100%;
}

/* MAIN */
main {
  padding: 20px 12px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

main::after {
  content: "";
  display: block;
  width: 100%;
  height: clamp(120px, 35vh, 480px);
}

@media (min-width: 1024px) {
  main {
    padding: 24px 40px;
  }
}

.container {
  width: 100%;
  max-width: 1300px;
  display: grid;
  gap: 16px;
}

@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
  }
}

/* Layout con secciones - columna única siempre con tabs en la parte superior */
.accredit-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

/* Sidebar config - oculto en todos los tamaños */
.side-menu {
  display: none !important;
}

.accredit-content {
  width: 100%;
}

.hero-card,
.side-card,
.pdf-item,
.service-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.hero-subtitle {
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--azul2);
  margin-bottom: 4px;
}

.page-title {
  font-size: 22px;
  margin: 0 0 8px 0;
  color: var(--azul1);
}

/* Responsive video container */
.video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  background: #000;
}
.video-wrap iframe,
.video-wrap video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.hero-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--azul1);
  margin-bottom: 8px;
}

.hero-text {
  font-size: 15px;
  margin-bottom: 24px;
}

.primary-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 4px;
  background: var(--naranja);
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.primary-btn:hover {
  background: #d04f2d;
}

/* Generic card hover */
.service-card {
  padding: 16px 18px;
  font-size: 14px;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
  cursor: pointer;
}
.service-card:hover {
  border-color: var(--naranja);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.side-card {
  padding: 24px 20px;
  font-size: 14px;
}

.side-card h2 {
  font-size: 16px;
  font-weight: 500;
  color: var(--azul1);
  margin-bottom: 12px;
}

.status-ok {
  color: #4d902b;
  font-weight: 500;
  margin-bottom: 8px;
}

.browser-list {
  margin-top: 16px;
  list-style: none;
  font-size: 13px;
  color: #555;
}

.browser-list li::before {
  content: "• ";
  color: var(--gris);
}

/* SEARCH RESULTS (estilos generales) */
.search-results {
  position: absolute;
  top: 50px;
  right: 16px;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 300px;
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive header: menú hamburguesa */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--azul1);
}

@media (max-width: 900px) {
  .header-top {
    gap: 8px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    padding: 10px 12px;
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
  }

  .app-title span:first-child {
    font-size: 16px;
  }
  .app-title span:last-child {
    font-size: 12px;
  }

  .menu-toggle {
    display: inline-block;
    align-self: center;
    margin-bottom: 0;
  }

  .search-input {
    display: none;
  }
  .ghost-btn {
    display: none;
  }

  .main-nav {
    display: none;
    width: 100%;
  }
  .main-nav.open {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    margin: 0;
  }
  .main-nav li {
    border-top: 1px solid rgba(255, 255, 255, 0.03);
  }
  .main-nav a {
    display: block;
    padding: 10px 16px;
  }

  .search-results {
    display: none;
  }
}

/* Styles to make repo tables/cards look like PIER on small screens */
@media (max-width: 600px) {
  /* show mobile selector, hide side menu */
  #repo-mobile-select-wrap {
    display: block !important;
  }
  #acc-mobile-select-wrap {
    display: none !important;
  }
  .side-menu {
    display: none !important;
  }

  /* make content sections full width and spaced like PIER */
  .accredit-content {
    padding: 8px 0;
  }
  .accredit-section {
    background: transparent;
    padding: 8px 0;
  }

  /* tables -> card list */
  .repo-table,
  .repo-table thead {
    display: block;
  }
  .repo-table tbody {
    display: block;
  }
  .repo-table tr {
    display: block;
    margin: 8px 0;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  }
  .repo-table tr {
    display: block;
    margin: 6px 0;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  }
  .repo-table td,
  .repo-table th {
    display: block;
    padding: 4px 0;
    border: none;
  }
  .repo-table td:nth-child(1) {
    font-weight: 600;
    color: var(--azul1);
  }
  .repo-table td:nth-child(2) {
    color: #444;
    font-size: 13px;
  }
  .repo-table td:nth-child(3) {
    color: #666;
    font-size: 12px;
  }
  .repo-table td:nth-child(4) {
    margin-top: 8px;
  }

  /* pdf-list / pdf-item spacing */
  .pdf-list {
    display: block;
  }
  .pdf-item {
    display: block;
    padding: 10px;
    margin: 8px 0;
    background: #fff;
    border-radius: 8px;
  }

  /* ensure menu toggle visible and aligned */
  .menu-toggle {
    display: inline-block;
  }
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: #333;
}

.search-result-item:hover {
  background: #f8f8f8;
}

.search-result-title {
  font-weight: 600;
  color: var(--azul2);
  font-size: 14px;
}

.search-result-desc {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.search-no-results {
  padding: 16px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

/* ===== ESTILOS DE ACREDITACIONES Y PÁGINAS ===== */

/* Títulos y descripción mejorados */
.page-title {
  background: linear-gradient(135deg, var(--azul1) 0%, var(--azul2) 100%);
  color: #fff;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(0, 51, 94, 0.15);
  border-bottom: none;
}

.page-desc {
  text-align: justify;
  background: #f8fafc;
  padding: 16px;
  border-left: 4px solid var(--azul2);
  border-radius: 8px;
  margin-bottom: 32px;
  color: #555;
  line-height: 1.7;
}

.muted {
  color: #666;
  font-size: 13px;
}

p {
  text-align: justify;
  color: #666;
}

/* Botones modernizados */
.btn {
  display: inline-block;
  background: var(--azul2);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(54, 110, 175, 0.2);
}

.btn:hover {
  background: var(--azul1);
  box-shadow: 0 6px 20px rgba(0, 51, 94, 0.3);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

/* Modal mejorado */
.modal-content {
  width: 95%;
  max-width: 1000px;
  height: 85vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-body {
  height: calc(100% - 48px);
}

.modal-body iframe {
  width: 100%;
  height: 100%;
}

/* Select móvil - oculto siempre */
#acc-mobile-select-wrap,
#repo-mobile-select-wrap {
  display: none;
  margin-bottom: 12px;
}

#acc-mobile-select,
#repo-mobile-select {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fff;
}

/* Contenedor principal con tabs - mostrado siempre */
.tabs-container {
  display: block;
}

@media (max-width: 1023px) {
  .tabs-container {
    display: block;
  }
}

.tabs-container.mobile-active {
  display: block;
}

.tabs-list {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
  -webkit-overflow-scrolling: touch;
}

.tab-button {
  padding: 12px 16px;
  background: transparent;
  border: 2px solid #ddd;
  border-radius: 8px;
  color: var(--azul1);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-button:hover {
  border-color: var(--azul2);
  color: var(--azul2);
}

.tab-button.active {
  background: linear-gradient(135deg, var(--azul2) 0%, var(--azul1) 100%);
  color: #fff;
  border-color: var(--azul1);
  box-shadow: 0 4px 12px rgba(54, 110, 175, 0.25);
}

/* Sidebar - oculto siempre */
.side-menu {
  display: none !important;
}

.side-menu h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--azul1);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.side-menu .menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--azul1);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.side-menu .menu-item:hover {
  background: #f0f6ff;
  padding-left: 18px;
}

.side-menu .menu-item.active {
  background: linear-gradient(135deg, var(--azul2) 0%, var(--azul1) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(54, 110, 175, 0.25);
}

/* Secciones de acreditación */
.accredit-section {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease-in;
}

.accredit-section.is-hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.accredit-section h2 {
  margin-bottom: 20px;
  color: var(--azul1);
  font-size: 22px;
  font-weight: 700;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
}

.accredit-section h3 {
  color: var(--azul1);
  font-size: 16px;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 10px;
  border-left: 4px solid var(--naranja);
  padding-left: 12px;
}

.accredit-section h4 {
  color: var(--azul2);
  font-size: 14px;
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 8px;
}

.small-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* Botones año/etiqueta mejorados */
.ghost-btn {
  background: transparent;
  border: 2px solid var(--azul2);
  color: var(--azul2);
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.ghost-btn:hover {
  background: var(--azul2);
  color: #fff;
  box-shadow: 0 4px 12px rgba(54, 110, 175, 0.25);
  transform: translateY(-2px);
}

.ghost-btn:active {
  transform: translateY(0);
}

/* Lista de PDFs mejorada */
.pdf-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.pdf-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #e8f0f8;
  background: linear-gradient(135deg, #fafbfc 0%, #f5f8fb 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.pdf-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--azul2) 0%, var(--azul1) 100%);
}

.pdf-item:hover {
  border-color: var(--azul2);
  box-shadow: 0 8px 24px rgba(54, 110, 175, 0.12);
  transform: translateY(-4px);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.pdf-item h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--azul1);
  margin: 0 0 8px 0;
}

.pdf-item .pdf-meta {
  color: #888;
  font-size: 13px;
  margin: 0;
  text-align: justify;
  line-height: 1.5;
}

.pdf-item .pdf-left {
  flex: 1;
}

.pdf-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.pdf-btn,
.pdf-dual-btn {
  background: linear-gradient(135deg, var(--azul2) 0%, var(--azul1) 100%);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(54, 110, 175, 0.15);
}

.pdf-btn:hover,
.pdf-dual-btn:hover {
  background: linear-gradient(135deg, var(--azul1) 0%, #001f3f 100%);
  box-shadow: 0 6px 16px rgba(0, 51, 94, 0.25);
  transform: translateY(-2px);
}

.pdf-btn:active,
.pdf-dual-btn:active {
  transform: translateY(0);
}

.pdf-item .small-grid {
  margin-top: 14px;
  grid-column: 1 / -1;
}

/* Nota mejorada */
.note {
  background: linear-gradient(135deg, #fffbf0 0%, #fff9f3 100%);
  border-left: 4px solid var(--naranja);
  padding: 16px;
  border-radius: 8px;
  margin-top: 20px;
}

.note p {
  margin: 0;
  color: #664e3b;
  font-size: 13px;
}

.note a {
  color: var(--naranja);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed var(--naranja);
  transition: all 0.2s ease;
}

.note a:hover {
  color: var(--guinda);
  border-bottom-color: var(--guinda);
}

/* Tablas mejoradas (para repositorio) */
.repo-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.repo-table thead {
  background: linear-gradient(135deg, var(--azul1) 0%, var(--azul2) 100%);
  color: #fff;
}

.repo-table thead th {
  padding: 16px;
  text-align: left;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.repo-table tbody tr {
  border-bottom: 1px solid #e8f0f8;
  transition: background 0.2s ease;
}

.repo-table tbody tr:hover {
  background: #f8fafc;
}

.repo-table tbody tr:last-child {
  border-bottom: none;
}

.repo-table td {
  padding: 14px 16px;
  color: #555;
  font-size: 13px;
}

.repo-table a {
  color: var(--azul2);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.repo-table a:hover {
  color: var(--azul1);
}

/* ===== RESPONSIVE DESIGN - TODAS LAS SECCIONES EN FORMATO MÓVIL ===== */

/* Extra Large Desktop (1600px+) */
@media (min-width: 1600px) {
  .accredit-section {
    padding: 32px;
  }

  .page-title {
    padding: 28px;
    font-size: 26px;
  }

  .page-desc {
    padding: 18px;
    font-size: 15px;
  }
}

/* Large Desktop (1200px - 1599px) */
@media (min-width: 1200px) and (max-width: 1599px) {
  .accredit-section {
    padding: 28px;
  }

  .page-title {
    padding: 24px;
    font-size: 24px;
  }

  .page-desc {
    padding: 16px;
    font-size: 14px;
  }
}

/* Tablets Grandes y Desktop Pequeño (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
  .accredit-section {
    padding: 20px;
  }

  .pdf-item {
    padding: 16px;
  }

  .small-grid {
    gap: 8px;
  }

  .page-title {
    padding: 20px;
    font-size: 22px;
  }

  .page-desc {
    padding: 14px;
    font-size: 13px;
  }
}

/* Tablets Medianas (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .tabs-list {
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 2px solid #e8f0f8;
  }

  .tab-button {
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 6px;
    flex-shrink: 0;
  }

  .accredit-section {
    padding: 20px;
    margin-bottom: 16px;
  }

  .accredit-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .pdf-item {
    padding: 16px;
  }

  .page-title {
    padding: 20px;
    margin-bottom: 20px;
    font-size: 22px;
  }

  .page-desc {
    padding: 14px;
    margin-bottom: 20px;
    font-size: 14px;
  }
}

/* Tablets Pequeñas (600px - 767px) */
@media (min-width: 600px) and (max-width: 767px) {
  .tabs-list {
    gap: 6px;
    margin-bottom: 14px;
    padding: 10px 0;
    border-bottom: 2px solid #e8f0f8;
  }

  .tab-button {
    padding: 9px 12px;
    font-size: 11px;
    border-radius: 6px;
    flex-shrink: 0;
  }

  .accredit-section {
    padding: 16px;
    margin-bottom: 12px;
  }

  .accredit-section h2 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .pdf-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .pdf-actions {
    width: 100%;
  }

  .pdf-btn,
  .pdf-dual-btn {
    flex: 1;
  }

  .small-grid {
    gap: 6px;
  }

  .ghost-btn {
    padding: 7px 10px;
    font-size: 11px;
  }

  .page-title {
    padding: 16px;
    margin-bottom: 16px;
    font-size: 20px;
  }

  .page-desc {
    padding: 12px;
    margin-bottom: 16px;
    font-size: 13px;
  }

  .repo-table {
    font-size: 12px;
  }

  .repo-table thead th,
  .repo-table td {
    padding: 10px 8px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* Móviles (menos de 600px) */
@media (max-width: 599px) {
  .tabs-list {
    gap: 4px;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 2px solid #e8f0f8;
  }

  .tab-button {
    padding: 8px 10px;
    font-size: 10px;
    border-radius: 4px;
    flex-shrink: 0;
  }

  .accredit-section {
    padding: 12px;
    margin-bottom: 10px;
  }

  .accredit-section h2 {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .pdf-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .pdf-item h3 {
    font-size: 14px;
  }

  .pdf-meta {
    font-size: 12px;
  }

  .pdf-actions {
    width: 100%;
  }

  .pdf-btn,
  .pdf-dual-btn {
    flex: 1;
    padding: 9px 12px;
    font-size: 12px;
  }

  .small-grid {
    gap: 4px;
    margin-top: 8px;
  }

  .ghost-btn {
    padding: 6px 8px;
    font-size: 10px;
  }

  .page-title {
    padding: 12px;
    margin-bottom: 12px;
    font-size: 18px;
  }

  .page-desc {
    padding: 10px;
    margin-bottom: 12px;
    font-size: 12px;
  }

  .note {
    padding: 12px;
    font-size: 12px;
  }

  .note a {
    font-size: 11px;
  }

  .repo-table {
    font-size: 11px;
  }

  .repo-table thead th,
  .repo-table td {
    padding: 8px 6px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 11px;
  }
}

/* FOOTER */
footer {
  background: var(--azul1);
  color: #ffffff;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: 220px minmax(280px, 1fr) minmax(260px, 1fr);
  gap: 20px 28px;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-logo {
  width: 170px;
  max-width: 100%;
  height: auto;
}

.footer-col {
  display: grid;
  gap: 8px;
}

.footer-line {
  margin: 0;
  color: #ffffff;
  font-size: 12px;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-icon {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  color: #ffffff;
  opacity: 1;
}

.footer-col-org .footer-line {
  font-weight: 400;
}

@media (max-width: 1100px) {
  footer {
    grid-template-columns: 180px 1fr;
  }

  .footer-col-org {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  footer {
    grid-template-columns: 1fr;
    text-align: left;
    padding: 16px;
  }

  .footer-logo {
    width: 150px;
  }

  .footer-line {
    font-size: 14px;
  }

  .footer-col-org {
    grid-column: auto;
  }
}

.modal-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Acordeones, tablas, botones y utilidades comunes */
.accordion-header {
  background: var(--azul2);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  transition: all 0.3s ease;
  user-select: none;
}

.accordion-header:hover {
  background: var(--azul1);
  box-shadow: 0 2px 8px rgba(0, 51, 94, 0.2);
  transform: translateX(4px);
}

.accordion-header::after {
  content: "▼";
  font-size: 12px;
  transition: transform 0.3s ease;
}

.accordion-header.collapsed::after {
  transform: rotate(-90deg);
}

.accordion-content {
  max-height: 2000px;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease;
  padding: 12px 0;
}

.accordion-content.collapsed {
  max-height: 0;
  padding: 0;
}

/* Espacio entre grupos de acordeón */
.accordion-group {
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .accordion-group {
    margin-bottom: 10px;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 10px 0;
}

th,
td {
  padding: 8px;
  border-bottom: 1px solid #eef3f7;
  text-align: left;
}

th {
  background: #f4f9ff;
  color: var(--azul1);
  font-weight: 600;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-content {
  background: #ffffff;
  width: 95%;
  max-width: 1000px;
  max-height: 90vh;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 10px 16px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.modal-header span {
  font-weight: 500;
  color: var(--azul1);
}

.close-btn,
.close-btn-dual {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.modal-body {
  flex: 1;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-body iframe.is-hidden {
  display: none;
}

/* Contenedor para documentos Word convertidos */
.docx-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  background: white;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  box-sizing: border-box;
}

.docx-content.is-hidden {
  display: none;
}

.docx-content h1,
.docx-content h2,
.docx-content h3 {
  margin-top: 20px;
  margin-bottom: 12px;
  color: #333;
}

.docx-content p {
  margin-bottom: 12px;
}

.docx-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.docx-content table td,
.docx-content table th {
  border: 1px solid #ddd;
  padding: 8px;
}

.docx-content img {
  max-width: 100%;
  height: auto;
}

/* utilidades */
.cta-box {
  background: #f0f7ff;
  border-left: 4px solid var(--azul2);
  padding: 12px;
  border-radius: 4px;
  margin: 10px 0;
}

.doc-link {
  display: inline-block;
  color: var(--azul2);
  text-decoration: none;
  font-weight: 500;
}

.doc-link:hover {
  text-decoration: underline;
}

.pdf-btn.external-link {
  text-decoration: none;
}

/* Search highlight */
.search-highlight {
  box-shadow: 0 0 0 4px rgba(255, 223, 93, 0.25) inset;
  transition: box-shadow 0.3s ease;
}

/* Hidden element for CSP compliance */
.hidden {
  display: none !important;
}

/* Download link styling */
.download-link {
  font-size: 18px;
  text-decoration: none;
  cursor: pointer;
}

/* Document status styling */
.doc-status-vigente {
  color: var(--azul1);
  font-weight: bold;
}

.doc-status-no-vigente {
  color: #555;
  font-weight: bold;
}

/* fin de common.css */
