/* === FUENTES === */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

/* === VARIABLES DE COLOR === */
:root {
  --adr-primary-color: #f7c45f; /* Amarillo principal */
  --adr-primary-dark: #e0b055;  /* Amarillo oscuro para hover */
  --adr-text-light: #ffffff;
  --adr-text-dark: #444;
  --adr-background-light: #fefaf3;
  --adr-background-card: #ffffff;
  --adr-border-radius-main: 20px;
  --adr-border-radius-small: 10px;
  --adr-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  --adr-shadow-hover: 0 6px 14px rgba(0, 0, 0, 0.15);
}


/* === CONTENEDOR PRINCIPAL === */
#adr-wrapper {
  font-family: 'Poppins', sans-serif;
  text-align: center;
  padding: 40px 20px;
  background-color: var(--adr-background-light);
}

.adr-hero-title {
    color: var(--adr-text-dark);
    font-weight: 600;
    margin-bottom: 35px;
}

/* === GRID DE TARJETAS === */
.adr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 35px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

/* === TARJETA PRINCIPAL === */
.adr-card {
  position: relative;
  background: var(--adr-background-card);
  border-radius: var(--adr-border-radius-main);
  width: 260px;
  height: 200px;
  box-shadow: var(--adr-shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.25s ease;
  overflow: visible;
}

.adr-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--adr-shadow-hover);
}

/* === ETIQUETA AMARILLA (TÍTULO) === */
.adr-title-pill {
  background-color: var(--adr-primary-color);
  color: var(--adr-text-light);
  font-weight: 500;
  font-size: 1rem;
  border-radius: var(--adr-border-radius-small);
  padding: 12px 18px;
  width: 80%;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 25px;
}

/* === ICONO DE INFORMACIÓN (ESQUINA SUPERIOR IZQUIERDA) === */
.adr-info-icon {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 32px;
  height: 32px;
  background-color: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--adr-text-dark);
  font-weight: 600;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  cursor: help;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 10;
}

/* Tooltip (Caja de texto) */
.adr-info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%; /* Posición sobre el icono */
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 400;
  white-space: pre-wrap; /* Permite saltos de línea */
  width: 200px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
  z-index: 11;
}

/* Tooltip (Flecha) */
.adr-info-icon::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #333;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
  z-index: 11;
}

/* Mostrar tooltip al hacer hover */
.adr-info-icon:hover::after,
.adr-info-icon:hover::before {
  opacity: 1;
  visibility: visible;
}


/* === HEXÁGONO SUPERIOR DERECHo === */
.adr-hex {
  position: absolute;
  top: -25px;         /* <-- Posición precisa para superposición */
  right: -25px;        /* <-- Posición precisa para superposición */
  width: 60px;
  height: 60px;
  background-color: var(--adr-primary-color);
  /* Polígono de 8 puntos para simular visualmente un hexágono redondeado */
  clip-path: polygon(35% 5%, 65% 5%, 95% 35%, 95% 65%, 65% 95%, 35% 95%, 5% 65%, 5% 35%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: none; /* <-- Sombra eliminada para un diseño plano */
}

.adr-hex:hover {
  transform: scale(1.08); /* Aumentamos ligeramente el efecto hover */
  background-color: var(--adr-primary-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Sombra sutil que aparece solo en hover */
}

.adr-hex > svg {
    width: 32px;
    height: 32px;
    stroke-width: 3.5; /* <-- Grosor del ícono de flecha aumentado para coincidir */
}

/*
 * =========================================
 * BUSCADOR DE REGISTROS
 * =========================================
 */
.adr-search-container {
  max-width: 700px;
  margin: 0 auto 45px; /* Espaciado inferior para separar de las tarjetas */
}

#adr-search-input {
  width: 100%;
  padding: 16px 22px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  color: var(--adr-text-dark);
  background-color: var(--adr-background-card);
  border: 2px solid #e0e0e0;
  border-radius: var(--adr-border-radius-small);
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#adr-search-input::placeholder {
  color: #999;
}

#adr-search-input:focus {
  outline: none;
  border-color: var(--adr-primary-color);
  box-shadow: 0 0 0 4px rgba(247, 196, 95, 0.5);
}

#adr-no-results-msg {
    display: none; /* Oculto por defecto */
    color: var(--adr-text-dark);
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 30px;
}

/* === CÍRCULO INFERIOR CON ÍCONO === */
.adr-circular-image-wrapper {
  position: absolute;
  bottom: -20px;
  background-color: var(--adr-background-card);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--adr-primary-color);
  overflow: hidden; /* <-- [CORRECCIÓN] Recorta cualquier contenido que se desborde */
}

.adr-circular-image {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Mantiene la proporción de la imagen */
  border-radius: 50%; /* <-- [CORRECCIÓN] Hace la imagen circular */
}

/*
 * =========================================
 * ESTILOS HOMOLOGADOS PARA MODALES
 * =========================================
 */

/* === MODAL DE VALIDACIÓN (Pequeño) === */
.adr-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  font-family: 'Poppins', sans-serif;
  backdrop-filter: blur(5px);
}

.adr-modal-box {
  background: var(--adr-background-card);
  padding: 25px 30px;
  border-radius: var(--adr-border-radius-main);
  width: 90%;
  max-width: 400px;
  box-shadow: var(--adr-shadow-hover);
  text-align: center;
  border-top: 5px solid var(--adr-primary-color);
}

.adr-modal-box h3 {
    margin: 0 0 20px 0;
    color: var(--adr-text-dark);
    font-weight: 600;
    font-size: 1.25rem;
}

#adr-user-input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: var(--adr-border-radius-small);
    border: 1px solid #ccc;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    box-sizing: border-box; /* Asegura que el padding no afecte el ancho total */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#adr-user-input:focus {
    border-color: var(--adr-primary-color);
    box-shadow: 0 0 0 3px rgba(247, 196, 95, 0.5);
    outline: none;
}


#adr-recaptcha-box {
    margin: 20px auto;
    display: flex;
    justify-content: center;
}

.adr-modal-box button {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    padding: 12px 24px;
    border: none;
    border-radius: var(--adr-border-radius-small);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.adr-modal-box button:active {
    transform: scale(0.98);
}

#adr-modal-submit {
    background-color: var(--adr-primary-color);
    color: var(--adr-text-light);
}

#adr-modal-submit:hover {
    background-color: var(--adr-primary-dark);
}

#adr-modal-close {
    background-color: #aaa;
    margin-left: 8px;
    color: var(--adr-text-light);
}
#adr-modal-close:hover {
    background-color: #999;
}

.adr-modal-msg {
  margin-top: 15px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* === MODAL FULLSCREEN (Visor de documento) === */
.adr-fullscreen-modal {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.8);
  z-index: 999999;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.adr-fullscreen-modal.visible {
  opacity: 1;
}

.adr-fullscreen-overlay {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(5px);
}

.adr-fullscreen-container {
  position: relative;
  width: 95%;
  height: 95%;
  background: var(--adr-background-card);
  border-radius: var(--adr-border-radius-main);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  z-index: 1000000;
}

/* === Header superior del visor (CORREGIDO) === */
.adr-fullscreen-header {
  background: var(--adr-primary-color); /* Fondo amarillo principal */
  color: var(--adr-text-dark); /* Texto oscuro para contraste */
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  height: 55px;
  border-bottom: 2px solid var(--adr-primary-dark); /* Borde sutil más oscuro */
}

.adr-fullscreen-title {
  font-size: 1.1rem;
}

.adr-close-fullscreen {
  background: transparent;
  border: none;
  color: var(--adr-text-dark); /* Ícono oscuro */
  font-size: 24px;
  font-weight: 300;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
  padding: 5px;
  line-height: 1;
}
.adr-close-fullscreen:hover {
  transform: scale(1.1);
  color: #000; /* Se oscurece al pasar el cursor */
}

/* Cuerpo del visor */
.adr-fullscreen-body {
  flex: 1;
  background: #f5f6fa;
  overflow: hidden;
  padding: 10px; /* Un pequeño margen para el iframe */
}

.adr-fullscreen-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--adr-border-radius-small);
}