/*===========================================================================
  TABLE OF CONTENTS:
  1. Variables & Font Definitions
  2. Base Styles
  3. Navigation Bar
  4. Hero Section
  5. Section Titles
  6. Cards & Content Sections
  7. Nuestros Aliados Section
  8. Brands Carousel
  9. Nosotros Section
  10. Academia & Contacto Sections
  11. Sliding Panels
  12. Modal & Forms
  13. Footer
  14. Utility Classes & Animations
  15. Media Queries
===========================================================================*/

/*===========================================================================
  1. VARIABLES & FONT DEFINITIONS
===========================================================================*/
@font-face {
  font-family: "KLEIN";
  src: url("../Font/poppins/Poppins-Medium.ttf");
  font-weight: normal;
  font-style: normal;
}

:root {
  /* Color Variables */
  --primary: #c4510a;
  --secondary: #ff8c00;
  --accent: #ff9800;
  --bg-color: #ffffff;
  --text-color: #333333;
  --card-bg: #000000;
  --card-text: #ffffff;

  /* Spacing Variables */
  --section-padding: 4rem 0;
  --card-padding: 1.5rem;

  /* Animation Variables */
  --transition-speed: 0.3s;
}

/*===========================================================================
    2. BASE STYLES
  ===========================================================================*/
body {
  font-family: "KLEIN", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/*===========================================================================
    3. NAVIGATION BAR
  ===========================================================================*/
.navbar {
  background-color: transparent;
  transition: all var(--transition-speed) ease;
  padding: 0;
  height: 80px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.navbar.scrolled {
  background-color: var(--bg-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar.hidden {
  display: none;
}

.navbar-brand {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1050;
  height: 60px;
  display: flex;
  align-items: center;
}

.navbar-brand img {
  height: 77px;
  transition: height var(--transition-speed) ease;
}

.nav-link {
  color: var(--bg-color) !important;
  background-color: var(--primary);
  margin: 0 15px;
  padding: 6px 15px !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  transition: all var(--transition-speed);
  font-size: 0.95rem;
}

.navbar.scrolled .nav-link {
  color: var(--text-color) !important;
  border-color: rgba(0, 0, 0, 0.1);
}

.nav-link:hover {
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--primary) !important;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
}

.navbar-collapse {
  flex-grow: 0;
}

/* Consultation Button */
.consultation-btn {
  color: var(--bg-color) !important;
  background-color: var(--primary);
  margin: 0 15px;
  padding: 6px 15px !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  transition: all var(--transition-speed);
  font-size: 0.95rem;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

.consultation-btn:hover {
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--primary) !important;
}

.navbar.scrolled .consultation-btn {
  color: var(--text-color) !important;
  border-color: rgba(0, 0, 0, 0.1);
}

.navbar.scrolled .consultation-btn:hover {
  border-color: var(--primary);
  background-color: rgba(0, 0, 0, 0.1);
  color: var(--primary) !important;
}

/*===========================================================================
    4. HERO SECTION
  ===========================================================================*/
.hero-section {
  background-color: rgba(0, 0, 0, 0.5);
  background-image: url(../Hero_UP.jpg);
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 5% 80px;
}

.hero-content {
  text-align: center;
  max-width: 900px;
}

.hero-content h1 {
  font-size: 8rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  animation: fadeInScale 1.2s ease-out;
}

.hero-content p {
  font-size: 2.5rem;
  margin-bottom: 2.5rem;
  font-weight: 500;
  color: var(--bg-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out 0.3s both;
}

#hero .btn-secondary {
  background-color: var(--secondary);
  border-color: var(--secondary);
}

/*===========================================================================
    5. SECTION TITLES
  ===========================================================================*/
.section-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: var(--primary);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background-color: var(--accent);
}

.title-brands {
  color: #ff8c00;
  text-align: center;
  font-size: 3rem;
  margin-bottom: 3rem;
  text-transform: uppercase;
}

/*===========================================================================
    6. CARDS & CONTENT SECTIONS
  ===========================================================================*/
.card {
  background-color: var(--card-bg);
  color: var(--card-text);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  border: none;
  box-shadow: 0 4px 6px rgba(235, 235, 235);
  height: auto;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/*===========================================================================
    7. NUESTROS ALIADOS SECTION (ACTUALIZADO)
  ===========================================================================*/
#aliados {
  background-color: #f8f9fa;
  padding: var(--section-padding);
}

/* Allies Carousel Styles - Actualizado para scroll horizontal */
.allies-carousel {
  position: relative;
  overflow-x: auto; /* Permitir scroll horizontal */
  overflow-y: hidden; /* Evitar scroll vertical */
  padding: 20px 0 40px; /* Reducido el padding inferior al quitar los botones */
  margin: 0 auto;
  max-width: 1200px;
  scrollbar-width: thin; /* Para Firefox */
  scrollbar-color: var(--primary) #f1f1f1; /* Para Firefox */
  -webkit-overflow-scrolling: touch; /* Mejor desplazamiento en iOS */
}

/* Estilo para scrollbar en WebKit (Chrome, Safari, Edge) */
.allies-carousel::-webkit-scrollbar {
  height: 8px;
}

.allies-carousel::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.allies-carousel::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

.allies-carousel::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

/* Indicador visual de scroll para desktop */
.allies-carousel.scrollable-hint::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 30px;
  background: linear-gradient(to right, transparent, rgba(248, 249, 250, 0.8));
  pointer-events: none;
  z-index: 1;
}

/* Allies Track (Container for Cards) */
.allies-track {
  display: flex;
  gap: 2rem;
  width: max-content; /* Permitir que el contenido determine el ancho */
  padding: 0 1rem; /* Añadir padding horizontal */
}

/* Individual Ally Card */
.ally-card {
  flex: 0 0 auto; /* No crecer ni encogerse, mantener tamaño automático */
  width: 300px; /* Ancho fijo para cada tarjeta */
  background: white;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0;
}

/* Ally Logo Container */
.ally-logo {
  width: 150px;
  height: 150px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ally-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Ally Card Text */
.ally-card h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.ally-card p {
  font-size: 0.9rem;
  color: var(--text-color);
  margin-bottom: 1rem;
}

/* Read More Button */
.read-more-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: auto;
}

.read-more-btn:hover {
  background: var(--secondary);
}

/* Eliminamos los estilos de los botones de navegación ya que los quitaremos */
/* Carousel Controls */
.carousel-controls {
  display: none; /* Ocultar los controles del carrusel */
}

/*===========================================================================
    8. BRANDS CAROUSEL
  ===========================================================================*/
.brands-container {
  width: 100%;
  overflow: hidden;
  background: white;
  padding: 40px 0;
  position: relative;
}

.brands-track {
  display: flex;
  animation: scrollBrands 30s linear infinite;
  width: max-content;
}

.brand-item {
  flex: 0 0 auto;
  width: 200px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all var(--transition-speed) ease;
}

.brand-item img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.brands-container:hover .brands-track {
  animation-play-state: paused;
}

/*===========================================================================
    9. NOSOTROS SECTION
  ===========================================================================*/
#nosotros .card {
  background-color: #111;
  color: white;
  transition: all var(--transition-speed) ease;
  height: auto;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

#nosotros .card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

#nosotros .card-title {
  color: #ff8c00;
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

#nosotros .card-text {
  color: white;
  margin-bottom: 1rem;
  text-align: center;
}

#nosotros .card-content {
  position: relative;
  transition: all var(--transition-speed) ease;
}

#nosotros ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-speed) ease;
}

#nosotros .card:hover ul {
  max-height: 900px;
}

#nosotros ul li {
  color: #ff8c00;
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
}

#nosotros .card:hover ul li {
  opacity: 1;
}

#nosotros ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #ff8c00;
}

#aliados .btn-primary,
#nosotros .btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  margin-top: auto;
}

/*===========================================================================
    10. ACADEMIA & CONTACTO SECTIONS
  ===========================================================================*/
#academia p {
  border: 1px solid var(--primary);
  padding: 15px;
  border-radius: 5px;
}

#medios .map-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 15px;
}

#medios .map-container iframe {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* WhatsApp Float Button */
/* Estilos para el nuevo botón de WhatsApp con texto */
.whatsapp-container {
  position: fixed;
  bottom: 20px;
  right: -17px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1100;
}

.whatsapp-text {
  background-color: rgba(37, 211, 102, 0.9);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  margin-bottom: 5px;
  font-size: 0.9rem;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.3s ease;
}

.whatsapp-container:hover .whatsapp-text {
  transform: translateY(0);
  opacity: 1;
}

.whatsapp-float {
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #128c7e;
}

.whatsapp-icon {
  width: 35px;
  height: 35px;
}

/* Estilos para el nuevo modal de capacitaciones */
.capacitaciones-modal {
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.form-selector {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  gap: 15px;
}

.form-selector-btn {
  padding: 10px 20px;
  background-color: #f1f1f1;
  border: 2px solid var(--primary);
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.form-selector-btn.active {
  background-color: var(--primary);
  color: white;
}

.capacitaciones-categorias {
  margin: 20px 0;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
}

.capacitaciones-categorias h3 {
  text-align: center;
  color: var(--primary);
  margin-bottom: 20px;
}

.categorias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.categoria-card {
  background-color: white;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.categoria-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.categoria-card h4 {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 1.1rem;
  text-align: center;
}

.categoria-card ul {
  list-style-type: none;
  padding-left: 0;
}

.categoria-card ul li {
  padding: 5px 0;
  font-size: 0.9rem;
  position: relative;
  padding-left: 20px;
}

.categoria-card ul li:before {
  content: "•";
  color: var(--primary);
  position: absolute;
  left: 5px;
}

.capacitacion-form {
  display: none;
  margin-top: 20px;
}

.capacitacion-form.active a {
  background-color: var(--primary);
}

.capacitacion-form.active {
  display: block;
}

.capacitacion-form h3 {
  text-align: center;
  color: var(--primary);
  margin-bottom: 20px;
}

.submit-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 15px;
}

.submit-btn:hover {
  background-color: var(--secondary);
}

.submit-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

/* Estilos para el chat de WhatsApp */
.whatsapp-chat {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 350px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 1100;
  display: none;
  flex-direction: column;
  overflow: hidden;
  max-height: 70vh;
}

.whatsapp-chat.active {
  display: flex;
}

.whatsapp-chat-header {
  background-color: #075e54;
  color: white;
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.whatsapp-chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.whatsapp-chat-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: white;
  padding: 3px;
}

.whatsapp-chat-title h3 {
  margin: 0;
  font-size: 1rem;
}

.whatsapp-chat-title p {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.8;
}

.whatsapp-chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.whatsapp-chat-body {
  padding: 15px;
  overflow-y: auto;
  flex-grow: 1;
  background-color: #e5ddd5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23d0d0d0' fill-opacity='0.4'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.whatsapp-message {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 7.5px;
  margin-bottom: 8px;
  position: relative;
  word-wrap: break-word;
}

.whatsapp-message p {
  margin: 0 0 5px 0;
}

.whatsapp-message p:last-child {
  margin-bottom: 0;
}

.whatsapp-message.sent {
  background-color: #dcf8c6;
  margin-left: auto;
  border-top-right-radius: 0;
}

.whatsapp-message.received {
  background-color: white;
  margin-right: auto;
  border-top-left-radius: 0;
}

.whatsapp-chat-footer {
  padding: 10px;
  background-color: #f0f0f0;
  border-top: 1px solid #e0e0e0;
}

.whatsapp-option-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.whatsapp-option-btn {
  background-color: #25d366;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.whatsapp-option-btn:hover {
  background-color: #128c7e;
}

/* Media queries para responsividad */
@media (max-width: 768px) {
  .whatsapp-chat {
    width: 300px;
    bottom: 80px;
  }

  .capacitaciones-modal {
    width: 95%;
    padding: 15px;
  }

  .categorias-grid {
    grid-template-columns: 1fr;
  }

  .form-selector {
    flex-direction: column;
    gap: 10px;
  }

  .whatsapp-option-buttons {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .whatsapp-chat {
    width: calc(100% - 40px);
    left: 20px;
    right: -30px;
  }
}

/*===========================================================================
    11. SLIDING PANELS (ACTUALIZADO PARA MEJOR RESPONSIVIDAD)
  ===========================================================================*/
.sliding-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background-color: #000000;
  z-index: 1000;
  overflow-y: auto;
  transition: right var(--transition-speed) ease-in-out;
  padding: 2rem;
}

.sliding-panel h2 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 2rem;
  text-align: center;
}

.sliding-panel h3 {
  font-size: 1.8rem;
  color: var(--accent);
  margin: 2rem 0 1rem;
}

.sliding-panel p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.sliding-panel ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.sliding-panel li {
  padding: 0.5rem 0;
  font-size: 1.1rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sliding-panel li::before {
  content: "★";
  color: var(--primary);
}

.sliding-panel-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 30px;
  background: none;
  border: none;
  cursor: pointer;
  color: white;
}

.panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.panel-overlay.active {
  display: block;
}

/* Service Cards in Sliding Panels */
.service-card {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform var(--transition-speed) ease;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card h4 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.service-card p {
  color: #333;
  margin-bottom: 1rem;
}

.service-card ul {
  list-style-type: none;
  padding-left: 0;
  text-align: left;
}

.service-card ul li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
  color: #333;
}

.service-card ul li::before {
  content: "\2605";
  color: var(--accent);
  position: absolute;
  left: 0;
}

/* Team Cards in Sliding Panels */
.team-card {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.team-card img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid var(--primary);
  padding: 3px;
}

.team-card h5 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.team-card p {
  color: var(--text-color);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.team-card .social-icons {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

/* Projects Section in Sliding Panels - Mejorado para responsividad */
.proyectos-section {
  padding: 2rem 0;
}

.proyectos-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary);
}

.proyectos-content {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  flex-wrap: wrap;
}

.proyectos-column {
  flex: 1;
  min-width: 250px;
  padding: 0 1rem;
}

.proyectos-divider {
  width: 2px;
  background-color: #ffffff;
  margin: 0 2rem;
}

.proyectos-column-title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--bg-color);
}

.proyectos-list {
  margin-top: 1rem;
}

.proyecto-item {
  margin-bottom: 0.5rem;
}

.proyecto-item .proyecto-titulo {
  color: var(--primary);
  padding: 1rem;
  margin: 0;
  cursor: pointer;
  background-color: var(--card-bg);
  border-bottom: 2px solid #ffffff;
  position: relative;
}

/* Añadir indicador de expansión */
.proyecto-item .proyecto-titulo::after {
  content: "+";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
}

.proyecto-item.active .proyecto-titulo::after {
  content: "-";
  transform: translateY(-50%) rotate(180deg);
}

.proyecto-item .proyecto-descripcion {
  color: #ffffff;
  padding: 0 1rem;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: all var(--transition-speed) ease;
}

.proyecto-item.active .proyecto-descripcion {
  max-height: 500px;
  padding: 1rem;
  margin-bottom: 1rem;
}

/*===========================================================================
    12. MODAL & FORMS
  ===========================================================================*/
.modal {
  position: fixed;
  z-index: 1100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-speed) ease, visibility var(--transition-speed) ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--bg-color);
  margin: auto;
  padding: 30px;
  border: 1px solid var(--primary);
  width: 90%;
  max-width: 600px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: scale(0.7);
  opacity: 0;
  transition: transform var(--transition-speed) ease, opacity var(--transition-speed) ease;
}

.modal.show .modal-content {
  transform: scale(1);
  opacity: 1;
}

.close {
  color: var(--primary);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color var(--transition-speed);
}

.close:hover,
.close:focus {
  color: var(--secondary);
}

.modal-title {
  color: var(--primary);
}

/* Form Styles */
#consultaForm {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px;
  border: 1px solid var(--primary);
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color var(--transition-speed);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
}

.checkbox-group {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

.checkbox-group label {
  font-size: 0.9rem;
  margin-bottom: 0;
}

#consultaForm button[type="submit"] {
  background-color: var(--primary);
  color: var(--bg-color);
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color var(--transition-speed);
  align-self: flex-start;
}

#consultaForm button[type="submit"]:hover {
  background-color: var(--secondary);
}

/*===========================================================================
    13. FOOTER
  ===========================================================================*/
.footer {
  background-color: var(--primary);
  color: var(--bg-color);
  padding: 3rem 0 1rem;
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-item {
  flex: 1;
  min-width: 200px;
}

.footer-item h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--bg-color);
  font-weight: bold;
}

.footer-item p,
.footer-item ul {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.footer-item ul {
  list-style-type: none;
  padding: 0;
}

.footer-item ul li {
  margin-bottom: 0.5rem;
}

.footer-item a {
  color: var(--bg-color);
  text-decoration: none;
  transition: opacity var(--transition-speed);
}

.footer-item a:hover {
  opacity: 0.8;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  color: var(--bg-color);
  font-size: 1.5rem;
  transition: transform var(--transition-speed);
}

.social-icons a:hover {
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
  list-style-type: none;
  padding: 0;
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links li {
  margin: 0 1rem;
}

.footer-links a {
  color: var(--bg-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: opacity var(--transition-speed);
}

.footer-links a:hover {
  opacity: 0.8;
}

/*===========================================================================
    14. UTILITY CLASSES & ANIMATIONS
  ===========================================================================*/
.mt-3 {
  margin-top: 1rem;
  margin-bottom: 4rem;
  text-align: center;
  align-items: center;
}

.mt-4 h4 {
  text-align: center;
  align-items: center;
  color: var(--primary);
  margin-bottom: 2rem;
  margin-top: 2rem;
  padding-top: 0.5rem;
}

/* Animations */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes scrollBrands {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.navbar-collapse.show .nav-item {
  animation: slideInDown 0.5s forwards;
}

/*===========================================================================
    15. MEDIA QUERIES (ACTUALIZADO PARA MEJOR RESPONSIVIDAD)
  ===========================================================================*/
/* Large Devices (Desktops) */
@media (min-width: 992px) {
  .ally-card {
    width: 300px; /* Ancho fijo para desktop */
  }

  .sliding-panel {
    width: 65%;
  }

  /* Mostrar 3 tarjetas en desktop */
  .allies-track {
    padding: 0 1rem;
  }
}

/* Medium Devices (Tablets) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .ally-card {
    width: 280px; /* Ancho ligeramente menor para tablets */
  }

  .hero-content h1 {
    font-size: 6rem;
  }

  .hero-content p {
    font-size: 2rem;
  }

  .sliding-panel {
    width: 80%;
  }

  /* Ajustes para la sección de proyectos */
  .proyectos-content {
    flex-direction: row;
  }

  .proyectos-divider {
    width: 2px;
    height: auto;
    margin: 0 1rem;
  }
}

/* Small Devices (Landscape Phones) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .ally-card {
    width: 250px; /* Ancho para móviles en horizontal */
  }

  .hero-content h1 {
    font-size: 5rem;
  }

  .hero-content p {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .allies-carousel {
    padding: 20px 0 30px;
  }

  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-item {
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-links li {
    margin: 0;
  }

  /* Ajustes para la sección de proyectos */
  .proyectos-content {
    flex-direction: column;
  }

  .proyectos-divider {
    width: 100%;
    height: 2px;
    margin: 2rem 0;
  }

  .proyectos-column {
    padding: 0;
  }

  .sliding-panel {
    width: 100%;
    padding: 1.5rem;
  }
}

/* Extra Small Devices (Portrait Phones) */
@media (max-width: 575.98px) {
  .ally-card {
    width: 85%; /* Ancho relativo para móviles en vertical */
    margin: 0 auto;
  }

  .allies-track {
    gap: 1rem;
    padding: 0 0.5rem;
  }

  .hero-content h1 {
    font-size: 4rem;
  }

  .hero-content p {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .hero-section {
    padding: 100px 20px 60px;
  }

  .navbar-brand img {
    height: 40px;
  }

  .service-card,
  .team-card {
    padding: 1rem;
  }

  .sliding-panel {
    padding: 1rem;
    width: 100%;
  }

  .sliding-panel h2 {
    font-size: 1.8rem;
  }

  .sliding-panel h3 {
    font-size: 1.5rem;
  }

  .modal-content {
    padding: 20px;
  }

  /* Ajustes para la sección de proyectos */
  .proyectos-content {
    flex-direction: column;
  }

  .proyectos-divider {
    width: 100%;
    height: 2px;
    margin: 1.5rem 0;
  }

  .proyectos-column {
    padding: 0;
  }

  .proyectos-title {
    font-size: 2rem;
  }

  .proyecto-item .proyecto-titulo {
    font-size: 1rem;
    padding: 0.75rem;
  }
}

/* Specific Mobile Fixes for Navbar */
@media (max-width: 991.98px) {
  .navbar-brand {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1050;
  }

  .navbar-brand img {
    height: 65px;
    margin: 0;
  }

  .navbar-toggler {
    position: absolute !important;
    right: 1rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 1060 !important;
    border: none;
    padding: 0.25rem;
    margin: 0;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: var(--primary);
  }

  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  }

  .navbar-collapse {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 100vh !important;
    padding: 80px 2rem 2rem;
    z-index: 1040;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
  }

  .navbar-collapse.show {
    transform: translateY(0);
  }

  .navbar-nav {
    gap: 0.5rem;
  }

  .nav-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    transition-delay: calc(var(--item-index) * 0.1s);
  }

  .nav-link {
    color: var(--primary) !important;
    background-color: transparent;
    border: 2px solid var(--primary);
    margin: 0;
    padding: 0.75rem 1.5rem !important;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
  }

  .nav-link:hover {
    background-color: var(--primary);
    color: white !important;
  }

  .consultation-btn {
    position: static;
    transform: none;
    margin: 1rem auto;
    width: fit-content;
    text-align: center;
    display: block;
  }
}

/* Specific Fixes for Brands Carousel */
@media (max-width: 768px) {
  .brand-item {
    width: 150px;
    padding: 0 20px;
  }
}

/*===========================================================================
  ESTILOS PARA EL MODAL DE POLÍTICAS DE PRIVACIDAD
===========================================================================*/
.privacy-policy-modal {
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.privacy-content {
  padding: 20px 10px;
  line-height: 1.6;
}

.privacy-content h3 {
  color: var(--primary);
  margin-top: 25px;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.privacy-content p,
.privacy-content li {
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 10px;
}

.privacy-content ul {
  padding-left: 20px;
  margin-bottom: 20px;
}

.privacy-content ul li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 5px;
}

.privacy-content a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.privacy-content a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 1.5rem;
}

#acceptPrivacyBtn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#acceptPrivacyBtn:hover {
  background-color: var(--secondary);
}

/* Estilos responsivos para el modal de políticas */
@media (max-width: 768px) {
  .privacy-policy-modal {
    width: 95%;
    padding: 15px;
  }

  .privacy-content h3 {
    font-size: 1.2rem;
  }

  .privacy-content p,
  .privacy-content li {
    font-size: 0.95rem;
  }
}

