/* ============================================================
   BILMAN BUS - CUSTOM THEME IMPROVEMENTS
   Header, Footer, Forms, and Global Styles
   ============================================================ */

/* === Rescatar estilos de WP === */
:root {
  --color-primary: #5d0049;
  --color-accent: #b60e82;
  --transition-speed: 0.3s;
}

/* === Global Reset & Focus === */
*:focus, *:active, *:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

input, select, textarea, button, a {
  outline: none !important;
}

::-moz-focus-inner {
  border: 0;
}

body {
  background-color: #f5f5f5;
  color: #575756;
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
}

/* === GLOBAL LAYOUT FOR INTERNAL PAGES === */
.inner-page-content {
    background: transparent;
    padding: 60px 0 40px;
    min-height: 400px;
}

.main-container {
    max-width: 1100px;
    margin: 40px auto 0;
    background: #ffffff;
    padding: 50px 70px 30px;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -5px 30px rgba(0,0,0,0.03), 10px 0 30px rgba(0,0,0,0.03), -10px 0 30px rgba(0,0,0,0.03);
    position: relative;
    z-index: 10;
}

.footer-assets {
    max-width: 1100px;
    margin: -1px auto 60px;
    background: #ffffff;
    padding: 30px 70px 60px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.03); /* Unión casi invisible */
    position: relative;
    z-index: 5;
}

.footer-assets .footer-main-img {
    max-width: 100%;
    height: auto;
    margin: 10px 0 50px;
    display: block;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.footer-assets .footer-logo {
    max-width: 200px;
    margin: 0 auto 35px !important;
    display: block;
    opacity: 0.8;
}

.footer-assets .btn.blue-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 45px !important;
    padding: 0 60px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    letter-spacing: 1px;
    background: #5D004A !important;
    color: #fff !important;
    text-shadow: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    margin: 0 auto !important;
    width: fit-content !important;
}

/* === Column spacing for iframe === */
.columns {
    display: flex;
    gap: 30px;
}

.column.is-4 {
    flex: 0 0 420px; /* Ancho perfecto para el buscador */
}

.column.is-8 {
    flex: 1;
}

@media screen and (max-width: 1024px) {
    .columns {
        flex-direction: column;
        align-items: center;
    }
    .column.is-4 {
        flex: 1;
        width: 100%;
        max-width: 500px;
        margin-bottom: 30px;
    }
}

/* === Header Refinement === */
.header.fullwidth {
  background: transparent;
  min-height: auto;
  position: relative;
  z-index: 100;
}

.header .header-top {
  background: #ffffff;
  padding: 20px 0 25px 0 !important; /* Reducido de 30px/35px para un look más ajustado */
  border-bottom: none;
  position: relative;
  z-index: 110;
}

/* === HOME PAGE SPECIFIC HEADER === */
.home .header.fullwidth {
  position: relative;
  z-index: 100;
  background-image: url('../../images/bg-header.jpg') !important;
  background-size: cover !important;
  background-position: center 0 !important;
  background-repeat: no-repeat !important;
  min-height: 100vh; /* Restaurado a pantalla completa para eliminar el espacio blanco */
}

.home .header .header-top {
  position: relative;
  background: transparent !important;
  z-index: 1000;
}

.home .navigation.fullwidth {
  position: relative;
  background: rgba(0, 0, 0, 0.6) !important;
  z-index: 1000;
}

.home .page-content {
  margin-top: 0;
  padding-top: 60px;
}
.header .header-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.header .header-top .logo {
  max-width: 280px;
  height: auto;
  margin: 0;
  display: block;
}

/* Lang links above buttons */
.lang-link {
  display: flex;
  gap: 0;
  margin: 0; 
  padding: 0;
  font-size: 12px; /* Aumentado de 11px */
  text-transform: uppercase;
  align-items: center;
  font-family: 'Open Sans', sans-serif;
  color: #5d0049 !important;
}

.header .header-top .top-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px; /* Elementos más juntos arriba */
  padding: 0;
  margin: 0;
}

@media screen and (min-width: 1024px) {
  .header .header-top .top-nav {
    top: 0;
  }
}

.lang-link a:hover {
  text-decoration: underline;
}

.lang-link .sep {
  color: #5d0049;
  font-size: 11px;
  font-weight: 300;
  margin: 0 2px; /* Aún más compacto para que parezca una sola línea */
}

.header .header-top .top-nav .btn {
  background: #5d0049 !important;
  color: #fff !important;
  margin-bottom: 6px;
  width: 160px; /* Aumentado de 150px */
  height: 36px; /* Aumentado de 32px */
  margin-top: 5px;
  line-height: 36px;
  font-size: 15px; /* Aumentado de 14px */
  font-weight: 700;
  margin-left: auto;
  display: block;
  margin-right: 0;
  border-radius: 50px;
  text-transform: uppercase;
  text-align: center;
  transition: all 0.3s ease;
  border: none !important;
  padding: 0;
}

.header .header-top .top-nav .btn:hover {
  background: #7a0060 !important; /* Cambio sutil al pasar el ratón */
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.header .header-top .top-nav .btn:hover {
  background: #000;
}

/* === BUTTON COLORS FIX === */
.btn, 
button, 
input[type="button"], 
input[type="submit"],
.ticket .btn,
.gform_button,
.blue-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #5d0049 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 50px !important;
  height: 45px !important;
  padding: 0 20px !important;
  white-space: nowrap !important;
  text-align: center !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  transition: all 0.3s !important;
  text-shadow: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.btn:hover, 
button:hover,
.gform_button:hover {
  background: #000 !important;
}

/* === CARD & CONTENT FIX === */
.home-card {
  display: flex;
  justify-content: center;
  background: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1) !important;
  padding: 20px !important;
  margin-bottom: 40px !important;
}

h1, h2, h3 {
  color: #5d0049 !important;
  font-weight: 400 !important;
}

.page-content {
  background: #fff;
  color: #575756;
}

.header .header-top .top-nav .menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header .header-top .top-nav .menu li {
  margin-left: 0;
  padding: 0 12px; /* Un poco más de aire */
  border-left: 1px solid #5d0049;
  border-right: none !important;
  font-size: 15px; /* Aumentado de 14px */
  line-height: 1;
  display: inline-block;
}

.header .header-top .top-nav .menu li a {
  color: #5d0049;
  font-weight: 400;
  text-decoration: none;
}

.header .header-top .top-nav .menu li:first-child {
  border-left: none !important;
  padding-left: 0;
}

.header .header-top .top-nav .menu li:first-child {
  border-left: none;
}

.header .header-top .top-nav .menu li a {
  color: #5d0049;
  text-decoration: none;
  font-weight: 400;
}

/* Main Navigation (Dark semi-transparent Bar as in WP) */
.navigation.fullwidth {
  background: rgba(0, 0, 0, 0.6) !important; /* Más oscuro para legibilidad como en WP */
  padding: 0;
  position: relative;
  width: 100%;
  z-index: 90;
}

.navigation .container {
  max-width: 1300px; /* Slightly wider */
  margin: 0 auto;
}

.navigation #menu-main-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center; /* Centrado por petición del usuario */
}

.navigation #menu-main-menu > li {
  position: relative;
}

.navigation #menu-main-menu > li > a {
  color: #ffffff;
  padding: 16px 28px !important; /* Aumentado ligeramente más */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: auto !important;
  line-height: normal !important;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 0.5px; /* Añadido para un look más refinado */
  text-decoration: none;
  transition: all 0.3s ease;
}

.navigation #menu-main-menu > li.current-menu-item > a {
  background: #000;
}

.navigation #menu-main-menu > li {
  display: flex;
}

.navigation #menu-main-menu > li:hover > a,
.navigation #menu-main-menu > li.current-menu-item > a {
  background: #000000 !important;
  color: #fff !important;
}

.navigation #menu-main-menu > li.current-menu-item {
    background: #000;
}

/* Submenus */
.navigation .sub-menu {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 100% !important; /* Asegurar que empieza justo al final del li */
  left: 0;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  min-width: 280px;
  z-index: 999;
  padding: 0; /* Eliminado padding general para controlar mejor los bordes */
  border-radius: 0 0 6px 6px;
  transform: translateY(0); /* Eliminamos el desplazamiento hacia abajo que causaba lejanía */
  transition: all 0.2s ease;
  margin-top: -1px; /* Pegarlo un poco más arriba para evitar el hueco */
}

.navigation li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
}

.navigation .sub-menu li a {
  color: #5d0049;
  padding: 12px 25px;
  display: block;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  text-decoration: none;
  transition: all 0.2s ease;
}

.navigation .sub-menu li:last-child a {
  border-bottom: none;
}

.navigation .sub-menu li a:hover {
  background: #fcf1f9;
  color: #b60e82;
  padding-left: 28px;
}

/* Specific adjustment for the purple bar background to look like it's over the hero */
@media screen and (min-width: 1024px) {
  .inner-page-content {
    margin-top: 0;
  }
}

/* === Contact Form Refinement (Gravity Forms clone) === */
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper select,
.gform_wrapper textarea {
  font-size: 14px;
  height: 40px;
  line-height: normal;
  padding: 0 15px;
  width: 100%;
  display: block;
  color: #000000;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 8px;
  -webkit-box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.08);
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  transition: box-shadow var(--transition-speed);
}

.gform_wrapper textarea {
  height: 120px;
  padding-top: 10px;
}

.gform_wrapper input[type="submit"] {
  background: #5d0049;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 10px 40px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: block;
  margin-left: auto;
  transition: background var(--transition-speed);
}

.gform_wrapper input[type="submit"]:hover {
  background: #000000;
}

/* === Footer Styling (WP Purple Version) === */
.footer.fullwidth {
  background: #5d0049 !important;
  padding: 40px 0 20px 0 !important;
  margin-top: 0 !important;
  color: #ffffff !important;
  border: none !important;
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer .ftop {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  padding-bottom: 15px;
  border-bottom: none !important;
  margin-bottom: 10px;
}

.footer-widget h3 {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
  margin-bottom: 15px !important;
  letter-spacing: 1.5px !important;
}

.footer-widget a {
  display: block;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 13px !important;
  margin-bottom: 4px !important;
  opacity: 1 !important;
  transition: opacity 0.3s;
}

.footer-widget a:hover {
  opacity: 1 !important;
  text-decoration: underline !important;
}

.footer .fmiddle {
  text-align: center;
  padding: 15px 20px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
  background: transparent !important;
}

.footer .fmiddle img.footer-ayudas {
  max-width: 800px; /* Slightly wider */
  height: auto;
  margin: 0 auto 15px auto;
  display: block;
}

.footer .fmiddle small {
  display: block;
  font-size: 10px !important;
  line-height: 1.5;
  color: #ffffff !important;
  opacity: 0.6 !important;
  max-width: 800px;
  margin: 0 auto;
}

.footer .fbottom {
  padding: 20px 0 10px 0 !important;
  background: transparent !important;
  border-top: none !important; /* redundant since fmiddle has border-bottom */
}

.footer .fbottom .columns {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap !important;
  gap: 20px;
}

.footer-nav ul {
  display: block;
  text-align: left;
  list-style: none !important;
  padding: 0;
  margin: 0;
  line-height: 2 !important;
}

.footer-nav ul li {
  display: inline;
}

.footer-nav ul li:after {
  content: " / ";
  white-space: pre;
  color: #ffffff;
  opacity: 0.8 !important;
  font-size: 11px;
}

.footer-nav ul li:last-child:after {
  content: "";
}

.footer-nav ul li a {
  font-size: 11px !important;
  color: #ffffff !important;
  text-decoration: none !important;
  opacity: 1 !important;
}

.footer-nav ul li a:hover {
  opacity: 1 !important;
}

.footer-logo {
  width: 180px;
  max-width: 180px !important;
  height: auto;
  display: block;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .footer .ftop {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .footer .ftop {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-nav ul {
    text-align: center;
  }
  .footer .fbottom .columns {
    flex-wrap: wrap !important;
    justify-content: center;
  }
}

/* === HAMBURGER MENU === */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
}

.hamburger .line {
  width: 100%;
  height: 3px;
  background-color: #5d0049;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active .line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active .line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  overflow-y: auto;
  padding: 80px 20px 20px;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu ul.menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu ul.menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu ul.menu li a {
  display: block;
  color: #fff;
  padding: 15px 10px;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.3s;
}

.mobile-menu ul.menu li a:hover {
  background: rgba(93, 0, 73, 0.5);
}

/* Show hamburger on mobile */
@media (max-width: 1023px) {
  .header .header-top .top-nav ul.menu {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .navigation {
    display: none !important;
  }
}

/* === WP HOME LAYOUT === */
.split { display: flex; gap: 40px; width: 100%; max-width: 1200px; align-items: flex-start; }
.column { flex: 1; padding: 20px; }
.left { flex: 1; }
.right { flex: 1; display: flex; align-items: center; justify-content: center; }
.ticket { margin-top: 20px; }
.right img { max-width: 100%; height: auto; border-radius: 8px; }
.btn.blue-btn { background: #5d0049 !important; color: white !important; }
.btn.blue-btn:hover { background: #000 !important; }
@media (max-width: 768px) { .split { flex-direction: column; } .ticket { margin-bottom: 20px; } }

