/**
 * ARCHIVO    : staff.css
 * UBICACIÓN  : assets/css/staff.css
 * DESCRIPCIÓN: Estilos de staff.php v4.0 — tarjetas giratorias (flip on hover).
 *              Frente: banner + avatar circular + datos.
 *              Reverso: descripción + expertise + botones sociales.
 *              Prefijo "sf-" (StaFF) para evitar colisiones.
 *              Requiere campoaventuras.css antes (variables CSS del sistema).
 * AUTOR      : ERenovar SAS ®
 * Fecha: 2026-04-20
 */


/* ═══════════════════════════════════════════════════════════════
   1. HERO
   ═══════════════════════════════════════════════════════════════ */

.sf-hero {
    position: relative;
    min-height: 52vh;
    display: flex;
    align-items: center;
    padding: 7rem 0 4rem;
    overflow: hidden;
}
.sf-hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,102,0,0.10) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.sf-hero .container { position: relative; z-index: 2; }

.sf-hero-badge {
    display: inline-block;
    background: rgba(255,102,0,0.22);
    border: 1px solid rgba(255,102,0,0.45);
    color: #fff;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
}
.sf-hero-title {
    font-family: var(--font-display, 'Righteous', cursive);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.15;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
}
.sf-hero-sub {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    opacity: 0.9;
    font-weight: 500;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.35);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* Color de acento del sistema */
.sf-accent { color: #ff8533 !important; }

/* ── Stat badges del hero ── */
.sf-stat {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.20);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.25rem 1rem;
    transition: transform 0.3s ease, background 0.3s ease;
}
.sf-stat:hover { background: rgba(255,255,255,0.18); transform: translateY(-4px); }
.sf-stat-num {
    font-family: var(--font-display, 'Righteous', cursive);
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 0.2rem;
}
.sf-stat-lbl {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.82);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* ═══════════════════════════════════════════════════════════════
   2. HINT DE INTERACCIÓN
   ═══════════════════════════════════════════════════════════════ */

.sf-hint {
    background: var(--bg-secondary, #f8f9fa);
    color: var(--text-secondary, #666);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--border-color, #e9ecef);
}
.sf-hint i { color: var(--color-primary, #ff6600); }


/* ═══════════════════════════════════════════════════════════════
   3. SECCIÓN PRINCIPAL
   ═══════════════════════════════════════════════════════════════ */

.sf-section { background: var(--bg-secondary, #E5E9ED); }

.sf-section-title {
    font-family: var(--font-display, 'Righteous', cursive);
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 900;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 0.5rem;
}
.sf-section-sub {
    font-size: 1.05rem;
    color: var(--text-secondary, #666);
}


/* ═══════════════════════════════════════════════════════════════
   4. FLIP CARD — PERSPECTIVA 3D
   Técnica idéntica al modelo Creative Tim:
   - .sf-card-container: mantiene la perspectiva
   - .sf-card: gira 180° en Y al hover del contenedor
   - .sf-front / .sf-back: backface-visibility hidden
   ═══════════════════════════════════════════════════════════════ */

.sf-card-container {
    perspective: 800px;
    margin-bottom: 0;
    /* Altura fija: front y back son absolute, el container la sostiene */
    height: 420px;
}

/* Al hover sobre el contenedor, girar la tarjeta */
.sf-card-container:hover .sf-card {
    transform: rotateY(180deg);
}

.sf-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.45, 0.05, 0.55, 0.95);
    border-radius: 8px;
    /* --acento y --acento-bg se inyectan desde PHP por miembro */
}

/* Frente y reverso: posición absoluta, tapan el contenedor */
.sf-front,
.sf-back {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.12);
    overflow: hidden;
}

/* Frente: sobre el reverso */
.sf-front { z-index: 2; }

/* Reverso: inicialmente girado 180° */
.sf-back {
    transform: rotateY(180deg);
}


/* ═══════════════════════════════════════════════════════════════
   5. FRENTE DE LA TARJETA
   ═══════════════════════════════════════════════════════════════ */

/* Banner superior con imagen de portada */
.sf-cover {
    height: 108px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Avatar circular centrado sobre el banner (overlap) */
.sf-avatar-wrap {
    display: flex;
    justify-content: center;
    margin-top: -56px; /* Sube el avatar sobre el borde del banner */
    margin-bottom: 0;
    position: relative;
    z-index: 3;
}

.sf-avatar {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    object-position: center top;
    background: #fff;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Fallback de iniciales */
.sf-avatar-fb {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display, 'Righteous', cursive);
    font-size: 2.4rem;
    font-weight: 900;
    /* color y background inyectados inline */
}

/* Cuerpo del frente */
.sf-front-body {
    padding: 8px 20px 16px;
    text-align: center;
}

.sf-nombre {
    font-family: var(--font-display, 'Righteous', cursive);
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text-primary, #444);
    margin: 8px 0 2px;
    text-transform: capitalize;
    line-height: 1.2;
}

.sf-cargo {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    /* color inyectado inline */
}

/* Lista de metadatos (ubicación, empresa, especialidad) */
.sf-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
    text-align: left;
}
.sf-meta li {
    font-size: 0.82rem;
    color: var(--text-secondary, #777);
    font-weight: 400;
    line-height: 1.8;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.sf-meta li i {
    width: 14px;
    text-align: center;
    margin-top: 3px;
    flex-shrink: 0;
}

/* Rating decorativo */
.sf-rating {
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    padding-top: 8px;
    margin-top: 6px;
    letter-spacing: 2px;
}


/* ═══════════════════════════════════════════════════════════════
   6. REVERSO DE LA TARJETA
   ═══════════════════════════════════════════════════════════════ */

.sf-back {
    display: flex;
    flex-direction: column;
    background: #fff;
}

/* Encabezado del reverso: lema/descripción */
.sf-back-header {
    padding: 14px 18px 10px;
    border-bottom: 1px solid;
    /* border-color inyectado inline */
}
.sf-motto {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-secondary, #888);
    line-height: 1.55;
    margin: 0;
    font-style: italic;
    /* Limitar a 3 líneas para que quepa en la tarjeta */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Cuerpo del reverso */
.sf-back-body {
    padding: 12px 18px;
    flex: 1;
    overflow: hidden;
}
.sf-back-label {
    font-family: var(--font-display, 'Righteous', cursive);
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.sf-back-text {
    font-size: 0.82rem;
    color: var(--text-secondary, #666);
    line-height: 1.55;
    margin: 0;
    /* Limitar texto para que quepa */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pie del reverso: botones sociales */
.sf-back-footer {
    border-top: 1px solid;
    padding: 10px 18px 14px;
    /* border-color inyectado inline */
}
.sf-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}
.sf-soc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1rem;
    text-decoration: none;
    /* color y background usando variable CSS inyectada inline */
    color: var(--btn, #ff6600);
    border: 2px solid var(--btn, #ff6600);
    background: transparent;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.sf-soc-btn:hover {
    background: var(--btn, #ff6600);
    color: #fff;
    transform: scale(1.12);
}


/* ═══════════════════════════════════════════════════════════════
   7. SECCIÓN COMPROMISO
   ═══════════════════════════════════════════════════════════════ */

.sf-compromiso { background: var(--bg-primary, #fff); }

.sf-comp-card {
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 16px;
    border: 1px solid var(--border-color, #e9ecef);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.sf-comp-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.10);
    border-color: var(--color-primary, #ff6600);
}
.sf-comp-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: transform 0.3s ease;
}
.sf-comp-card:hover .sf-comp-icon { transform: scale(1.1) rotate(-5deg); }


/* ═══════════════════════════════════════════════════════════════
   8. CTA FINAL
   ═══════════════════════════════════════════════════════════════ */

.sf-cta {
    background: linear-gradient(135deg,
        var(--color-primary, #ff6600) 0%,
        var(--color-primary-dark, #cc5200) 40%,
        var(--ca-azul-oscuro, #1e3a5f) 100%);
    position: relative;
    overflow: hidden;
}
.sf-cta::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}


/* ═══════════════════════════════════════════════════════════════
   9. TEMA OSCURO
   ═══════════════════════════════════════════════════════════════ */

[data-theme="dark"] .sf-section     { background: var(--bg-secondary, #2d3748); }
[data-theme="dark"] .sf-compromiso  { background: var(--bg-primary, #1a202c); }
[data-theme="dark"] .sf-comp-card   { background: var(--bg-secondary, #2d3748); border-color: #4a5568; }
[data-theme="dark"] .sf-front,
[data-theme="dark"] .sf-back        { background: var(--bg-primary, #1a202c); box-shadow: 0 2px 16px rgba(0,0,0,0.4); }
[data-theme="dark"] .sf-nombre      { color: var(--text-primary, #f7fafc); }
[data-theme="dark"] .sf-meta li,
[data-theme="dark"] .sf-back-text,
[data-theme="dark"] .sf-motto       { color: #a0aec0; }
[data-theme="dark"] .sf-hint        { background: var(--bg-primary, #1a202c); border-color: #4a5568; }
[data-theme="dark"] .sf-rating      { border-color: #4a5568; }


/* ═══════════════════════════════════════════════════════════════
   10. RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

/* Tablets */
@media (max-width: 991px) {
    .sf-hero { min-height: 45vh; padding: 6rem 0 3rem; }
    .sf-stat-num { font-size: 1.6rem; }
}

/* Mobile — touch: girar al tap en lugar de hover */
@media (max-width: 767px) {
    .sf-hero { min-height: auto; padding: 5rem 0 2.5rem; }
    .sf-hero-sub br { display: none; }
    .sf-stat-badge { padding: 1rem 0.75rem; }
    .sf-stat-num { font-size: 1.4rem; }

    /* En touch el flip es por click (JS nativo del sistema lo gestiona).
       En móvil aumentamos un poco la tarjeta para que el texto quepa. */
    .sf-card-container { height: 440px; }
    .sf-cover { height: 100px; }
    .sf-nombre { font-size: 1.15rem; }
}

@media (max-width: 480px) {
    .sf-card-container { height: 460px; }
    .sf-stat-lbl { font-size: 0.7rem; }
}

/* ═══════════════════════════════════════════════════════════════
   FIN — staff.css v4.0
   ═══════════════════════════════════════════════════════════════ */
