/* ============================================================
   COMUNIDAD LA BROCHERIANA — Frontend CSS
   ============================================================ */
:root {
    --bc-tierra:   #3F352E;
    --bc-arena:    #C0B599;
    --bc-arena-bg: #f0ece6;
    --bc-white:    #ffffff;
    --bc-radius:   10px;
    --bc-shadow:   0 4px 24px rgba(63,53,46,0.12);
}

.broch-auth-brochero-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid var(--bc-arena);
    box-shadow: 0 4px 20px rgba(63,53,46,.25);
    display: block;
    margin: 0 auto;
}

/* ── Carrusel de banners ────────────────────────────────── */
.broch-banners-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.75rem;
    background: #f0ece6;
    aspect-ratio: 16/5;
    min-height: 120px;
}

.broch-banner-slide {
    width: 100%;
    height: 100%;
    position: relative;
}

.broch-banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.broch-banner-slide a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.broch-banner-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(42,35,30,.85) 0%, transparent 100%);
    color: #fff;
    padding: 1.5rem 1.25rem .75rem;
    font-size: .9rem;
    font-weight: 700;
}

.broch-banner-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(63,53,46,.6);
    border: none;
    color: #fff;
    font-size: 1.6rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 5;
    line-height: 1;
}
.broch-banner-btn:hover { background: rgba(63,53,46,.9); }
.broch-banner-btn--prev { left: .75rem; }
.broch-banner-btn--next { right: .75rem; }

.broch-banner-dots {
    position: absolute;
    bottom: .6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: .4rem;
    z-index: 5;
}
.broch-banner-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .2s;
}
.broch-banner-dot.active { background: #fff; }

/* ── Auth (login / registro) ────────────────────────────── */
.broch-auth-wrap {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
}

.broch-auth-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--bc-shadow);
    padding: 2.5rem;
    width: 100%;
    max-width: 460px;
}

.broch-auth-card--wide { max-width: 640px; }

.broch-auth-logo {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 1rem;
}

.broch-auth-card h2 {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--bc-tierra);
    text-align: center;
    margin: 0 0 .4rem;
}

.broch-auth-logo {
    text-align: center;
    margin-bottom: 1.25rem;
}

.broch-login-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid var(--bc-arena);
    box-shadow: 0 4px 20px rgba(63,53,46,.2);
    display: block;
    margin: 0 auto;
}
    text-align: center;
    color: #7a6f69;
    font-size: .9rem;
    margin-bottom: 1.75rem;
}

.broch-auth-alt {
    text-align: center;
    font-size: .85rem;
    color: #7a6f69;
    margin-top: 1.5rem;
}
.broch-auth-alt a { color: var(--bc-tierra); font-weight: 700; }

/* ── Campos ─────────────────────────────────────────────── */
.broch-field {
    margin-bottom: 1.1rem;
}
.broch-field label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    color: var(--bc-tierra);
    margin-bottom: .35rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.broch-field label span { color: #c00; }
.broch-field input,
.broch-field select,
.broch-field textarea {
    width: 100%;
    padding: .72rem 1rem;
    border: 1.5px solid #e0d8cc;
    border-radius: 7px;
    font-size: .95rem;
    font-family: inherit;
    color: var(--bc-tierra);
    background: #faf9f7;
    box-sizing: border-box;
    transition: border-color .2s;
}
.broch-field input:focus,
.broch-field select:focus,
.broch-field textarea:focus {
    outline: none;
    border-color: var(--bc-arena);
    background: #fff;
}

.broch-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 540px) {
    .broch-form-grid-2 { grid-template-columns: 1fr; }
}

/* ── Botones ─────────────────────────────────────────────── */
.broch-btn-primary {
    width: 100%;
    padding: .9rem;
    background: var(--bc-tierra);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: .5rem;
}
.broch-btn-primary:hover { background: #2a231d; color: #fff; }
.broch-btn-primary:disabled { opacity: .6; cursor: not-allowed; }

/* ── Notices ─────────────────────────────────────────────── */
.broch-notice {
    padding: .9rem 1.1rem;
    border-radius: 8px;
    font-size: .9rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}
.broch-notice--success { background: #d4edda; color: #155724; border-color: #c3e6cb; }
.broch-notice--error   { background: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.broch-notice--info    { background: var(--bc-arena-bg); color: #5a4a3a; border-color: var(--bc-arena); }

/* ── Terms notice ───────────────────────────────────────── */
.broch-terms-notice {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    background: var(--bc-arena-bg);
    border: 1.5px solid var(--bc-arena);
    border-radius: 8px;
    padding: .9rem 1rem;
    margin-bottom: 1.25rem;
    color: #5a4a3a;
    font-size: .8rem;
    line-height: 1.55;
}
.broch-terms-notice p { margin: 0; }

/* ── Mi cuenta layout ───────────────────────────────────── */
.broch-cuenta-wrap {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    max-width: 1140px;
    margin: 2rem auto;
    padding: 0 1.25rem;
    align-items: start;
}

@media (max-width: 768px) {
    .broch-cuenta-wrap { grid-template-columns: 1fr; }
}

/* ── Sidebar ─────────────────────────────────────────────── */
.broch-cuenta-sidebar {
    position: sticky;
    top: 100px;
}

.broch-perfil-header {
    background: var(--bc-tierra);
    border-radius: 14px;
    padding: 2rem 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.broch-avatar-wrap {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 1rem;
}

.broch-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bc-arena);
    display: block;
}

.broch-avatar--placeholder {
    background: var(--bc-arena);
    color: var(--bc-tierra);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 900;
}

.broch-avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--bc-arena);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    cursor: pointer;
    border: 2px solid var(--bc-tierra);
    transition: background .2s;
}
.broch-avatar-edit:hover { background: #d4c8aa; }

.broch-perfil-name {
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    margin-bottom: .5rem;
}

.broch-role-badge {
    display: inline-block;
    padding: .3rem .9rem;
    border-radius: 100px;
    font-size: .72rem;
    font-weight: 800;
    color: var(--bc-tierra);
    margin-bottom: .75rem;
}

.broch-verify-warn {
    font-size: .75rem;
    color: #f0ad4e;
    margin-top: .5rem;
}
.broch-verify-warn a { color: #f0ad4e; font-weight: 700; text-decoration: underline; }

.broch-cuenta-nav {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--bc-shadow);
    overflow: hidden;
}

.broch-cuenta-nav-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1.25rem;
    font-size: .88rem;
    font-weight: 600;
    color: var(--bc-tierra);
    text-decoration: none;
    border-bottom: 1px solid #f0ece6;
    transition: background .15s;
}
.broch-cuenta-nav-item:hover { background: var(--bc-arena-bg); }
.broch-cuenta-nav-item.active {
    background: var(--bc-tierra);
    color: var(--bc-arena);
}
.broch-cuenta-nav-item--logout { color: #c0392b; border-bottom: none; }
.broch-cuenta-nav-item--logout:hover { background: #fff5f5; }

/* ── Contenido principal ─────────────────────────────────── */
.broch-cuenta-main {
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--bc-shadow);
    padding: 2rem 2.5rem;
    min-height: 400px;
}

@media (max-width: 600px) {
    .broch-cuenta-main { padding: 1.5rem; }
}

.broch-tab-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--bc-arena-bg);
    padding-bottom: 1.25rem;
}
.broch-tab-header h2 {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--bc-tierra);
    margin: 0 0 .3rem;
}
.broch-tab-header p { margin: 0; color: #7a6f69; font-size: .9rem; }

/* ── Cards de stats ─────────────────────────────────────── */
.broch-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
@media (max-width: 500px) {
    .broch-cards-grid { grid-template-columns: 1fr; }
}

.broch-info-card {
    background: var(--bc-arena-bg);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(192,181,153,.3);
}
.broch-info-card-icon { font-size: 1.8rem; }
.broch-info-card-num  { font-size: 1.6rem; font-weight: 900; color: var(--bc-tierra); line-height: 1; }
.broch-info-card-lbl  { font-size: .72rem; color: #7a6f69; text-transform: uppercase; letter-spacing: .05em; margin-top: .2rem; }

/* ── Inscripcion card ───────────────────────────────────── */
.broch-inscripcion-card {
    background: var(--bc-arena-bg);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(192,181,153,.3);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    font-size: .9rem;
    color: #5a4a3a;
}

.broch-inscripcion-estado {
    display: inline-block;
    padding: .25rem .75rem;
    border-radius: 100px;
    font-size: .72rem;
    font-weight: 800;
    align-self: flex-start;
}
.broch-inscripcion-estado--approved { background: #d4edda; color: #155724; }
.broch-inscripcion-estado--pending  { background: #fff3cd; color: #856404; }
.broch-inscripcion-estado--rejected { background: #f8d7da; color: #721c24; }

/* ── Sección títulos ─────────────────────────────────────── */
.broch-section-title {
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--bc-arena);
    border-bottom: 2px solid var(--bc-arena-bg);
    padding-bottom: .5rem;
    margin-bottom: 1rem;
}

/* ── Ediciones grid ─────────────────────────────────────── */
.broch-ediciones-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}
.broch-edicion-check {
    display: flex;
    align-items: center;
    gap: .35rem;
    cursor: pointer;
    font-size: .82rem;
    background: var(--bc-arena-bg);
    border: 1.5px solid #e0d8cc;
    border-radius: 6px;
    padding: .3rem .7rem;
    transition: border-color .15s, background .15s;
}
.broch-edicion-check:has(input:checked) {
    border-color: var(--bc-tierra);
    background: var(--bc-tierra);
    color: var(--bc-arena);
}
.broch-edicion-check input { display: none; }

/* ── Empty state ─────────────────────────────────────────── */
.broch-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: #aaa;
}

.broch-historial-list { display: flex; flex-direction: column; gap: 1rem; }
