/* ============================================================
   FRONTEND · CEEISCASTELAR PARKING
   Vanilla CSS · 2026
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --primary:       #003087;
    --primary-dark:  #001f5c;
    --primary-light: #e8f0fe;
    --accent:        #e8a000;
    --accent-dark:   #c47f00;
    --danger:        #c62828;
    --success:       #2e7d32;
    --bg:            #f8f9fc;
    --white:         #ffffff;
    --text:          #1a1a2e;
    --text-muted:    #6c757d;
    --border:        #dee2e6;
    --radius:        10px;
    --shadow:        0 4px 24px rgba(0,48,135,.10);
    --font:          'Segoe UI', system-ui, -apple-system, sans-serif;
    --header-h:      72px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Tipografía ─────────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; color: var(--primary-dark); }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
p  { line-height: 1.7; }

/* ── Contenedor ─────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ── Botones ─────────────────────────────────────────────────  */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .7rem 1.6rem;
    border: none;
    border-radius: 50px;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    text-decoration: none;
    white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-dark); color: #fff; box-shadow: 0 4px 12px rgba(0,48,135,.25); }
.btn-accent   { background: var(--accent);  color: #fff; }
.btn-accent:hover   { background: var(--accent-dark); color: #fff; }
.btn-outline  { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover  { background: var(--primary); color: #fff; }
.btn-white    { background: #fff; color: var(--primary); font-weight: 700; }
.btn-white:hover    { background: var(--primary-light); }
.btn-sm { padding: .45rem 1rem; font-size: .85rem; }
.btn-lg { padding: .9rem 2.2rem; font-size: 1.05rem; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
    background: var(--primary-dark);
    position: sticky;
    top: 0;
    z-index: 300;
    box-shadow: 0 2px 12px rgba(0,0,0,.20);
}
.site-header .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 1rem;
}
.logo-wrap {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.logo-wrap img {
    height: 44px;
    filter: brightness(0) invert(1);
}
.logo-text {
    color: #fff;
    line-height: 1.2;
}
.logo-text strong { display: block; font-size: 1.1rem; }
.logo-text small  { font-size: .75rem; opacity: .75; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.site-nav a {
    color: rgba(255,255,255,.85);
    font-size: .9rem;
    font-weight: 500;
    transition: color .2s;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a.active { color: var(--accent); }

.header-contact {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255,255,255,.8);
    font-size: .85rem;
}
.header-contact a { color: var(--accent); font-weight: 600; }
.header-contact a:hover { color: #fff; }

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    padding: .25rem;
}

/* ── Slider Hero ─────────────────────────────────────────────── */
.hero-slider {
    position: relative;
    overflow: hidden;
    background: var(--primary-dark);
    min-height: 783px;
    display: flex;
    align-items: center;
}
.slider-track {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity .7s ease;
    pointer-events: none;
}
.slide.active {
    opacity: 1;
    pointer-events: auto;
}
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(.55);
}
.slide-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.25rem;
}
.slide-content {
    color: #fff;
    max-width: 700px;
}
.slide-content .badge-pill {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    padding: .3rem .9rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.slide-content h1 {
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.slide-content p {
    font-size: 1.1rem;
    opacity: .9;
    margin-bottom: 2rem;
}
.slider-dots {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: .5rem;
    z-index: 10;
}
.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,.45);
    border: none;
    cursor: pointer;
    transition: background .2s, transform .2s;
    padding: 0;
}
.slider-dot.active {
    background: var(--accent);
    transform: scale(1.3);
}
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    font-size: 1.4rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background .2s;
}
.slider-arrow:hover { background: rgba(255,255,255,.3); }
.slider-arrow.prev  { left: 1.2rem; }
.slider-arrow.next  { right: 1.2rem; }

/* Fallback sin imagen */
.hero-simple {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #004abf 100%);
    padding: 5rem 0;
    text-align: center;
    color: #fff;
}
.hero-simple h1 { color: #fff; margin-bottom: 1rem; }
.hero-simple p  { font-size: 1.1rem; opacity: .9; margin-bottom: 2rem; }

/* ── Aviso campaña ───────────────────────────────────────────── */
.campana-banner {
    background: var(--accent);
    color: #fff;
    text-align: center;
    padding: .75rem 1rem;
    font-weight: 600;
    font-size: .95rem;
}
.campana-banner a { color: #fff; text-decoration: underline; }

/* ── Secciones genéricas ─────────────────────────────────────── */
section { padding: 4rem 0; }
section.bg-white   { background: var(--white); }
section.bg-light   { background: var(--bg); }
section.bg-primary { background: var(--primary-dark); color: #fff; }
section.bg-primary h2, section.bg-primary h3 { color: #fff; }

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header .eyebrow {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent);
    margin-bottom: .5rem;
}
.section-header h2 { margin-bottom: .75rem; }
.section-header p  { color: var(--text-muted); max-width: 560px; margin: 0 auto; }

/* ── Parkings grid ───────────────────────────────────────────── */
.parkings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.parking-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .25s, box-shadow .25s;
}
.parking-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 36px rgba(0,48,135,.15);
}
.parking-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.parking-card-img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, #1565c0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255,255,255,.5);
}
.parking-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.parking-card h3 {
    font-size: 1.05rem;
    margin-bottom: .5rem;
    color: var(--primary-dark);
}
.parking-card p {
    font-size: .88rem;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.parking-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: auto;
}
.parking-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}
.parking-price span { font-size: .85rem; font-weight: 400; color: var(--text-muted); }

.badge-agotado {
    display: inline-block;
    background: var(--danger);
    color: #fff;
    padding: .25rem .75rem;
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-disponible {
    display: inline-block;
    background: var(--success);
    color: #fff;
    padding: .25rem .75rem;
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 700;
}
.parking-plazas {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: .3rem;
}

/* ── Servicios ───────────────────────────────────────────────── */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.servicio-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform .25s;
}
.servicio-item:hover { transform: translateY(-3px); }
.servicio-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 3px solid var(--primary-light);
}
.servicio-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1rem;
}
.servicio-item h3 {
    font-size: 1.05rem;
    margin-bottom: .6rem;
    color: var(--primary-dark);
}
.servicio-item p {
    color: var(--text-muted);
    font-size: .88rem;
    line-height: 1.6;
}

/* ── Formulario de contacto / aviso ──────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}
.form-section {
    max-width: 600px;
    margin: 0 auto;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: 1rem;
}
.form-group.full { grid-column: 1 / -1; }
.form-group label {
    font-size: .875rem;
    font-weight: 600;
    color: var(--text);
}
.form-control {
    padding: .65rem .9rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: .95rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,48,135,.12);
}
textarea.form-control { resize: vertical; min-height: 110px; }
.form-hint { font-size: .78rem; color: var(--text-muted); }
.form-msg  { margin-top: .75rem; padding: .75rem 1rem; border-radius: 8px; font-size: .9rem; }
.form-msg.ok  { background: #e8f5e9; color: var(--success); }
.form-msg.err { background: #ffebee; color: var(--danger); }
.form-check {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.form-check input { margin-top: .2rem; flex-shrink: 0; }
.form-check a { color: var(--primary); }

/* ── Aviso disponibilidad ─────────────────────────────────────── */
.aviso-box {
    background: var(--primary-light);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}
.aviso-box h3 { color: var(--primary); margin-bottom: .75rem; }
.aviso-box p  { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ── Detalle parking ─────────────────────────────────────────── */
.parking-detail {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}
.park-img-main {
    width: 100%;
    border-radius: var(--radius);
    aspect-ratio: 16/9;
    object-fit: cover;
    box-shadow: var(--shadow);
}
.park-info-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: calc(var(--header-h) + 1rem);
}
.park-price {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: .25rem;
}
.park-price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.park-meta {
    list-style: none;
    margin: 1rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.park-meta li {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .9rem;
    color: var(--text-muted);
}
.park-meta li strong { color: var(--text); }
.park-meta .icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── Barra periodo bono ───────────────────────────────────────── */
.bono-periodo {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    border-radius: 0 8px 8px 0;
    padding: .85rem 1rem;
    margin: 1rem 0;
    font-size: .9rem;
}
.bono-periodo strong { color: var(--primary-dark); }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,.75);
    padding: 3rem 0 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-brand img {
    height: 40px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}
.footer-brand p {
    font-size: .875rem;
    line-height: 1.6;
    max-width: 300px;
}
.footer-col h4 {
    color: #fff;
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.footer-col ul li {
    margin-bottom: .5rem;
}
.footer-col ul li a {
    color: rgba(255,255,255,.65);
    font-size: .875rem;
    transition: color .2s;
}
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .82rem;
    color: rgba(255,255,255,.5);
}
.footer-bottom a { color: rgba(255,255,255,.6); }
.footer-bottom a:hover { color: var(--accent); }

/* ── Cookie banner ───────────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    color: rgba(255,255,255,.9);
    padding: 1.25rem 1.5rem;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 -4px 24px rgba(0,0,0,.2);
    animation: slideUp .4s ease;
}
.cookie-banner p { font-size: .87rem; flex: 1; min-width: 200px; }
.cookie-banner a { color: var(--accent); }
.cookie-btns { display: flex; gap: .6rem; flex-shrink: 0; }
@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* ── Texto legal (política, aviso legal…) ────────────────────── */
.legal-content {
    max-width: 820px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    line-height: 1.8;
}
.legal-content h2 { margin: 2rem 0 .75rem; color: var(--primary); }
.legal-content h3 { margin: 1.5rem 0 .5rem; }
.legal-content p  { margin-bottom: 1rem; color: var(--text-muted); }
.legal-content ul { margin: 0 0 1rem 1.5rem; list-style: disc; color: var(--text-muted); }

/* ── Utilidades ──────────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }
.d-flex { display: flex; align-items: center; gap: .75rem; }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }

/* ── Accesibilidad ───────────────────────────────────────────── */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 960px) {
    .parking-detail {
        grid-template-columns: 1fr;
    }
    .park-info-card { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    :root { --header-h: 60px; }
    .site-nav { display: none; position: fixed; top: 60px; left: 0; right: 0; background: var(--primary-dark); flex-direction: column; align-items: flex-start; padding: 1rem 1.25rem; gap: .75rem; border-top: 1px solid rgba(255,255,255,.1); }
    .site-nav.open { display: flex; }
    .header-contact { display: none; }
    .mobile-toggle { display: block; }
    section { padding: 2.5rem 0; }
    .hero-slider { min-height: 340px; }
    .form-row { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr !important; }
    .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .parkings-grid { grid-template-columns: 1fr; }
    .servicios-grid { grid-template-columns: 1fr; }
}

/* ── Páginas legales ─────────────────────────────────────────── */
.legal-page {
    padding: 3rem 0 4rem;
    min-height: calc(100vh - var(--header-h) - 220px);
}
.legal-header {
    max-width: 820px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.legal-header h1 {
    font-size: 1.75rem;
    color: var(--primary);
}
.btn-back {
    font-size: .9rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: color .2s;
}
.btn-back:hover { color: var(--accent); }
.legal-doc-download {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Ajuste footer simple en páginas legales */
.site-footer .footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .85rem;
}
.footer-legal {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.footer-legal a {
    color: rgba(255,255,255,.65);
    font-size: .82rem;
    transition: color .2s;
}
.footer-legal a:hover { color: var(--accent); }
