:root {
  --mainblue: #184892;
  --mainred: #d51f26;
  --maindarkblue: #161a49;
  --secblue: #4c80d1;
  --secred: #ea5359;
  --secredlight: #de9093;
  --secbluelight: #e6eaef;
  --black: #000000;
  --white: #ffffff;

  --max-width: 1680px;
  --border-radius-s: 4px;
  --border-radius-m: 7px;

  --transition: all 0.3s ease;

  --font-header: 'cond-bold';
  --font-subtitle: 'reg-bold';
  --font-body: 'reg';
  --font-span: 'reg-semibold-ita';

  --text-shadow: -1px 1px 1px 0px rgba(0, 0, 0, 0.2);
  --pic-shadow: -2px 2px 4px 0px rgba(0, 0, 0, 0.5);
  --box-shadow: 0 2px 8px 0px rgba(0, 0, 0, 0.25);
}

@font-face {
    font-family: 'reg-bold';
    src: url('fonts/OpenSans-Bold.ttf') format('truetype');
    font-display: swap;}
@font-face {
    font-family: 'cond-bold';
    src: url('fonts/OpenSans-CondBold.ttf') format('truetype');
    font-display: swap;}
@font-face {
    font-family: 'reg';
    src: url('fonts/OpenSans-Regular.ttf') format('truetype');
    font-display: swap;}
@font-face {
    font-family: 'reg-semibold-ita';
    src: url('fonts/OpenSans-SemiboldItalic.ttf') format('truetype');
    font-display: swap;}


html,
body {margin: 0px; height: 100%; font-family: 'reg';}

a {
  text-decoration: none;
}

/*HEADER*/

/* ===== CLASES DE UTILIDAD (REUTILIZABLES) ===== */

.container{
  display: flex;
  flex-direction: column;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  gap:35px;
  width: 100%;
}

.main-btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--mainred);
  color: var(--white);
  font-family: var(--font-header);
  font-size: 16px;
  text-decoration: none;
  border-radius: var(--border-radius-m);
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.main-btn:hover {
  background-color: var(--mainblue);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

/* ===== SISTEMA TIPOGRÁFICO REUTILIZABLE ===== */
h1 {
  font-family: var(--font-header);
  font-size: 3.5rem;
  font-weight: 300;
  margin: 0 0 21px 0;
  line-height: 1.1;
  letter-spacing: -3px;
}

h2 {
  font-family: var(--font-header);
  font-size: 2.7rem;
  font-weight: 300;
  margin: 0 0 14px 0;
  line-height: 1.2;
  letter-spacing: -2px;
}

h3 {
  font-family: var(--font-header);
  font-size: 2rem;
  font-weight: 300;
  text-transform: uppercase;
  margin: 0 0 11px 0;
  line-height: 1.3;
  letter-spacing: -2px;
}

.subtitle {
  font-family: var(--font-subtitle);
  font-size: 1.5rem;
  text-transform: uppercase;
  margin: 0 0 11px 0;
  line-height: 1.3;
  letter-spacing: -1px;
}

p {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 11px 0;
}

span {
  font-family: var(--font-span);
  font-size: 16px;
}

/* ===== COMPONENTE HEADER ===== */
.header {
   display: flex;
   width: 100%;
   flex-direction: column;
   align-items: center;
   position: fixed;
   z-index: 10;
}

.navbar-wrapper {
   display: flex;
   justify-content: space-between;
   align-items: center;
   align-self: stretch;
   padding: 20px;
}

.logo-wrap {
   display: flex;
   flex-direction: column;
   align-items: flex-start;
   background-color: var(--white);
   border-radius: var(--border-radius-m);
   box-shadow: var(--box-shadow);
   padding: 9px 21px;
   height:fit-content;
   width: 300px;
}

.navbar {
  display: flex;
  gap: 21px;
  justify-content: flex-end;
  align-items: center;
  background-color: var(--white);
  border-radius: var(--border-radius-m);
  box-shadow: var(--box-shadow);
  padding: 14px 21px;
  width: fit-content;
}

.text-wrap {
  line-height: 1.2;
}

.head-text-blue {
  color: var(--maindarkblue);
  font-family: var(--font-header);
  font-size: 16px;
  margin: 0;
  text-shadow: var(--text-shadow);
}

.head-text-red {
  color: var(--mainred);
  font-family: var(--font-header);
  font-size: 16px;
  margin: 0;
  text-shadow: var(--text-shadow);
}

.nav-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 14px 28px;
  background-color: var(--mainblue);
  color: var(--white);
  border-radius: var(--border-radius-m);
  font-family: var(--font-header);
  font-size: 16px;
  text-decoration: none;
  transition: var(--transition);
  letter-spacing: 2px;
}

.nav-bar-btn:hover {
  background-color: var(--maindarkblue);
}

.phone {
  width: 16px;
  height: 16px;
}

/* ===== COMPONENTE HERO ===== */
.hero {
  position: relative;
  height: 640px;
  overflow: hidden;
}

.hero-pic {
  width: 100%;
  height: 600px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.overlay-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 600px;
  pointer-events: none;
}

.overlay-svg .image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-text {
  position: absolute;
  top: 200px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--white);
  width: 100%;
  padding: 0 20px;
  z-index: 2;
}

.hero-text h1 {
  color: var(--white);
  text-shadow: var(--text-shadow);
}

.hero-text .subtitle {
  color: var(--white);
  text-shadow: var(--text-shadow);
}

.coupon {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border-radius: var(--border-radius-m);
  box-shadow: var(--box-shadow);
  padding: 21px 35px;
  width: fit-content;
  z-index: 3;
}

.coupon .text-wrapper {
  text-align: center;
}

.coupon h2 {
  color: var(--black);
}

.btn-wrapper {
  text-align: center;
}

/* ===== COMPONENTES REUTILIZABLES ===== */
.title-container {
  padding: 14px 0;
  border-bottom: 2px solid var(--mainred);
}

.title-container .text-wrap {
  display: inline-block;
}

.title-container h2 {
  color: var(--mainred);
  margin: 0;
}

.pic-and-text {
  display: flex;
  gap: 42px;
  align-items: center;
}

.pic-and-text picture {
  width: 100%;
  max-width: 600px;
  height: fit-content;
}

.pic-and-text img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-m);
}

.pic-and-text .text-wrap {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 21px;
  width: 100%;
}

.pic-and-text .subtitle {
  color: var(--mainblue);
  margin: 0;
}

.pic-and-text p {
  margin: 0;
  line-height: 1.6;
}

/* ===== SECCIÓN EXPERTS ===== */
.experts {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 50px 0 70px 0;
  gap: 35px;
}

/* ===== SECCIÓN OFFER ===== */
.offer {
  position: relative;
  width: 100%;
  padding: 70px 0;
}

.offer picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.offer picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.offer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--maindarkblue);
  opacity: 0.8;
  z-index: 2;
}

.offer .text-wrap {
  position: relative;
  z-index: 3;
  color: var(--white);
  text-align: center;
}

.offer h2 {
  color: var(--white);
  text-shadow: var(--text-shadow);
}

.offer .subtitle {
  color: var(--mainred);
  margin: 0;
}

.offer .container{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 200px;
}

.offer .main-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 14px 28px;
  background-color: var(--mainred);
  color: var(--white);
  font-family: var(--font-header);
  font-size: 18px;
  text-decoration: none;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 3px;
}

.offer .main-btn:hover {
  background-color: var(--mainblue);
  transform: translateY(-2px);
  box-shadow: var(--pic-shadow);
}

.offer .phone {
  width: 20px;
  height: 20px;
}

/* ===== SECCIÓN PIC-AND-TEXT INVERT ===== */

.pic-and-text-invert {
  background-color: var(--secbluelight);
  width: 100%;
  padding: 70px 0;
}

.pic-and-text-invert .container {
  display: flex;
  flex-direction: row;
  gap: 42px;
  align-items: flex-start;
  flex-direction: row-reverse;
}

.pic-and-text-invert picture {
  width: 100%;
  max-width: 600px;
  height: fit-content;
}

.pic-and-text-invert .section-pic {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-m);
}

/* ===== SECCIÓN SERVICES ===== */

.services {
  width: 100%;
  padding: 70px 0;
}

.services .container {
  display: flex;
  flex-direction: column;
  gap: 42px;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 35px;
  padding: 50px 0;
}

.card {
  background-color: var(--secbluelight);
  border-radius: var(--border-radius-m);
  padding: 28px;
  flex: 1;
  min-width: 300px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  transition: var(--transition);
}

.card h3 {
  color: var(--mainblue);
  margin: 0;
  line-height: 1.3;
}

.card:hover {
  background-color: var(--mainblue);
  box-shadow: var(--box-shadow);
  color: white;
  cursor: pointer;
}

.card:hover h3 {
  color: var(--secbluelight);
}

.card-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.card p {
  margin: 0;
  line-height: 1.6;
  flex-grow: 1; /* Empuja el botón hacia abajo */
}

.card .btn-wrapper {
  margin-top: auto; /* Empuja el botón hacia el fondo */
  text-align: right; /* Alinea el botón a la derecha */
}


.card .main-btn:hover {
  background-color: var(--maindarkblue);
  box-shadow: none;
  transform: translateY(-2px);
}

/* ===== SECCIÓN CLOSING ===== */
.closing {
  position: relative;
  width: 100%;
  padding: 70px 0;
}

.closing picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.closing picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.closing::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--secbluelight);
  opacity: 0.9;
  z-index: 2;
}

.closing .container {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 35px;
}

.closing .title-container {
  text-align: center;
}

.text-single-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
  max-width: 800px;
  width: 100%;
}

.logo-blue {
  width: 100%;
  max-width: 600px;
  height: auto;
  margin: 0 auto;
  padding: 2rem 0;
}

.text-single-column h3 {
  margin: 0;
  line-height: 1.3;
}

.text-single-column p {
  margin: 0;
  line-height: 1.6;
  text-align: center;
}

.text-single-column .btn-wrapper {
  text-align: center;
}

/* ===== FOOTER ===== */
.footer {
  background-color: var(--maindarkblue);
  width: 100%;
  padding: 42px 0;
}

.footer .container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items:center;
  flex-wrap: wrap;
}

.footer .logo {
  width: 300px;
  height: auto;
  align-self: center;
}

.quick-links {
  display: flex;
  flex-direction: column;
  gap: 21px;
  flex: 1;
  max-width: fit-content;
}

.quick-links .subtitle {
  color: var(--secblue);
  font-size: 1.2rem;
}

.btn-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 16px;
  border-radius: var(--border-radius-m);
  transition: var(--transition);
  background-color: rgba(0, 0, 0, 0.1);
  width: fit-content;
}

.btn-footer:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

.btn-icon {
  width: 16px;
  height: 16px;
}

.btn-footer p {
  margin: 0;
}

.btn-footer a {
  color: var(--secbluelight);
  text-decoration: none;
}

.btn-footer a:hover {
  color: var(--white);
}

.form-wrap {
  flex: 1;
  max-width: fit-content;
}

.coupon-footer {
  background-color: var(--mainblue);
  border-radius: var(--border-radius-m);
  padding: 28px;
  box-shadow: var(--box-shadow);
  text-align: center;
  width: fit-content;
}

.coupon-footer .text-wrapper h2 {
  color: var(--white);
  margin: 0 0 14px 0;
  text-shadow: var(--text-shadow);
}

.coupon-footer .subtitle {
  color: var(--white);
  margin: 0 0 21px 0;
  text-shadow: var(--text-shadow);
}

.coupon-footer .main-btn:hover {
  background-color: var(--maindarkblue);
}

.copyright{
  color: var(--secbluelight);
  background-color: var(--secblue);
  text-align: center;
}

.copyright p{
  margin: 0;
  padding: 14px;
}

.copyright p a{
  color: var(--white);
  text-decoration: none;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1024px) {
  .pic-and-text {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .pic-and-text picture {
    max-width: 100%;
    margin: 0 auto;
  }

  .pic-and-text {
    flex-direction: column;
    gap: 28px;
  }
  
  .pic-and-text picture {
    max-width: 100%;
    margin: 0 auto;
  }

  .section-pic{
    max-height: 350px;
    object-fit: contain;
  }

  .offer .container{
    gap: 100px;
    padding: 50px 0;
  }
  
  .pic-and-text-invert .container {
    flex-direction: column;
    gap: 28px;
  }

  .closing {
    padding: 50px 0;
  }
  
  .text-single-column {
    gap: 21px;
    max-width: 900px;
  }
  
  .logo-blue {
    max-width: 500px;
  }

  .footer .container {
    gap: 35px;
    justify-content: center;
  }
  
  .footer .logo {
    width: 250px;
  }
  
  .quick-links,
  .form-wrap {
    max-width: 100%;
    flex: 0 0 50%;
  }
  
}

@media (max-width: 900px) {
  h1{ font-size: 3rem; }
  h2{ font-size: 2.2rem; }
  h3{ font-size: 1.7rem; }
  .subtitle{ font-size: .9rem; }

  .hero{
    height: 560px;
  }
  
   .hero-pic, .overlay-svg {
     height: 520px;
   }
  
  .hero-text {
    top: 140px;
  }

}

@media (max-width: 800px) {
  .navbar-wrapper {
    background-color: var(--white);
    padding: 10px;
    box-shadow: var(--box-shadow);
  }

  .logo-wrap, .navbar {
    padding: 0;
    background-color: transparent;
    box-shadow: none;
  }
}

@media (max-width: 768px) {
  .experts {
    padding: 30px 0 50px 0;
  }
  
  .title-container {
    text-align: center;
    margin-bottom: 30px;
  }
  
  .pic-and-text .text-wrap {
    gap: 20px;
  }

  .offer .container {
    flex-direction: column;
    gap: 28px;
    padding: 42px 0;
    text-align: center;
  }

  .offer .main-btn {
    font-size: 16px;
    padding: 12px 25px;
  }

  .services {
    padding: 40px 0;
  }

  .services .container{
    gap: 0;
  }
  
  .card-container {
    gap: 21px;
    padding: 21px;
  }

  .closing {
    padding: 40px 0;
  }
  
  .closing .container {
    gap: 28px;
  }
  
  .text-single-column {
    gap: 18px;
  }
  
  .logo-blue {
    max-width: 400px;
  }

  .footer {
    padding: 60px 0;
  }
  
  .footer .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 28px;
  }
  
  .footer .logo {
    width: 50%;
    order: -1;
  }
  
  .quick-links {
    max-width: 100%;
    align-items: center;
  }
  
  .btn-footer {
    justify-content: center;
  }
  
  .form-wrap {
    max-width: 100%;
  }
  
  .coupon-footer {
    padding: 21px;
  }

}

@media (max-width: 700px) {
   h1 { font-size: 2.5rem; }
   h2 { font-size: 1.9rem; }
   h3 { font-size: 1.3rem; }
  .subtitle { font-size: .8rem; }

   .navbar-wrapper{
      flex-direction: column;
      gap: 10px;
   }

   .nav-bar-btn{
    letter-spacing: 0;
   }

   .hero-text {
      top: 200px;
   }

   .coupon {
      width: 60%;
   }
}

@media (max-width: 450px) {
  .hero{
    height: 600px;
  }
  
   .hero-pic, .overlay-svg {
     height: 560px;
   }
  
  .hero-text {
    top: 200px;
  }

  .services {
    padding: 30px 0;
  }
  
  .card {
    padding: 18px;
    gap: 21px;
  }
  
  .card-icon {
    width: 50px;
    height: 50px;
  }

  .closing {
    padding: 30px 0;
  }
  
  .text-single-column {
    gap: 14px;
  }
  
  .logo-blue {
    max-width: 300px;
  }

  .footer {
    padding: 40px 0;
  }
  
  .footer .container {
    gap: 28px;
  }
  
  .footer .logo {
    width: 80%;
  }
  
  .coupon-footer {
    padding: 18px;
  }

}

@media (max-width: 375px) {
  .hero-text {
    top: 160px;
  }
}
/* ===== ANIMACIONES SCROLL SIMPLIFICADAS ===== */
.section-animate {
  opacity: 0;
  transform: translateY(30px);
}

.section-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease-out;
}

.card-animate {
  opacity: 0;
  transform: translateY(20px);
}

.card-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.5s ease-out;
}

/* CARD HOVER - TRANSICIÓN SEPARADA Y RÁPIDA */
.card {
  background-color: var(--secbluelight);
  border-radius: var(--border-radius-m);
  padding: 28px;
  flex: 1;
  min-width: 300px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  /* TRANSICIÓN SOLO PARA PROPIEDADES DE HOVER */
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.card h3 {
  color: var(--mainblue);
  margin: 0;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.card p {
  margin: 0;
  line-height: 1.6;
  flex-grow: 1;
  transition: color 0.3s ease;
}

.card:hover {
  background-color: var(--mainblue);
  box-shadow: var(--box-shadow);
  transform: translateY(-5px);
}

.card:hover h3 {
  color: var(--secbluelight);
}

.card:hover p {
  color: var(--white);
}

/* El resto del CSS se mantiene igual... */

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
}

.fade-in-up.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.4s ease-out;
}

/* Delay escalonado para las tarjetas */
.card-container .card-animate.animate-in:nth-child(1) { transition-delay: 0.1s; }
.card-container .card-animate.animate-in:nth-child(2) { transition-delay: 0.2s; }
.card-container .card-animate.animate-in:nth-child(3) { transition-delay: 0.3s; }