/* =========================
   RESET BÁSICO
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.7;
  background: #EEEEFF;
  color: #1e293b;
  text-align: justify;
}

/* =========================
   VARIABLES
========================= */
:root {
  --azul: #050262;
  --azul-oscuro: #03013D;
  --gris-claro: #f1f5f9;
  --gris-medio: #e2e8f0;
  --texto-suave: #64748b;
  --radio: 10px;
  --maxw: 1000px;
}

/* =========================
   HEADER
========================= */
header {
  background: white;
  border-bottom: 1px solid var(--gris-medio);
  position: sticky;
  top: 0;
  z-index: 10;
}

header .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.brand {
  font-weight: 700;
  color: var(--azul-oscuro);
  font-size: 1.3rem;
  text-align: left;
}

/* =========================
   MENÚ DE NAVEGACIÓN
========================= */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-menu a {
  text-decoration: none;
  color: var(--texto-suave);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: var(--azul);
}

/* =========================
   MENÚ DE IDIOMAS
========================= */
.menu-lang {
  display: flex;
  gap: 8px;
  margin-left: 1.5rem; /* separa del menú principal en desktop */
}

.menu-lang a {
  text-decoration: none;
  color: #555;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  background: transparent;
  transition: all 0.2s ease;
}

.menu-lang a:hover {
  background-color: #f2f2f2;
  color: #000;
}

.menu-lang a.active {
  background-color: var(--azul);
  color: #fff;
  font-weight: 600;
}

/* =========================
   BOTÓN HAMBURGUESA
========================= */
.menu-toggle {
  display: none; /* oculto en desktop */
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 20;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--azul-oscuro); /* gris oscuro */
  border-radius: 2px;
  margin-bottom: 4px;
}

.menu-toggle span:last-child {
  margin-bottom: 0;
}

.menu-toggle:hover,
.menu-toggle:focus,
.menu-toggle:active {
  background: transparent;
  outline: none;
}

/* =========================
   HERO
========================= */
.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
  background: linear-gradient(135deg, var(--azul), var(--azul-oscuro));
  color: white;
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.hero p {
  max-width: 650px;
  margin: 0 auto;
  color: #e0e7ff;
  font-size: 1.1rem;
}

/* =========================
   MAIN CONTENT
========================= */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem 1rem;
}

section {
  margin: 4rem 0;
}

h2 {
  color: var(--azul-oscuro);
  margin-bottom: 1.2rem;
  font-size: 1.6rem;
  border-left: 4px solid var(--azul);
  padding-left: 0.5rem;
  text-align: left;
}

p {
  margin-bottom: 1rem;
  color: #334155;
}

/* =========================
   SOBRE MÍ
========================= */
#about-me {
  width: 100%;
}

#about-me strong {
  color: var(--azul-oscuro);
}

/* ===============================
   Responsive: móvil
   =============================== */
@media (max-width: 768px) {
  .grid,
  .values-grid {
    grid-template-columns: 1fr; /* Una columna en móvil */
  }

  .values-grid .card:last-child {
    grid-column: auto;
    max-width: 100%;
    justify-self: stretch;
  }
}


/* ===============================
   Responsive: móvil
   =============================== */
@media (max-width: 768px) {
  .grid,
  .values-grid {
    grid-template-columns: 1fr; /* Una columna en móvil */
  }

  .values-grid .card:last-child {
    grid-column: auto;
    max-width: 100%;
    justify-self: stretch;
  }
}


/* Responsive */
@media (max-width: 768px) {
  .grid,
  .values-grid {
    grid-template-columns: 1fr;
  }

  .values-grid .card:last-child {
    grid-column: auto;
    max-width: 100%;
    justify-self: stretch;
  }
}
/* =========================
   FORMULARIO
========================= */
form {
  display: grid;
  gap: 1rem;
  background: white;
  padding: 2rem;
  border-radius: var(--radio);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  width: 100%;
  margin-top: 1.5rem;
}

label {
  display: flex;
  flex-direction: column;
  font-weight: 500;
  color: var(--azul-oscuro);
  text-align: left;
}

input,
textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radio);
  font: inherit;
  margin-top: 0.3rem;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--azul);
  outline-offset: 2px;
}

button {
  background: var(--azul);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: var(--radio);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

button:hover {
  background: var(--azul-oscuro);
}

/* =========================
   FOOTER
========================= */
footer {
  text-align: center;
  padding: 1.5rem;
  background: var(--gris-claro);
  font-size: 0.9rem;
  color: var(--texto-suave);
  margin-top: 3rem;
}

/* =========================
   WHATSAPP FLOAT
========================= */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: white;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  color: #1e293b;
  z-index: 1000;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.whatsapp-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.whatsapp-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.whatsapp-icon {
  width: 60px;
  height: 60px;
}

.whatsapp-content span {
  margin-top: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #25d366;
}

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

  /* Contenedor flex del header */
  header .wrap {
    flex-wrap: wrap; /* permite que elementos bajen */
    align-items: center;
  }

  /* Botón hamburguesa visible y alineado a la derecha */
  .menu-toggle {
    display: flex;
    order: 2;
    margin-left: auto; /* empuja a la derecha */
  }

  /* Menú principal */
  .nav-menu {
    display: none;          /* oculto por defecto */
    flex-direction: column; /* vertical */
    gap: 1rem;
    width: 100%;            /* ocupa todo el ancho */
    margin-top: 0.8rem;     /* separa del header */
    order: 3;               /* aparece debajo del logo y hamburguesa */
  }

  /* Cuando se abre */
  .nav-menu.open {
    display: flex;
  }

  /* Menú de idiomas dentro del nav-menu */
  .menu-lang {
    margin-left: 0;
    margin-top: 1rem;
    gap: 8px;
    justify-content: flex-start;
  }
}


  /* Ajustes grids */
  .grid,
  .values-grid {
    grid-template-columns: 1fr;
  }

  .values-grid .card:last-child {
    grid-column: auto;
    max-width: 100%;
    justify-self: stretch;
  }

  /* Hero más pequeño */
  .hero h1 {
    font-size: 1.7rem;
  }

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

  /* Sobre mí */
  #about-me {
    padding: 1.5rem;
  }

  /* WhatsApp flotante */
  .whatsapp-float {
    bottom: 15px;
    right: 15px;
    padding: 0.7rem 0.9rem;
  }

  .whatsapp-icon {
    width: 50px;
    height: 50px;
  }

  .whatsapp-content span {
    font-size: 0.8rem;
  }

  /* Menú de idiomas móvil */
  .menu-lang {
    margin-left: 0;
    margin-top: 1rem;
  }

/* ===============================
   Cards de Áreas y Valores
   =============================== */

/* Grid general para Áreas y Valores */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr); /* Dos columnas en desktop */
  align-items: stretch; /* Igual altura de las cards */
}

/* Estilo de cada card */
.card {
  background: white;
  padding: 1.8rem;
  border-radius: var(--radio);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Texto arriba */
  height: 100%;
  min-height: 240px; /* Misma altura mínima */
}

/* Efecto hover */
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
}

/* Titulos de las cards */
.card h3 {
  margin-bottom: 0.6rem;
  color: var(--azul-oscuro);
  font-size: 1.2rem;
  text-align: left; /* Evita justificar subtítulo */
}

/* Párrafos de las cards */
.card p {
  color: var(--texto-suave);
}

/* Grid específico de Valores */
.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

/* Centrar la última card si queda sola */
.values-grid .card:last-child {
  grid-column: 1 / -1;
  max-width: 500px;
  justify-self: center;
}

/* ===============================
   Responsive: móvil
   =============================== */
@media (max-width: 768px) {
  .grid,
  .values-grid {
    grid-template-columns: 1fr; /* Una columna en móvil */
  }

  .values-grid .card:last-child {
    grid-column: auto;
    max-width: 100%;
    justify-self: stretch;
  }
}
