/* ===================== OPTIMIZACIONES GENERALES ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --blanco: #ffffff;
  --negro: #000000;
  --celeste: #8cc9e7;
  --celeste-suave: #89d6ff;
  --gris: #cccccc;

  /* DEFINICIÓN DE FUENTES */
  --fuente-titulos: 'Montserrat', sans-serif;
  --fuente-cuerpo: 'Poppins', sans-serif;
}

body {
  background: #ffffff;
  color: #1a1a1a;
  overflow-x: hidden;
  font-family: var(--fuente-cuerpo);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.6;
}

html {
  scroll-behavior: smooth;
}

/* ===== HEADER & NAVBAR (INTACTO) ===== */
header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  background: var(--negro);
  transition: background 0.4s ease, box-shadow 0.3s ease;
}

header.scrolled {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0 2rem;
  position: relative;
  background: var(--negro);
}

.logo {
  display: flex;
  align-items: center;
  color: var(--celeste) !important;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 1100;
  transition: all 0.3s ease;
  user-select: none;
  margin-right: auto;
  padding: 0.5rem 1rem;
  text-transform: uppercase;
  font-family: var(--fuente-titulos);
  font-weight: 900;
  letter-spacing: -0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none !important;
  border: none !important;
}

.logo-text,
.logo-text:link,
.logo-text:visited,
.logo-text:hover,
.logo-text:active,
.logo-text:focus {
  color: var(--celeste);
  text-decoration: none !important;
  border-bottom: none !important;
  outline: none !important;
}

.logo:hover .logo-text {
  color: var(--celeste-suave) !important;
}

.logo i {
  display: inline-block !important;
  margin-right: 12px;
  font-size: 2rem;
  transition: all 0.4s ease;
  cursor: pointer;
  color: var(--celeste);
}

.logo:hover i {
  color: var(--celeste-suave);
  transform: rotate(90deg);
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: left 0.4s ease;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--blanco);
  font-size: 1.1rem;
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-family: var(--fuente-titulos);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.nav-link:hover {
  color: var(--celeste);
  transform: translateY(-2px);
}

.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 998;
  backdrop-filter: blur(2px);
}

.menu-overlay.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

body.menu-open {
  overflow: hidden;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 992px) {
  .navbar {
    height: 70px;
    padding: 0 1rem;
  }

  .logo {
    order: 1;
    font-size: 1.7rem !important;
  }

  .logo i {
    font-size: 1.9rem !important;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 70%;
    height: 100vh;
    background: var(--negro);
    flex-direction: column;
    align-items: flex-start;
    padding: 6rem 2rem;
    gap: 2rem;
    transform: none;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    order: 2;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3);
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links.active .nav-item {
    animation: slideInRight 0.4s ease forwards;
    opacity: 0;
    transform: translateX(-20px);
  }

  .nav-links.active .nav-item:nth-child(1) {
    animation-delay: 0.1s;
  }

  .nav-links.active .nav-item:nth-child(2) {
    animation-delay: 0.2s;
  }

  .nav-links.active .nav-item:nth-child(3) {
    animation-delay: 0.3s;
  }

  .nav-links.active .nav-item:nth-child(4) {
    animation-delay: 0.4s;
  }

  .nav-links.active~.navbar .logo i,
  body.menu-open .logo i {
    transform: rotate(90deg);
    color: var(--celeste-suave);
  }

  .nav-link {
    font-size: 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    padding: 1rem 0;
  }
}

@media (max-width: 768px) {
  .navbar {
    height: 70px;
    padding: 0 1rem;
  }

  .logo {
    font-size: 1.6rem !important;
  }
}

@media (max-width: 576px) {
  .nav-links {
    width: 85%;
    padding: 6rem 1.5rem;
  }
}

/* ===================== HERO NOSOTROS ===================== */
.hero-nosotros {
  position: relative;
  min-height: 600px;
  padding-top: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.9) 10%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 100%),
    url('/images/unas-no-copy.webp') center/cover;
  color: #ffffff;
  overflow: hidden;
}

.hero-nosotros::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.9) 0%, rgba(50, 50, 50, 0.8) 100%);
  z-index: 1;
}

.hero-nosotros .container {
  position: relative;
  z-index: 2;
}

/* TITULO RESPONSIVE */
.hero-nosotros h1 {
  font-family: var(--fuente-titulos);
  font-weight: 900;
  font-size: clamp(3rem, 7vw, 4rem);
  letter-spacing: 3px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero-subtitle {
  font-family: var(--fuente-cuerpo);
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  color: #e0e0e0;
}

/* ===================== BOTONES ===================== */
.btn-responsive {
  border-radius: 8px;
  padding: 12px 30px;
  font-weight: 600;
  font-family: var(--fuente-titulos);
  border: 2px solid;
  transition: all 0.3s ease;
}

.btn-primary {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #000000 !important;
}

.btn-primary:hover {
  background: #e0e0e0 !important;
  border-color: #e0e0e0 !important;
  transform: translateY(-2px);
}

/* ===================== SECCIÓN HISTORIA ===================== */
.historia-section {
  background: #ffffff;
  padding: 80px 0;
}

.historia-section h2 {
  font-family: var(--fuente-titulos);
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  color: #000000;
  text-transform: uppercase;
}

.historia-texto {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  font-family: var(--fuente-cuerpo);
  color: #666666;
}

.logros-historia {
  margin-top: 2.5rem;
  padding: 2rem;
  background: rgba(134, 205, 234, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(134, 205, 234, 0.2);
}

.logros-historia h3 {
  font-family: var(--fuente-titulos);
  font-size: 1.5rem;
  font-weight: 800;
}

.logros-historia p {
  font-family: var(--fuente-cuerpo);
  font-size: 0.9rem;
  color: #666666;
  margin-bottom: 0;
}

.text-celeste {
  color: #86CDEA !important;
}

/* Galería de Historia */
.galeria-historia {
  padding-left: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
  justify-content: center;
}

.imagen-historia {
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.imagen-historia:hover {
  transform: translateY(-5px);
}

.imagen-historia img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.imagen-historia:hover img {
  transform: scale(1.05);
}

/* ===================== SECCIÓN MISIÓN Y VISIÓN ===================== */
.mision-vision {
  background: #ffffff;
  padding: 80px 0;
}

.mision-vision h2 {
  font-family: var(--fuente-titulos);
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  color: #000000;
  text-transform: uppercase;
}

.mision-vision .lead {
  font-size: 1.2rem;
  color: #666666;
  margin-bottom: 2.5rem;
  font-family: var(--fuente-cuerpo);
}

.card-filosofia {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-filosofia:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-filosofia h3 {
  font-family: var(--fuente-titulos);
  font-weight: 900;
  letter-spacing: 1.5px;
  font-size: 1.8rem;
}

.filosofia-texto {
  font-size: 1.1rem;
  line-height: 1.7;
  font-family: var(--fuente-cuerpo);
  color: #666666;
}

.bg-white {
  background: linear-gradient(135deg, #ffffff, #f8f9fa) !important;
  color: #000000;
}

.bg-dark {
  background: linear-gradient(135deg, #000000, #1a1a1a) !important;
  color: #ffffff;
}

.bg-dark .filosofia-texto {
  color: #e0e0e0;
}

/* Valores */
.valores-section h3 {
  font-family: var(--fuente-titulos);
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #000000;
  margin-bottom: 3rem;
  font-size: 2rem;
}

.valor-item {
  padding: 2rem 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  text-align: center;
}

.valor-item:hover {
  background: rgba(134, 205, 234, 0.05);
  transform: translateY(-5px);
}

.valor-item h5 {
  font-family: var(--fuente-titulos);
  font-weight: 800;
  color: #000000;
  margin-bottom: 0.5rem;
}

.valor-item p {
  font-size: 0.9rem;
  color: #666666;
  font-family: var(--fuente-cuerpo);
  line-height: 1.5;
}

/* ===================== FOOTER ===================== */
.footer {
  background: #1a1a1a;
  padding: 60px 0 20px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-bottom: 40px;
}

.footer-section {
  padding: 0 25px;
  position: relative;
}

.footer-section:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.footer-section h3 {
  font-size: 1.1rem;
  color: var(--blanco);
  margin-bottom: 25px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--celeste);
  font-family: var(--fuente-titulos);
  font-weight: 800;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.footer-section ul li a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
  width: 100%;
  padding: 4px 0;
  font-size: 0.95rem;
  font-family: var(--fuente-cuerpo);
  font-weight: 800;
}

.footer-section ul li a:hover {
  color: var(--celeste);
}

.contact-info,
.hours-list {
  color: #cccccc;
  font-weight: 800;
}

.contact-info li {
  margin-bottom: 12px;
  line-height: 1.4;
  font-size: 0.95rem;
}

.contact-info i {
  margin-right: 12px;
  width: 16px;
  color: var(--celeste);
  font-size: 0.9rem;
}

.promo-box {
  background: rgba(140, 201, 231, 0.08);
  padding: 20px;
  border-radius: 4px;
  border-left: 2px solid var(--celeste);
  margin-bottom: 15px;
}

.promo-box p {
  color: #ffffff;
  line-height: 1.5;
  text-align: center;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #cccccc;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 0.9rem;
}

.social-links a:hover {
  color: #ffffff;
  background-color: var(--celeste);
  border-color: var(--celeste);
}

.footer-bottom {
  text-align: center;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #999999;
  font-size: 0.85rem;
  font-weight: 800;
}

/* --- RESPONSIVE FOOTER --- */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-section {
    text-align: center;
    padding: 0 20px;
  }

  .footer-section:not(:last-child)::after {
    display: none;
  }

  .footer-section:not(:last-child)::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 20%;
    width: 60%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
  }
}

/* ===================== RESPONSIVE GENERAL ===================== */
/* ===================== AQUÍ ESTÁN LOS CAMBIOS DE TAMAÑO ===================== */

@media (max-width: 768px) {
  .hero-nosotros {
    min-height: 55vh;
    padding-top: 100px;
  }

  /* REDUCCIÓN DE TÍTULO TABLET/MÓVIL GRANDE */
  .hero-nosotros h1 {
    font-size: 2.5rem;
    /* Antes era 3.5rem */
  }

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

  .galeria-historia {
    padding-left: 0;
    margin-top: 2rem;
  }

  .historia-texto {
    font-size: 1rem;
  }

  .logros-historia {
    padding: 1.5rem;
  }

  .logros-historia h3 {
    font-size: 1.5rem;
    /* Antes era 2rem */
  }

  .card-filosofia {
    margin-bottom: 1.5rem;
  }

  .valor-item {
    padding: 1.5rem 0.5rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {

  /* REDUCCIÓN DRASTICA PARA MÓVIL */
  .hero-nosotros h1 {
    font-size: 1.8rem;
    /* Antes era 3rem */
  }

  /* Añadido: Controlar los H2 en móvil para que no se salgan */
  .historia-section h2,
  .mision-vision h2,
  .valores-section h3 {
    font-size: 1.5rem;
    /* Forzado a tamaño controlable */
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .imagen-historia img {
    height: 200px;
  }

  .valor-item {
    padding: 1rem 0.5rem;
  }
}

/* Placeholders para imágenes */
.imagen-historia::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
}

.imagen-historia {
  position: relative;
}

.imagen-historia img {
  position: relative;
  z-index: 1;
}

/* Galería Historia - Rectángulos verticales */
.galeria-historia {
  padding-left: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
  justify-content: center;
}

.imagen-historia {
  border-radius: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  height: 200px;
}

.imagen-historia:hover {
  transform: translateY(-8px);
}

.imagen-historia img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
  opacity: 0.9;
}

.imagen-historia:hover img {
  transform: scale(1.08);
  opacity: 1;
}

.imagen-historia::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.imagen-historia:hover::after {
  opacity: 0.3;
}

/* ===================== RESPONSIVE ADICIONAL ===================== */
@media (max-width: 800px) {
  .galeria-historia {
    padding-left: 0;
    margin-top: 2rem;
    gap: 1rem;
  }

  .imagen-historia {
    height: 180px;
  }
}

@media (max-width: 576px) {
  .imagen-historia {
    height: 150px;
  }
}

@media (max-width: 767px) {
  .page-wrapper {
    margin: 22px;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.252);
  }

  .historia-section,
  .mision-vision {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    background: transparent !important;
  }

  .page-wrapper .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}