/* ============================================
   VARIABLES CSS - Branding y Colores
   ============================================ */
:root {
  --primary-color: #00d4ff;
  --primary-hover: #57d4edef;
  --secondary-color: #0f8bc9;
  --dark-bg: #1a1a1a;
  --dark-bg-light: #2d2d2d;
  --text-primary: #333;
  --text-secondary: #666;
  --text-light: #999;
  --white: #1a1a1a;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 15px 35px rgba(0, 0, 0, 0.2);
  --transition: all 0.3s ease;
  --border-radius: 12px;
}

/* ============================================
   ANIMACIONES GLOBALES
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* ============================================
   NAVBAR MEJORADO
   ============================================ */
#mainNavbar {
  background-color: var(--dark-bg) !important;
  padding: 0.75rem 0;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

#mainNavbar.scrolled {
  box-shadow: var(--shadow-md);
  padding: 0.5rem 0;
}

.navbar-logo {
  height: 46px;
  transition: var(--transition);
}

.navbar-logo:hover {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  margin: 0 0.25rem;
  border-radius: 6px;
  transition: var(--transition);
  position: relative;
}

.navbar-nav .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover {
  color: var(--white) !important;
  background-color: rgba(172, 77, 0, 0.1);
}

.navbar-nav .nav-link:hover::before {
  width: 80%;
}

.navbar-nav .nav-link i {
  font-size: 0.9em;
}

/* ============================================
   TARJETAS DE UBICACIONES
   ============================================ */
.location-card {
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
}

.location-card:nth-child(1) { animation-delay: 0.1s; }
.location-card:nth-child(2) { animation-delay: 0.2s; }
.location-card:nth-child(3) { animation-delay: 0.3s; }
.location-card:nth-child(4) { animation-delay: 0.4s; }
.location-card:nth-child(5) { animation-delay: 0.5s; }
.location-card:nth-child(6) { animation-delay: 0.6s; }
.location-card:nth-child(7) { animation-delay: 0.7s; }

.location-card-inner {
  background: rgba(255, 255, 255, 0.51);
  backdrop-filter: blur(5px);
  border-radius: var(--border-radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.location-card-inner:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  background: rgba(255, 255, 255, 0.59);
}

.location-image-wrapper {
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.location-card-inner:hover .location-image-wrapper {
  transform: scale(1.1);
}

.location-image {
  transition: var(--transition);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.location-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  transition: var(--transition);
}

.location-card-inner:hover .location-title {
  color: var(--primary-color);
}

.location-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  min-height: 1.5rem;
}

/* ============================================
   BOTONES MEJORADOS
   ============================================ */
.btn-location {
  background-color: var(--primary-color);
  border: none;
  color: var(--white);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.btn-location:hover {
  background-color: var(--primary-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-location:active {
  transform: translateY(0);
}

.btn-location i {
  transition: var(--transition);
}

.btn-location:hover i {
  transform: translateX(3px);
}

/* ============================================
   SECCIÓN HISTORIA MEJORADA
   ============================================ */
.historia-section {
  margin: 4rem 0;
  padding: 3rem 0;
  align-items: center;
}

.historia-content {
  padding: 2rem;
  animation: slideIn 0.8s ease-out;
}

.historia-content .featurette-heading {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.historia-content .lead {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.historia-image-wrapper {
  padding: 1rem;
  animation: fadeIn 0.8s ease-out 0.3s both;
}

.historia-image-wrapper .featurette-image {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  max-width: 100%;
  height: auto;
}

.historia-image-wrapper:hover .featurette-image {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
}

/* ============================================
   TIPOGRAFÍA Y ESPACIADO
   ============================================ */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.centrado {
  text-align: center;
  margin-bottom: 4rem;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  animation: fadeIn 0.6s ease-out;
}

/* ============================================
   FOOTER MEJORADO
   ============================================ */
.footer-main {
  background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-bg-light) 100%);
  color: rgba(12, 11, 11, 0.9);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  margin-bottom: 2rem;
}

.footer-title {
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
}

.footer-tagline {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-description {
  color: rgba(6, 6, 6, 0.7);
  line-height: 1.6;
  margin-bottom: 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(8, 8, 8, 0.8);
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: rgba(4, 3, 3, 0.8);
  text-decoration: none;
  transition: var(--transition);
  font-size: 1.2rem;
}

.social-link:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.footer-divider {
  border-color: rgba(255, 255, 255, 0.1);
  margin: 2rem 0 1.5rem;
}

.footer-copyright {
  color: rgb(11, 11, 11);
  font-size: 0.9rem;
  margin: 0;
}

a {
  text-decoration: none;
  color: inherit;
}


/* ============================================
   BOTÓN VOLVER ARRIBA
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  z-index: 1000;
  font-size: 1.2rem;
}

.back-to-top:hover {
  background-color: var(--primary-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.back-to-top.show {
  display: flex;
}

/* ============================================
   SCROLL SUAVE
   ============================================ */
html {
  scroll-behavior: smooth;
}

/* ============================================
   MEJORAS RESPONSIVE
   ============================================ */
@media (max-width: 991.98px) {
  .historia-section {
    text-align: center;
  }
  
  .historia-content {
    margin-bottom: 2rem;
  }
  
  .centrado {
    font-size: 2rem;
  }
  
  .location-card-inner {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 767.98px) {
  .centrado {
    font-size: 1.75rem;
    margin-bottom: 2.5rem;
  }
  
  .historia-content .featurette-heading {
    font-size: 2rem;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
  }
}

@media (max-width: 575.98px) {
  .location-title {
    font-size: 1.25rem;
  }
  
  .btn-location {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
}

/* ============================================
   ESTILOS EXISTENTES MEJORADOS
   ============================================ */
.bd-placeholder-img {
  font-size: 1.125rem;
  text-anchor: middle;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

@media (min-width: 768px) {
  .bd-placeholder-img-lg {
    font-size: 3.5rem;
  }
}

/* Fondo de papel solo para las tarjetas de ubicaciones */
.marketing > .row {
  background-image: url(images/fondopapelcb.png);
  padding: 2rem 0;
  border-radius: var(--border-radius);
}

/* Quitar fondo de papel de la sección de historia */
.historia-section,
.historia-section .row,
.historia-section .col-md-7,
.historia-section .col-md-5 {
  background-image: none !important;
  background-color: transparent !important;
}

/* Quitar fondo de papel del footer y sus elementos */
.footer-main,
.footer-main .container,
.footer-main .row,
.footer-main .footer-content,
.footer-main .footer-content .col-md-6,
.footer-main .footer-content .col-md-12,
.footer-main .footer-content .col-lg-4 {
  background-image: none !important;
}

/* Quitar fondo específicamente de las últimas 2 secciones del footer */
.footer-main .row:last-child,
.footer-main .footer-content .col-md-12:last-child,
.footer-main .footer-content .col-lg-4:last-child {
  background-image: none !important;
  background-color: transparent !important;
}

.somos {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  max-height: 700px;
  margin-bottom: 5rem;
  animation: fadeIn 0.8s ease-out;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
}

.historia {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.mi-seccion > div {
  flex: 1 1 50%;
}

.col-md-7 {
  margin-top: 0;
}
