/* Añade al comienzo de tu CSS: */
html, body {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* evita cualquier desplazamiento horizontal */
}
*, *::before, *::after {
  box-sizing: inherit;
}

/* Modifica tu .page-wrapper así: */
.page-wrapper {
  max-width: 800px;      /* ancho máximo */
  margin: 0 auto;        /* centrado horizontal */
  background-color: #fff;/* fondo blanco */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Elimina width: 100% de .page-wrapper */

/* El resto de tu CSS permanece igual */

.red-line {
  display: none;
}

.panel-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: calc(100vh - 40px);
  width: 100%;
}

.top-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.panel-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  background-color: white;
  padding: 5px;
  will-change: transform;
}

.un-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border: none;
  border-radius: 0;
}

.bottom-logo {
  margin-bottom: 20px;
}

.main-content {
  margin-right: 140px;
  padding: 40px;
  font-family: 'Arial', 'Helvetica', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(100vh - 80px);
  text-align: center;
  padding-top: 60px;
}

.main-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin-bottom: 30px;
}

.buttons-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.side-button {
  padding: 20px 25px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: white;
  font-weight: 600;
  font-family: 'Arial', 'Helvetica', sans-serif;
  text-align: center;
  transition: opacity 0.2s ease;
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
  will-change: opacity;
}

.side-button:hover {
  opacity: 0.8;
}

.side-button.active {
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: 700;
}

.main-content {
  margin-right: 140px;
  padding: 40px;
  font-family: 'Arial', 'Helvetica', sans-serif;
}

.main-content h1 {
  color: ##AD0000;
  font-size: 28px;
  margin-bottom: 20px;
}

.main-content p {
  font-size: 16px;
  line-height: 1.6;
  color: #666;
}

.news-container {
  max-width: 800px;
  margin: 0 auto;
}

.news-post {
  background-color: #f9f9f9;
  border-left: 4px solid #ad0000;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  width: 100%;
  box-sizing: border-box;
}

.news-post-content {
  margin-top: 10px;
}

.news-date {
  color: #ad0000;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 10px;
}

.news-post h3 {
  color: #666;
  margin: 0 0 10px 0;
  font-size: 20px;
}

.news-post p {
  margin: 0;
  color: #666;
}

.instagram-link {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  background-color: #f0f0f0;
  border-radius: 10px;
}

.instagram-link a {
  color: #ad0000;
  text-decoration: none;
  font-weight: bold;
}

.instagram-link a:hover {
  text-decoration: underline;
}

.admin-link {
  text-align: center;
  margin-top: 20px;
  padding: 15px;
  color: #666;
  font-size: 14px;
}

.admin-link a {
  color: #666;
  text-decoration: underline;
}

.admin-link a:hover {
  color: #ad0000;
}

.countries-list {
  max-width: 800px;
  margin: 0 auto;
}

.country-item {
  background-color: #f9f9f9;
  border-left: 4px solid #ad0000;
  padding: 15px 20px;
  margin-bottom: 15px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.country-item h3 {
  color: #ad0000;
  margin: 0 0 10px 0;
  font-size: 18px;
}

.country-item p {
  margin: 0;
  color: #666;
  line-height: 1.5;
}

.noticia-row {
  background-color: #666; /* gris suave */
  border-left: 8px solid #800000; /* bordó */
  border-radius: 10px;
  overflow: hidden;
}

.noticia-row td {
  padding: 10px;
  vertical-align: middle;
}

.noticia-row td.linea-izquierda {
  border-left: 8px solid #800000;
  padding-left: 12px;
}


.noticias-listado {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.noticia-card {
  display: flex;
  background-color: #f0f0f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}

.noticia-linea {
  width: 10px;
  background-color: #AD0000;
  border-radius: 0 10px 10px 0;
}

.noticia-contenido {
  padding: 16px;
  flex: 1;
}

.noticia-contenido h3 {
  margin: 0 0 10px 0;
}

.noticia-media {
  margin-top: 10px;
}


.noticias-listado {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.noticia-card {
  display: flex;
  background-color: #f2f2f2;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}

.noticia-linea {
  width: 10px;
  background-color: #AD0000;
  border-radius: 0 10px 10px 0;
}

.noticia-contenido {
  padding: 16px;
  flex: 1;
}

.noticia-contenido h3 {
  margin: 0 0 8px 0;
}

.noticia-contenido p {
  margin: 4px 0;
}

.instagram-btn-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.instagram-button {
  cursor: pointer;
  padding: 10px 20px;
  background-color: #AD0000;
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s ease;
}

.instagram-button:hover {
  background-color: #AD0000;
}


/* Color rojo oscuro */
:root {
  --rojo-oscuro: #AD0000; /* bordó oscuro */
  --gris-texto: #666;  /* gris medio */
}

/* Título "Últimas Noticias" */
h2 {
  color: var(--rojo-oscuro);
  text-align: center;
  margin-bottom: 1em;
}

/* Para cada tarjeta de noticia */
.noticia-card {
  border: 1px solid #666;
  margin-bottom: 1em;
  padding: 10px;
}

/* Título y fecha de noticia en rojo oscuro */
.noticia-card h3,
.noticia-card p strong {
  color: var(--rojo-oscuro);
}

/* Texto de la noticia (contenido) en gris */
.noticia-card p:not(:has(strong)) {
  color: var(--gris-texto);
}

/* Texto "Archivo no soportado" también en gris */
.noticia-card .noticia-media p {
  color: var(--gris-texto);
  font-style: italic;
  text-align: center;
}

/* --- Cuerpo de cada noticia: ahora sin espacio libre --- */
.noticia-body {
  display: flex;
  padding: 12px;
  background-color: var(--gris-fondo);
  border-top: 1px solid var(--rojo-oscuro);
  gap: 1em;                  /* espacio entre columnas */
}
.noticia-snippet {
  flex: 2;                   /* ocupa 2/3 del espacio */
  color: var(--gris-texto);
  line-height: 1.4;
  font-style: italic;
  text-align: left;
}
.noticia-media {
  flex: 1;                   /* ocupa 1/3 del espacio */
  text-align: center;
}
.noticia-media img,
.noticia-media video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.noticia-media p {
  margin: 0;
  color: var(--gris-texto);
  font-style: italic;
}

/* Define tu clase */
.intranet-link,
.intranet-link:link,
.intranet-link:visited,
.intranet-link:hover,
.intranet-link:active {
  color: #999 !important;
  text-decoration: none; /* o subrayado si prefieres */
}

    /* Fondo rojizo en filas pares, gris claro en impares */
    tbody tr:nth-child(even) { background: rgba(173, 0, 0, 0.1); }
    tbody tr:nth-child(odd)  { background: var(--gris-fondo); }
}

    /* Ocultar separadores entre Embajador, Delegado 1 y Delegado 2 */
    .tabla-paises table th:nth-child(2),
    .tabla-paises table td:nth-child(2) {
      border-right: none;
    }
    .tabla-paises table th:nth-child(3),
    .tabla-paises table td:nth-child(3) {
      border-left: none;
      border-right: none;
    }
    .tabla-paises table th:nth-child(4),
    .tabla-paises table td:nth-child(4) {
      border-left: none;
    }

/* 1) Asegura que la tabla use borde colapsado */
.tabla-paises table {
  border-collapse: collapse;
}

/* 2) Estilo base de celdas: borde rojo y padding */
.tabla-paises th,
.tabla-paises td {
  border: 1px solid var(--rojo-oscuro);
  padding: 8px 12px;
}

/* 3) Rayado: filas pares en rojizo, filas impares en gris claro */
.tabla-paises tbody tr:nth-child(odd) {
  background-color: var(--gris-fondo);
}
.tabla-paises tbody tr:nth-child(even) {
  background-color: rgba(173, 0, 0, 0.1);
}

/* 4) Ocultar los bordes internos entre Embajador (col 2), Delegado 1 (col 3) y Delegado 2 (col 4) */
/* – quita la línea derecha de la 2, ambas de la 3, y la izquierda de la 4 */
.tabla-paises th:nth-child(2),
.tabla-paises td:nth-child(2) {
  border-right: none;
}
.tabla-paises th:nth-child(3),
.tabla-paises td:nth-child(3) {
  border-left: none;
  border-right: none;
}
.tabla-paises th:nth-child(4),
.tabla-paises td:nth-child(4) {
  border-left: none;
}

.btn-volver {
  padding: 4px 4px;
  font-size: 0.85em;
}
