/* ===== VARIABLES GLOBALES ===== */
:root {
  --primary: #cba135; /* Dorado Suave */
  --headerColor: #203040; /* Azul Profundo */
  --bodyTextColor: #4e4b66;
  --white: #ffffff;
  --grayLight: #bdc3c7;
  --grayDark: #7f8c8d;
  --black: #333333;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --radius: 5px;
}

/* ===== RESET Y ESTILOS BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Open Sans", sans-serif;
  color: var(--bodyTextColor);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Merriweather", serif;
  color: var(--headerColor);
  margin-bottom: 1rem;
  line-height: 1.3;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: var(--transition);
}

a:hover {
  color: var(--white);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--primary);
}

.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 3rem;
  color: var(--grayDark);
}

/* ===== PRELOADER ===== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader img {
  max-width: 150px;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

.progress-bar {
  width: 200px;
  height: 4px;
  background-color: var(--grayLight);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background-color: var(--primary);
  animation: progress 2s ease-in-out forwards;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes progress {
  0% {
    width: 0;
  }
  100% {
    width: 100%;
  }
}
/* ===== HEADER / NAVIGATION ===== */
#cs-navigation {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 94%;
  max-width: 80rem;
  padding: clamp(1rem, 2vw, 2rem);
  background: transparent; /* lo pintamos en ::before */
  border-radius: clamp(0.75rem, 2vw, 1.5rem);
  box-sizing: border-box;
  z-index: 1000;
  transition:
    top 0.3s ease,
    width 0.3s ease,
    max-width 0.3s ease,
    padding 0.3s ease,
    border-radius 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}
#cs-navigation::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(32, 48, 64, 0.85);
  box-shadow: rgba(0,0,0,0.2) 0 8px 24px;
  border-radius: inherit;
  transition: transform 0.3s ease, border-radius 0.3s ease, background 0.3s ease;
  z-index: -1;
}
body.scroll #cs-navigation::before {
  background: rgba(32, 48, 64, 0.95);
}
body.scroll #cs-navigation {
  top: 0;
  width: 100%;
  max-width: 100%;
  padding: clamp(1rem, 2vw, 2rem);
  backdrop-filter: blur(10px);
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Contenedor interno: quitamos space-between y centramos */
.cs-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Logo absoluto a la izquierda */
.cs-logo {
  position: absolute;
  left: clamp(1rem, 2vw, 2rem);
  z-index: 1;
}
.cs-logo img {
  display: block;
  max-width: 120px;
  width: 100%;
  height: auto;
}
@media (max-width: 780px) {
  .cs-logo img {
    max-width: 70px;
  }
}

/* Centro de la nav */
.cs-nav {
  display: flex;
  justify-content: center;
  flex: 1;
  z-index: 1;
}

/* Toggle hamburguesa */
.cs-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1002;
}
.cs-toggle .cs-box {
  width: 24px;
  height: 18px;
  position: relative;
}
.cs-toggle .cs-line {
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}
.cs-line1 { top: 0; }
.cs-line2 { top: 8px; }
.cs-line3 { bottom: 0; }

/* Hover → “X” */
.cs-toggle.cs-active .cs-line1 { transform: translateY(8px) rotate(45deg); }
.cs-toggle.cs-active .cs-line2 { opacity: 0; }
.cs-toggle.cs-active .cs-line3 { transform: translateY(-8px) rotate(-45deg); }

/* Lista de enlaces */
.cs-ul-wrapper {
  display: flex;
}
.cs-ul {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
}
.cs-li-link {
  color: var(--white);
  position: relative;
  padding: 0.25rem 0;
}
.cs-li-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}
.cs-li-link:hover::after,
.cs-li-link.cs-active::after {
  width: 100%;
}

/* ===== MENÚ MÓVIL ===== */
@media (max-width: 767px) {
  .cs-toggle { display: block; }

  .cs-ul-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--headerColor);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding-top: clamp(6rem, 10vw, 8rem);
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    z-index: 1001;
  }
  #cs-navigation.cs-active .cs-ul-wrapper {
    transform: translateX(0);
  }
  .cs-ul {
    flex-direction: column;
    padding: 0 1.5rem;
    gap: 1.5rem;
  }
  .cs-li-link { color: var(--white); padding: 0.5rem 0; }
  
}


/* ===== HERO SECTION ===== */
.hero-section {
  height: 100vh;
  min-height: 600px;
  background-image: url("../img/1.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(32, 48, 64, 0.7);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  /* aquí ya no forzamos color global */
}

.hero-content h1 {
  font-size: 3.5rem;
  color: var(--white);                   /* aseguramos blanco */
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-content h2 {
  font-size: 1.5rem;
  color: var(--white);                   /* aseguramos blanco */
  margin-bottom: 2rem;
  font-weight: 400;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.cta-button {
  display: inline-block;
  background-color: var(--primary);
  color: var(--white);
  padding: 16px 40px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid var(--primary);
  transition: var(--transition);
}

.cta-button:hover {
  background-color: darken(var(--primary), 10%);
  color: var(--white);
}

/* ===== Animaciones Fade-In ===== */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}



/* ===== SOBRE NOSOTROS SECTION ===== */
.sobre-nosotros-section {
  background-color: #f9f9f9;
  padding: 100px 0;
}

.sobre-nosotros-card {
  background-color: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.sobre-nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}

.sobre-nosotros-content .section-title {
  margin-bottom: 0.5rem;
}

.sobre-nosotros-content .section-subtitle {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--grayDark);
}

.sobre-nosotros-content p {
  text-align: left;
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--bodyTextColor);
}

/* Imagen de la sección */
.sobre-nosotros-image img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sobre-nosotros-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .sobre-nosotros-content p {
    text-align: center;
  }
}


/* ===== SERVICIOS SECTION ===== */
.servicios-section {
  padding: 100px 0;
  background-color: var(--white);
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.servicio-card {
  background-color: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
  border: 1px solid var(--grayLight);
}

.servicio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.servicio-icon {
  margin-bottom: 20px;
  color: var(--primary);
}

.servicio-card h3 {
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.servicio-card p {
  margin-bottom: 20px;
  color: var(--bodyTextColor);
}

/* Botón con texto + icono al final */
.servicio-card form button {
  background-color: var(--headerColor);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;              /* espacio entre texto e icono */
}

.servicio-card form button:hover {
  background-color: var(--primary);
}

.whatsapp-inline-icon {
  width: 20px;
  height: auto;
}



/* ===== CTA SECTION (#cta-51) ===== */
#cta-51 {
  position: relative;
  min-height: 400px;              /* ajústalo si quieres más alto */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sectionPadding);
  overflow: hidden;
  color: #fff;                    /* todo el texto en blanco */
}

/* capa semitransparente oscura sobre la imagen */
#cta-51::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

/* contenedor del contenido encima de la capa */
#cta-51 .cs-container {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

/* topper / subtítulo */
#cta-51 .cs-topper {
  /* hereda tu estilo global */
}

/* título principal */
#cta-51 .cs-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
  line-height: 1.2;
  color: #fff;
}

/* párrafo explicativo */
#cta-51 .cs-text {
  font-size: 1rem;
  line-height: 1.5;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  color: #eee;
}

/* botón principal */
#cta-51 .cs-button-solid {
  background-color: var(--primary);
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  display: inline-block;
  transition: background-color 0.3s, transform 0.2s;
}

/* hover sin transparencias: un poco más oscuro y “elevado” */
#cta-51 .cs-button-solid:hover {
  background-color: #e65a3c; /* tono ligeramente más oscuro que --primary */
  transform: translateY(-2px);
}

/* background picture */
#cta-51 .cs-picture {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  overflow: hidden;
}

/* imagen abarcando todo */
#cta-51 .cs-picture img {
  width: 100%; height: 100%;
  object-fit: cover;
}


/* ===== EQUIPO SECTION ===== */
.equipo-section {
  padding: 100px 0;
  background-color: #f9f9f9;
}

.equipo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.miembro-card {
  background-color: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.miembro-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.miembro-img {
  height: 300px;
  overflow: hidden;
}

.miembro-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.miembro-card:hover .miembro-img img {
  transform: scale(1.05);
}

.miembro-card h3 {
  padding: 20px 20px 5px;
  font-size: 1.3rem;
}

.miembro-card .cargo {
  padding: 0 20px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 10px;
}

.miembro-card .bio {
  padding: 0 20px 20px;
  font-size: 0.9rem;
}

/* ===== TESTIMONIOS SECTION ===== */
.testimonios-section {
  padding: 100px 0;
  background-color: var(--white);
}

.testimonios-slider {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.testimonios-container {
  position: relative;
  height: 250px;
}

.testimonio-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
}

.testimonio-slide.active {
  opacity: 1;
  visibility: visible;
}

.testimonio-content {
  background-color: #f9f9f9;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  position: relative;
}

.testimonio-content::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 5rem;
  color: var(--primary);
  opacity: 0.2;
  font-family: "Merriweather", serif;
  line-height: 1;
}

.testimonio-text {
  margin-bottom: 20px;
  font-style: italic;
}

.testimonio-autor h4 {
  margin-bottom: 5px;
  color: var(--headerColor);
}

.testimonio-autor p {
  color: var(--grayDark);
  font-size: 0.9rem;
}

.testimonios-dots {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--grayLight);
  margin: 0 5px;
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background-color: var(--primary);
}

/* ===== CONTACTO SECTION ===== */
.contacto-section {
  padding: 100px 0;
  background-color: #f9f9f9;
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contacto-form {
  background-color: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--headerColor);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--grayLight);
  border-radius: var(--radius);
  font-family: "Open Sans", sans-serif;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(203, 161, 53, 0.2);
}

.submit-btn {
  background-color: var(--primary);
  color: var(--white);
  border: none;
  padding: 12px 25px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.submit-btn:hover {
  background-color: var(--headerColor);
}

.contacto-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
}

.info-icon {
  margin-right: 15px;
  color: var(--primary);
  flex-shrink: 0;
}

.info-content h4 {
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.info-content p a {
  color: var(--bodyTextColor);
}

.info-content p a:hover {
  color: var(--primary);
}

/* ===== FOOTER ===== */
.footer {
  background-color: var(--headerColor);
  color: var(--white);
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo img {
  max-width: 180px;
  margin-bottom: 15px;
}

.footer-logo p {
  color: var(--grayLight);
}

.footer h3 {
  color: var(--white);
  margin-bottom: 20px;
  font-size: 1.3rem;
  position: relative;
  padding-bottom: 10px;
}

.footer h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--primary);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--grayLight);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.footer-contact p {
  margin-bottom: 10px;
  color: var(--grayLight);
}

.footer-contact a {
  color: var(--grayLight);
}

.footer-contact a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--grayLight);
  font-size: 0.9rem;
}

/* ===== BOTÓN WHATSAPP FLOTANTE ===== */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 100;
  transition: var(--transition);
  animation: pulse-animation 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #25d366;
  animation: none;
}

@keyframes pulse-animation {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(203, 161, 53, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(203, 161, 53, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(203, 161, 53, 0);
  }
}

/* ===== BOTÓN BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--headerColor);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 100;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary);
}

/* ===== ANIMACIONES ON SCROLL ===== */
[data-animation] {
  opacity: 0;
  transition: all 0.8s ease;
}

[data-animation="fade-in"].animate {
  opacity: 1;
}

[data-animation="slide-up"] {
  transform: translateY(50px);
}

[data-animation="slide-up"].animate {
  opacity: 1;
  transform: translateY(0);
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 992px) {
  .section-title {
    font-size: 2.2rem;
  }

  .hero-content h1 {
    font-size: 3rem;
  }

  .contacto-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Header / Navegación */
  .cs-toggle {
    display: block;
  }

  .cs-ul-wrapper {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--headerColor);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 9;
  }

  .cs-ul-wrapper.active {
    right: 0;
  }

  .cs-ul {
    flex-direction: column;
    padding: 100px 30px 30px;
  }

  .cs-li {
    margin: 0 0 20px;
  }

  .cs-toggle.active .cs-line1 {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .cs-toggle.active .cs-line2 {
    opacity: 0;
  }

  .cs-toggle.active .cs-line3 {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Hero */
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content h2 {
    font-size: 1.3rem;
  }

  /* Servicios */
  .servicios-section {
    padding: 80px 0;
  }

  /* Equipo */
  .equipo-section {
    padding: 80px 0;
  }

  /* Testimonios */
  .testimonios-section {
    padding: 80px 0;
  }

  /* Contacto */
  .contacto-section {
    padding: 80px 0;
  }
}

@media (max-width: 576px) {
  .section-title {
    font-size: 1.8rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content h2 {
    font-size: 1.1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    left: 20px;
  }
}


/* Estilos para el mensaje de carga */
.loading, .sent-message, .error-message {
  display: none;
  text-align: center;
  margin-top: 10px;
  font-weight: bold;
}

.d-block {
  display: block;
}

.sent-message {
  color: green;
}

.error-message {
  color: red;
}
