/*
Theme Name: Landing Page de Ensayos de Aptitud USACH
Theme URI: https://usach.cl
Author: Equipo USACH
Author URI: https://usach.cl
Description: Tema personalizado para Landing Page de Ensayos de Aptitud USACH con bloques Gutenberg editables
Version: 1.0.0
Text Domain: usach-ensayos-landing
*/

/* ============================================
   VARIABLES CSS - HEREDADAS DE NIVEL3ELEMENTOR
   ============================================ */

:root {
  --main-green-color: #01a499;
  --main-light-green-color: #49beb6;
  --main-lighter-green-color: #f2fbfa;
  --main-darker-green-color: #304f55;
  --main-dark-grey-color: #394049;
  --main-grey-color: #5e6269;
  --main-orange-color: #e37604;
  --variant-green-color: #2b9b7c;
}

/* ============================================
   RESET Y ESTILOS GLOBALES
   ============================================ */

* {
  box-sizing: border-box;
  font-family: "Nunito Sans", sans-serif;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Nunito Sans", sans-serif;
  margin: 0;
  background-color: #ffffff;
  line-height: 1.6;
  color: var(--main-dark-grey-color);
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */

h1 {
  font-size: 2.4rem; /* 38.4px */
  font-weight: 700;
  color: var(--main-green-color);
}

h2 {
  font-size: 2rem; /* 32px */
  font-weight: 700;
  color: var(--main-green-color);
}

h3 {
  font-size: 1.6rem; /* 25.6px */
  font-weight: 600;
}

h4 {
  font-size: 1.4rem; /* 22.4px */
  font-weight: 600;
}

h5 {
  font-size: 1.2rem; /* 19.2px */
  font-weight: 600;
}

h6 {
  font-size: 1.1rem; /* 17.6px */
  font-weight: 600;
}

p {
  font-size: 1rem; /* 16px */
  line-height: 1.6;
}

a {
  font-size: 1rem;
  font-family: "Nunito Sans", sans-serif;
  font-weight: bold;
  text-decoration: none;
  color: var(--main-orange-color);
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.8;
  cursor: pointer;
}

/* ============================================
   BOTONES
   ============================================ */

.btn-primary {
  display: inline-block;
  padding: 12px 32px;
  background-color: var(--main-green-color);
  color: white !important;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-align: center;
}

.btn-primary:hover {
  background-color: var(--main-darker-green-color);
  opacity: 1;
}

.btn-secondary {
  display: inline-block;
  padding: 10px 24px;
  background-color: transparent;
  color: var(--main-green-color) !important;
  font-weight: 700;
  border: 2px solid var(--main-green-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: var(--main-green-color);
  color: white !important;
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */

.landing-container {
  max-width: 100%;
  margin: 0 auto;
  overflow-x: hidden;
}

.section {
  padding: 60px 7vw;
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding: 40px 5vw;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  p {
    font-size: 1.1rem;
  }
}

/* ============================================
   SECCIÓN 1: HÉROE (PORTADA)
   ============================================ */

.seccion-heroe {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--main-green-color) 0%, var(--main-darker-green-color) 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.seccion-heroe::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('imgs/foto_portada_landing.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  z-index: 0;
}

.heroe-contenido {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 40px;
}

.heroe-contenido h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 24px;
  line-height: 1.2;
}

.heroe-contenido p {
  font-size: 1.3rem;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.95);
}

/* ============================================
   SECCIÓN 2: SELLO DE CONFIANZA (ACREDITACIÓN)
   ============================================ */

.seccion-acreditacion {
  background-color: white;
  text-align: center;
  padding: 50px 7vw;
  border-bottom: 1px solid #e5e5e5;
}

.acreditacion-bloque {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px;
  border: 3px solid var(--main-green-color);
  border-radius: 16px;
  background-color: var(--main-lighter-green-color);
}

.acreditacion-logo {
  max-width: 200px;
  margin-bottom: 20px;
}

.acreditacion-texto {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--main-dark-grey-color);
}

/* ============================================
   SECCIÓN 3: ENSAYOS ACREDITADOS
   ============================================ */

.seccion-ensayos {
  background-color: var(--main-lighter-green-color);
}

.ensayos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.ensayo-card {
  background-color: white;
  padding: 32px;
  border-radius: 16px;
  border: 2px solid var(--main-green-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ensayo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(1, 164, 153, 0.2);
}

.ensayo-card h3 {
  color: var(--main-green-color);
  margin-bottom: 16px;
}

.ensayo-card p {
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ============================================
   SECCIÓN 4: PROGRAMA GENERAL
   ============================================ */

.seccion-programa {
  background-color: white;
  text-align: center;
}

.programa-contenido {
  max-width: 700px;
  margin: 0 auto;
}

.programa-contenido p {
  font-size: 1.2rem;
  margin-bottom: 32px;
}

/* ============================================
   SECCIÓN 5: ¿POR QUÉ ELEGIR USACH?
   ============================================ */

.seccion-beneficios {
  background: linear-gradient(135deg, var(--main-green-color) 0%, var(--main-darker-green-color) 100%);
  color: white;
}

.seccion-beneficios h2 {
  color: white;
  text-align: center;
  margin-bottom: 50px;
}

.beneficios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.beneficio-item {
  text-align: center;
  padding: 30px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: background-color 0.3s ease;
}

.beneficio-item:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.beneficio-icono {
  font-size: 3rem;
  margin-bottom: 20px;
  color: var(--main-orange-color);
}

.beneficio-item h3 {
  color: white;
  margin-bottom: 16px;
}

.beneficio-item p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

/* ============================================
   SECCIÓN 6: FORMULARIO DE CONTACTO
   ============================================ */

.seccion-formulario {
  background-color: var(--main-lighter-green-color);
}

.formulario-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.formulario-container h2 {
  text-align: center;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--main-dark-grey-color);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  font-family: "Nunito Sans", sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--main-green-color);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  text-align: center;
  margin-top: 32px;
}

/* ============================================
   FOOTER
   ============================================ */

.main-footer {
  background-color: var(--main-green-color);
  color: white;
  padding: 50px 7vw 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-logos {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

.footer-logo {
  max-width: 200px;
  height: auto;
}

.footer-contacto h3,
.footer-redes h3 {
  color: white;
  margin-bottom: 16px;
}

.footer-contacto p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
}

.footer-contacto a {
  color: white;
  text-decoration: underline;
}

.redes-sociales {
  display: flex;
  gap: 16px;
}

.red-social {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.red-social:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.red-social i {
  color: white;
  font-size: 1.5rem;
}

.footer-copyright {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   ACORDEONES / DESPLIEGUES
   Copiado desde Nivel3Elementor
   ============================================ */

.despliegue-container {
  margin: 20px 0;
}

.despliegue-summary {
  background-color: white;
  border: 2px solid var(--main-green-color);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.despliegue-summary:hover {
  box-shadow: 0 4px 12px rgba(1, 164, 153, 0.15);
}

.despliegue-summary h3 {
  padding: 20px 24px;
  margin: 0;
  cursor: pointer;
  color: var(--main-green-color);
  font-weight: 700;
  position: relative;
  user-select: none;
  transition: background-color 0.3s ease;
}

.despliegue-summary h3::after {
  content: '\25BC';
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.3s ease;
  font-size: 0.8em;
  color: var(--main-green-color);
}

.despliegue-summary.activo h3 {
  background-color: var(--main-lighter-green-color);
}

.despliegue-summary.activo h3::after {
  transform: translateY(-50%) rotate(180deg);
}

.default-contenido {
  overflow: hidden;
}

.default-despliegue-text {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  padding: 0 24px;
}

.default-despliegue-text.abierto {
  padding: 20px 24px;
}

.default-despliegue-text p {
  margin-bottom: 12px;
}

.default-despliegue-text ul,
.default-despliegue-text ol {
  margin-left: 20px;
  margin-bottom: 12px;
}

.default-despliegue-text li {
  list-style: inherit;
  margin-bottom: 8px;
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .heroe-contenido h1 {
    font-size: 2rem;
  }

  .heroe-contenido p {
    font-size: 1.1rem;
  }

  .ensayos-grid,
  .beneficios-grid {
    grid-template-columns: 1fr;
  }

  .formulario-container {
    padding: 24px;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .despliegue-summary h3 {
    padding: 16px 20px;
    font-size: 1.2rem;
  }

  .default-despliegue-text.abierto {
    padding: 16px 20px;
  }
}
