/* ========= HERENCIA BÁSICA ========= */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #222;
  background-color: #f3f4f6;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

/* Contenedor reutilizable (herencia de estilos) */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ========= HEADER (sticky) ========= */
#main-header {
  background: linear-gradient(90deg, #1e40af, #3b82f6);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}

.titulo-principal {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.titulo-principal::before {
  content: "★ ";
}
.titulo-principal::after {
  content: " ★";
}

.menu-link {
  margin-left: 1rem;
  text-decoration: none;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  padding-bottom: 0.1rem;
  position: relative;
}

.menu-link:hover {
  opacity: 0.9;
}

.menu-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: #facc15;
  transition: width 0.25s;
}
.menu-link:hover::after {
  width: 100%;
}

.btn-contacto {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #f9fafb;
  background-color: rgba(15, 23, 42, 0.25);
}

/* ========= HERO / PORTADA ========= */
.seccion {
  padding: 3rem 0;
  background-color: #ffffff;
  margin-bottom: 1rem;
}

.hero {
  background: radial-gradient(circle at top left, #dbeafe, #eff6ff);
}

.hero-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: center;
}

.hero-texto h2 {
  font-size: 2rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

@keyframes aparecer {
  0%   { opacity: 0; transform: translateY(15px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero-texto {
  animation: aparecer 0.8s ease-out;
}

.hero-texto p {
  margin-bottom: 1.5rem;
}

.resaltar {
  font-weight: 700;
  color: #1d4ed8;
}

.btn-primario {
  display: inline-block;
  background-color: #1d4ed8;
  color: #f9fafb;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primario:hover {
  background-color: #1e40af;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(30, 64, 175, 0.45);
}

.hero-imagen img {
  width: 100%;
  max-width: 420px;
  display: block;
  margin: 0 auto;
  border-radius: 1.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  object-fit: cover;
}

/* ========= GALERÍA ========= */
.galeria {
  background-color: #f9fafb;
}

.galeria h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.grid-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background-color: #111827;
  color: #f9fafb;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transform: translateY(0);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.4rem 0.7rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.1));
  font-size: 0.95rem;
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 10px 20px rgba(0,0,0,0.35);
}

.destacado {
  border: 2px solid #facc15;
}

/* ========= VIDEO ========= */
.video-section {
  background-color: #ffffff;
}

.video-section h2 {
  margin-top: 0;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  margin-top: 1.5rem;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ========= CONTACTO ========= */
.contacto {
  background-color: #eff6ff;
}

.form-contacto {
  max-width: 420px;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.form-contacto label {
  font-weight: 600;
  font-size: 0.95rem;
}

input, textarea {
  padding: 0.55rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5f5;
  font-size: 0.95rem;
  font-family: inherit;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}

.btn-enviar {
  background-color: #2563eb;
  color: #f9fafb;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  align-self: flex-start;
  margin-top: 0.5rem;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-enviar:hover {
  background-color: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(37,99,235,0.4);
}

/* ========= BOTÓN FLOTANTE (fixed) ========= */
.boton-flotante {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background-color: #111827;
  color: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.35);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.boton-flotante:hover {
  transform: translateY(-2px);
  background-color: #1f2937;
}

/* ========= FOOTER ========= */
.footer {
  background-color: #020617;
  color: #9ca3af;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.85rem;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 640px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .menu-link {
    margin-left: 0.4rem;
  }

  .hero-texto h2 {
    font-size: 1.6rem;
  }
}
