/* =========================================================================
   Centro Pontevedrés – hoja de estilos
   Colores principales: cambiá estas variables para ajustar todo el sitio.
   ========================================================================= */
:root {
    --primary: #446084;      /* azul institucional (el mismo del sitio anterior) */
    --primary-dark: #2e4560;
    --accent: #1a9ad6;       /* celeste de la bandera gallega */
    --text: #22303f;
    --muted: #64748b;
    --bg: #ffffff;
    --bg-alt: #f2f5f9;
    --border: #dde3ea;
    --radius: 10px;
    --shadow: 0 6px 24px rgba(20, 35, 55, .10);
    --font-head: 'Biryani', system-ui, sans-serif;
    --font-body: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 .6em; color: var(--primary-dark); }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 800px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .85rem; margin-bottom: .5em; }
.icon { width: 1.2em; height: 1.2em; flex-shrink: 0; vertical-align: -0.2em; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 10px; top: 10px; z-index: 100; background: #fff; padding: 8px 12px; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .5em;
    background: var(--primary); color: #fff; text-decoration: none;
    font-weight: 700; padding: .75em 1.5em; border-radius: 999px;
    border: 2px solid var(--primary); cursor: pointer; font-size: 1rem;
    font-family: inherit; transition: background .2s, border-color .2s, transform .2s;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); }
.btn-outline:hover { background: var(--primary); }
.btn-small { padding: .5em 1.1em; font-size: .9rem; }
.btn-big { font-size: 1.2rem; padding: .9em 2em; }
p .btn { margin: .25em; }

/* ---------- Cabecera ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--primary-dark); color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: .95rem; line-height: 1.2; }
.brand:hover { color: #fff; }
.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav a {
    display: block; color: rgba(255, 255, 255, .85); text-decoration: none;
    font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    padding: 8px 9px; border-radius: 6px; white-space: nowrap;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .12); }

.menu-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1260px) {
    .brand span { max-width: 170px; }
}
@media (max-width: 1160px) {
    .menu-toggle { display: block; }
    .main-nav {
        position: absolute; left: 0; right: 0; top: 100%;
        background: var(--primary-dark); display: none;
        border-top: 1px solid rgba(255, 255, 255, .1);
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; padding: 8px 20px 16px; }
    .main-nav a { font-size: .95rem; padding: 12px 10px; }
}

/* ---------- Portada / encabezados ---------- */
.hero {
    background-color: #fff; background-size: cover; background-position: center;
    padding: 48px 0;
}
.hero-inner {
    display: flex; align-items: center; gap: 28px; justify-content: center;
    width: fit-content; max-width: calc(100% - 40px); padding: 24px 32px;
    background: rgba(255, 255, 255, .92); border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero-logo { width: 120px; flex-shrink: 0; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .2)); }
.hero h1 { color: var(--primary-dark); margin: 0; font-size: clamp(1.2rem, 3vw, 1.9rem); font-weight: 700; }
.hero h1 span { display: block; font-size: clamp(2rem, 5.5vw, 3.6rem); font-weight: 800; }
@media (max-width: 600px) {
    .hero-inner { flex-direction: column; text-align: center; }
    .hero-logo { width: 90px; }
}

/* Banner principal con video de fondo */
.hero-video {
    position: relative; overflow: hidden; color: #fff; text-align: center;
    min-height: 520px; height: 78vh; max-height: 760px;
    display: flex; align-items: center; justify-content: center;
    background: #0e1a2b url('../../uploads/video/banner-portada.jpg') center / cover no-repeat;
}
.hero-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-video::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(14, 26, 43, .35) 0%, rgba(14, 26, 43, .65) 100%);
}
.hero-video-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.hero-video .hero-logo { width: 110px; margin-bottom: 16px; }
.hero-video h1 { color: #fff; font-size: clamp(1.15rem, 3vw, 1.8rem); font-weight: 700; text-shadow: 0 2px 16px rgba(0, 0, 0, .5); }
.hero-video h1 span { display: block; font-size: clamp(2.2rem, 7vw, 4.4rem); font-weight: 800; line-height: 1.1; }
.btn-light { background: #fff; color: var(--primary-dark); border-color: #fff; }
.btn-light:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.video-toggle {
    position: absolute; z-index: 1; right: 16px; bottom: 16px;
    width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(255, 255, 255, .25); color: #fff; font-size: 13px;
}
.video-toggle:hover { background: rgba(255, 255, 255, .45); }
@media (max-width: 600px) {
    .hero-video { min-height: 440px; height: 70vh; }
    .hero-video .hero-logo { width: 80px; }
}

.hero-photo { position: relative; color: #fff; padding: 120px 0; text-align: center; }
.hero-photo::before { content: ""; position: absolute; inset: 0; background: rgba(20, 35, 55, .55); }
.hero-photo .container { position: relative; }
.hero-photo h1 { color: #fff; font-size: clamp(2rem, 6vw, 3.6rem); }

.page-head { background: var(--primary); color: #fff; padding: 56px 0 44px; text-align: center; }
.page-head h1 { color: #fff; margin: 0; }
.page-head p { margin: .6em auto 0; max-width: 700px; opacity: .9; }
.page-head a { color: #fff; }
.page-head-img { position: relative; background-size: cover; background-position: center; }
.page-head-img::before { content: ""; position: absolute; inset: 0; background: rgba(46, 69, 96, .78); }
.page-head-img .container { position: relative; }

.band { background: var(--primary); color: #fff; padding: 40px 0 56px; }
.band-title { color: #fff; text-align: center; font-size: clamp(1.4rem, 3.5vw, 2.2rem); margin-bottom: 28px; }

.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }

/* ---------- Carrusel ---------- */
.slider { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 7; background: #000; box-shadow: var(--shadow); }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .8s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide figcaption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 60px 24px 48px; text-align: center;
    background: linear-gradient(transparent, rgba(0, 0, 0, .7));
    font-family: var(--font-head); font-weight: 700; font-size: clamp(1.1rem, 3vw, 1.8rem);
}
.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%; border: 0;
    background: rgba(255, 255, 255, .85); color: var(--primary-dark);
    font-size: 30px; line-height: 1; cursor: pointer;
}
.slider-btn:hover { background: #fff; }
.slider-btn.prev { left: 14px; }
.slider-btn.next { right: 14px; }
.slider-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.slider-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, .5); cursor: pointer; }
.slider-dots button[aria-current="true"] { background: #fff; }
@media (max-width: 700px) { .slider { aspect-ratio: 4 / 3; } }

/* ---------- Tarjetas ---------- */
.cards { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 900px; margin: 0 auto; }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card-media { display: block; aspect-ratio: 16 / 10; background: var(--bg-alt); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; flex: 1; }
.card-title { margin: 0; flex: 1; }

.feature {
    display: grid; grid-template-columns: 1fr 1fr; align-items: center;
    background: var(--primary); color: #fff; text-decoration: none;
    border-radius: var(--radius); overflow: hidden; margin-bottom: 40px; box-shadow: var(--shadow);
}
.feature:hover { color: #fff; }
.feature img { width: 100%; height: 100%; max-height: 320px; object-fit: cover; }
.feature-text { padding: 28px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.feature-text strong { font-family: var(--font-head); font-size: 1.6rem; }
.feature .btn { background: #fff; color: var(--primary); border-color: #fff; }
@media (max-width: 700px) { .feature { grid-template-columns: 1fr; } }

/* ---------- Feed de noticias ---------- */
.feed { display: grid; gap: 20px; margin-bottom: 40px; }
.feed-item { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.feed-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.feed-title { font-size: 1.25rem; margin-bottom: .3em; }
.feed-title a { color: var(--primary-dark); text-decoration: none; }
.feed-title a:hover { color: var(--accent); }
.feed-meta { font-size: .9rem; margin-bottom: .5em; }
@media (max-width: 600px) { .feed-item { grid-template-columns: 1fr; } }

/* ---------- Grupo deportivo ---------- */
.features { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 28px; }
.feature-box { text-align: center; padding: 28px 18px; border-radius: var(--radius); background: var(--bg-alt); }
.feature-box img { margin: 0 auto 12px; }
.feature-box p { margin: 0; font-weight: 700; }
.categories { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 24px; }
.category { background: #fff; border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.category strong { display: block; font-family: var(--font-head); font-size: 1.1rem; color: var(--primary-dark); }
.category span { color: var(--muted); font-weight: 700; }

.quote { position: relative; background-size: cover; background-position: center; padding: 100px 0; color: #fff; text-align: center; }
.quote::before { content: ""; position: absolute; inset: 0; background: rgba(20, 35, 55, .7); }
.quote .container { position: relative; }
.quote blockquote { margin: 0; }
.quote blockquote p { font-family: var(--font-head); font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 700; }

.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 28px 0; }
.gallery a { display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--bg-alt); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.05); }

.lightbox {
    position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .9);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.lightbox img { max-height: 90vh; max-width: 100%; width: auto; border-radius: 6px; }
.lightbox button {
    position: absolute; background: rgba(255, 255, 255, .15); color: #fff; border: 0;
    width: 48px; height: 48px; border-radius: 50%; font-size: 28px; cursor: pointer;
}
.lightbox button:hover { background: rgba(255, 255, 255, .3); }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Historia ---------- */
.prose { max-width: 760px; font-size: 1.08rem; }
.prose .highlight {
    font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; color: var(--primary);
    border-left: 4px solid var(--accent); padding: 6px 0 6px 18px; margin: 1.6em 0;
}
.prose blockquote { margin: 2em 0; padding: 24px 28px; background: var(--bg-alt); border-radius: var(--radius); border-left: 4px solid var(--primary); }
.prose blockquote p { font-style: italic; font-size: 1.15rem; }
.prose blockquote footer { color: var(--muted); font-size: .95rem; }
.figure { margin: 2em 0; }
.figure img { border-radius: var(--radius); width: 100%; }
.figure figcaption { text-align: center; font-size: .95rem; margin-top: 10px; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; gap: 48px; grid-template-columns: 1fr 1.3fr; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0 0 1.4em; }
.contact-list li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.contact-list .icon { color: var(--accent); margin-top: .25em; }
.contact-list.big { font-size: 1.1rem; }

.info-boxes { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.info-box { text-align: center; padding: 28px; border-radius: var(--radius); background: var(--bg-alt); }
.info-box > .icon { width: 36px; height: 36px; color: var(--accent); margin-bottom: 10px; }
.info-box h2 { font-size: 1.15rem; }
.info-box p { margin: 0; }

.social { display: flex; gap: 10px; margin: 0 0 1.4em; }
.social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff;
}
.social a:hover { background: var(--accent); color: #fff; }
.social .icon { width: 22px; height: 22px; }

.map { margin-top: 20px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.map iframe { width: 100%; height: 100%; border: 0; }

.contact-form { background: #fff; padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-form label { display: block; font-weight: 500; margin-bottom: 16px; font-size: .95rem; }
.contact-form input, .contact-form textarea {
    display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: 8px; font: inherit; background: #fbfcfd;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; background: #fff; }
.form-row { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 18px; }
.alert p { margin: 0; }
.alert-ok { background: #e6f6ec; color: #17603a; border: 1px solid #b6e2c6; }
.alert-error { background: #fdeceb; color: #9b2620; border: 1px solid #f3c2bf; }

/* ---------- Pie ---------- */
.site-footer { background: var(--primary-dark); color: rgba(255, 255, 255, .85); padding-top: 48px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--accent); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding-bottom: 36px; }
.footer-logo { width: 64px; margin-bottom: 10px; }
.footer-name { font-weight: 700; color: #fff; margin-bottom: 4px; }
.site-footer .muted { color: rgba(255, 255, 255, .6); }
.footer-title { color: #fff; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; }
.site-footer .social a { background: rgba(255, 255, 255, .12); }
.site-footer .social a:hover { background: var(--accent); }
.footer-link { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; font-weight: 500; }
.copyright { background: rgba(0, 0, 0, .2); padding: 16px 0; font-size: .85rem; text-align: center; }

.whatsapp-float {
    position: fixed; right: 18px; bottom: 18px; z-index: 60;
    width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.whatsapp-float:hover { color: #fff; transform: scale(1.06); }
.whatsapp-float .icon { width: 30px; height: 30px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
