/* ============================================================
   tu_inscripcion_cullera_natura / styles.css
   Estilos para la página de identificación y visualización
   de datos de inscripción Cullera Natura
   ============================================================ */

/* ---------- Reset y base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Montserrat", sans-serif;
  color: #222;
  min-height: 100vh;
}

/* ---------- Fondo Global Wrapper ---------- */
.cn-main-wrapper {
  position: relative;
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
    url("../images/principal.jpg");
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  padding-top: 100px; /* Espacio para el navbar fijo */
}

.cn-content-container {
  position: relative;
  z-index: 2;
}

/* ---------- Hero / cabecera ---------- */
.cn-hero {
  background: transparent;
  padding: 1rem 1.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: -1rem; /* Trasladado desde el inline style */
}
.cn-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}
.cn-hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: #e8f5e9;
  border-radius: 50%;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  color: #2e7d32;
  backdrop-filter: blur(4px);
  border: 2px solid #2e7d32;
}
.cn-hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #1b5e20;
  letter-spacing: -0.5px;
  margin-bottom: 0.4rem;
}
.cn-hero-subtitle {
  font-size: 1.1rem;
  color: #2e7d32;
  font-weight: 400;
}
.cn-hero-subtitle:last-child {
  margin-top: -1rem; /* Trasladado desde el inline style */
}
.cn-hero-subtitle.bold {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.5rem;
  color: #1b5e20;
}
@media (max-width: 480px) {
  .cn-hero-title {
    font-size: 1.45rem;
  }
  .cn-hero {
    padding-top: 0; /* Reducido para móviles */
    margin-top: -1rem; /* Ajustado: +0.5rem respecto al -2.5rem anterior */
  }
}

/* ---------- Contenedor principal ---------- */
.cn-main {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  margin-top: -1rem;
}

/* ---------- Tarjeta de login ---------- */
.cn-login-card {
  background: #fff;
  border-radius: 18px;
  box-shadow:
    0 8px 45px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(0, 0, 0, 0.05);
  padding: 2.5rem 2rem 2rem;
  margin-bottom: -1rem;
}
.cn-login-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2e7d32;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cn-login-card .cn-card-desc {
  font-size: 0.88rem;
  color: #666;
  margin-bottom: 1.6rem;
  line-height: 1.5;
}

/* ---------- Grupos de formulario ---------- */
.cn-form-group {
  margin-bottom: 1.2rem;
}
.cn-form-group label {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 0.4rem;
  letter-spacing: 0.3px;
}
.cn-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.cn-input-wrap i {
  position: absolute;
  left: 0.9rem;
  color: #2e7d32;
  font-size: 0.95rem;
  pointer-events: none;
}
.cn-input-wrap input {
  width: 100%;
  padding: 0.72rem 1rem;
  border: 1.5px solid #d0d9d0;
  border-radius: 10px;
  font-size: 0.97rem;
  font-family: "Montserrat", sans-serif;
  color: #222;
  background: #f9fbf9;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  outline: none;
}
.cn-input-wrap input:focus {
  border-color: #2e7d32;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
  background: #fff;
}
.cn-input-wrap input.input-error {
  border-color: #c62828;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1);
}
.cn-field-error {
  display: none;
  font-size: 0.78rem;
  color: #c62828;
  margin-top: 0.3rem;
  font-weight: 600;
}
.cn-field-error.show {
  display: block;
}

/* ---------- Botón de verificar ---------- */
.cn-btn-verify {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, #2e7d32, #43a047);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  font-family: "Montserrat", sans-serif;
  cursor: pointer;
  margin-top: 0.5rem;
  transition:
    opacity 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  box-shadow: 0 3px 12px rgba(46, 125, 50, 0.22);
  letter-spacing: 0.3px;
}
.cn-btn-verify:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(46, 125, 50, 0.28);
}
.cn-btn-verify:active {
  transform: translateY(0);
}
.cn-btn-verify:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Mensaje de error global ---------- */
.cn-error-msg {
  display: none;
  background: #fff3f3;
  border: 1.5px solid #f5c6c6;
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  margin-top: 1.5rem;
  text-align: center;
}
.cn-error-msg.show {
  display: block;
}
.cn-error-msg .cn-error-icon {
  font-size: 2rem;
  color: #c62828;
  margin-bottom: 0.5rem;
}
.cn-error-msg h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #c62828;
  margin-bottom: 0.4rem;
}
.cn-error-msg p {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.55;
}
.cn-error-msg a {
  color: #2e7d32;
  font-weight: 600;
  text-decoration: none;
}
.cn-error-msg a:hover {
  text-decoration: underline;
}

/* ---------- Spinner de carga ---------- */
.cn-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  gap: 1rem;
  color: #2e7d32;
  font-weight: 600;
  font-size: 0.95rem;
}
.cn-loading.show {
  display: flex;
}
.cn-loading i {
  font-size: 2.2rem;
}

/* ---------- Tarjeta de datos del inscrito ---------- */
.cn-data-card {
  display: none;
  background: #fff;
  border-radius: 18px;
  box-shadow:
    0 8px 45px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  animation: fadeInUp 0.4s ease;
}
.cn-data-card.show {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cn-data-header {
  background: linear-gradient(135deg, #1b5e20, #2e7d32);
  padding: 1.4rem 1.8rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.cn-data-header-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
}
.cn-data-header-text h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.1rem;
}
.cn-data-header-text p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.78);
}

.cn-data-body {
  padding: 1.6rem 1.8rem;
}

/* ---------- Grid de datos ---------- */
.cn-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.cn-data-grid.full {
  grid-template-columns: 1fr;
}

.cn-data-item {
  background: #f4f7f4;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  border-left: 3px solid #2e7d32;
}
.cn-data-item .cn-data-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #2e7d32;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.cn-data-item .cn-data-value {
  font-size: 0.97rem;
  font-weight: 600;
  color: #222;
  word-break: break-word;
}

/* Span completo en grid de 2 columnas */
.cn-data-item.span2 {
  grid-column: 1 / -1;
}

/* ---------- Badge de estado ---------- */
.cn-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.cn-badge.inscrito {
  background: #e8f5e9;
  color: #1b5e20;
  border: 2px solid #2e7d32;
}
.cn-badge.no-inscrito {
  background: #fff3e0;
  color: #e65100;
  border: 1.5px solid #ffcc80;
}

/* ---------- Sección de actividad ---------- */
.cn-activity-section {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1.5px solid #e8f0e8;
}
.cn-activity-section h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #2e7d32;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ---------- Botón volver ---------- */
.cn-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.5rem;
  padding: 0.65rem 1.3rem;
  background: #f4f7f4;
  color: #2e7d32;
  border: 1.5px solid #c8ddc8;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
  cursor: pointer;
  transition:
    background 0.18s,
    border-color 0.18s;
  text-decoration: none;
}
.cn-btn-back:hover {
  background: #e8f5e9;
  border-color: #2e7d32;
}

/* ---------- Nota de privacidad ---------- */
.cn-privacy-note {
  margin-top: 1.8rem;
  font-size: 0.78rem;
  color: #888;
  text-align: center;
  line-height: 1.5;
}
.cn-privacy-note i {
  color: #2e7d32;
}

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
  .cn-login-card {
    padding: 1.8rem 1.2rem 1.5rem;
  }
  .cn-data-grid {
    grid-template-columns: 1fr;
  }
  .cn-data-item.span2 {
    grid-column: 1;
  }
  .cn-data-body {
    padding: 1.2rem 1.1rem;
  }
  .cn-data-header {
    padding: 1.1rem 1.2rem;
  }
  .cn-data-header-text h3 {
    font-size: 1.1rem;
  }
  .cn-main {
    padding: 1.5rem 0.85rem 3rem;
  }
}
