/* 
 * Terratorque - Digital Contact Cards (Luxury Style)
 * Version 3.2.13 - EWEB Compact & Scrollable
 */

/* 1. GRID MAESTRO (Listado) */
.tt-equipa-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 320px)) !important;
    gap: 30px !important;
    margin: 40px auto !important;
    width: 100% !important;
    max-width: 1200px !important;
    justify-content: center !important; 
    align-items: stretch !important;
}

.tt-member-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 24px !important;
    padding: 35px 25px !important;
    text-align: center !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    height: 100% !important;
    position: relative !important;
}

.tt-member-card:hover { transform: translateY(-8px) !important; box-shadow: 0 15px 40px rgba(13, 89, 60, 0.12) !important; border-color: #0D593C !important; }

/* 2. PLACEHOLDERS Y FOTOS */
.tt-member-photo-wrap { 
    width: 110px; height: 110px; margin: 0 auto 25px; border-radius: 50%; overflow: hidden; border: 4px solid #f1f5f9; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #0D593C; 
}
.tt-member-photo { width: 100%; height: 100%; object-fit: cover; }
.tt-member-photo-placeholder { color: #ffffff; font-size: 42px; font-weight: 900; }

.tt-member-info { flex-grow: 1 !important; display: flex !important; flex-direction: column !important; justify-content: center !important; align-items: center !important; margin-bottom: 25px !important; width: 100% !important; }
.tt-member-name { font-size: 19px; font-weight: 800; color: #0f172a; margin: 0 0 6px 0 !important; line-height: 1.2 !important; }
.tt-member-role { font-size: 11px; color: #64748b; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; margin: 0 !important; }

/* 3. BOTÓN LISTADO */
.tt-btn-digital-card { background: #0D593C !important; color: #ffffff !important; border: none !important; padding: 14px 24px !important; border-radius: 14px !important; font-size: 12px !important; font-weight: 800; cursor: pointer !important; text-transform: uppercase !important; margin-top: auto !important; }

/* 4. POPUP MOTOR (SCROLL ACTIVADO) */
.mc-popup {
    position: fixed !important; top: 0 !important; left: 0 !important; 
    width: 100% !important; height: 100% !important;
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    display: none !important; 
    align-items: flex-start !important; /* Permite scroll desde arriba */
    justify-content: center !important;
    z-index: 100000 !important; 
    padding: 40px 20px !important;
    overflow-y: auto !important; /* El scroll que necesitábamos */
}
.mc-popup.active { display: flex !important; }

.mc-card {
    background: #ffffff !important;
    width: 100% !important;
    max-width: 500px !important; 
    border-radius: 40px !important;
    overflow: hidden !important;
    position: relative !important;
    box-shadow: 0 50px 150px rgba(0,0,0,0.6) !important;
    margin: auto !important; /* Centra la card si cabe, si no, permite scroll */
}

/* 5. HERO COMPACTO (AJUSTADO) */
.mc-hero {
    background: #0D593C !important;
    padding: 20px 15px !important; /* Ajuste solicitado */
    text-align: center !important; color: #ffffff !important;
}
.mc-photo { width: 90px !important; height: 90px !important; border-radius: 50% !important; margin: 0 auto 15px !important; border: 4px solid rgba(255,255,255,0.15) !important; object-fit: cover !important; }
.mc-photo--placeholder { width: 90px !important; height: 90px !important; background: rgba(255,255,255,0.1) !important; border-radius: 50% !important; margin: 0 auto 15px !important; display: flex !important; align-items: center; justify-content: center !important; font-size: 35px !important; font-weight: 900; color: #ffffff !important; }
.mc-name { font-size: 24px !important; font-weight: 900 !important; margin: 0 !important; line-height: 1.1; color: #fff !important; }
.mc-role { font-size: 12px !important; opacity: 0.8 !important; margin-top: 4px !important; font-weight: 600; text-transform: uppercase; color: #fff !important; }
.mc-bio { font-size: 13px !important; opacity: 0.9 !important; line-height: 1.5 !important; margin-top: 15px !important; font-style: italic !important; padding: 0 25px !important; color: #fff !important; }

/* 6. CHIPS HORIZONTALES (AJUSTADO) */
.mc-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; padding: 25px 30px !important; }

.mc-chip {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    padding: 4px 3px !important; /* Ajuste solicitado */
    border-radius: 14px !important;
    text-decoration: none !important;
    color: #0f172a !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: flex !important;
    flex-direction: row !important; /* Formato horizontal */
    align-items: center !important;
    gap: 11px !important; /* Ajuste solicitado */
    transition: 0.3s !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    min-height: 45px;
}
.mc-chip:hover { border-color: #0D593C !important; color: #0D593C !important; transform: translateY(-2px) !important; }
/* ICONOS SVG PROFESIONALES */
.mc-ico-svg {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}
.mc-ico-svg svg {
    width: 100%;
    height: 100%;
    stroke-width: 2;
}

.mc-chip:hover .mc-ico-svg {
    transform: scale(1.1);
}

/* 7. SECCIÓN QR (ADAPTATIVA) */
.mc-qr-section { text-align: center !important; padding: 0 35px 25px !important; }
.mc-qr-container { 
    background: #ffffff !important; 
    padding: 12px !important; 
    border-radius: 20px !important; 
    display: inline-block !important; 
    border: 1px solid #e2e8f0 !important; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.05) !important;
}
.mc-qr-img { 
    width: 120px !important; 
    height: 120px !important; 
    display: block !important; border-radius: 10px !important; 
}

@media (min-width: 769px) {
    .mc-qr-img { width: 180px !important; height: 180px !important; }
    .mc-qr-hint::before { content: "📱 "; }
}

.mc-qr-hint { font-size: 10px !important; color: #64748b !important; margin-top: 8px !important; font-weight: 600; text-transform: uppercase; }

/* 8. FOOTER Y DESCARGA */
.mc-footer { padding: 0 30px 35px !important; text-align: center !important; }
.mc-download-hint {
    margin-top: 15px !important;
    font-size: 11px !important;
    color: #64748b !important;
    font-weight: 600;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.mc-download-hint svg { width: 14px; height: 14px; opacity: 0.7; }
.mc-download { 
    background: #0f172a !important; color: #ffffff !important; 
    text-decoration: none !important; display: flex !important; align-items: center !important; justify-content: center !important; 
    padding: 16px !important; border-radius: 16px !important; 
    font-weight: 800 !important; font-size: 14px !important; transition: 0.3s !important; 
}
.mc-download:hover { background: #0D593C !important; transform: translateY(-2px) !important; box-shadow: 0 10px 25px rgba(13, 89, 60, 0.2) !important; }

.mc-close {
    position: absolute !important; top: 15px !important; right: 15px !important;
    background: rgba(255,255,255,0.2) !important; border: none !important; color: #fff !important;
    width: 30px !important; height: 30px !important; border-radius: 50% !important; cursor: pointer !important; z-index: 10 !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    font-size: 18px !important;
}

/* 9. SMART TOAST (NOTIFICAÇÃO) */
#tt-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #0f172a;
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    z-index: 200000;
    transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    opacity: 0;
    width: auto;
    min-width: 280px;
    text-align: center;
}

#tt-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.tt-toast-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.tt-toast-content svg { width: 24px; height: 24px; color: #0D593C; flex-shrink: 0; }
.tt-toast-content span { font-size: 13px; line-height: 1.4; text-align: left; }
.tt-toast-content strong { display: block; color: #0D593C; font-size: 14px; }
.tt-equipa-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important; }

@media (max-width: 480px) {
    .tt-equipa-grid { grid-template-columns: 1fr !important; }
    .mc-grid { grid-template-columns: 1fr !important; padding: 20px !important; }
    .mc-card { border-radius: 30px !important; max-width: 95% !important; }
}
