/* ========================================
   COUNTRY LANDING PAGES - ESTILOS ESPECIFICOS
   Corrige contraste y asegura consistencia visual
   ======================================== */

/* Reset de colores para secciones con fondo azul */
.country-landing-page .hero-section,
.country-landing-page section[style*="linear-gradient"] {
  color: #ffffff !important;
}

.country-landing-page .hero-section h1,
.country-landing-page .hero-section h2,
.country-landing-page .hero-section p,
.country-landing-page section[style*="linear-gradient"] h1,
.country-landing-page section[style*="linear-gradient"] h2,
.country-landing-page section[style*="linear-gradient"] p {
  color: #ffffff !important;
}

/* Hero section - garantizar texto blanco */
.country-landing-page .hero-section * {
  color: inherit;
}

/* CTA buttons en hero - mantener contraste */
.country-landing-page .hero-section .btn-primary,
.country-landing-page .hero-section a[style*="background: white"] {
  color: #1e3a8a !important;
  background-color: #ffffff !important;
}

/* Secciones con fondo claro - texto oscuro */
.country-landing-page section[style*="background: #f9fafb"] h2,
.country-landing-page section[style*="background: white"] h2 {
  color: #1e3a8a;
}

.country-landing-page section[style*="background: #f9fafb"] p,
.country-landing-page section[style*="background: white"] p {
  color: #374151;
}

/* Cards de rutas */
.country-landing-page .route-card {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.country-landing-page .route-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Widget TravelPayouts */
.country-landing-page .tp-widget-container {
  margin: 40px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Breadcrumbs */
.country-landing-page nav[aria-label="breadcrumb"] {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.country-landing-page nav[aria-label="breadcrumb"] a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s ease;
}

.country-landing-page nav[aria-label="breadcrumb"] a:hover {
  color: #1e3a8a;
  text-decoration: underline;
}

/* FAQ section */
.country-landing-page .faq-section {
  background: #ffffff;
  padding: 60px 20px;
}

.country-landing-page .faq-section h2 {
  color: #1e3a8a;
  text-align: center;
  margin-bottom: 40px;
}

/* Selector de idioma flotante */
.country-landing-lang-selector {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.country-landing-lang-selector a {
  background: #1e3a8a;
  color: #ffffff !important;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.country-landing-lang-selector a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.4);
}

/* CTA final section */
.country-landing-page section[style*="linear-gradient"]:last-of-type {
  color: #ffffff !important;
}

.country-landing-page section[style*="linear-gradient"]:last-of-type h2 {
  color: #ffffff !important;
  font-weight: 700;
}

.country-landing-page section[style*="linear-gradient"]:last-of-type a {
  background: #ffffff !important;
  color: #1e3a8a !important;
}

/* Responsive */
@media (max-width: 768px) {
  .country-landing-page .hero-section {
    padding: 60px 16px;
  }

  .country-landing-page .hero-section h1 {
    font-size: 1.75rem;
  }

  .country-landing-lang-selector {
    bottom: 10px;
    right: 10px;
  }

  .country-landing-lang-selector a {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}

/* ========================================
   CTA BUSCAR VUELOS - Boton global
   ======================================== */
.btn-search-flights-cta {
  display: inline-block;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white !important;
  padding: 18px 48px;
  border-radius: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-search-flights-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
}

/* ========================================
   DESTINOS RECOMENDADOS - Cards con imagenes
   ======================================== */
#destinos-recomendados img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

#destinos-recomendados > div > div > div:hover img {
  transform: scale(1.05);
}

/* ========================================
   RESPONSIVE ADICIONAL
   ======================================== */
@media (max-width: 768px) {
  .btn-search-flights-cta {
    padding: 14px 32px;
    font-size: 1.1rem;
  }

  #destinos-recomendados > div > div {
    grid-template-columns: 1fr !important;
  }

  .hotel-search-section-clp {
    padding: 40px 16px !important;
  }
}

@media (max-width: 480px) {
  .btn-search-flights-cta {
    padding: 12px 24px;
    font-size: 1rem;
    width: 90%;
    text-align: center;
  }
}

/* ========================================
   STICKY CTA MOBILE
   ======================================== */
.sticky-cta-mobile {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Ocultar sticky en desktop */
@media (min-width: 768px) {
  .sticky-cta-mobile {
    display: none !important;
  }
}

/* Ajustar lang-selector cuando sticky esta visible */
@media (max-width: 767px) {
  .country-landing-lang-selector {
    bottom: 80px !important;
  }
}

/* ========================================
   WHY CHOOSE SECTION
   ======================================== */
#why-choose-rd {
  border-bottom: 1px solid #fcd34d;
}

#why-choose-rd > div > div > div {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#why-choose-rd > div > div > div:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ========================================
   INTERNAL LINKS SECTION
   ======================================== */
.internal-links-section a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.internal-links-section a:hover {
  color: #1e40af;
  transform: translateX(4px);
}

/* WCAG AA Compliance - Contraste minimo 4.5:1 */
/* Blanco #fff sobre Azul #1e3a8a = ratio 8.59:1 (AAA) */
/* Azul #1e3a8a sobre Blanco #fff = ratio 8.59:1 (AAA) */

/* ========================================
   TRAVEL TIPS ACCORDION - Optimizaciones
   ======================================== */
.travel-tips-accordion {
    scroll-margin-top: 80px;
}

.travel-tips-accordion summary {
    cursor: pointer;
}

.travel-tips-accordion summary::-webkit-details-marker {
    display: none;
}

.travel-tips-accordion details[open] .accordion-icon {
    transform: rotate(180deg);
}

/* ========================================
   CAR RENTAL SECTION - Ajustes adicionales
   ======================================== */
.car-rental-section-clp {
    scroll-margin-top: 80px;
}

/* Asegurar que el fondo azul mantenga contraste */
.car-rental-section-clp h2,
.car-rental-section-clp p {
    color: #ffffff !important;
}

.car-rental-section-clp .car-rental-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ========================================
   MOBILE OPTIMIZATIONS - Global
   ======================================== */
@media (max-width: 768px) {
    /* Tipografia minima legible */
    .country-landing-page {
        font-size: 16px;
    }

    .country-landing-page p,
    .country-landing-page li {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* Touch targets minimos 48px */
    .country-landing-page a,
    .country-landing-page button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Reducir padding en secciones */
    .country-landing-page section {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Cards mas compactas */
    .country-landing-page .tip-card,
    .country-landing-page .route-card {
        padding: 16px !important;
    }
}

@media (max-width: 480px) {
    /* Headings mas pequenos en movil */
    .country-landing-page h2 {
        font-size: 1.35rem !important;
    }

    .country-landing-page h3 {
        font-size: 1.1rem !important;
    }

    /* Espaciado mas compacto */
    .country-landing-page section {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }
}
