/*
 Theme Name:   Hello Elementor Child - Transfer Pro Madrid
 Theme URI:    https://transferpromadrid.com
 Description:  Tema hijo estandarizado para Transfer Pro Madrid. Incluye cabecera centralizada, navegación nativa de WordPress y soporte widescreen.
 Author:       Transfer Pro Madrid
 Author URI:   https://transferpromadrid.com
 Template:     hello-elementor
 Version:      1.1.0
 Text Domain:  hello-elementor-child
*/

/* ==========================================================================
   1. VARIABLES DE DISEÑO & TOKENS GLOBALES
   ========================================================================== */
:root {
  --tp-font-family: 'Jost', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Ancho Máximo Estándar (Protección para Pantallas Widescreen / 4K / Ultrawide) */
  --tp-container-max: 1440px;
  
  /* Paleta Cromática de Lujo */
  --tp-black: #0a0a0a;
  --tp-charcoal: #141414;
  --tp-dark-surface: #1a1a1a;
  --tp-white: #ffffff;
  --tp-off-white: #f8f8f9;
  --tp-gray-100: #f4f4f5;
  --tp-gray-200: #e4e4e7;
  --tp-gray-400: #a1a1aa;
  --tp-gray-600: #52525b;
  --tp-gold: #c5a059;
  --tp-gold-hover: #b08d48;
}

body, input, button, select, textarea {
  font-family: var(--tp-font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ocultar cualquier cabecera por defecto de Hello Elementor */
#site-header,
.site-header {
  display: none !important;
}

/* ==========================================================================
   2. CONTENEDOR MAESTRO DE CABECERA
   ========================================================================== */
.tp-theme-header-wrapper {
  width: 100%;
  position: relative;
  z-index: 1000;
  box-sizing: border-box;
}

/* ==========================================================================
   3. BARRA DE NAVEGACIÓN PRINCIPAL
   ========================================================================== */
.tp-main-navbar {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  transition: all 0.3s ease;
  z-index: 999;
  width: 100%;
}

.tp-main-navbar.tp-scrolled {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

/* Contenedor centralizado con límite widescreen */
.tp-nav-container {
  max-width: var(--tp-container-max);
  margin-left: auto;
  margin-right: auto;
  padding: 0 40px;
  height: 90px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  box-sizing: border-box;
}

/* --- MENÚ IZQUIERDO (WordPress wp_nav_menu) --- */
.tp-nav-left {
  display: flex;
  align-items: center;
}

.tp-nav-left ul.tp-menu-list,
.tp-nav-left ul.menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.tp-nav-left li.menu-item,
.tp-nav-left li.tp-menu-item {
  position: relative;
  margin: 0;
  padding: 0;
}

.tp-nav-left a {
  font-family: var(--tp-font-family);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tp-charcoal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  position: relative;
  transition: color 0.25s ease;
}

.tp-nav-left a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--tp-black);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tp-nav-left a:hover::after,
.tp-nav-left li.current-menu-item > a::after {
  width: 100%;
}

.tp-nav-left a:hover {
  color: var(--tp-black);
}

/* Submenús desplegables de WordPress (ul.sub-menu) */
.tp-nav-left ul.sub-menu {
  position: absolute;
  top: 100%;
  left: -16px;
  width: 260px;
  background: var(--tp-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
  padding: 12px 0;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tp-nav-left li.menu-item-has-children:hover > ul.sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tp-nav-left ul.sub-menu a {
  display: block;
  padding: 9px 20px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 500;
  color: var(--tp-charcoal);
}

.tp-nav-left ul.sub-menu a:hover {
  background-color: var(--tp-off-white);
  color: var(--tp-black);
}

.tp-nav-left ul.sub-menu a::after {
  display: none;
}

/* --- LOGO CENTRAL (SÓLO TRANSFER PRO, MÁS GRANDE) --- */
.tp-nav-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.tp-logo {
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: transform 0.25s ease;
}

.tp-logo:hover {
  transform: scale(1.02);
}

.tp-logo-main {
  font-family: var(--tp-font-family);
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--tp-black);
  line-height: 1;
  white-space: nowrap;
  display: block;
  text-transform: uppercase;
}

/* --- ACCIONES DERECHA --- */
.tp-nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

/* Selector de Idioma */
.tp-lang-selector {
  position: relative;
}

.tp-lang-btn {
  background: transparent;
  border: 1px solid var(--tp-gray-200);
  border-radius: 4px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--tp-font-family);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--tp-charcoal);
  transition: all 0.2s ease;
}

.tp-lang-btn:hover {
  border-color: var(--tp-black);
}

.tp-icon-chevron {
  width: 8px;
  height: 5px;
  transition: transform 0.25s ease;
}

.tp-lang-selector.active .tp-icon-chevron {
  transform: rotate(180deg);
}

.tp-lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--tp-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  min-width: 130px;
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.2s ease;
}

.tp-lang-selector.active .tp-lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tp-lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--tp-charcoal);
  transition: background 0.2s ease;
}

.tp-lang-option:hover {
  background: var(--tp-off-white);
}

.tp-lang-option.active {
  font-weight: 700;
  color: var(--tp-black);
}

/* Botón Booking */
.tp-btn-booking {
  background: var(--tp-black);
  color: var(--tp-white);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.tp-btn-booking:hover {
  background: #1f1f1f;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.tp-btn-booking .tp-btn-arrow {
  width: 12px;
  height: 12px;
  transition: transform 0.3s ease;
}

.tp-btn-booking:hover .tp-btn-arrow {
  transform: translateX(3px);
}

/* Botón Hamburguesa Móvil */
.tp-hamburger-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
}

.tp-burger-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--tp-black);
  border-radius: 1px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   4. CAJÓN DE MENÚ MÓVIL (DRAWER)
   ========================================================================== */
.tp-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  visibility: hidden;
  transition: visibility 0.4s ease;
}

.tp-mobile-drawer.open {
  visibility: visible;
}

.tp-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.tp-mobile-drawer.open .tp-drawer-backdrop {
  opacity: 1;
}

.tp-drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 360px;
  height: 100%;
  background: var(--tp-white);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
}

.tp-mobile-drawer.open .tp-drawer-content {
  transform: translateX(0);
}

.tp-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--tp-gray-200);
}

.tp-drawer-close {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--tp-black);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tp-drawer-menu,
.tp-drawer-menu ul {
  list-style: none;
  margin: 0;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tp-drawer-menu a {
  font-family: var(--tp-font-family);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tp-black);
  text-decoration: none;
  display: block;
}

.tp-drawer-footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--tp-gray-200);
}

.tp-drawer-cta-btn {
  background: var(--tp-black);
  color: var(--tp-white);
  text-align: center;
  padding: 14px 20px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
}

/* ==========================================================================
   5. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
  .tp-nav-left {
    display: none;
  }
  .tp-nav-container {
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    height: 70px;
    padding: 0 20px;
  }
  .tp-nav-center {
    justify-content: flex-start;
  }
  .tp-logo-main {
    font-size: 19px;
  }
  .tp-btn-booking {
    display: none;
  }
  .tp-hamburger-btn {
    display: flex;
  }
}
