/* ==========================================================================
   1. VARIABLES GLOBALES Y RESETEO
   ========================================================================== */

/* Variables de colores del segundo archivo */
:root {
  --color-primary: #2b88cf;
  --color-secondary: #5d798f;
  --color-accent: #0f2852;
  --color-light: #f0f8ff;
  --color-danger: #ff4444;
  --color-success: #00cc00;
}

/* Reseteo universal y fuente base del primer archivo */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
}

/* Estilos generales del body del segundo archivo */
body {
  background-color: var(--color-secondary);
  line-height: 1.6;
}


/* ==========================================================================
   2. CABECERAS Y NAVEGACIÓN
   ========================================================================== */

/* Estilos de Header del primer archivo */
body:not(.admin-page) header {
  position: absolute;
  padding: 20px 60px;
  z-index: 10;
  width: 100%;
  top: 0;
  left: 0;
}

/* Navbar principal (del primer archivo) */
body:not(.admin-page) .navbar {
  justify-content: center;
  padding: 15px 60px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  position: fixed;
  z-index: 1000;
  width: 100%;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
}

.navbar img {
  height: 40px;
}

.navbar .brand {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
}

.nav-links li a {
  text-decoration: none;
  font-weight: 500;
  color: #fff;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: #2b88cf;
}

/* Header alternativo (del segundo archivo) */
.divheader {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  position: relative;
  background-color: var(--color-primary);
  margin: auto;
  padding: 15px 30px;
  border-bottom: 2px solid black;
}

.divheader::after {
  content: '';
  grid-column: 3;
  width: 60px;
  height: 1px;
}

#headertitle {
  margin: 0;
  text-align: center;
  flex: 1;
  color: white;
  font-size: 1.5rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: 60%;
}

#logo {
  height: 60px;
  width: auto;
  position: relative;
  z-index: 2;
}

/* Navegación alternativa (del segundo archivo) */
.nav-main {
  background-color: var(--color-accent);
  padding: 15px;
  text-align: center;
  border-bottom: 2px solid black;
}

.nav-main a {
  color: white;
  text-decoration: none;
  margin: 0 20px;
  font-weight: bold;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.nav-main a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}


/* ==========================================================================
   3. SECCIONES HERO Y SLIDESHOW
   ========================================================================== */

.hero {
  padding-top: 80px;
  height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.hero-small {
  height: 40vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero-deportivo {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url(/index_3.jpg) no-repeat 50%;
  background-size: cover;
}

.hero-comedor {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url(/index_5.jpg) no-repeat 50%;
  background-size: cover;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 40px;
}

.slideshow {
  background-color: #000;
  z-index: -1;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.slideshow img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: fade 36s infinite;
}

.slideshow img:first-child { animation-delay: 0s; }
.slideshow img:nth-child(2) { animation-delay: 6s; }
.slideshow img:nth-child(3) { animation-delay: 12s; }
.slideshow img:nth-child(4) { animation-delay: 18s; }
.slideshow img:nth-child(5) { animation-delay: 24s; }
.slideshow img:nth-child(6) { animation-delay: 30s; }

@keyframes fade {
  0% { opacity: 0; }
  5% { opacity: 1; }
  25% { opacity: 1; }
  30% { opacity: 0; }
  to { opacity: 0; }
}


/* ==========================================================================
   4. BOTONES
   ========================================================================== */

/* Botones genéricos (del primer archivo) */
.buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 15px 25px;
  border-radius: 30px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-green {
  background: #9dcddf;
  color: #000;
}

.btn-green:hover {
  background: #7bb8d1;
}

.btn-dark {
  background: #0b2c2c;
  color: #fff;
}

.btn-dark:hover {
  background: #145454;
}

/* Botones de página principal (del segundo archivo) */
.divbuttons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 30px 20px;
  gap: 25px;
}

.button1 {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.5rem;
  padding: 25px 40px;
  font-weight: bold;
  background-color: hwb(206 44% 38%);
  border: 3px solid black;
  border-radius: 35px;
  width: 400px;
  height: auto;
  min-height: 100px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 20px 0;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.button1:hover {
  background-color: var(--color-accent);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.button1:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


/* ==========================================================================
   5. FORMULARIOS Y SUS COMPONENTES
   ========================================================================== */

/* Contenedores de Formulario */
.form-section {
  padding: 60px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #1d1d1d;
}

.form-container {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  max-width: 700px;
  width: 100%;
}

.divform {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin: 5vh auto;
  font-size: 1.1rem;
  font-weight: bold;
  border: 2px solid black;
  border-radius: 10px;
  padding: 30px;
  background-color: var(--color-light);
  max-width: 90%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: auto;
  min-width: 300px;
  overflow: visible;
}

.form-flex {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 15px;
}

/* Grupos de campos y labels */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 8px;
}

.textbox {
  width: 100%;
  margin-bottom: 15px;
  box-sizing: border-box;
}

.textbox label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

/* Campos de entrada (Inputs, Selects, etc.) */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="number"] {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 10px;
  transition: border 0.3s;
}

.form-group input:focus {
  outline: none;
  border: 1px solid #2b88cf;
}

.textbox input,
.textbox select,
.textbox textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 2px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  font-family: 'Courier New', Courier, monospace;
}

/* Grupos de Radio y Checkbox (Estilos del segundo archivo, más completos) */
.radio-group,
.checkbox-group {
  margin: 10px 0;
}

.radio-group input[type="radio"],
.checkbox-group input[type="checkbox"] {
  display: inline-block;
  width: auto;
  margin-right: 8px;
  vertical-align: middle;
}

.radio-label,
.checkbox-label {
  display: inline-block;
  margin-right: 15px;
  font-weight: normal;
  cursor: pointer;
}

.radio-group label,
.checkbox-group label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 3px;
  cursor: pointer;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
  margin-right: 10px;
}

.radio-option label,
.checkbox-option label {
  margin: 0;
}

/* Sub-responsables (Estilos del segundo archivo, más completos) */
.sub-responsables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
  box-sizing: border-box;
}

.sub-responsables input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.sub-responsables input:nth-child(odd) {
  grid-column: 1;
}

.sub-responsables input:nth-child(even) {
  grid-column: 2;
}

/* Botón de Enviar */
input[type="submit"] {
  background-color: var(--color-primary);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 5px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

input[type="submit"]:hover {
  background-color: var(--color-accent);
  transform: translateY(-2px);
}

input[type="submit"]:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
}


/* ==========================================================================
   6. SECCIONES OCULTAS Y ACORDEONES
   ========================================================================== */

/* Estilos combinados para secciones ocultas (del segundo archivo, más completos) */
.hiddenAlumno,
.hiddenDocente,
.hiddenFuncionario,
.hiddenEgresado,
.hiddenExterior,
.hidden-section {
  display: none;
  width: 100%;
  margin: 15px 0;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #f9f9f9;
  transition: all 0.3s ease;
}

.deporte-group {
  display: none;
  margin-top: 10px;
}

#hiddenOtro {
  display: none;
  margin-top: 10px;
}

#hiddenOtro.active {
  display: block;
}

.accordion-section {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.3s ease;
  background: #f9f9f9;
  margin: 10px 0 0 15px;
  padding: 0 15px;
  border-left: 3px solid #2196f3;
  border-radius: 5px;
}

.accordion-section.active {
  max-height: 400px;
  padding: 15px;
}

.accordion-section label {
  display: block;
  margin: 6px 0;
  cursor: pointer;
}


/* ==========================================================================
   7. CLASES DE UTILIDAD
   ========================================================================== */

.required {
  color: red;
  font-weight: 700;
}

.pagebreak {
  border: none;
  height: 8vh;
}

input:required {
  border-left: 4px solid var(--color-danger) !important;
}

input:valid {
  border-left: 4px solid var(--color-success) !important;
}


/* ==========================================================================
   8. DISEÑO RESPONSIVO (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 768px) {
  .divheader {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 15px;
    text-align: center;
    padding: 15px 20px;
  }

  .divheader::after {
    display: none;
  }

  #headertitle {
    grid-row: 2;
    grid-column: 1;
    font-size: 1.3rem;
    padding: 0;
    position: static; /* Ajuste para layout responsivo */
    transform: none;
    max-width: 100%;
  }

  #logo {
    grid-row: 1;
    justify-self: center;
    margin-bottom: 10px;
  }

  .nav-main {
    padding: 10px;
  }

  .nav-main a {
    display: block;
    margin: 5px 0;
    font-size: 1rem;
  }

  .button1 {
    width: 200px;
    font-size: 0.9rem;
    padding: 10px 20px;
  }

  .sub-responsables {
    grid-template-columns: 1fr;
  }

  .sub-responsables input:nth-child(odd),
  .sub-responsables input:nth-child(even) {
    grid-column: 1;
  }

  .textbox input, .textbox select, .textbox textarea {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .button1 {
    width: 300px;
    font-size: 1.2rem;
    padding: 20px 30px;
    min-height: 80px;
    margin: 15px 0;
  }
}

@media (min-width: 1200px) {
  .button1 {
    width: 450px;
    font-size: 1.6rem;
    padding: 30px 50px;
    min-height: 120px;
  }
}