.info-simple-pro {
    max-width: 480px;
    margin: 0 auto 38px auto;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.info-title-pro {
    font-size: 1.18rem;
    color: #568864;
    font-family: 'ClashDisplay-Regular', 'Playfair Display', Georgia, serif;
    font-weight: 700;
    margin: 0 0 2px 0;
    letter-spacing: -0.5px;
}
.info-text-pro {
    color: #32494b;
    font-size: 1.07rem;
    font-family: 'ClashDisplay-Regular', 'Playfair Display', Georgia, serif;
    margin-bottom: 0;
    line-height: 1.6;
    margin-bottom: 10px;
}
@media (max-width: 600px) {
    .info-simple-pro { max-width: 98vw; padding: 0 2vw; }
    .info-title-pro { font-size: 1.05rem; }
    .info-text-pro { font-size: 0.98rem; }
}
.volver-btn-pro {
    display: inline-flex;
    align-items: center;
    background: #568864;
    color: #fff !important;
    font-size: 1.08rem;
    font-weight: 600;
    border-radius: 24px;
    padding: 12px 28px;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(86,136,100,0.10);
    transition: background 0.18s, box-shadow 0.18s, color 0.18s;
    border: none;
    margin-top: 0;
    letter-spacing: 0.5px;
}
.volver-btn-pro:hover {
    background: #3d6147;
    color: #fff;
    box-shadow: 0 4px 18px rgba(86,136,100,0.16);
}
.volver-btn-pro svg {
    margin-right: 7px;
    stroke: #fff;
}
.program-title-pro h1 {
    font-size: 2.3rem;
    font-family: 'Playfair Display', 'Cannon Cannon', Georgia, serif;
    font-weight: 700;
    color: #32494b;
    letter-spacing: -1px;
    text-shadow: 0 2px 12px rgba(86,136,100,0.08);
    margin-bottom: 0;
}

.program-card-pro {
    background: linear-gradient(135deg, #fff 80%, #eaf6ee 100%);
    border-radius: 22px;
    box-shadow: 0 8px 32px rgba(50,73,75,0.13), 0 1.5px 8px rgba(124,188,142,0.08);
    padding: 38px 28px 32px 28px;
    max-width: 420px;
    width: 100%;
    margin: 0 auto 36px auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
    border: 1.5px solid #e0e0e0;
    backdrop-filter: blur(2px);
    transition: box-shadow 0.2s;
}
.program-card-pro:hover {
    box-shadow: 0 12px 40px rgba(86,136,100,0.13), 0 2px 12px rgba(124,188,142,0.13);
}
.program-section-pro h2 {
    font-size: 1.18rem;
    color: #568864;
    margin-bottom: 7px;
    font-family: 'ClashDisplay-Regular', -apple-system, sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.program-section-pro p {
    color: #32494b;
    font-size: 1.04rem;
    margin-bottom: 0;
    line-height: 1.6;
}
@media (max-width: 600px) {
    .program-card-pro {
        padding: 18px 4vw 18px 4vw;
        max-width: 98vw;
    }
    .program-title-pro h1 {
        font-size: 1.35rem;
    }
}
.main-content.fam-main-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
    background-image: none !important;
}
.hero-video.no-gap-top {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.app-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.cdn-video {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 16/9;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 32px auto 0 auto;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
}
#yt-player, .cdn-video iframe {
    width: 100%;
    height: 100%;
    min-height: 220px;
    border: none;
    display: block;
}
.cdn-card {
    width: 96vw;
    max-width: 540px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 8px 32px rgba(50,73,75,0.10), 0 1.5px 8px rgba(124,188,142,0.06);
    margin: 32px auto 0 auto;
    padding: 36px 28px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.cdn-header {
    margin-bottom: 10px;
    text-align: center;
}
.cdn-title {
    font-size: 2rem;
    font-family: 'Cannon Cannon', Georgia, serif;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.2;
}
.cdn-meta {
    font-size: 15px;
    color: var(--primary);
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}
.cdn-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.cdn-section h2 {
    font-size: 1.13rem;
    color: var(--primary);
    margin-bottom: 6px;
    font-family: 'ClashDisplay-Regular', -apple-system, sans-serif;
    font-weight: 600;
}
.cdn-section p {
    color: var(--text-dark);
    font-size: 15.5px;
    margin-bottom: 0;
}
@media (max-width: 700px) {
    .cdn-card { padding: 18px 4vw 18px 4vw; }
    .cdn-video { max-width: 100vw; border-radius: 0 0 18px 18px; }
}
/* ======== Comunidad Detalle Moderno ======== */
.comunidad-detalle-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    background: var(--bg-light);
    min-height: 100vh;
    padding-bottom: 32px;
}
.cdm-video {
    width: 100vw;
    max-width: 600px;
    aspect-ratio: 16/9;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 6px 32px rgba(0,0,0,0.13);
    border-radius: 0 0 24px 24px;
    overflow: hidden;
}
#yt-player, .cdm-video iframe {
    width: 100%;
    height: 100%;
    min-height: 220px;
    border: none;
    display: block;
}
.cdm-card {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    width: 92vw;
    max-width: 480px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 12px 36px rgba(50,73,75,0.18), 0 2px 12px rgba(124,188,142,0.10);
    padding: 28px 22px 24px 22px;
    margin: 0 auto;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 220px;
}
.comunidad-detalle-modern {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    background: var(--bg-light);
    min-height: 100vh;
    padding-bottom: 32px;
}
.cdm-video {
    width: 100vw;
    max-width: 600px;
    aspect-ratio: 16/9;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 6px 32px rgba(0,0,0,0.13);
    border-radius: 0 0 24px 24px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}
@media (max-width: 600px) {
    .cdm-card {
        padding: 18px 7vw 18px 7vw;
        transform: translateX(-50%) translateY(-36px);
    }
    .cdm-video { max-width: 100vw; border-radius: 0 0 18px 18px; }
}
.cdm-header {
    margin-bottom: 10px;
}
.cdm-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 6px;
    gap: 8px;
}
.cdm-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}
.cdm-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    color: #FFD700;
    font-weight: 600;
}
.cdm-title {
    font-size: 1.45rem;
    font-family: 'Cannon Cannon', Georgia, serif;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
    line-height: 1.2;
}
.cdm-meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
}
.cdm-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.cdm-section h2 {
    font-size: 1.08rem;
    color: var(--primary);
    margin-bottom: 4px;
    font-family: 'ClashDisplay-Regular', -apple-system, sans-serif;
    font-weight: 600;
}
.cdm-section p {
    color: var(--text-dark);
    font-size: 15px;
    margin-bottom: 0;
}
@media (max-width: 600px) {
    .cdm-card { padding: 18px 7vw 18px 7vw; }
    .cdm-video { max-width: 100vw; border-radius: 0 0 18px 18px; }
}
/* FILE: /assets/css/styles.css */
/* GREEN HOUSE - Estilos Premium */

/* Importar las fuentes personalizadas */
@import url('../../fonts/cannon/stylesheet.css');
@import url('../../fonts/clash-display/ClashDisplay_Complete/Fonts/WEB/css/clash-display.css');

:root {
    --primary: #568864;
    --primary-variant: #7cbc8e;
    --secondary: #bfd6bd;
    --secondary-variant: #d5eed3;
    --text-dark: #32494b;
    --text-light: #495057;
    --bg-light: #f8f9fa;
    --bg-white: #efefef;
    --border-color: #e0e0e0;
    --primary-rgb: 86,136,100;
    --primary-variant-rgb: 124,188,142;
    --secondary-rgb: 191,214,189;
    --secondary-variant-rgb: 213,238,211;
    --text-dark-rgb: 50,73,75;
    --white-rgb: 239,239,239;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'ClashDisplay-Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cannon Cannon', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
}

/* ===== SPLASH SCREEN ===== */
.splash-screen {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    background: #0b0f0d;
}

.splash-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 30%;
    z-index: 1;
}

.splash-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.08) 0%,
        rgba(0,0,0,0.10) 40%,
        rgba(11,15,13,0.72) 65%,
        rgba(11,15,13,0.97) 85%,
        #0b0f0d 100%
    );
}

.splash-content {
    position: relative;
    z-index: 3;
    padding: 0 28px 52px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.splash-logo {
    width: 130px;
    height: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 2px 12px rgba(0,0,0,0.5));
}

.splash-title {
    font-family: 'Cannon Cannon', Georgia, serif;
    font-size: clamp(28px, 8vw, 38px);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 14px;
    max-width: 320px;
}

.splash-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 300px;
}

.btn-splash {
    display: block;
    width: 100%;
    max-width: 340px;
    background: linear-gradient(90deg, var(--primary), var(--primary-variant));
    color: #fff;
    text-align: center;
    text-decoration: none;
    padding: 16px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 28px rgba(var(--primary-rgb),0.30);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-splash:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(var(--primary-rgb),0.40);
}

@media (min-width: 480px) {
    .splash-content {
        align-items: center;
        text-align: center;
        padding-bottom: 64px;
    }
    .splash-title, .splash-desc { max-width: 420px; }
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, rgba(var(--primary-rgb),0.08) 0%, rgba(var(--secondary-rgb),0.04) 100%), url('/assets/img/login-bg.png');
    background-size: cover;
    background-position: center;
    padding: 32px;
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 980px;
    margin: auto;
    background: white;
    box-shadow: 0 20px 50px rgba(23,32,39,0.12);
    border-radius: 18px;
    overflow: hidden;
}

/* Transparent/minimal variant used on the login landing */
.login-container.transparent {
    background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45));
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.06);
}

.login-minimal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 36px;
    gap: 18px;
}

.login-minimal .brand-logo {
    filter: brightness(1.6) saturate(0.9);
}

.social-links {
    display: flex;
    gap: 14px;
    margin-top: 8px;
}

.social-links a{
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: white;
    text-decoration: none;
    font-size: 18px;
}

.visually-hidden{
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ===== Unique Hero Login — Tolet-inspired mobile-first ===== */
.hero-login {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #0d1a10;
    color: white;
    overflow-x: hidden;
}

/* ── Top decorative header ─────────────────── */
.hero-decor {
    position: relative;
    flex: 0 0 auto;
    height: 42vh;
    min-height: 210px;
    background: linear-gradient(170deg, #1f4228 0%, #163320 55%, #0f2418 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* V-notch cut into the bottom edge of the header */
.hero-decor::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0; right: 0;
    height: 64px;
    background: #0d1a10;
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
    z-index: 6;
}

/* Soft blob glows */
.decor-shape {
    position: absolute;
    border-radius: 40% 60% 30% 70% / 30% 40% 60% 70%;
    filter: blur(32px) saturate(130%);
    opacity: 0.75;
    transform: rotate(-12deg);
    pointer-events: none;
}
.shape-a { width: 380px; height: 380px; background: radial-gradient(circle, rgba(var(--primary-rgb),0.55), transparent 70%); left: -60px; top: -40px; }
.shape-b { width: 300px; height: 300px; background: radial-gradient(circle, rgba(var(--primary-variant-rgb),0.40), transparent 70%); right: -50px; bottom: -30px; }

/* Mountain silhouette layers */
.mountain {
    position: absolute;
    bottom: 0;
    left: 50%;
    z-index: 3;
    transform: translateX(-50%);
}
.mountain-back {
    width: 340px;
    height: 160px;
    background: #16391f;
    clip-path: polygon(0 100%, 38% 0%, 78% 100%);
    transform: translateX(-30%);
    opacity: 0.90;
}
.mountain-front {
    width: 260px;
    height: 130px;
    background: #0f2a17;
    clip-path: polygon(0 100%, 42% 0%, 88% 100%);
    transform: translateX(-60%);
    z-index: 4;
}

.hero-visual {
    position: relative;
    z-index: 5;
    width: 185px;
    max-width: 65%;
    height: auto;
    margin-bottom: 12px;
    transform: translateY(-28px);
    filter: drop-shadow(0 4px 18px rgba(0,0,0,0.55));
}

/* ── Login card ────────────────────────────── */
.login-panel {
    flex: 1;
    width: 100%;
    max-width: 520px;
    align-self: center;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 32px 28px 40px;
    box-shadow: none;
    color: white;
}

.login-title {
    font-family: 'ClashDisplay-Regular', -apple-system, sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 28px;
    letter-spacing: -0.3px;
}

/* Underline-style fields */
.field {
    display: flex;
    flex-direction: column;
    background: transparent;
    padding: 0;
    border: none;
    border-bottom: 1px solid rgba(124,188,142,0.22);
    border-radius: 0;
    margin-bottom: 24px;
    transition: border-color 0.25s;
}
.field-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(191,214,189,0.7);
    margin-bottom: 4px;
}
.field-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.field input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 15px;
    padding: 6px 0 10px;
}
.field input::placeholder { color: rgba(255,255,255,0.30); }
.field:focus-within { border-bottom-color: var(--primary-variant); }

/* ── Actions row (remember me) ─────────────── */
.actions {
    display: flex;
    align-items: center;
    margin: 4px 0 18px;
}
.remember {
    color: rgba(191,214,189,0.75);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* ── Full-width CTA ─────────────────────────── */
.btn-cta {
    display: block;
    width: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-variant));
    color: white;
    padding: 15px;
    border-radius: 14px;
    border: none;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 28px rgba(var(--primary-rgb),0.28);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(var(--primary-rgb),0.36); }

/* ── Social icon buttons ────────────────────── */
.social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
    color: white;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}
.social svg { width: 20px; height: 20px; fill: currentColor; }
.social:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); }

/* Desktop: restore two-column layout */
@media (min-width: 900px) {
    .hero-login {
        display: grid;
        grid-template-columns: 1fr 520px;
        align-items: stretch;
    }
    .hero-decor {
        height: 100vh;
        min-height: unset;
    }
    .hero-decor::after { display: none; }
    .mountain-back { width: 500px; height: 260px; }
    .mountain-front { width: 380px; height: 200px; }
    .hero-visual { width: 200px; }
    .login-panel {
        background: #0f2016;
        padding: 60px 48px;
        border-left: 1px solid rgba(124,188,142,0.06);
    }
}

/* Small phones */
@media (max-width: 380px) {
    .hero-decor { height: 36vh; min-height: 180px; }
    .hero-visual { width: 110px; }
    .login-panel { padding: 24px 20px 36px; }
    .login-title { font-size: 28px; }
}


.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-variant) 100%);
    padding: 48px 36px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.login-brand {
    text-align: left;
    margin-bottom: 8px;
}

.login-brand h1 {
    font-size: 34px;
    color: white;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.login-brand p {
    font-size: 15px;
    opacity: 0.9;
}

.login-description p {
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.95;
}

.login-right {
    flex: 1;
    padding: 48px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.login-form-wrapper h2 {
    font-size: 28px;
    margin-bottom: 6px;
}

.login-subtitle {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Input visual improvements for login */
.login-form .form-group input {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1.5px solid rgba(23,32,39,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.login-form .form-group label {
    font-size: 13px;
    margin-bottom: 8px;
}

.brand-logo {
    width: 110px;
    height: auto;
    display: block;
}

/* Input with inline icon/button (password toggle) */
.input-with-icon{
    position: relative;
}

.input-with-icon input{
    padding-right: 48px;
}

.password-toggle{
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-light);
    padding: 6px;
    border-radius: 8px;
}

.password-toggle:focus{
    outline: 2px solid rgba(var(--primary-rgb),0.15);
}

/* Small screens: collapse left panel and center form */
@media (max-width: 767px) {
    .login-container {
        flex-direction: column;
        border-radius: 12px;
    }

    .login-left {
        display: none;
    }

    .login-right {
        padding: 28px 20px;
    }

    .login-form-wrapper h2 {
        font-size: 22px;
        margin-bottom: 6px;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(86, 136, 100, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-light);
    font-size: 13px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #3f6b4d;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.login-footer {
    text-align: center;
    margin-top: 32px;
    color: var(--text-light);
    font-size: 13px;
}

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-layout {
    background: var(--bg-light);
}

/* Decorative background and reduced whiteness for main area */
.dashboard-layout::before {
    content: '';
    position: fixed;
    left: 0;
    top: 140px;
    width: 420px;
    height: calc(100% - 210px);
    background: linear-gradient(180deg, rgba(var(--primary-rgb),0.03), transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.main-content {
    position: relative;
    z-index: 2;
    background-image: linear-gradient(180deg, rgba(var(--primary-rgb),0.02), transparent 20%);
    padding-top: 70px;
}

.app-container {
    min-height: 100vh;
    display: grid;
    grid-template-rows: calc(70px + var(--safe-top)) 1fr auto;
    grid-template-columns: 260px 1fr;
    grid-template-areas:
        "sidebar topbar"
        "sidebar main"
        "sidebar footer";
}

/* Family pages use a one-column layout with shared bottom nav */
.familia-layout .app-container {
    min-height: unset;
    grid-template-rows: calc(70px + var(--safe-top)) auto auto;
    grid-template-columns: 1fr;
    grid-template-areas:
        "topbar"
        "main"
        "footer";
}

.familia-layout .topbar {
    left: 0;
    right: 0;
}

.familia-layout .main-content {
    padding-bottom: 12px;
}

.familia-layout .app-footer {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    background: transparent;
    border-top: none;
    padding: 6px 0 calc(62px + env(safe-area-inset-bottom));
    pointer-events: auto;
}

.footer-content-familia {
    justify-content: center;
    align-items: center;
    min-height: 16px;
    margin-bottom: 10px;
}

.footer-logo-familia {
    height: 16px;
    width: auto;
    opacity: 0.75;
    display: block;
}

/* Topbar */
.topbar {
    grid-area: topbar;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(50,73,75,0.1);
    box-shadow: 0 1px 10px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: calc(70px + var(--safe-top));
    padding-top: var(--safe-top);
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--primary);
}

.site-logo {
    width: 140px;
    height: auto;
    display: block;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.notifications-bell {
    position: relative;
    color: var(--text-dark);
    transition: var(--transition);
}

.notifications-bell:hover {
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-profile-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--text-light);
}

/* Sidebar */
.sidebar {
    grid-area: sidebar;
    background: linear-gradient(180deg, #ffffff, var(--bg-white));
    border-right: 1px solid rgba(23,32,39,0.03);
    padding: 24px 0;
    overflow-y: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    font-size: 15px;
}

.nav-item:hover {
    background: rgba(86, 136, 100, 0.05);
    color: var(--primary);
}

.nav-item.active {
    background: rgba(86, 136, 100, 0.1);
    color: var(--primary);
    font-weight: 500;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
}

.nav-item svg {
    flex-shrink: 0;
}

/* Force icons and nav text to use a high-contrast color */
.nav-item {
    color: var(--text-dark);
}
.nav-item svg,
.nav-item svg path,
.nav-item svg circle,
.nav-item svg rect {
    color: var(--text-dark);
    stroke: currentColor;
    fill: none;
}

/* More graphic, higher-contrast panels */
.content-section,
.stat-card,
.action-card,
.welcome-banner,
.welcome-card,
.activity-card,
.action-card-modern {
    border: 1px solid rgba(23,32,39,0.04);
    box-shadow: 0 6px 18px rgba(23,32,39,0.06);
    transition: transform 0.35s cubic-bezier(0.2,0.9,0.2,1), box-shadow 0.35s;
}

.content-section:hover,
.stat-card:hover,
.action-card:hover,
.action-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(23,32,39,0.09);
}

.card-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--primary-rgb),0.12), rgba(var(--primary-variant-rgb),0.06));
    box-shadow: inset 0 -6px 14px rgba(0,0,0,0.02);
    margin: 0 auto 8px auto;
}

.action-card-modern {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px;
    border-radius: 14px;
}

.card-content h3,
.action-card h3,
.stat-value {
    color: var(--text-dark);
}

.card-arrow {
    margin-left: auto;
    font-size: 20px;
    color: rgba(23,32,39,0.45);
}

/* Make table headers more legible */
.data-table th {
    color: var(--text-dark);
}

/* Slightly darker topbar icons */
.topbar svg {
    color: var(--text-dark);
}

.nav-badge {
    margin-left: auto;
    background: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.nav-logout {
    margin-top: auto;
    color: #e74c3c;
}

.nav-logout:hover {
    background: rgba(231, 76, 60, 0.05);
}

.sidebar-overlay {
    display: none;
}

/* Main Content */
.main-content {
    grid-area: main;
    padding: 32px;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 32px;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 8px;
}

.page-header h1::after {
    content: '';
    display: block;
    width: 72px;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--primary-variant));
    border-radius: 6px;
    margin-top: 12px;
}
.page-header p {
    color: var(--text-light);
    margin-top: 4px;
}

.welcome-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 48px 40px;    
    border-radius: 12px;
    margin-bottom: 32px;
}

.welcome-banner h1 {
    font-size: 36px;
    color: white;
    margin-bottom: 8px;
}

.welcome-banner p {
    font-size: 18px;
    opacity: 0.9;
}

.content-section {
    background: linear-gradient(180deg, #ffffff, var(--bg-white));
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(23,32,39,0.04);
    margin-bottom: 24px;
}

.content-section h2 {
    font-size: 24px;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: linear-gradient(180deg, #ffffff, rgba(191,214,189,0.025));
    padding: 20px 22px;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(23,32,39,0.05);
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, var(--primary), var(--primary-variant));
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(23,32,39,0.04);
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-dark);
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.action-card {
    background: linear-gradient(180deg, #ffffff, rgba(var(--primary-rgb),0.02));
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(23,32,39,0.04);
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    border: 2px solid transparent;
}

.action-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.action-card svg {
    color: var(--primary);
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 12px rgba(var(--primary-rgb),0.06));
}

/* Slightly stronger hover for admin to feel tactile */
.action-card:hover,
.action-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(23,32,39,0.09);
}

.action-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.action-card p {
    font-size: 14px;
    color: var(--text-light);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-light);
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background: var(--bg-light);
}

.table-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    border-radius: 6px;
}

.btn-icon:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.btn-icon.btn-danger:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

/* Responsive table: convert to cards on small screens to avoid horizontal scroll */
@media (max-width: 767px) {
    .table-responsive {
        overflow: visible;
    }

    .data-table {
        display: block;
        width: 100%;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody {
        display: block;
    }

    .data-table tbody tr {
        display: block;
        background: white;
        border-radius: 10px;
        margin-bottom: 12px;
        box-shadow: var(--shadow-sm);
        overflow: hidden;
        border: 1px solid var(--border-color);
    }

    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 14px;
        border: none;
        font-size: 14px;
    }

    .data-table td + td {
        border-top: 1px solid rgba(0,0,0,0.03);
    }

    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-light);
        margin-right: 12px;
        flex: 0 0 auto;
    }

    .data-table td span.badge {
        white-space: nowrap;
    }

    .table-actions {
        justify-content: flex-end;
    }

    .page-header h1 {
        width: 100%;
    }
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    text-transform: capitalize;
}

.badge-activo, .badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-inactivo {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-admin {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-seguridad {
    background: #e2e3e5;
    color: #383d41;
}

.badge-familia {
    background: #d4edda;
    color: #155724;
}

.badge-semanal {
    background: #cce5ff;
    color: #004085;
}

.badge-mensual {
    background: #d4edda;
    color: #155724;
}

.badge-especial {
    background: #fff3cd;
    color: #856404;
}

.badge-deporte {
    background: #cce5ff;
    color: #004085;
}

.badge-alimentacion {
    background: #d4edda;
    color: #155724;
}

.badge-jardineria {
    background: #d1ecf1;
    color: #0c5460;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 800px;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal form {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Programs Grid */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.program-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.program-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.program-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.program-header h3 {
    font-size: 24px;
    color: white;
    margin: 0;
}

.program-header .btn-icon {
    color: white;
}

.program-header .btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.program-body {
    padding: 20px;
}

.program-body h4 {
    font-size: 18px;
    margin-bottom: 12px;
}

.program-body p {
    color: var(--text-light);
    margin-bottom: 12px;
}

/* Timeline */
.timeline-container {
    position: relative;
    padding-left: 40px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding: 24px;
    margin-bottom: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-dark);
    display: block;
    transition: var(--transition);
}

.timeline-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateX(8px);
}

.timeline-marker {
    position: absolute;
    left: -39px;
    top: 24px;
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px white;
}

.month-number {
    color: white;
    font-weight: 600;
    font-size: 12px;
}

.timeline-content h3 {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 400;
    margin-bottom: 4px;
}

.timeline-content h4 {
    font-size: 20px;
    margin-bottom: 8px;
}

.timeline-content p {
    color: var(--text-light);
    margin-bottom: 12px;
}

/* Community redesign (family) */
.community-page-header {
    margin-bottom: 10px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
}

.community-page-header h1 {
    margin: 0;
    font-size: clamp(26px, 4.8vw, 34px);
    line-height: 1.05;
    letter-spacing: -0.4px;
    color: #1f3f25;
    text-wrap: balance;
}

.community-page-header h1::after {
    width: 56px;
    height: 4px;
    margin-top: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #568864 0%, #76a685 100%);
}

.community-page-header p {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: #5f7166;
    letter-spacing: 0;
}

.community-programs-wrap {
    margin-bottom: 10px;
}

.community-programs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.community-program-card {
    text-decoration: none;
    color: inherit;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 20, 18, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    display: flex;
    flex-direction: column;
}

.community-program-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(15, 20, 18, 0.14);
}

.community-card-media {
    height: 148px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.community-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13, 26, 16, 0.02) 20%, rgba(13, 26, 16, 0.78) 100%);
}

.community-card-meta {
    position: absolute;
    z-index: 1;
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.community-month-chip,
.community-video-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.25px;
    text-transform: uppercase;
}

.community-month-chip {
    background: rgba(86, 136, 100, 0.9);
    color: #fff;
}

.community-video-chip {
    background: rgba(255, 255, 255, 0.9);
    color: #2f4b32;
}

.community-card-body {
    padding: 10px 11px 11px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.community-card-body h3 {
    font-size: 15px;
    line-height: 1.3;
    margin: 0;
    color: var(--text-dark);
}

.community-card-body p {
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--text-light);
    margin: 0;
}

.community-card-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
}

.community-card-cta::after {
    content: '->';
    font-size: 12px;
    transform: translateX(0);
    transition: transform 0.2s ease;
}

.community-program-card:hover .community-card-cta::after {
    transform: translateX(2px);
}

/* ── Team editorial carousel ───────────────── */
.team-page-header {
    padding: 0;
    margin-bottom: 10px;
}

.team-kicker {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.team-big-title {
    font-size: clamp(48px, 12vw, 72px);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -2px;
    color: #111c13;
    margin: 0;
    text-transform: uppercase;
}

.team-big-title::after { display: none; }

.team-carousel-wrap {
    position: relative;
    margin-bottom: 0;
}

.team-carousel {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: #0f1b12;
    aspect-ratio: 3/4;
    max-height: 420px;
}

/* Make team carousel fill most of the mobile viewport so photos look large */
@media (max-width: 900px) {
    .team-carousel {
        aspect-ratio: auto;
        height: 62vh; /* increased to 62vh per request */
        max-height: none;
        border-radius: 12px;
    }

    .team-slide-photo img {
        object-position: center center;
    }

    .team-info-strip { margin-top: 12px; padding: 0 12px; }
    .team-info-name { font-size: 20px; }
    .team-info-role { font-size: 14px; }
}

@media (max-width: 420px) {
    .team-carousel { height: calc(100dvh - 100px); border-radius: 8px; }
    .team-big-title { font-size: 28px; }
}

/* Make the team carousel + info occupy full mobile viewport (image + content) */
@media (max-width: 900px) {
    .team-page-header { padding: 8px 12px; }
    .team-carousel-wrap {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
        margin-bottom: 0;
    }
    .team-carousel { height: 58vh; aspect-ratio: auto; max-height: none; border-radius: 12px; }
    .team-slide-photo, .team-slide-photo img { height: 100%; width: 100%; }
    .team-info-strip {
        position: relative;
        flex: 0 0 auto;
        padding: 12px;
        background: rgba(255,255,255,0.98);
        box-shadow: none;
        border-radius: 0 0 12px 12px;
        margin-top: 8px;
    }
    .team-info-item { display: none; }
    .team-info-item.is-active { display: block; }
}

.team-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.42s ease;
    pointer-events: none;
}

.team-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.team-slide-photo {
    width: 100%;
    height: 100%;
}

.team-slide-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.team-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.team-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(86,136,100,0.25);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.team-dot.is-active {
    background: var(--primary);
    transform: scale(1.35);
}

.team-info-strip {
    margin-top: 14px;
    position: relative;
    min-height: 80px;
}

.team-info-item {
    display: none;
}

.team-info-item.is-active {
    display: block;
}

.team-info-name-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.team-info-name {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #111c13;
    margin: 0 0 3px;
    line-height: 1.1;
}

.team-info-role {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--primary);
    margin: 0;
}

.team-nav-arrows {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-top: 2px;
}

.team-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(86,136,100,0.3);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1f3f25;
    transition: background 0.18s, border-color 0.18s;
}

.team-arrow:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.team-arrow svg { display: block; }

.team-info-bio {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-light);
    margin: 0;
}

/* ============================================================
   SERVICIOS FAMILIA PAGE  (svc-*)
   ============================================================ */
.svc-page {
    padding-bottom: 16px;
}

.svc-header {
    padding: 22px 20px 14px;
}

.svc-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.svc-subtitle {
    font-size: 13px;
    color: var(--text-light);
    margin: 3px 0 0;
}

/* Category icon scroll row */
.svc-cats-row {
    display: flex;
    gap: 12px;
    padding: 0 20px 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.svc-cats-row::-webkit-scrollbar { display: none; }

.svc-cat-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    flex-shrink: 0;
    width: 70px;
    transition: transform 0.18s;
}
.svc-cat-btn:active { transform: translateY(-2px); }

.svc-cat-lbl {
    font-size: 12px;
    color: var(--text-dark);
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    letter-spacing: -0.2px;
}

/* Sections */
.svc-sections {
    padding: 0 20px;
}

.svc-section {
    margin-bottom: 30px;
    scroll-margin-top: 80px;
}

.svc-section-lbl {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 10px;
    letter-spacing: -0.2px;
}

/* === SERVICE CARD ===
   .svc-card-wrap  — gradient bg, overflow:hidden, border-radius
   .svc-card       — transparent flex container
   .svc-card-photo — absolute right panel, bleeds into padding-top
*/
.svc-card-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.13);
    transition: box-shadow 0.2s;
}
.svc-card-wrap:active { box-shadow: 0 6px 18px rgba(0,0,0,0.16); }

.svc-card {
    min-height: 95px;
    display: flex;
    align-items: stretch;
}

.svc-card-left {
    flex: 1;
    padding: 14px 115px 14px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.svc-card-name {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2px;
    line-height: 1.15;
    letter-spacing: -0.2px;
}

.svc-card-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.88);
    margin: 0 0 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
}

.svc-card-btns {
    display: flex;
    gap: 5px;
    align-items: center;
}

.svc-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px 11px;
    border-radius: 16px;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.12s, opacity 0.12s;
    white-space: nowrap;
    letter-spacing: -0.3px;
}
.svc-btn:active { transform: scale(0.96); opacity: 0.85; }

.svc-btn-phone {
    background: rgba(255,255,255,0.25);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(8px);
}

.svc-btn-wa {
    background: rgba(255,255,255,0.25);
    color: #fff;
    padding: 5px 7px;
    border: none;
}

/* Photo panel */
.svc-card-photo {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 105px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    box-sizing: border-box;
}

.svc-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    border-radius: 6px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}


.team-grid { display: flex; flex-direction: column; gap: 16px; }
.team-member-card { display: none; }
.member-photo { height: 280px; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.member-info { padding: 14px 0; }
.member-info h3 { font-size: 18px; margin-bottom: 4px; }
.member-role { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.member-bio { font-size: 13px; color: var(--text-light); line-height: 1.55; }

/* iOS small-screen adjustments: safe-area handling and scaled sizes */
.profile-hero {
    padding: 28px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(var(--primary-rgb),0.03), rgba(var(--secondary-rgb),0.02));
    margin-bottom: 18px;
}
.profile-hero-inner {
    display: flex;
    gap: 22px;
    align-items: center;
}
.profile-avatar-large {
    width: 132px;
    height: 132px;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid rgba(var(--primary-rgb),0.12);
    box-shadow: 0 12px 30px rgba(23,32,39,0.06);
}
.profile-avatar-large img { width:100%; height:100%; object-fit:cover; display:block; }
.profile-hero-info { flex:1; }
.profile-name { font-family: 'Cannon Cannon', serif; font-size: 28px; margin:0 0 6px; color: var(--text-dark); }
.profile-sub { margin:0 0 12px; color: var(--text-light); }
.profile-meta { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
.meta-item { background: rgba(255,255,255,0.92); padding:10px 12px; border-radius:10px; box-shadow: 0 8px 20px rgba(23,32,39,0.04); }
.meta-label { font-size:12px; color: var(--text-light); }
.meta-value { font-weight:600; color: var(--text-dark); }
.profile-actions { display:flex; gap:10px; align-items:center; }
.btn-logout { background: var(--primary); color: #fff; }
.btn-logout:hover { background: var(--primary-variant); }
.profile-panels .panels-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap:16px; }
.panel-card { background: transparent; padding:12px 0; border-radius:8px; box-shadow: none; }
.panel-card h3 { margin:0 0 6px; color: var(--text-dark); }
.panel-card .muted { color: var(--text-light); margin:0; }

/* Profile page - mobile style fields and link cards */
.profile-page { max-width: 820px; margin: 0 auto; }
.profile-top { display:flex; align-items:center; gap:12px; margin-bottom:18px; flex-direction:column; text-align:center; }
.profile-top .profile-avatar-large { width:180px; height:180px; border-radius:50%; overflow:hidden; border:4px solid rgba(var(--primary-rgb),0.12); box-shadow: 0 18px 40px rgba(23,32,39,0.08); }
.profile-top .profile-avatar-large img { width:100%; height:100%; object-fit:cover; display:block; }
.profile-top .profile-name { font-size:24px; margin:8px 0 0; color:var(--text-dark); font-weight:800; }
.profile-fields { display:flex; flex-direction:column; gap:12px; margin-bottom:18px; }
.input-ghost {
    background: transparent;
    border-radius: 8px;
    padding: 10px 0;
    border: none;
    box-shadow: none;
    display: block;
}
.input-ghost + .input-ghost { border-top: none; }
.input-ghost .label { font-size:12px; color:var(--text-light); margin-bottom:6px; }
.input-ghost .value { font-weight:600; color:var(--text-dark); padding:8px 0; border-bottom: 1px solid rgba(var(--text-dark-rgb),0.06); }

.profile-links { display:flex; flex-direction:column; gap:10px; margin-bottom:18px; }
.profile-link-card { display:flex; align-items:center; justify-content:space-between; text-decoration:none; padding:12px 0; background: transparent; border-radius:6px; color:var(--text-dark); border: none; box-shadow: none; }
.profile-link-card + .profile-link-card { border-top: 1px solid rgba(var(--text-dark-rgb),0.06); padding-top:14px; }
.profile-link-card .link-title { font-weight:700; font-size:16px; }
.profile-link-card .link-chevron { color: rgba(var(--text-dark-rgb),0.35); font-weight:700; }

.profile-signout { margin-top:8px; display:flex; flex-direction:column; gap:8px; align-items:stretch; }
.profile-signout .btn { display:inline-block; text-decoration:none; text-align:center; box-sizing:border-box; }
.profile-signout .btn.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); padding:8px 12px; border-radius:10px; width: auto; align-self:flex-start; font-weight:700; }
.profile-signout .btn.btn-outline:hover { background: rgba(var(--primary-rgb),0.04); }
.profile-signout .btn.btn-logout { background: var(--primary); color: #fff; padding:12px 16px; border-radius:12px; border: none; width:100%; font-weight:700; transition: background .12s ease; }
.profile-signout .btn.btn-logout:hover { background: var(--primary-variant); }
.ios-small body, .ios-small html {
    /* slightly reduce base scale */
    font-size: 14px;
}

.ios-small .dashboard-hero,
.ios-small .page-header,
.ios-small .content-section {
    padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
}

.ios-small .dashboard-hero .hero-content {
    padding: 18px 16px;
}

.ios-small .hero-title {
    font-size: 18px;
}

.ios-small .hero-subtitle {
    font-size: 12px;
}

.ios-small .hero-stats .stat-item {
    padding: 10px;
    min-width: 88px;
}

.ios-small .activity-media { height: 140px }
.ios-small .activity-card-body { padding: 16px }
.ios-small .activity-title { font-size: 18px }
.ios-small .activity-description { font-size: 13px }

.ios-small .team-member-card .member-photo { height: 220px }

/* Ensure sidebar/menu is above safe-area and usable */
.ios-small #sidebar { padding-top: calc(env(safe-area-inset-top, 0px) + 8px) }
.ios-small #menuToggle { z-index: 10050 }

/* Compact / Professional UI: reduce sizes globally for a more elegant, dense layout */
html.compact body {
    font-size: 14px;
    line-height: 1.5;
}

html.compact h1 { font-size: 26px }
html.compact h2 { font-size: 20px }
html.compact h3 { font-size: 18px }

/* Header / Hero */
html.compact .dashboard-hero .hero-content { padding: 18px 20px }
html.compact .hero-title { font-size: 20px }
html.compact .hero-subtitle { font-size: 12px }
html.compact .hero-stats .stat-item { padding: 10px 12px; min-width: 84px }

/* Cards */
html.compact .activity-card { border-radius: 14px }
html.compact .activity-media { height: 160px }
html.compact .activity-card-body { padding: 18px }
html.compact .activity-title { font-size: 18px }
html.compact .activity-description { font-size: 13px }

/* Team cards */
html.compact .team-member-card { border-radius: 12px }
html.compact .member-photo { height: 260px }
html.compact .member-info { padding: 14px 16px }
html.compact .member-info h3 { font-size: 18px }
html.compact .member-role { font-size: 12px }

/* Misc compact adjustments */
html.compact .btn-view-more, html.compact .btn-activity-detail { padding: 10px 16px; font-size: 13px }
html.compact .page-header { padding: 16px 18px }
html.compact .content-section { padding: 12px 14px }

@media (max-width: 680px) {
    html.compact .member-photo { height: 240px }
    html.compact .activity-media { height: 140px }
}

/* iOS installed (standalone) safe-area adjustments
   When the app runs as a web-app on iOS (home-screen install or standalone),
   the system status bar and notch can overlap the content. Add a top offset
   using the safe-area inset to avoid overlap. */
html.ios-installed body,
html.ios-installed .page-header,
html.ios-installed .dashboard-hero,
html.ios-installed #sidebar {
    padding-top: calc(env(safe-area-inset-top, 20px));
}

/* Slight additional offset for interactive controls near the top */
html.ios-installed #menuToggle,
html.ios-installed .logo,
html.ios-installed .hero-logo-float {
    margin-top: calc(env(safe-area-inset-top, 20px));
}

/* Make sure fixed headers or overlays respect the safe area */
html.ios-installed .dashboard-hero .hero-content {
    padding-top: calc(env(safe-area-inset-top, 18px));
}

/* Fallback: if env() isn't supported, keep a reasonable top padding */
@supports not (padding-top: env(safe-area-inset-top)) {
    html.ios-installed body,
    html.ios-installed .page-header,
    html.ios-installed .dashboard-hero,
    html.ios-installed #sidebar {
        padding-top: 20px;
    }
}
.contact-link {
    font-size: 13px;
    transition: var(--transition);
}

.contact-link:hover {
    background: var(--primary);
    color: white;
}

/* Services List */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.service-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
        "thumb name actions"
        "thumb description actions";
    align-items: center;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    gap: 20px;
}

.service-name {
    grid-area: name;
    font-size: 18px;
    margin: 0;
}

.service-description {
    grid-area: description;
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
}

.service-thumb img { 
    display: block; 
    width: 72px; 
    height: 72px; 
    object-fit: cover; 
    border-radius: 8px; 
}

.service-item .service-thumb { 
    grid-area: thumb;
    flex: 0 0 auto; 
}

.service-actions {
    grid-area: actions;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Calendar Activities */
.calendar-activities {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.calendar-activity-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition);
}

.calendar-activity-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.activity-date-badge {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.badge-day {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.badge-month {
    font-size: 12px;
    text-transform: uppercase;
    margin-top: 4px;
}

.badge-time {
    font-size: 13px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.activity-content h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.activity-content p {
    color: var(--text-light);
    margin-bottom: 12px;
}

.activity-metadata {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-light);
}

/* Activities Timeline (Dashboard) */
.activities-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 12px;
}

.activity-date {
    flex-shrink: 0;
    width: 60px;
    text-align: center;
    padding: 8px;
    background: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.date-day {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.date-month {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-top: 4px;
}

.activity-details h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.activity-details p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.activity-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-light);
}

/* Profile */
.profile-container {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
}

.profile-avatar-section {
    text-align: center;
}

.profile-avatar-large {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary);
    margin: 0 auto;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-field label {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.field-value {
    font-size: 18px;
    color: var(--text-dark);
    font-weight: 500;
}

.about-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-light);
}

/* Cameras */
.cameras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.camera-viewer {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.camera-header {
    padding: 16px 20px;
    background: var(--bg-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.camera-header h3 {
    font-size: 18px;
    margin: 0;
}

.camera-status {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: capitalize;
}

.status-activo {
    background: #d4edda;
    color: #155724;
}

.status-configuracion {
    background: #fff3cd;
    color: #856404;
}

.status-inactivo {
    background: #f8d7da;
    color: #721c24;
}

.camera-display {
    aspect-ratio: 16/9;
    background: #000;
    position: relative;
}

.camera-stream {
    width: 100%;
    height: 100%;
}

.camera-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(86, 136, 100, 0.05) 0%, rgba(124, 188, 142, 0.05) 100%);
    color: var(--text-light);
    text-align: center;
    padding: 40px;
}

.camera-placeholder p {
    font-size: 16px;
    margin-top: 16px;
    margin-bottom: 8px;
}

.camera-placeholder small {
    font-size: 13px;
}

.camera-config-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.camera-icon {
    text-align: center;
    margin-bottom: 16px;
}

.camera-config-card h3 {
    text-align: center;
    margin-bottom: 8px;
}

.camera-config-card p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 20px;
}

.camera-form {
    margin-top: 20px;
}

/* Family security redesign */
.security-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.security-header {
    margin-bottom: 0;
}

.security-header h1 {
    margin-bottom: 4px;
}

.security-cameras-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.security-camera-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.security-camera-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.1);
}

.security-camera-header {
    background: linear-gradient(180deg, #f8fcf8 0%, #f3f8f3 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    align-items: flex-start;
}

.camera-subtitle {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-light);
}

.camera-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.camera-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.status-activo {
    background: rgba(31, 181, 72, 0.12);
    color: #127a33;
}

.status-configuracion {
    background: rgba(255, 175, 0, 0.14);
    color: #8d6500;
}

.status-inactivo,
.status-desactivado {
    background: rgba(227, 77, 77, 0.14);
    color: #9b2d2d;
}

.security-camera-display {
    background: #111;
}

.security-camera-placeholder {
    background: radial-gradient(circle at 15% 20%, rgba(86, 136, 100, 0.17), transparent 42%), #0f1b12;
    color: rgba(255, 255, 255, 0.85);
}

.security-camera-placeholder p,
.security-camera-placeholder small {
    color: rgba(255, 255, 255, 0.88);
}

.security-camera-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    font-size: 12px;
    color: var(--text-light);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
}

.security-camera-pill {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(86, 136, 100, 0.14);
    padding: 4px 8px;
    border-radius: 999px;
}

.security-note {
    margin: 0;
}

.security-info-showcase {
    border-radius: 18px;
    border: 1px solid rgba(86, 136, 100, 0.14);
    background:
        radial-gradient(circle at 15% 8%, rgba(86, 136, 100, 0.1), transparent 40%),
        linear-gradient(180deg, #ffffff 0%, #f4f8f4 100%);
}

.security-showcase-head {
    margin-bottom: 16px;
}

.security-showcase-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.security-showcase-head h2 {
    margin-bottom: 6px;
}

.security-showcase-head p {
    color: var(--text-light);
    max-width: 760px;
}

.security-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.security-feature-card {
    position: relative;
    border-radius: 14px;
    min-height: 185px;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.security-feature-large {
    grid-column: span 2;
    min-height: 220px;
}

.security-feature-media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1);
    transition: transform 0.35s ease;
}

.security-feature-card:hover .security-feature-media {
    transform: scale(1.05);
}

.security-feature-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 22, 14, 0.04) 15%, rgba(10, 22, 14, 0.85) 100%);
}

.security-feature-content {
    position: relative;
    z-index: 1;
    padding: 16px;
}

.security-feature-content h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 6px;
}

.security-feature-content p {
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    line-height: 1.45;
}

.security-guidelines {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.security-guideline-item {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 12px;
}

.security-guideline-item h4 {
    margin-bottom: 4px;
    color: #1f3f25;
}

.security-guideline-item p {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
}

/* Video Container */
.video-container {
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.program-video {
    width: 100%;
    aspect-ratio: 16/9;
}

.program-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-section h2 {
    font-size: 20px;
    margin-bottom: 12px;
}

.detail-section p {
    color: var(--text-light);
    line-height: 1.8;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 15px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.btn-back:hover {
    color: var(--primary);
}

/* Notificaciones */
.notifications-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.notification-unread {
    background: rgba(86, 136, 100, 0.05);
    border-left-color: var(--primary);
}

.notification-read {
    background: var(--bg-light);
    opacity: 0.7;
}

.notification-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon-visita {
    background: rgba(86, 136, 100, 0.1);
    color: var(--primary);
}

.notification-icon-actividad {
    background: rgba(124, 188, 142, 0.1);
    color: var(--secondary);
}

.notification-icon-sistema {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.notification-content {
    flex: 1;
}

.notification-content h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.notification-content p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 6px;
}

.notification-content small {
    color: var(--text-light);
    font-size: 12px;
}

.notification-actions {
    flex-shrink: 0;
}

.empty-state-large {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-large p {
    color: var(--text-light);
    margin-top: 16px;
    font-size: 16px;
}

/* Visitas Module */
.visit-form {
    max-width: 600px;
}

.search-results {
    position: relative;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
}

.search-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: var(--bg-light);
}

.search-item strong {
    display: block;
    margin-bottom: 4px;
}

.search-item span {
    font-size: 13px;
    color: var(--text-light);
}

.selected-familia {
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius);
    min-height: 56px;
    display: flex;
    align-items: center;
}

.selected-familia strong {
    color: var(--text-dark);
}

.selected-familia em {
    color: var(--text-light);
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.notification-info strong {
    display: block;
    margin-bottom: 2px;
}

.notification-house {
    font-size: 13px;
    color: var(--text-light);
    display: block;
    margin-bottom: 8px;
}

.notification-info p {
    margin-bottom: 6px;
}

.notification-info small {
    font-size: 12px;
    color: var(--text-light);
}

.empty-state {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
    font-size: 15px;
}

/* Footer */
.app-footer {
    grid-area: footer;
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 20px 32px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-left p {
    color: var(--text-light);
    font-size: 13px;
}

.footer-right {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 50%;
    color: var(--text-dark);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "topbar"
            "main"
            "footer";
    }

    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        width: 260px;
        z-index: 999;
        transition: var(--transition);
    }

    .topbar {
        left: 0;
        right: 0;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 998;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .menu-toggle {
        display: flex;
    }

    .dashboard-hero {
        width: 100%;
        margin: 0 0 24px;
        height: 60vh;
        max-height: 520px;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .profile-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-info-section {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .login-left {
        padding: 40px 24px;
    }

    .login-right {
        padding: 40px 24px;
    }

    .main-content {
        padding: 20px;
    }

    .content-section {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .cameras-grid {
        grid-template-columns: 1fr;
    }

    .security-header {
        gap: 12px;
        align-items: flex-start;
    }

    .security-showcase-grid {
        grid-template-columns: 1fr;
    }

    .security-feature-large {
        grid-column: span 1;
        min-height: 200px;
    }

    .security-guidelines {
        grid-template-columns: 1fr;
    }

    .community-programs-grid {
        grid-template-columns: 1fr;
    }

    .community-card-media {
        height: 160px;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .calendar-activity-item {
        flex-direction: column;
    }

    .service-item {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "thumb name"
            "description description"
            "actions actions";
        align-items: center;
        gap: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .service-item .service-thumb {
        flex: 0 0 auto;
    }

    .service-name,
    .service-description {
        min-width: 0;
    }

    .service-item .service-actions {
        margin-left: 0;
        justify-content: flex-start;
        display: flex;
        gap: 8px;
    }

    .service-thumb img {
        width: 88px;
        height: 88px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-info {
        display: none;
    }
}

@media (max-width: 480px) {
    .topbar {
        padding: 0 16px;
    }

    .welcome-banner {
        padding: 32px 24px;
    }

    .welcome-banner h1 {
        font-size: 28px;
    }

    .notification-card {
        flex-direction: column;
    }
    

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== DASHBOARD HERO SECTION ===== */
.dashboard-hero {
    position: relative;
    height: 70vh;
    max-height: 720px;
    width: calc(100% + 32px);
    margin: 0 0 32px -32px;
    background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(20,20,20,0.9) 100%);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.dashboard-hero .hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
    filter: brightness(0.55) contrast(1.15);
    animation: slowZoom 20s ease-in-out infinite alternate;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.65) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 32px;
    text-align: center;
}

.hero-meta {
    margin-top: 18px;
}

.hero-meta-item {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.hero-logo-float {
    margin-bottom: 20px;
}

.floating-leaf {
    width: 60px;
    height: 60px;
    animation: floatLeaf 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.hero-title {
    font-family: 'Cannon Cannon', serif;
    font-size: clamp(40px, 8vw, 72px);
    line-height: 1.05;
    color: rgba(255, 255, 255, 0.98);
    margin-bottom: 6px;
    letter-spacing: 0.06em;
    text-shadow: 2px 2px 16px rgba(0,0,0,0.4);
    animation: fadeInDown 0.8s ease-out;
}

.hero-subtitle {
    font-family: 'ClashDisplay-Light', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.68);
    margin-bottom: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.hero-meta-item {
    font-size: 12px;
    color: rgba(255,255,255,0.72);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: rgba(255,255,255,0.06);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
}
.hero-stats .stat-item {
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: var(--transition);
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 100px;
}

.hero-stats .stat-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
}

.hero-stats .stat-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.hero-stats .stat-value {
    font-family: 'Cannon Cannon', serif;
    font-size: clamp(18px, 2.6vw, 28px);
    color: white;
    margin-bottom: 4px;
}

.hero-stats .stat-label {
    font-family: 'ClashDisplay-Light', sans-serif;
    font-size: clamp(11px, 1.6vw, 13px);
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Desktop: make stat-items stretch evenly across available width */
@media (min-width: 900px) {
    .hero-stats { gap: 28px; }
    .hero-stats .stat-item { padding: 20px 22px; min-height: 120px; }
    .hero-stats .stat-value { font-size: 28px; }
}

/* Mobile: compact minicards with uniform size and smaller text */
@media (max-width: 480px) {
    .hero-stats { gap: 10px; }
    .hero-stats .stat-item { padding: 8px 10px; min-width: 88px; max-width: 120px; min-height: 86px; }
    .hero-stats .stat-icon { font-size: 28px; margin-bottom: 6px; }
    .hero-stats .stat-value { font-size: 16px; }
    .hero-stats .stat-label { font-size: 11px; }
}

/* ===== ACTIVITIES SHOWCASE ===== */
.activities-showcase {
    margin: 32px 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-icon {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.section-title {
    font-family: 'Cannon Cannon', serif;
    font-size: 28px;
    color: var(--text-dark);
    margin: 0;
}

.btn-view-more {
    padding: 10px 18px;
    border-radius: 999px;
    background: #1f2937;
    color: white;
    text-decoration: none;
    font-weight: 600;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    white-space: nowrap;
}

.btn-view-more:hover {
    background: #111827;
}

.section-subtitle {
    font-family: 'ClashDisplay-Light', sans-serif;
    color: var(--text-light);
    font-size: 16px;
    margin-top: 4px;
}

.btn-view-more {
    font-family: 'ClashDisplay-Medium', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    font-size: 14px;
}

.btn-view-more:hover {
    background: var(--secondary);
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.activities-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    background: transparent;
    padding: 0;
    margin: 0;
}

.activity-card {
    background: transparent;
    border-radius: 18px;
    overflow: hidden;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    transition: transform 180ms ease;
}

.activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(0,0,0,0.25);
    border-color: rgba(255,255,255,0.25);
}

/* Media (imagen) para la tarjeta de actividad */
.activity-media {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: transparent;
}

.activity-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.activity-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.2));
    border-radius: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.overlay-flex {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.overlay-date {
    font-size: 12px;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.activity-title.inside {
    font-size: clamp(18px, 4vw, 24px);
    margin: 0;
    color: #fff;
    font-family: 'Cannon Cannon', serif;
    line-height: 1.2;
}

.activity-overlay-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 4px 12px 10px 12px;
    background: rgba(0,0,0,0.45);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.overlay-chip {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.95);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
    padding: 4px 9px;
    backdrop-filter: blur(5px);
}


.activity-card-body {
    padding: 10px 16px 14px;
    background: rgba(15, 23, 42, 0.75);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.meta-item {
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.meta-text { color: #f8fafc; }

.activity-card { background: #0b0f13; border: 1px solid rgba(255,255,255,0.06); }

.activity-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.date-day {
    font-family: 'Cannon Cannon', serif;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
}

.date-month {
    font-family: 'ClashDisplay-Light', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.activity-status-badge {
    font-family: 'ClashDisplay-Medium', sans-serif;
    padding: 6px 12px;
    background: #ffc107;
    color: #333;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-card-body {
    padding: 24px;
}

.activity-title {
    font-family: 'Cannon Cannon', serif;
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.activity-description {
    font-family: 'ClashDisplay-Regular', sans-serif;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.activity-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-light);
    border-radius: 8px;
}

.meta-icon {
    font-size: 16px;
}

.meta-text {
    font-family: 'ClashDisplay-Regular', sans-serif;
    font-size: 13px;
    color: var(--text-dark);
}

.activity-card-footer {
    padding: 0 24px 24px;
}

.btn-activity-detail {
    font-family: 'ClashDisplay-Medium', sans-serif;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.btn-activity-detail:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.empty-state-modern {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    width: 100px;
    height: 100px;
    opacity: 0.3;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

/* ===== QUICK ACCESS SECTION ===== */
.quick-access-section {
    margin: 32px 24px;
}

.quick-actions-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.action-card-modern {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    background: white;
    border-radius: 20px;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: var(--transition);
    overflow: hidden;
}

.action-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    transition: var(--transition);
}

.action-card-modern:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.action-card-modern:hover::before {
    width: 100%;
    opacity: 0.05;
}

.card-icon-wrapper {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 16px;
    color: white;
    transition: var(--transition);
}

.action-card-modern:hover .card-icon-wrapper {
    transform: rotate(5deg) scale(1.1);
}

.card-green .card-icon-wrapper { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-variant) 100%); }
.card-blue .card-icon-wrapper { background: linear-gradient(135deg, #3498db 0%, #5dade2 100%); }
.card-purple .card-icon-wrapper { background: linear-gradient(135deg, #8e44ad 0%, #a569bd 100%); }
.card-orange .card-icon-wrapper { background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%); }
.card-red .card-icon-wrapper { background: linear-gradient(135deg, #e74c3c 0%, #ec7063 100%); }
.card-teal .card-icon-wrapper { background: linear-gradient(135deg, #16a085 0%, #1abc9c 100%); }

.card-content h3 {
    font-family: 'Cannon Cannon', serif;
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.card-content p {
    font-family: 'ClashDisplay-Light', sans-serif;
    font-size: 13px;
    color: var(--text-light);
}

.card-arrow {
    margin-left: auto;
    font-size: 24px;
    color: var(--primary);
    transition: var(--transition);
}

.action-card-modern:hover .card-arrow {
    transform: translateX(5px);
}

/* ===== WELCOME SECTION ===== */
.welcome-section {
    margin: 32px 24px;
}

.welcome-card {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    background: white;
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow-md);
    align-items: center;
}

.welcome-image {
    text-align: center;
}

.logo-animated {
    max-width: 250px;
    width: 100%;
    height: auto;
    animation: floatSlow 6s ease-in-out infinite;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.1));
}

.welcome-text h2 {
    font-family: 'Cannon Cannon', serif;
    font-size: 36px;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.welcome-text p {
    font-family: 'ClashDisplay-Regular', sans-serif;
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 32px;
}

.welcome-features {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-light);
    border-radius: 12px;
    font-family: 'ClashDisplay-Medium', sans-serif;
    font-size: 14px;
}

.feature-icon {
    font-size: 20px;
}

/* ===== FLOATING DECORATIONS ===== */
.floating-decoration {
    position: fixed;
    pointer-events: none;
    opacity: 0.08;
    z-index: 0;
}

.leaf-1 {
    width: 150px;
    top: 20%;
    right: 5%;
    animation: floatDecoration1 15s ease-in-out infinite;
}

.leaf-2 {
    width: 120px;
    bottom: 15%;
    left: 8%;
    animation: floatDecoration2 18s ease-in-out infinite;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatLeaf {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes slowZoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes floatDecoration1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, -30px) rotate(5deg);
    }
    50% {
        transform: translate(0, -50px) rotate(-5deg);
    }
    75% {
        transform: translate(-20px, -30px) rotate(3deg);
    }
}

@keyframes floatDecoration2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(-30px, 20px) rotate(-8deg);
    }
    66% {
        transform: translate(30px, -20px) rotate(8deg);
    }
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpSmall {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .dashboard-hero {
        position: relative;
        left: 50%;
        right: 50%;
        width: 100vw;
        margin-left: -50vw;
        margin-right: -50vw;
        margin-top: -32px;
        height: 60vh;
        min-height: 320px;
        border-radius: 0;
    }

    .hero-content {
        padding: 24px 20px;
    }

    .hero-title {
        font-size: 24px;
        margin-bottom: 6px;
    }

    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .hero-stats .stat-item {
        padding: 10px 12px;
        min-width: 88px;
        max-width: 140px;
        font-size: 13px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .animate-slide-up { animation: slideUpSmall 0.5s ease-out both; }

    .stat-item {
        padding: 12px 8px;
        flex: 1;
        min-width: 0;
    }

    .stat-icon {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .stat-value {
        font-size: 16px;
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stat-label {
        font-size: 9px;
        letter-spacing: 0.5px;
    }

    .activities-grid {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        padding: 0 16px;
        scroll-snap-type: x mandatory;
    }

    .activities-grid::-webkit-scrollbar {
        display: none;
    }

    .activity-card {
        min-width: 280px;
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .activities-showcase {
        margin: 24px 16px;
    }

    .section-title {
        font-size: 24px;
    }

    .quick-actions-modern {
        grid-template-columns: 1fr;
    }

    .quick-access-section {
        margin: 24px 16px;
    }

    .welcome-card {
        grid-template-columns: 1fr;
        padding: 24px;
        gap: 20px;
    }

    .welcome-section {
        margin: 24px 16px;
    }

    .welcome-text h2 {
        font-size: 24px;
    }

    .welcome-text p {
        font-size: 14px;
    }

    .logo-animated {
        max-width: 150px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .floating-decoration {
        display: none;
    }
}



/* ===== FAMILIA APP � Mobile-first dashboard ===== */

/* Body override for this view */
body.fam-app {
    background: #f4f6f4;
    color: #1e2e20;
    overscroll-behavior: none;
}

/* Shell: full-height flex column */
.fam-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    background: #f4f6f4;
}

/* -- TOP BAR --------------------------- */
.fam-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: rgba(255,255,255,0.95);
    border-bottom: 1px solid rgba(50,73,75,0.1);
    box-shadow: 0 1px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 50;
    height: 70px;
}

.fam-logo {
    width: 140px;
    height: auto;
}

.fam-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fam-bell {
    position: relative;
    color: var(--text-dark);
    display: inline-flex;
}

.fam-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.fam-badge-nav {
    top: -4px;
    right: -8px;
}

.fam-avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(124,188,142,0.5);
    display: block;
}

.fam-avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* -- SCROLL AREA ----------------------- */
.fam-scroll {
    flex: 1;
    overflow-y: auto;
    padding: calc(70px + var(--safe-top) + 4px) 0 8px; /* topbar height + 4px gap */
}

@media (max-width: 600px) {
    .fam-scroll { padding-top: calc(70px + var(--safe-top) + 4px); }
}

/* -- GREETING -------------------------- */
.fam-greeting {
    padding: 6px 20px 18px;
}

.fam-greeting-sub {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.fam-greeting-name {
    font-family: 'Cannon Cannon', Georgia, serif;
    font-size: 46px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.08;
    margin-bottom: 10px;
    letter-spacing: -0.6px;
}

@media (max-width: 480px) {
    .fam-greeting-name { font-size: 30px; }
}

.fam-unit-chip {
    display: inline-block;
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    padding: 0;
    border-radius: 0;
}

/* -- HERO BANNER CARD ------------------ */
.fam-hero-card {
    position: relative;
    margin: 0 16px 24px;
    border-radius: 20px;
    overflow: hidden;
    height: 200px;
    cursor: pointer;
}

.fam-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: transform 0.4s;
}

.fam-hero-card:hover .fam-hero-bg { transform: scale(1.03); }

.fam-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.05) 0%,
        rgba(11,26,16,0.82) 75%,
        rgba(11,26,16,0.97) 100%
    );
}

.fam-hero-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    padding: 16px 18px 18px;
}

.fam-hero-tag {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 6px;
}

.fam-hero-title {
    font-family: 'Cannon Cannon', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 10px;
}

.fam-hero-date {
    font-size: 12px;
    color: rgba(191,214,189,0.8);
    margin-bottom: 12px;
}

.fam-hero-btn {
    display: inline-block;
    background: linear-gradient(90deg, var(--primary), var(--primary-variant));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(86,136,100,0.35);
}

/* -- SECTIONS -------------------------- */
.fam-section {
    padding: 0 16px 24px;
}

.fam-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.fam-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 0.1px;
}

.fam-section-link {
    font-size: 13px;
    color: var(--primary-variant);
    text-decoration: none;
}

/* -- QUICK ACCESS CHIPS ---------------- */
.fam-chips-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
}
.fam-chips-scroll::-webkit-scrollbar { display: none; }

.fam-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 11px;
    font-weight: 500;
    flex-shrink: 0;
    width: 64px;
    text-align: center;
}

.fam-chip-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fam-chip-green  { background: rgba(86,136,100,0.12); color: var(--primary); border: 1px solid rgba(86,136,100,0.18); }
.fam-chip-blue   { background: rgba(52,120,188,0.10); color: #3478bc; border: 1px solid rgba(52,120,188,0.18); }
.fam-chip-orange { background: rgba(188,110,52,0.10); color: #bc6e34; border: 1px solid rgba(188,110,52,0.18); }
.fam-chip-purple { background: rgba(130,80,188,0.10); color: #8250bc; border: 1px solid rgba(130,80,188,0.18); }
.fam-chip-teal   { background: rgba(52,168,150,0.10); color: #30a89a; border: 1px solid rgba(52,168,150,0.18); }
.fam-chip-pink   { background: rgba(233,30,99,0.10); color: #e91e63; border: 1px solid rgba(233,30,99,0.18); }
.fam-chip-brown  { background: rgba(121,85,72,0.10); color: #795548; border: 1px solid rgba(121,85,72,0.18); }
.fam-chip-red    { background: rgba(231,76,60,0.10); color: #e74c3c; border: 1px solid rgba(231,76,60,0.18); }
.fam-chip-yellow { background: rgba(255,193,7,0.10); color: #ffc107; border: 1px solid rgba(255,193,7,0.18); }

/* -- QUICK ACCESS GRID (full menu) ----- */
.fam-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.fam-quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    background: transparent;
    border-radius: 0;
    padding: 4px 2px;
    border: none;
    box-shadow: none;
    transition: transform 0.18s;
}

.fam-quick-item:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

.fam-quick-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
    margin: 0 auto;
}

.fam-quick-label {
    font-size: 10.5px;
    font-weight: 500;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.3;
}

/* -- ACTIVIDADES GRID ------------------ */
.fam-act-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.fam-act-card {
    text-decoration: none;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: block;
}

.fam-act-img {
    height: 110px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.fam-act-date {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
}

.fam-act-info {
    padding: 10px 12px;
}

.fam-act-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fam-act-time {
    font-size: 11px;
    color: var(--text-light);
}

/* Empty state */
.fam-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px;
    color: var(--text-light);
    font-size: 13px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* -- BOTTOM NAV ------------------------ */
.fam-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.07);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.07);
    display: flex;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}

.fam-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: #aab8ab;
    font-size: 10px;
    font-weight: 500;
    padding: 4px 0;
    transition: color 0.2s;
}

/* ── Stats strip ────────────────────────── */
.fam-stats-strip {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: #fff;
    border-radius: 18px;
    padding: 18px 8px;
    box-shadow: 0 2px 12px rgba(86,136,100,0.08);
}
.fam-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.fam-stat-num {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}
.fam-stat-label {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 500;
}
.fam-stat-sep {
    width: 1px;
    height: 36px;
    background: rgba(0,0,0,0.08);
}

/* ── Video card ──────────────────────────── */
.fam-video-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}
.fam-video-thumb {
    position: relative;
    height: 200px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.fam-video-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.70) 0%, rgba(0,0,0,0.12) 55%);
}
.fam-video-play {
    position: relative; z-index: 2;
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.94);
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.28);
    transition: transform 0.18s;
    color: var(--primary);
    text-decoration: none;
}
.fam-video-play:hover { transform: scale(1.07); }
.fam-video-play svg { margin-left: 4px; }
.fam-video-caption {
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
    padding: 14px 18px;
}
.fam-video-tag {
    display: inline-block;
    font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
    background: var(--primary); color: #fff;
    padding: 3px 9px; border-radius: 6px;
}
.fam-video-title {
    font-size: 14px; font-weight: 600; color: #fff;
    margin: 7px 0 0; line-height: 1.35;
    max-width: 260px;
}

/* ── Amenidades horizontal scroll ─────────── */
.fam-amenidades-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin: 0 -2px;
    padding: 2px;
}
.fam-amenidades-scroll::-webkit-scrollbar { display: none; }
.fam-amenidad-card {
    flex: 0 0 148px;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    text-decoration: none;
}
.fam-amenidad-img {
    height: 108px;
    background-size: cover;
    background-position: center;
}
.fam-amenidad-info { padding: 10px 11px 12px; }
.fam-amenidad-name {
    font-size: 12.5px; font-weight: 600;
    color: var(--text-dark); margin: 0 0 3px;
}
.fam-amenidad-desc {
    font-size: 10.5px; color: var(--text-light);
    margin: 0; line-height: 1.4;
}

/* ── About banner ───────────────────────── */
.fam-about-banner {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    min-height: 260px;
    display: flex;
    align-items: flex-end;
}
.fam-about-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
}
.fam-about-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(13,26,16,0.92) 0%, rgba(13,26,16,0.40) 70%, transparent 100%);
}
.fam-about-body {
    position: relative; z-index: 1;
    padding: 24px 20px;
    width: 100%;
}
.fam-about-logo {
    width: 100px;
    margin-bottom: 12px;
    display: block;
}
.fam-about-tagline {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    font-family: 'Playfair Display', serif;
}
.fam-about-desc {
    font-size: 12.5px;
    color: rgba(255,255,255,0.82);
    margin: 0 0 18px;
    line-height: 1.6;
}
.fam-about-btn {
    display: inline-block;
    background: #fff;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.18s;
}
.fam-about-btn:hover { transform: translateY(-2px); }

/* ────────────────────────────────────────── */
.fam-nav-item.active,
.fam-nav-item:hover {
    color: var(--primary);
}

.fam-nav-item svg {
    transition: transform 0.2s;
}

.fam-nav-item.active svg {
    transform: translateY(-1px);
}

/* Tablet/desktop: wider layout */
@media (min-width: 640px) {
    .fam-shell {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: 0 0 40px rgba(0,0,0,0.12);
    }
    .fam-bottom-nav {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }
    .familia-layout .app-footer { max-width: 480px; margin: 0 auto; }
    .fam-act-grid { grid-template-columns: 1fr 1fr; }
}

