﻿/* 🎨 Estilo general */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: linear-gradient(180deg, #f1f5ff, #ffffff);
  color: #222;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
/* 🏛️ Título principal */
h1 {
  text-align: center;
  color: white;
  font-weight: 700;
  margin-bottom: 20px;
  margin-top: 10px;
}

/* 📋 Formulario */
form {
  max-width: 900px;
  margin: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  padding: 20px 30px;
}

/* 📂 Secciones */
fieldset {
  border: none;
  background: #f9faff;
  border-radius: 10px;
  margin-bottom: 15px;
  padding: 15px 20px;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}
fieldset:hover {
  background: #f3f6ff;
}

/* 🏷️ Títulos de secciones */
legend {
  font-weight: bold;
  color: #003366;
  font-size: 1em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* 🧾 Etiquetas y campos */
label {
  display: block;
  margin-top: 10px;
  font-weight: 600;
  color: #333;
  font-size: 0.95em;
}

input, select, textarea {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #c5c9d6;
  border-radius: 5px;
  font-size: 0.9em;
  background-color: #fff;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: #3366cc;
  box-shadow: 0 0 5px rgba(51, 102, 204, 0.5);
  outline: none;
}

/* 🔘 Botones */
button {
  background-color: #004aad;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  font-size: 0.95em;
  cursor: pointer;
  margin-top: 15px;
  transition: all 0.3s ease;
}

button:hover {
  background-color: #003580;
  transform: translateY(-1px);
}

#buscarDni {
  background: #0b5ed7;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 10px;
  cursor: pointer;
}
#buscarDni:hover {
  background: #084298;
}

/* 🧍 Radio buttons */
input[type="radio"] {
  width: auto;
  margin-right: 5px;
}

/* 🪟 Diseño responsivo */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  form {
    padding: 20px;
  }

  input, select, textarea, button {
    font-size: 0.9em;
  }
}

/* ✅ Mensajes */
.success {
  color: #0a7c00;
  font-weight: bold;
  background: #e7ffe6;
  border: 1px solid #0a7c00;
  padding: 8px;
  border-radius: 5px;
}

.error {
  color: #b30000;
  font-weight: bold;
  background: #ffe6e6;
  border: 1px solid #b30000;
  padding: 8px;
  border-radius: 5px;
}
/* Botones de login */
#googleLoginBtn, #invitadoBtn {
  background: #4285f4;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  margin: 10px;
}

#googleLoginBtn:hover {
  background: #3367d6;
}

#invitadoBtn {
  background: #34a853;
}

#invitadoBtn:hover {
  background: #2e7d32;
}

/* === SECCIÓN DE LOGIN MEJORADA === */
#loginSection {
  text-align: center;
  margin: 20px auto;
  max-width: 420px;
  padding: 30px 25px;
  border: 2px solid #004aad;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f5ff 100%);
  box-shadow: 0 8px 20px rgba(0, 74, 173, 0.15);
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#loginSection p {
  font-size: 18px;
  font-weight: 700;
  color: #003366;
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

#googleLoginBtn, #invitadoBtn {
  display: block;
  width: 90%;
  margin: 10px auto;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#googleLoginBtn {
  background: linear-gradient(135deg, #4285f4 0%, #2c5aa0 100%);
  color: white;
}

#googleLoginBtn:hover {
  background: linear-gradient(135deg, #3367d6 0%, #1e4073 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(66, 133, 244, 0.4);
}

#invitadoBtn {
  background: linear-gradient(135deg, #34a853 0%, #1f7a39 100%);
  color: white;
}

#invitadoBtn:hover {
  background: linear-gradient(135deg, #2e7d32 0%, #165a28 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(52, 168, 83, 0.4);
}

#loginSection small {
  display: block;
  margin-top: 20px;
  color: #666;
  font-size: 13px;
  opacity: 0.8;
}

/* === MODAL DE BIENVENIDA PASTOR === */
.welcome-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.welcome-modal.active {
  display: flex;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.welcome-content {
  background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
  padding: 35px 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
  max-width: 450px;
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-content .icon {
  font-size: 50px;
  margin-bottom: 15px;
}

.welcome-content h2 {
  color: #003366;
  font-size: 24px;
  font-weight: 700;
  margin: 10px 0;
  letter-spacing: 0.3px;
}

.welcome-content p {
  color: #555;
  font-size: 15px;
  margin: 8px 0;
  line-height: 1.5;
}

.welcome-content .subtitle {
  color: #004aad;
  font-weight: 600;
  font-size: 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
}

.welcome-btn {
  background: linear-gradient(135deg, #004aad 0%, #002d5f 100%);
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 25px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.welcome-btn:hover {
  background: linear-gradient(135deg, #003580 0%, #001a35 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 74, 173, 0.4);
}

/* ================================ */
/* 🎯 ESTILOS DE LOGIN Y FORMULARIO */
/* ================================ */

/* Container principal */
main {
  max-width: 1100px;
  margin: 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
}

/* Sección de Login */
#loginSection {
  width: 100%;
  max-width: 480px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 52, 102, 0.15);
  animation: slideIn 0.6s ease;
}

/* Header azul de Login */
.login-header {
  background: linear-gradient(135deg, #003366 0%, #004aad 100%);
  padding: 18px 24px;
  text-align: center;
}

.login-header h1 {
  margin: 0 0 4px 0;
  font-size: 24px;
  color: white;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.login-header p {
  margin: 0;
  font-size: 12px;
  color: #e0efff;
  font-weight: 500;
}

/* Contenido de Login */
.login-content {
  padding: 32px 24px;
  text-align: center;
}

.login-content p {
  margin: 0 0 24px 0;
  font-weight: 600;
  color: #003366;
  font-size: 16px;
  letter-spacing: 0.3px;
}

/* Contenedor de botones de login */
.login-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 24px 0;
}

/* Botón Google */
#googleLoginBtn {
  padding: 18px 24px;
  background: linear-gradient(135deg, #f3f3f3 0%, #e8e8e8 100%);
  color: #003366;
  border: 2px solid #e0e8f5;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: inherit;
}

#googleLoginBtn:hover {
  background: linear-gradient(135deg, #e0e0e0 0%, #d3d3d3 100%);
  border-color: #004aad;
  color: #004aad;
  box-shadow: 0 6px 16px rgba(0, 52, 102, 0.1);
}

/* Botón Invitado */
#invitadoBtn {
  padding: 18px 24px;
  background: linear-gradient(135deg, #004aad 0%, #003366 100%);
  color: white;
  border: 2px solid #003366;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(0, 74, 173, 0.2);
}

#invitadoBtn:hover {
  background: linear-gradient(135deg, #003366 0%, #001f40 100%);
  box-shadow: 0 8px 20px rgba(0, 74, 173, 0.35);
}

/* Pie de login */
.login-footer {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e0e8f5;
}

.login-footer small {
  color: #999;
  font-size: 12px;
  font-weight: 500;
}

/* Formulario de empadronamiento */
#formEmpadronamiento {
  display: none;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 52, 102, 0.15);
  animation: slideIn 0.6s ease;
  margin-top: 20px;
  width: 100%;
  max-width: 750px;
  max-height: 670px;
  flex-direction: column;
}

#formEmpadronamiento[style*="display: block"] {
  display: flex !important;
}

/* Header del formulario */
.form-header {
  background: linear-gradient(135deg, #003366 0%, #004aad 100%);
  padding: 24px;
  text-align: center;
  border-bottom: 1px solid #002347;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-header > div:first-child {
  flex: 1;
}

.form-header > div:nth-child(2) {
  flex: 2;
  text-align: center;
}

.form-header > div:nth-child(3) {
  flex: 1;
  text-align: right;
}

.form-header h2 {
  margin: 0 0 4px 0;
  font-size: 28px;
  color: white;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.form-header p {
  margin: 0;
  font-size: 13px;
  color: #e0efff;
  font-weight: 500;
}

#pageIndicator {
  color: white;
  font-size: 14px;
  font-weight: 600;
}

/* Contenido del formulario */
.form-content {
  padding: 24px;
  max-height: 490px;
  overflow-y: auto;
  flex: 1;
}

/* Páginas del formulario */
.form-page {
  display: none;
}

.form-page[data-page="1"] {
  display: block;
}

/* Fieldsets del formulario */
.form-page fieldset {
  border: 1px solid #e0e7ff;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  background: #f8faff;
}

.form-page fieldset[data-section="spiritual"] {
  border-color: #f0e6ff;
  background: #faf8ff;
}

.form-page fieldset[data-section="contact"] {
  border-color: #e0f2fe;
  background: #f0f9ff;
}

.form-page fieldset[data-section="family"] {
  border-color: #ffe0f0;
  background: #fff8fc;
}

.form-page fieldset[data-section="emergency"] {
  border-color: #fee0e0;
  background: #fff8f8;
}

.form-page fieldset[data-section="location"] {
  border-color: #e6f0e0;
  background: #f8fff8;
}

.form-page legend {
  font-weight: 700;
  color: #003366;
  font-size: 16px;
  padding: 0 8px;
}

/* Botón de búsqueda DNI */
#buscarDni {
  padding: 8px 12px;
  background: #004aad;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

#buscarDni:hover {
  background: #003366;
}

/* Labels para radio/checkbox */
.form-page label[style*="display:flex"] {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Botones de formulario */
.form-buttons {
  padding: 20px 24px;
  background: #f8fbff;
  border-top: 1px solid #e0e8f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

#cancelBtn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #e0e8f5 0%, #d0dbe8 100%);
  color: #003366;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

#cancelBtn:hover {
  background: linear-gradient(135deg, #d0dbe8 0%, #c0ccd8 100%);
  color: #001f40;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 52, 102, 0.15);
}

#prevBtn,
#nextBtn {
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 500;
  background: linear-gradient(135deg, #d0dbe8 0%, #c0ccd8 100%);
  color: #003366;
  border: 1px solid #b8c5d8;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#prevBtn:hover,
#nextBtn:hover {
  background: linear-gradient(135deg, #c0ccd8 0%, #b0bcc8 100%);
  color: #001f40;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 52, 102, 0.15);
}

#submitBtn {
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #004aad 0%, #003366 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 74, 173, 0.2);
}

#submitBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 74, 173, 0.35);
}

#submitBtn:active {
  transform: translateY(0);
}

/* ================================ */
/* 🎯 ESTILOS DE INDEX.HTML */
/* ================================ */

/* Reset y estilos base para index.html */
body.index-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #ffffff url('imajenes/Logo.jpeg') no-repeat center center fixed;
  background-size: auto 430px;
  color: #000000;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Header para index.html */
header.index-header {
  background: #003366;
  padding: 20px;
  border-bottom: 3px solid #9CA3AF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header.index-header .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header.index-header h1 {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

header.index-header nav a {
  color: #9CA3AF;
  text-decoration: none;
  margin: 0 20px;
  font-weight: 500;
  transition: color 0.2s;
}

header.index-header nav a:hover {
  color: #ffffff;
}

/* Main para index.html */
main.index-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: calc(100vh - 180px);
}

/* Footer para index.html */
footer.index-footer {
  background: #003366;
  border-top: 3px solid #9CA3AF;
  padding: 30px 20px;
  text-align: center;
  color: #9CA3AF;
  margin-top: 40px;
}

footer.index-footer .container {
  max-width: 1200px;
  margin: 0 auto;
}

footer.index-footer p {
  margin: 8px 0;
}

footer.index-footer .footer-links {
  margin: 16px 0;
}

footer.index-footer a {
  color: #9CA3AF;
  text-decoration: none;
  margin: 0 15px;
  transition: color 0.2s;
}

footer.index-footer a:hover {
  color: #ffffff;
}