/* ==========================================================================
   Club Landing — estilos para kluub.cl/{slug}
   Mobile-first. Tematizable vía CSS var --club-color (la setea el layout).
   ========================================================================== */

:root {
    --cl-color: var(--club-color, #2563eb);
    --cl-text: #111827;
    --cl-muted: #6b7280;
    --cl-bg: #f9fafb;
    --cl-bg-alt: #ffffff;
    --cl-border: #e5e7eb;
    --cl-shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --cl-shadow: 0 4px 16px rgba(0,0,0,0.07);
    --cl-radius: 14px;
    --cl-radius-sm: 10px;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.cl-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--cl-text);
    background: var(--cl-bg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.55;
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1rem;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cl-color); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Skip link para a11y. */
.cl-skip {
    position: absolute;
    left: -9999px;
}
.cl-skip:focus {
    position: fixed;
    top: 1rem; left: 1rem;
    z-index: 9999;
    background: #111827; color: #fff;
    padding: .6rem 1rem; border-radius: 8px;
    font-weight: 600; text-decoration: none;
}

/* ===== Topbar ===== */
.cl-topbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--cl-border);
}
.cl-topbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: .65rem 1rem;
}
.cl-back {
    display: inline-flex; align-items: center; gap: .5rem;
    color: var(--cl-text); font-weight: 700; font-size: .95rem;
}
.cl-back:hover { text-decoration: none; opacity: .8; }
.cl-back img { height: 28px; width: auto; }

.cl-topbar-club {
    display: flex; align-items: center; gap: .55rem;
    overflow: hidden;
}
.cl-topbar-logo {
    width: 28px; height: 28px;
    border-radius: 50%; object-fit: cover;
    border: 2px solid var(--cl-border);
}
.cl-topbar-club-name {
    font-weight: 600; font-size: .9rem;
    white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
    max-width: 180px;
}

/* ===== Hero ===== */
.cl-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    isolation: isolate;
    background: linear-gradient(135deg, var(--cl-color) 0%, #0c1c3e 100%);
    min-height: 360px;
    display: flex; align-items: center;
}
.cl-hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    z-index: -2;
}
.cl-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.65) 100%);
    z-index: -1;
}
.cl-hero-inner {
    padding: 3rem 1rem 2.5rem;
    text-align: center;
}
.cl-hero-logo {
    width: 88px; height: 88px;
    border-radius: 50%; object-fit: cover;
    margin: 0 auto 1.25rem;
    border: 3px solid rgba(255,255,255,0.25);
    background: #fff;
}
.cl-hero h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    margin: 0 0 .85rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.cl-hero-sub {
    font-size: 1.05rem;
    margin: 0 auto 1.5rem;
    max-width: 640px;
    color: rgba(255,255,255,0.92);
}
.cl-hero-meta {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: .85rem 1.5rem;
    margin-bottom: 1.75rem;
    font-size: .9rem;
    color: rgba(255,255,255,0.85);
}
.cl-hero-meta span {
    display: inline-flex; align-items: center; gap: .35rem;
}
.cl-hero-ctas {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: .75rem;
}

/* ===== Buttons ===== */
.cl-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    transition: transform .15s ease, opacity .15s ease, background .15s ease;
}
.cl-btn:hover { text-decoration: none; transform: translateY(-1px); }
.cl-btn-primary {
    background: #fff;
    color: var(--cl-color);
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.cl-btn-primary:hover { background: #f3f4f6; }
.cl-btn-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.5);
}
.cl-btn-outline:hover { background: rgba(255,255,255,0.12); }

/* ===== Sections ===== */
.cl-section {
    padding: 3rem 0;
}
.cl-section-alt { background: var(--cl-bg-alt); }
.cl-narrow { max-width: 720px; }
.cl-section-header {
    text-align: center;
    margin-bottom: 2rem;
}
.cl-section h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin: 0 0 .5rem;
    letter-spacing: -0.01em;
}
.cl-section-header p {
    color: var(--cl-muted);
    margin: 0;
}
.cl-subheader {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cl-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 2rem 0 1rem;
}

.cl-prose {
    color: var(--cl-muted);
    font-size: 1rem;
    line-height: 1.75;
}

/* ===== Cards ===== */
.cl-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.cl-card {
    background: var(--cl-bg-alt);
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius);
    padding: 1.25rem;
    transition: box-shadow .2s ease, transform .15s ease;
    position: relative;
}
.cl-card:hover {
    box-shadow: var(--cl-shadow);
    transform: translateY(-2px);
}
.cl-card h3 {
    font-size: 1.05rem;
    margin: .5rem 0 .25rem;
    font-weight: 700;
}
.cl-card p {
    margin: 0;
    color: var(--cl-muted);
    font-size: .9rem;
}
.cl-card-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--cl-color) 12%, white);
    color: var(--cl-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    margin-bottom: .35rem;
}
.cl-card-tournament { padding-top: 2.25rem; }
.cl-tournament-badge {
    position: absolute; top: 1rem; left: 1rem;
    font-size: .68rem;
    font-weight: 700;
    padding: .2rem .55rem;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.cl-tournament-badge-up   { background: #dcfce7; color: #15803d; }
.cl-tournament-badge-past { background: #f1f5f9; color: #64748b; }

/* ===== Contacto ===== */
.cl-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: .75rem;
    margin-bottom: 1.75rem;
}
.cl-contact-item {
    display: flex; align-items: center; gap: .85rem;
    padding: .9rem 1rem;
    background: var(--cl-bg-alt);
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius);
    color: var(--cl-text);
    text-decoration: none;
    transition: border-color .15s ease, transform .15s ease;
}
.cl-contact-item:hover {
    border-color: var(--cl-color);
    text-decoration: none;
    transform: translateY(-1px);
}
.cl-contact-item i {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--cl-color) 12%, white);
    color: var(--cl-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.cl-contact-item.cl-contact-static {
    cursor: default;
}
.cl-contact-item.cl-contact-static:hover {
    border-color: var(--cl-border);
    transform: none;
}
.cl-contact-label {
    font-size: .72rem;
    color: var(--cl-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .15rem;
}
.cl-contact-value {
    font-weight: 600;
    font-size: .95rem;
}

.cl-social {
    display: flex; flex-wrap: wrap; gap: .5rem;
    justify-content: center;
}
.cl-social a {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .5rem .85rem;
    border-radius: 100px;
    background: var(--cl-bg-alt);
    border: 1px solid var(--cl-border);
    color: var(--cl-text);
    font-size: .85rem;
    font-weight: 500;
}
.cl-social a:hover {
    border-color: var(--cl-color);
    color: var(--cl-color);
    text-decoration: none;
}

/* ===== Footer ===== */
.cl-footer {
    background: #111827;
    color: #94a3b8;
    padding: 2rem 0;
    margin-top: 3rem;
}
.cl-footer-inner {
    text-align: center;
}
.cl-footer-brand {
    display: inline-flex; align-items: center; gap: .45rem;
    color: #fff; font-weight: 700;
    margin-bottom: .5rem;
}
.cl-footer-text {
    margin: 0;
    font-size: .8rem;
}
.cl-footer-text a { color: #cbd5e1; text-decoration: underline; }

/* ===== Responsive ===== */
@media (min-width: 768px) {
    .cl-hero-inner { padding: 4rem 1rem 3.5rem; }
    .cl-hero-logo { width: 100px; height: 100px; }
    .cl-section { padding: 4rem 0; }
}

@media (max-width: 575.98px) {
    .cl-hero-ctas { flex-direction: column; align-items: stretch; gap: .55rem; }
    .cl-hero-ctas .cl-btn { justify-content: center; }
    .cl-hero { min-height: 300px; }
    .cl-cards-grid { grid-template-columns: 1fr; }
    .cl-contact-grid { grid-template-columns: 1fr; }
    .cl-section { padding: 2.25rem 0; }
}
