/* =====================================================================
   bermibusa.eus — Hoja de estilos
   ===================================================================== */
:root {
    --color-primary: #014171;
    --color-primary-dark: #012e52;
    --color-primary-light: #809aad;
    --color-dark: #1c2330;
    --color-text: #222222;
    --color-muted: #809aad;
    --color-bg: #ffffff;
    --color-bg-alt: #f4f6f8;
    --color-border: #e3e7ec;
    --color-white: #ffffff;
    --radius: 4px;
    --shadow: 0 4px 16px rgba(0,0,0,.10);
    --container: 1140px;
    --font: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ---- Reset básico ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--color-dark); line-height: 1.2; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.section { padding: 56px 0; }
.section:nth-child(even) { background: var(--color-bg-alt); }
.text-center { text-align: center; }
.page-title { font-size: 2rem; margin-bottom: 1.5rem; text-align: center; }

/* ---- Skip link accesibilidad ---- */
.skip-link {
    position: absolute; left: -9999px; top: 0; background: var(--color-dark);
    color: #fff; padding: 10px 16px; z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ---- Botones ---- */
.btn {
    display: inline-block; background: var(--color-primary); color: #fff;
    padding: 12px 26px; border-radius: var(--radius); border: 0; cursor: pointer;
    font-size: 1rem; font-weight: 600; text-decoration: none; transition: background .2s;
    text-transform: uppercase; letter-spacing: .5px;
}
.btn:hover { background: var(--color-primary-dark); text-decoration: none; color: #fff; }
.btn-lg { padding: 15px 40px; font-size: 1.1rem; }
.btn-sm { padding: 8px 18px; font-size: .9rem; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.15); color: #fff; }

/* =====================================================================
   HEADER / NAV
   — Logo centrado arriba, nav centrada debajo (igual que el WordPress original)
   ===================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 100; background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 20px 0;
}
.logo { margin-bottom: 10px; }
.logo img { height: 54px; width: auto; margin: 0 auto; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    justify-content: center;
    border-top: 1px solid var(--color-border);
    padding: 0;
}
.nav-list {
    display: flex; list-style: none; margin: 0; padding: 0; gap: 0;
}
.nav-list a {
    display: block;
    color: var(--color-primary-light);
    font-weight: 400;
    font-size: 17px;
    text-transform: uppercase;
    padding: 12px 22px;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: color .2s, border-color .2s;
}
.nav-list a:hover,
.nav-list a.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    text-decoration: none;
}

/* Conmutador de idioma */
.lang-switch { display: flex; gap: 6px; align-items: center; padding: 0 10px; }
.lang-switch .lang {
    display: inline-flex; align-items: center; gap: 4px; font-weight: 700;
    font-size: .8rem; color: var(--color-muted); text-decoration: none; opacity: .7;
    padding: 12px 6px;
}
.lang-switch .lang.active { color: var(--color-primary); opacity: 1; }
.lang-switch .lang:hover { text-decoration: none; opacity: 1; }
.flag { width: 18px; height: 12px; border-radius: 2px; display: inline-block; border: 1px solid rgba(0,0,0,.1); }
.flag-es { background: linear-gradient(to bottom, #c60b1e 0 25%, #ffc400 25% 75%, #c60b1e 75% 100%); }
.flag-eu { background:
    linear-gradient(to bottom right, transparent 45%, #d52b1e 45% 55%, transparent 55%),
    linear-gradient(to bottom left, transparent 45%, #009b48 45% 55%, transparent 55%),
    #fff; }

/* Botón hamburguesa (móvil) */
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; position: absolute; right: 20px; top: 18px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--color-dark); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =====================================================================
   HERO — Slider de fotos con overlay azul semitransparente
   ===================================================================== */
.hero {
    position: relative;
    height: 480px;
    overflow: hidden;
}
.hero-slides {
    position: absolute; inset: 0;
}
.hero-slide {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
    position: absolute; inset: 0;
    background: rgba(1, 65, 113, 0.55);
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    z-index: 1;
}
.hero-overlay h1 {
    color: #fff;
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(0,0,0,.3);
    max-width: 20ch;
    margin: 0;
}

/* ---- Sección con fondo azul (igual que en el original) ---- */
.section-blue {
    background: var(--color-primary) !important;
    color: #fff;
}
.section-blue h2,
.section-blue h3,
.section-blue p { color: #fff; }

/* ---- App ---- */
.app-section { text-align: center; background: var(--color-primary) !important; }
.app-section h2 { font-size: 1.9rem; color: #fff; }
.app-section .lead { color: rgba(255,255,255,.85); font-size: 1.1rem; margin-bottom: 2rem; }
.app-grid { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; }
.app-card h3 { font-size: 1rem; margin-bottom: 1rem; letter-spacing: .5px; color: #fff; }
.app-card img { width: 150px; margin: 0 auto; transition: transform .2s; }
.app-card a:hover img { transform: translateY(-4px); }

/* ---- Banner teléfono ---- */
.phone-section { background: var(--color-primary-light) !important; }
.phone-banner {
    color: #fff; text-align: center; font-size: 1.1rem; font-weight: 700;
    margin: 0; text-transform: uppercase; letter-spacing: .5px;
}

/* ---- COVID ---- */
.covid-section { text-align: center; }
.covid-list { list-style: none; padding: 0; margin: 1.5rem auto 0; max-width: 800px; display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.covid-list li {
    background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
    padding: 18px 24px; display: flex; align-items: center; gap: 12px;
    flex: 1 1 200px; max-width: 260px; justify-content: center;
}
.covid-list li::before {
    content: "✓"; color: var(--color-primary); font-weight: 700; font-size: 1.2rem; flex-shrink: 0;
}

/* =====================================================================
   LÍNEAS
   ===================================================================== */
.schedule { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-bottom: 2.5rem; }
.schedule-block {
    background: var(--color-primary); color: #fff; border-radius: var(--radius);
    padding: 20px 30px; text-align: center; min-width: 240px;
}
.schedule-block h2 { color: #fff; font-size: 1.2rem; margin: 0 0 .4rem; }
.schedule-block p { margin: 0; font-weight: 600; }

.stops { list-style: none; padding: 0; margin: 0 0 2.5rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stop {
    display: flex; gap: 12px; align-items: flex-start; background: #fff;
    border: 1px solid var(--color-border); border-radius: var(--radius); padding: 12px 16px;
}
.stop-num {
    flex-shrink: 0; background: var(--color-primary); color: #fff; font-weight: 700;
    font-size: .8rem; padding: 4px 10px; border-radius: 20px; white-space: nowrap;
}
.stop-name { color: var(--color-text); }
.line-map { margin: 0; text-align: center; }
.line-map img { margin: 0 auto; border-radius: var(--radius); box-shadow: var(--shadow); }

/* =====================================================================
   TIEMPO DE ESPERA
   ===================================================================== */
.tiempo-section { text-align: center; }
.tiempo-img img { max-width: 320px; margin: 0 auto 1.5rem; }
.tiempo-section .subtitle { font-size: 1.3rem; color: var(--color-primary); margin-top: .5rem; }
.realtime-frame { margin-top: 1.5rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

/* =====================================================================
   FORMULARIO
   ===================================================================== */
.form-intro { background: var(--color-bg-alt); border-left: 4px solid var(--color-primary); padding: 14px 18px; border-radius: var(--radius); font-weight: 500; }
.form-phones { text-align: center; color: var(--color-muted); }
.form { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin-top: 1.5rem; }
.field { margin-bottom: 18px; border: 0; padding: 0; }
.field > label, .field > legend { display: block; font-weight: 600; margin-bottom: 6px; padding: 0; }
.field input[type="text"], .field input[type="email"], .field textarea {
    width: 100%; padding: 11px 14px; border: 1px solid var(--color-border);
    border-radius: var(--radius); font-size: 1rem; font-family: inherit; background: #fff;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--color-primary); border-color: var(--color-primary); }
.field textarea { resize: vertical; }
.radio, .checkbox { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin-right: 22px; cursor: pointer; }
.checkbox-field { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.privacy-link { font-size: .9rem; }
.req { color: var(--color-primary); }
.form-note { font-size: .85rem; color: var(--color-muted); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 1.2rem; font-weight: 600; }
.alert-success { background: #e6f6ec; color: #1b7a3d; border: 1px solid #b7e2c6; }
.alert-error { background: #fdecec; color: #b3261e; border: 1px solid #f3c2bf; }

/* =====================================================================
   PÁGINAS LEGALES
   ===================================================================== */
.legal-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 2rem; }
.legal-tabs a {
    padding: 9px 16px; border: 1px solid var(--color-border); border-radius: 20px;
    font-size: .82rem; font-weight: 600; color: var(--color-muted); text-decoration: none;
    text-transform: uppercase;
}
.legal-tabs a.active, .legal-tabs a:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.legal-content h3 { margin-top: 1.8rem; font-size: 1.2rem; }
.legal-content p, .legal-content li { color: var(--color-text); }
.legal-content ul { padding-left: 1.2rem; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer { background: var(--color-primary); color: rgba(255,255,255,.85); margin-top: 0; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 40px; padding: 50px 20px; }
.footer-brand img { height: 54px; }
.footer-title { color: #fff; font-size: 1rem; font-weight: 700; margin: 0 0 .8rem; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 .4rem; }
.footer-map iframe { border-radius: var(--radius); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.15); }
.footer-bottom-inner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 16px 20px; }
.copyright { margin: 0; font-size: .9rem; color: rgba(255,255,255,.7); }
.footer-legal { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; }
.footer-legal a { font-size: .85rem; color: rgba(255,255,255,.7); }
.footer-legal a:hover { color: #fff; }

/* =====================================================================
   BANNER DE COOKIES
   — Ancho completo en la parte inferior, estilo azul oscuro
   ===================================================================== */
.cookie-banner {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
    background: #014171;
    color: #fff;
    padding: 14px 24px;
    display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center;
    text-align: center;
}
.cookie-banner p { margin: 0; font-size: .9rem; color: #fff; flex: 1 1 400px; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-banner .btn { background: #fff; color: var(--color-primary); }
.cookie-banner .btn:hover { background: #e8f0f7; }
.cookie-banner .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.cookie-banner .btn-ghost:hover { background: rgba(255,255,255,.1); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 860px) {
    .footer-inner { grid-template-columns: 1fr; gap: 28px; text-align: left; }
    .stops { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .header-inner { position: relative; padding-bottom: 0; }
    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed; inset: auto 0 auto 0; top: 110px;
        background: #fff; flex-direction: column;
        align-items: stretch; gap: 0; padding: 10px 0;
        box-shadow: 0 8px 20px rgba(0,0,0,.12);
        transform: translateY(-200%); transition: transform .28s ease;
        max-height: calc(100vh - 110px); overflow: auto;
        border-top: none;
    }
    .main-nav.open { transform: translateY(0); }
    .nav-list { flex-direction: column; gap: 0; }
    .nav-list a { display: block; padding: 14px 24px; border-bottom: 1px solid var(--color-border); border-right: none; }
    .lang-switch { padding: 14px 24px; }
}
