/* ==========================
   BASE STYLES
========================== */
:root {
  --primary-color: #1E73BE; /* azul */
  --accent-color: #00C896;  /* verde agua */
  --dark-color: #1F2933;
  --bg-color: #F8FAFC;
  --font: 'Roboto', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg-color);
  color: var(--dark-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ==========================
   NAVBAR
========================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary-color);
  color: white;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border-bottom: 4px solid white; /* línea blanca debajo */
  margin-bottom: 2rem; /* espacio entre navbar y contenido */
}

.navbar .logo {
  font-weight: 700;
  font-size: 1.5rem;
  cursor: pointer;
}

.navbar nav a {
  color: white;
  text-decoration: none;
  margin-left: 1.5rem;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.navbar nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  left: 0;
  bottom: -4px;
  transition: 0.3s;
}

.navbar nav a:hover::after {
  width: 100%;
}

.navbar nav a:hover {
  color: var(--accent-color);
}

/* ==========================
   HERO / COLOR BLOCK
========================== */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 80vh; /* ocupa casi toda la pantalla */
  margin-bottom: 2rem;
  border-radius: 12px; /* opcional, se ve más moderno */
}

/* Aplica el mismo estilo de color a todas las secciones principales tipo hero */
.main-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 60vh;
  margin-bottom: 2rem;
  border-radius: 12px;
}

.hero h1,
.main-block h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease forwards;
}

.hero p,
.main-block p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  animation: fadeInUp 1.2s ease forwards;
}

.small-hero {
  padding: 4rem 2rem;
  background: var(--primary-color);
}

/* ==========================
   BUTTONS
========================== */
.btn {
  padding: 12px 25px;
  margin: 10px;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn.primary {
  background: var(--accent-color);
  color: white;
  border: none;
}

.btn.primary:hover {
  background: white;
  color: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn.secondary {
  background: white;
  color: var(--dark-color);
  border: 2px solid var(--dark-color);
}

.btn.secondary:hover {
  background: var(--dark-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ==========================
   SECTIONS
========================== */
section {
  padding: 4rem 2rem;
  text-align: center;
}

h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent-color);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}


/* ==========================
   GRID PRICING Y SERVICES
========================== */

.pricing-grid,
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

/* fila superior */
.pricing-grid .pricing-card:nth-child(1),
.services-grid .service-card:nth-child(1) { grid-column: 1; }

.pricing-grid .pricing-card:nth-child(2),
.services-grid .service-card:nth-child(2) { grid-column: 2; }

.pricing-grid .pricing-card:nth-child(3),
.services-grid .service-card:nth-child(3) { grid-column: 3; }

/* fila inferior (sin cruzarse) */
.pricing-grid .pricing-card:nth-child(4),
.services-grid .service-card:nth-child(4) {
  grid-column: 1;
  transform: translateX(50%);
}

.pricing-grid .pricing-card:nth-child(5),
.services-grid .service-card:nth-child(5) {
  grid-column: 3;
  transform: translateX(-50%);
}

/* Cards styling */
.pricing-card,
.service-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover,
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* ==========================
   GRID CONTACT (3 cards en fila)
========================== */
.contact-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 3 por fila */
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* RESPONSIVE */
@media screen and (max-width: 1024px) {
  .pricing-grid,
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto auto;
  }

  .pricing-grid .pricing-card:nth-child(4),
  .pricing-grid .pricing-card:nth-child(5),
  .services-grid .service-card:nth-child(4),
  .services-grid .service-card:nth-child(5) {
    grid-column: auto;
    justify-self: center;
  }
}

@media screen and (max-width: 768px) {
  .pricing-grid,
  .services-grid,
  .contact-options {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .pricing-grid .pricing-card:nth-child(4),
  .pricing-grid .pricing-card:nth-child(5),
  .services-grid .service-card:nth-child(4),
  .services-grid .service-card:nth-child(5) {
    justify-self: stretch;
  }
}
 
/* ==========================
   LISTS
========================== */
.service-list,
.problems ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* ==========================
   CTA SECTIONS
========================== */
.cta {
  background: var(--primary-color);
  color: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  margin: 2rem auto;
  max-width: 800px;
}

.cta p {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

/* ==========================
   FOOTER
========================== */
footer {
  text-align: center;
  padding: 2rem;
  background: var(--dark-color);
  color: white;
  font-size: 0.9rem;
  border-top: 4px solid white; /* línea blanca encima del copyright */
}

/* ==========================
   ANIMATIONS
========================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px);}
  100% { opacity: 1; transform: translateY(0);}
}

/* ==========================
   RESPONSIVE
========================== */
@media screen and (max-width: 768px) {
  .navbar nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
  }

  .hero h1,
  .main-block h1 {
    font-size: 2rem;
  }

  .hero p,
  .main-block p {
    font-size: 1rem;
  }
}

/* ESTILO DE CARDS */
.service-card,
.pricing-card,
.contact-card {
  background: white; /* color de fondo */
  padding: 2rem;
  border-radius: 12px; /* bordes redondeados */
  box-shadow: 0 8px 20px rgba(0,0,0,0.05); /* sombra */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover,
.pricing-card:hover,
.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* hover para los de abajo (mantiene el shift horizontal) */
.pricing-grid .pricing-card:nth-child(4):hover,
.services-grid .service-card:nth-child(4):hover {
  transform: translateX(50%) translateY(-5px);
}

.pricing-grid .pricing-card:nth-child(5):hover,
.services-grid .service-card:nth-child(5):hover {
  transform: translateX(-50%) translateY(-5px);
}

/* ==========================
   ELIMINAR ESPACIO EXTRA ANTES DEL FOOTER
========================== */

/* Aplica solo al último section de index y contact */
.index-page section:last-of-type,
.contact-page section:last-of-type {
  margin-bottom: 0;  /* elimina margen inferior */
  padding-bottom: 0; /* elimina padding inferior */
}

html, body {
  overflow-x: hidden;
}


/* ==========================
   MOBILE FIX FOR CARDS
========================== */

@media (max-width: 768px) {

  .pricing-grid,
  .services-grid,
  .contact-options {
    grid-template-columns: 1fr;
  }

  .pricing-grid .pricing-card,
  .services-grid .service-card {
    transform: none !important;
    width: 100%;
  }

}

/* ==========================
   MOBILE CARD LAYOUT
========================== */

@media (max-width: 768px) {

  .pricing-grid,
  .services-grid {
    grid-template-columns: 1fr !important;
  }

  .pricing-grid .pricing-card,
  .services-grid .service-card {
    grid-column: 1 !important;
    transform: none !important;
    width: 100%;
  }

}


/* ==========================
   MOBILE BURGER MENU
========================== */

/* NAV normal (desktop) */
.nav-links{
  display:flex;
  gap:20px;
}

/* burger oculto en desktop */
.burger{
  display:none;
}


/* MOBILE */
@media (max-width:768px){

  .nav-links{
    display:none !important;
    flex-direction:column;
    position:absolute;
    top:100%;
    left:0;
    width:100%;
    background:#004a99;
    padding:20px;
  }

  .nav-links.active{
    display:flex !important;
  }

}
}

.logo img{
  height:40px;
  width:auto;
  display:block;
}

.navbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
}


.logo img{
  height:45px;
  transition:transform .25s ease;
}

.logo img:hover{
  transform:scale(1.05);
}

/* ==========================
   MOBILE BURGER MENU FINAL
========================== */
@media (max-width: 768px) {
  .burger {
    display: flex !important;
    flex-direction: column;
    justify-content: space-around;
    width: 50px !important;    /* ancho mayor */
    height: 45px !important;   /* alto del contenedor */
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 0;
  }

  .burger span {
    display: block !important;
    width: 100% !important;    /* línea completa */
    height: 5px !important;    /* más gruesa */
    background-color: white !important; /* color blanco visible sobre navbar */
    border-radius: 2px !important;
    transition: all 0.3s ease;
  }
}
