/* 
   XIBIS+ Travel Network Design System 
   Inspired by Sabre.com
*/

:root {
  /* Primary Colors */
  --primary-red: #e01a22;
  --primary-red-hover: #b0141a;

  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Typography */
  --font-main: "Inter", system-ui, -apple-system, sans-serif;

  /* Layout */
  --max-width: 1280px;
  --header-height: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  color: var(--gray-900);
  line-height: 1.5;
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* Base Components */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-red);
  color: var(--white);
  border: none;
}

.btn-primary:hover {
  background-color: var(--primary-red-hover);
}

.btn-black {
  background-color: var(--gray-900);
  color: var(--white);
  border: none;
}

.btn-black:hover {
  background-color: var(--gray-800);
}

/* Layout Utilities */
.section-padding {
  padding: 5rem 0;
}

.text-center {
  text-align: center;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
}

/* Header & Navigation */
.main-header {
  height: var(--header-height);
  background-color: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--gray-800);
  font-weight: 500;
  font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary-red);
  font-weight: 700;
}

.lang-picker {
  padding: 0.5rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.85rem;
}

/* Custom Language Selector */
 .custom-lang-selector {
     position: relative;
     margin-left: 1.5rem;
     z-index: 1001;
 }

 .lang-btn {
     background: transparent;
     border: 1px solid var(--gray-300);
     border-radius: 20px;
     padding: 0.4rem 0.8rem; /* Reduced padding */
     display: flex;
     align-items: center;
     gap: 0.5rem;
     font-family: 'Inter', sans-serif;
     font-weight: 500;
     cursor: pointer;
     transition: all 0.2s ease;
     color: var(--text-dark);
     background-color: var(--white);
     font-size: 0.9rem; /* Slightly smaller text */
 }

 .lang-btn:hover {
     border-color: var(--primary);
     background: var(--gray-50);
 }

 .lang-btn svg {
     transition: transform 0.2s;
     width: 14px; /* Smaller icon */
     height: 14px;
 }

 .custom-lang-selector.active .lang-btn svg {
     transform: rotate(180deg);
 }

 .lang-dropdown {
     position: absolute;
     top: calc(100% + 10px); /* Better positioning */
     right: 0;
     background: var(--white);
     border: 1px solid var(--gray-200);
     border-radius: 12px;
     list-style: none;
     width: 150px; /* Reduced width from 180px */
     box-shadow: 0 10px 30px rgba(0,0,0,0.15);
     display: none;
     flex-direction: column;
     padding: 0.5rem 0;
     opacity: 0;
     transform: translateY(-10px);
     transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
     z-index: 1002;
 }

 .custom-lang-selector.active .lang-dropdown,
 .custom-lang-selector:hover .lang-dropdown {
     display: flex;
     opacity: 1;
     transform: translateY(0);
 }

 .lang-dropdown li {
     padding: 0.6rem 1rem; /* Reduced padding */
     cursor: pointer;
     display: flex;
     align-items: center;
     gap: 0.8rem; /* Reduced gap */
     transition: background 0.1s;
     font-size: 0.9rem;
     color: var(--text-dark);
     font-weight: 500;
 }

 .lang-dropdown li:hover {
     background: var(--gray-100);
     color: var(--primary);
 }

 .lang-dropdown .flag {
     font-size: 1.2rem;
     line-height: 1;
 }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Slider Section */
.hero-slider-section {
  position: relative;
  overflow: hidden;
  height: 100vh; /* Full viewport height */
  min-height: 600px; /* Minimum height for smaller screens */
  max-width: 100%; /* Ensure full width */
  margin: 0 auto;
  background-color: var(--gray-900);
}

.hero-slider {
  height: 100%;
  position: relative;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Overlay dark layer */
.hero-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Standard overlay */
    z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  z-index: 10;
}

.hero-slide.active {
  opacity: 1;
  z-index: 10;
}

.hero-slide .container {
  z-index: 20;
  position: relative;
}

.hero-slide h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-slide p {
  font-size: 1.5rem;
  max-width: 800px;
  margin: 0 auto 2.5rem;
  color: var(--gray-100);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  font-weight: 500;
}

/* Slider Controls */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  border: none;
  font-size: 2rem;
  padding: 1rem;
  cursor: pointer;
  z-index: 100;
  border-radius: 50%;
  transition: background 0.3s;
}

.slider-btn:hover {
  background: rgba(255, 255, 255, 0.5);
}

.slider-btn.prev {
  left: 2rem;
}
.slider-btn.next {
  right: 2rem;
}

/* Brand Transition Section */
.brand-transition {
  padding-top: 4rem;
  padding-bottom: 2rem;
  background-color: var(--white);
}

.transition-logo {
  height: 90px;
  margin-bottom: 1.5rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.transition-tagline {
  font-family: Arial, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #666666;
  letter-spacing: -0.5px;
}

/* Value Proposition Section */
.value-prop {
  background-color: var(--white);
  padding-top: 2rem;
  padding-bottom: 5rem;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 4rem;
  text-align: left;
}

.value-item h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--gray-900);
  font-weight: 800;
}

.value-item p {
  font-size: 1.125rem;
  color: var(--gray-500);
  line-height: 1.6;
}

.icon-box {
  margin-bottom: 1.5rem;
}

/* Insights Section */
.insights-section {
  background-color: var(--gray-50);
  padding: 6rem 0;
  text-align: center;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.insights-section h2 {
  font-size: 2.5rem;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
}

.insights-section p {
  font-size: 1.25rem;
  color: var(--gray-500);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.insight-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  border: 1px solid var(--gray-200);
}

.insight-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.insight-icon {
  margin-bottom: 1rem;
  color: var(--gray-500);
}

.insight-value {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  font-family: var(--font-main);
  line-height: 1;
}

.text-green { color: #10b981; }
.text-blue { color: #3b82f6; }
.text-purple { color: #8b5cf6; }

.insight-label {
  font-size: 1.1rem;
  color: var(--gray-600);
  font-weight: 600;
}

@media (max-width: 768px) {
  .insights-grid {
    grid-template-columns: 1fr;
  }
}

/* Solutions & Products Shared Styles */
.solutions-hero {
  background-color: var(--gray-900);
  color: var(--white);
  padding: 5rem 0 3rem;
  text-align: center;
  background-image:
    linear-gradient(rgba(26, 37, 48, 0.85), rgba(26, 37, 48, 0.85)),
    url("../assets/img/background_top.jpg");
  background-size: cover;
  background-position: center;
}
.solutions-hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.solutions-hero p {
  font-size: 1.5rem;
  color: var(--gray-100);
  max-width: 800px;
  margin: 0 auto;
}

.solution-row {
  display: flex;
  align-items: center;
  padding: 5rem 0;
  border-bottom: 1px solid var(--gray-200);
  gap: 4rem;
}

.solution-row:last-child {
  border-bottom: none;
}
.solution-row.reverse {
  flex-direction: row-reverse;
}

.solution-content {
  flex: 1;
}
.solution-image {
  flex: 1;
}

.solution-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.solution-content h2 {
  font-size: 2.5rem;
  color: var(--primary-red);
  margin-bottom: 1rem; /* Reduced bottom margin to bring subtitle closer */
}

/* New Subtitle Style */
.solution-content .product-subtitle {
  font-size: 1.5rem;
  color: var(--gray-900);
  font-weight: 600;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.solution-content p {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 1rem;
}

@media (max-width: 900px) {
  .solution-row,
  .solution-row.reverse {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  .solution-content h2 {
    font-size: 2rem;
  }
  .solution-image img {
    height: 300px;
  }
}

/* Products Section (Card Grid) */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.product-card {
  background: var(--white);
  padding: 2.5rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.product-card h3 {
  color: var(--primary-red);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 800;
}

.product-card p {
  color: var(--gray-500);
  font-size: 1rem;
}

/* Footer */
.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.product-card .btn {
  margin-top: 1rem;
}

.icon-box svg {
  color: var(--primary-red);
}

.main-footer {
  background-color: var(--gray-900);
  color: var(--white);
  padding: 3rem 0;
  text-align: left;
  font-size: 0.9rem;
}

.main-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  color: var(--white);
  transition: color 0.3s ease;
  display: flex;
}

.social-links a:hover {
  color: var(--primary-red);
}

.social-links svg {
  width: 24px;
  height: 24px;
}

/* CTA Section (Global) */
.cta-section {
  padding: 4rem 0;
  background: var(--primary-red);
  color: var(--white);
  text-align: center;
}

.cta-section h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.btn-white {
  background-color: var(--white);
  color: var(--primary-red);
  padding: 1rem 2.5rem;
  border-radius: 5px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.3s;
  display: inline-block;
}

.btn-white:hover {
  background-color: var(--gray-100);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 0;
}

.mobile-menu-btn .bar {
  width: 25px;
  height: 3px;
  background-color: var(--gray-800);
  margin: 2px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* RESPONSIVE STYLES */
@media (max-width: 900px) {
  /* Header & Navigation */
  .main-header {
    height: 70px;
  }

  .mobile-menu-btn {
    display: flex;
    order: 3; /* Button after actions or logo */
  }

  .header-actions {
    order: 2; /* Lang picker before menu btn */
    margin-right: 1rem;
  }

  .logo img {
    height: 40px !important;
  }

  .main-nav {
    position: fixed;
    top: 70px; /* Header height */
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--white);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 999;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--gray-200);
  }

  .main-nav.active {
    transform: translateX(0);
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    padding: 2rem;
    gap: 1.5rem;
  }

  .main-nav a {
    font-size: 1.25rem;
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
  }

  /* Hamburger Animation when Active */
  .mobile-menu-btn.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .mobile-menu-btn.active .bar:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-btn.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

    /* Hero Slider Mobile */
    .hero-slider-section {
        height: 100vh; /* Full screen height */
        min-height: 100vh;
    }

    .hero-slide {
        position: absolute; /* Restore absolute positioning for crossfade */
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-size: cover !important;
        background-position: center center !important;
        background-attachment: scroll; /* Prevent fixed bg issues on mobile */
    }

    .hero-slide .container {
        padding-top: 2rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
        background: rgba(0,0,0,0.4); /* Asegurar legibilidad */
    }

    .hero-slide h1 {
        font-size: 2rem;
        text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    }

    .hero-slide p {
        font-size: 1rem;
        padding: 0 1rem;
        text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    }

    /* Imágenes de Soluciones/Productos en Móvil */
    .solution-image img {
        height: auto;
        max-height: 250px; /* Evitar que sean demasiado altas */
        width: 100%;
        object-fit: cover;
        aspect-ratio: 16/9; /* Mantener proporción cinematográfica */
    }

    .product-card img {
        height: 200px; /* Mantener consistencia */
        object-fit: cover;
    }

    .slider-btn {
        padding: 0.5rem;
        font-size: 1.2rem;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

  /* Brand Transition */
  .brand-transition {
    padding-top: 3rem;
  }
  .transition-tagline {
    font-size: 1.8rem;
  }

  /* Footer */
  .main-footer .container {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }

  .value-grid {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .hero-slide h1 {
    font-size: 1.8rem;
  }
}


/* Custom Language Selector */
.custom-lang-selector {
    position: relative;
    margin-left: 1.5rem;
    z-index: 1001;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-dark);
    background-color: var(--white);
    font-size: 0.9rem;
}

.lang-btn:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.lang-btn svg {
    transition: transform 0.2s;
    width: 14px;
    height: 14px;
}

.custom-lang-selector.active .lang-btn svg {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    list-style: none;
    width: 150px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    padding: 0.5rem 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1002;
}

.custom-lang-selector.active .lang-dropdown,
.custom-lang-selector:hover .lang-dropdown {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.lang-dropdown li {
    padding: 0.6rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: background 0.1s;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.lang-dropdown li:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.lang-dropdown .flag {
    font-size: 1.2rem;
    line-height: 1;
}

/* Insights Section Styles */
.insights-section {
    padding: 4rem 0;
    background-color: var(--gray-50);
    text-align: center;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.insight-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.insight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.insight-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.insight-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

.insight-value.text-green { color: #10B981; }

.insight-label {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* RESPONSIVE ADJUSTMENTS for Lang Selector */
@media (max-width: 768px) {
    .header-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }

    .logo img {
        height: 40px !important;
    }

    .custom-lang-selector {
        margin-left: auto;
        margin-right: 1.5rem;
        position: static;
    }

    .lang-btn {
        padding: 0.4rem 0.8rem;
        background-color: rgba(255,255,255,0.9);
    }
    
    .lang-btn span#current-lang-label {
        display: none;
    }
    
    .lang-dropdown {
        width: 200px;
        right: 1rem;
        top: 70px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    }

    .mobile-menu-btn {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .custom-lang-selector {
        margin-right: 1rem;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
}
