/* Archivo CSS optimizado para el sitio */

/* Variables CSS para mejor mantenimiento */
:root {
  /* Colores principales */
  --color-red: #fc5f45;
  --color-green: #38c695;
  --color-purple: #b27cf5;
  --color-yellow: #feb960;
  --color-dark: #313131;
  --color-text: #616161;
  --color-light-bg: #f7f7f7;
  --color-white: #ffffff;
  
  /* Fuentes */
  --font-primary: 'Poppins', Helvetica, sans-serif;
  --font-secondary: 'Libre Baskerville', 'Playfair Display', Georgia, serif;
  
  /* Dimensiones */
  --header-height: 5.3rem;
  --border-radius: 4px;
  --border-radius-round: 30px;
}

/*---------------------------------------
   1. GLOBAL STYLES AND FIXES
-----------------------------------------*/
html {
  font-size: 100%;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  font-family: var(--font-primary);
  font-size: 15px;
  line-height: 27px;
  color: var(--color-text);
  font-weight: 400;
  text-align: center;
  overflow-x: hidden !important;
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
}

/* Preloader optimizado */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #fefefe;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader {
  position: relative;
  margin: 0 auto;
  width: 70px;
}

.loader:before {
  content: '';
  display: block;
  padding-top: 100%;
}

.circular {
  animation: rotate 2s linear infinite;
  height: 100%;
  transform-origin: center center;
  width: 100%;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
}

.path {
  stroke-dasharray: 1,200;
  stroke-dashoffset: 0;
  animation: dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite;
  stroke-linecap: round;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dash {
  0% {
    stroke-dasharray: 1,200;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 89,200;
    stroke-dashoffset: -35px;
  }
  100% {
    stroke-dasharray: 89,200;
    stroke-dashoffset: -124px;
  }
}

@keyframes color {
  0%, 100% {
    stroke: var(--color-red);
  }
  40% {
    stroke: var(--color-purple);
  }
  66% {
    stroke: var(--color-green);
  }
  80%, 90% {
    stroke: var(--color-yellow);
  }
}

/* Enlaces y campos de formulario */
a {
  text-decoration: none;
  transition: all ease 0.25s;
  color: var(--color-dark);
}

a:hover, a:focus {
  text-decoration: none;
  color: var(--color-red);
  outline: none;
}

textarea.input-field:focus,
textarea.input-field:active,
input.input-field:focus,
input.input-field:active {
  border: 1px solid var(--color-red);
  outline: 0;
  background: var(--color-white);
}

/* Utilidades para texto y colores */
.dark-text { color: var(--color-dark); }
.white-text { color: var(--color-white); }
.red-text { color: var(--color-red); }
.green-text { color: var(--color-green); }
.purple-text { color: var(--color-purple); }
.yellow-text { color: var(--color-yellow); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.uppercase { text-transform: uppercase; }
.small-text { font-size: 14px; }
.extra-small-text { font-size: 13px; }

strong, .strong { font-weight: 500; }

/* Líneas decorativas y sombras */
.red-line-bottom { border-bottom: 3px solid var(--color-red); }
.green-line-bottom { border-bottom: 3px solid var(--color-green); }
.purple-line-bottom { border-bottom: 3px solid var(--color-purple); }
.yellow-line-bottom { border-bottom: 3px solid var(--color-yellow); }

.four-lines {
  width: 100%;
  display: flex;
}

.four-lines .line {
  width: 25%;
  float: left;
}

.diffuse-shadow {
  box-shadow: 0px 0px 25px 0px rgba(0, 0, 0, 0.05);
}

/* Encabezados y secciones */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-dark);
  margin-top: 0;
}

h1, h2 {
  font-family: var(--font-secondary);
  font-weight: 600;
}

h1 {
  font-size: 3.75rem;
  line-height: 5.313rem;
}

h2 {
  font-size: 3.125rem;
  line-height: 4.688rem;
}

h3 {
  font-size: 30px;
  line-height: 48px;
  font-weight: 400;
}

h4 {
  font-size: 25px;
  line-height: 40px;
  font-weight: 400;
}

h5 {
  font-size: 20px;
  line-height: 33px;
  font-weight: 500;
}

h6 {
  font-weight: 500;
  font-size: 18px;
  line-height: 26px;
}

.section-number {
  font-weight: 700;
  font-size: 273px;
  color: #e0e0e0;
  opacity: 0.3;
  position: absolute;
  top: 110px;
  left: 0;
}

.centered-number {
  right: 0;
  left: 0;
}

.section-header {
  position: relative;
  z-index: 10;
  margin-bottom: 5px;
}

.sub-heading {
  font-size: 18px;
  margin-top: 13px;
}

section {
  position: relative;
  padding: 40px 0;
}

/* Botones optimizados */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: var(--border-radius-round);
  transition: all 0.15s ease-in-out;
}

.btn-danger {
  color: var(--color-white);
  background-color: var(--color-red);
  border-color: var(--color-red);
}

.btn-danger:hover {
  background-color: #e04b35;
  border-color: #e04b35;
}

.standard-button {
  padding: 0 40px;
  font-size: 16px;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 30px;
  margin: 25px 0;
  line-height: 50px;
  border: none;
  box-shadow: none;
}

.red-button {
  color: var(--color-white);
  background: var(--color-red);
}

.red-button:hover,
.red-button:active,
.red-button:focus {
  background-color: #f34123;
  color: var(--color-white);
  outline: none;
}

/* Mejoras para formularios */
.form-control {
  height: auto;
  padding: 10px 15px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-dark);
  background-color: var(--color-white);
  border: 1px solid #efefef;
  border-radius: var(--border-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: var(--color-red);
  box-shadow: 0 0 0 0.2rem rgba(252, 95, 69, 0.25);
  outline: 0;
}

.form-group {
  margin-bottom: 1rem;
}

.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 14px;
  color: var(--color-red);
}

.was-validated .form-control:invalid ~ .invalid-feedback {
  display: block;
}

.required {
  color: var(--color-red);
}

label {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/*---------------------------------------
   2. SECCIONES ESPECÍFICAS
-----------------------------------------*/

/* Sección Home */
.home {
  background: url(../images/backgrounds/fondo1.jpg) no-repeat top;
  background-size: cover;
  background-position: center;
}

.home .color-overlay {
  padding-top: 175px;
  padding-bottom: 85px;
  background: rgba(38, 39, 50, 0.85);
}

.home .intro {
  margin-top: 62px;
  margin-bottom: 18px;
}

.home-features {
  margin-top: 55px;
  display: flex;
  flex-wrap: wrap;
}

.home-features .single-feature {
  margin-bottom: 45px;
}

.home-features .single-feature .icon {
  font-size: 45px;
  margin-bottom: 28px;
}

/* Navegación */
.sticky-navigation {
  background: var(--color-white);
  min-height: var(--header-height);
  border: none;
  box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

.sticky-navigation .navbar-brand {
  margin-top: 0;
}

.sticky-navigation .navbar-brand img {
  max-height: var(--header-height);
  transition: all 0.3s ease;
}

.sticky-navigation .main-navigation li a {
  line-height: var(--header-height);
  color: var(--color-dark);
  font-weight: 500;
  font-size: 18px;
  transition: color 0.3s ease;
}

.sticky-navigation .main-navigation li a:hover,
.sticky-navigation .main-navigation li a:focus {
  color: var(--color-red);
}

/* Sección del programa */
.pricing {
  padding-top: 44px;
  padding-bottom: 50px;
}

.about-us .featured-image {
  position: relative;
  width: 100%;
}

.overflow-box {
  margin-left: -200px;
  position: relative;
  z-index: 10;
}

.about-box {
  background: var(--color-white);
  position: relative;
  margin-top: 75px;
  z-index: 10;
  overflow: hidden;
  border-radius: var(--border-radius);
}

.about-box .about-content {
  padding: 60px 82px;
}

.about-box p {
  margin-top: 22px;
  margin-bottom: 30px;
  position: relative;
}

/* Footer */
.get-in-touch {
  background: url(../images/backgrounds/fondo1.jpg) no-repeat top;
  background-size: cover;
  padding-top: 114px;
  padding-bottom: 150px;
}

.footer {
  background: rgba(232, 232, 237, 0.95);
  margin-top: 25px;
  border-radius: var(--border-radius);
}

.footer .footer-col {
  padding: 50px 40px 45px;
  text-align: left;
}

.footer .footer-logo {
  margin-top: 45px;
  text-align: center;
}

.fixed-bg {
  background-attachment: fixed;
}

/* Media queries para responsividad */
@media (max-width: 1199px) {
  .overflow-box {
    margin-left: -100px;
  }
}

@media (max-width: 991px) {
  .overflow-box {
    margin-left: 0;
  }
  
  .about-box .about-content {
    padding: 40px 30px;
  }
  
  h1, h2 {
    font-size: 2.5rem;
    line-height: 3.2rem;
  }
  
  h3 {
    font-size: 1.8rem;
    line-height: 2.5rem;
  }
}

@media (max-width: 767px) {
  .home .color-overlay {
    padding-top: 100px;
    padding-bottom: 50px;
  }
  
  .sticky-navigation .main-navigation li a {
    line-height: 40px;
    font-size: 16px;
  }
  
  .sticky-navigation .navbar-brand img {
    max-height: 40px;
  }
  
  h1, h2 {
    font-size: 2rem;
    line-height: 2.8rem;
  }
  
  .intro {
    margin-top: 40px;
    margin-bottom: 10px;
  }
  
  .fixed-bg {
    background-attachment: scroll; /* Mejor rendimiento en móviles */
  }
}

@media (max-width: 480px) {
  h1, h2 {
    font-size: 1.8rem;
    line-height: 2.4rem;
  }
  
  h3 {
    font-size: 1.5rem;
    line-height: 2.2rem;
  }
  
  .about-box .about-content {
    padding: 30px 20px;
  }
  
  .footer .footer-col {
    padding: 30px 20px;
  }
}

/* Clases para centrar imágenes de forma consistente */

/* Contenedor principal para logos centrados */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 20px auto;
  text-align: center;
}

/* Clase para las imágenes centradas */
.centered-logo {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 10px; /* Redondeo de bordes consistente */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Sombra sutil para destacar */
}

/* Estilos específicos para el logo principal */
.logo-container .centered-logo {
  border-radius: 20px;
  transition: transform 0.3s ease;
}

/* Efecto hover sutil para logos */
.logo-container .centered-logo:hover {
  transform: scale(1.02);
}

/* Estilos para los logos de patrocinadores */
.sponsors-logo {
  max-width: 90%;
  margin: 30px auto;
}

/* Estilos para el logo del footer */
.footer-logo {
  margin: 20px auto;
  max-width: 200px;
}

/* Media queries para diferentes tamaños de pantalla */
@media (max-width: 992px) {
  .sponsors-logo {
    max-width: 95%;
  }
}

@media (max-width: 768px) {
  .logo-container {
    margin: 15px auto;
  }
  
  .sponsors-logo {
    max-width: 100%;
  }
  
  .footer-logo {
    max-width: 180px;
  }
}

@media (max-width: 480px) {
  .logo-container {
    margin: 10px auto;
  }
  
  .footer-logo {
    max-width: 150px;
  }
}