/* ========================================================
   JOALEX – TARJETA DIGITAL
   Black & Gold Premium - Pantalla Completa Móvil (100% Viewport)
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
    --bg:              #000000;
    --gold:            #D8B257;
    --gold-light:      #F5DE9C;
    --gold-border:     rgba(216, 178, 87, 0.65);
    --gold-glow:       rgba(216, 178, 87, 0.35);
    --btn-bg-start:    #161616;
    --btn-bg-end:      #0b0b0b;
    --white:           #FFFFFF;
    --radius-box:      1.35rem;
    --radius-pill:     9999px;
    --transition:      all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Escalado fluido proporcional al ancho de la pantalla del celular:
   Funciona tanto en viewport móvil normal (360-440px) como si el
   navegador móvil fuerza vista de escritorio o frame de 980px */
html {
    background-color: #000000;
    font-size: calc(100vw / 24.5);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #000000;
    color: var(--white);
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: stretch;
    overflow-x: hidden;
    line-height: 1.35;
    padding: 0;
    margin: 0;
}

/* ─── Contenedor principal: Ocupa el 100% de ancho y alto en móvil ─── */
.card-container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ══════════════════════════════════════════
   HEADER / HERO
   ══════════════════════════════════════════ */
.header-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-banner-wrap {
    width: 100%;
    position: relative;
    overflow: hidden;
    line-height: 0;
}

.hero-complete-img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    user-select: none;
}

/* Nombre: Xavier (Blanco) | Juárez Pérez (Dorado idéntico a iconos) */
.user-name {
    font-size: 1.48rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--white);
    margin-top: 0.35rem;
    margin-bottom: 0.30rem;
    padding: 0 0.8rem;
    white-space: nowrap;
}

.user-name span {
    color: var(--gold);
    font-weight: 800;
}

/* Cargo: DIRECTOR GENERAL (Texto en blanco con líneas doradas) */
.badge-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    width: 100%;
    margin-bottom: 0.25rem;
    padding: 0 1.2rem;
}

.line-gold {
    flex: 1;
    max-width: 4.2rem;
    height: 0.08rem;
    background: linear-gradient(to right, transparent, var(--gold));
}

.line-gold.right {
    background: linear-gradient(to left, transparent, var(--gold));
}

.title-text {
    font-size: 0.74rem;
    color: var(--white);
    letter-spacing: 0.22em;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ══════════════════════════════════════════
   GRILLA 3x3 DE ACCIONES
   ══════════════════════════════════════════ */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.68rem;
    padding: 0.45rem 1.05rem 0;
    width: 100%;
    position: relative;
    z-index: 2;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--white);
    background: linear-gradient(180deg, var(--btn-bg-start) 0%, var(--btn-bg-end) 100%);
    border: 0.085rem solid var(--gold-border);
    border-radius: var(--radius-box);
    aspect-ratio: 1 / 0.90;
    padding: 0.65rem 0.35rem 0.55rem;
    gap: 0.52rem;
    transition: var(--transition);
    box-shadow: 0 0.3rem 1.1rem rgba(0, 0, 0, 0.65);
    position: relative;
    overflow: hidden;
}

.action-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 38%;
    background: linear-gradient(180deg, rgba(216, 178, 87, 0.08), transparent);
    border-radius: var(--radius-box) var(--radius-box) 0 0;
    pointer-events: none;
}

.action-item:hover {
    transform: translateY(-2px);
    border-color: var(--gold-light);
    box-shadow: 0 0.5rem 1.5rem rgba(216, 178, 87, 0.25);
}

.action-item:active {
    transform: scale(0.94);
    border-color: var(--gold);
}

/* Iconos de la grilla */
.icon-box {
    width: 2.15rem;
    height: 2.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--gold);
}

.icon-box svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

/* Tipografía de botones */
.action-item span {
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    color: var(--white);
    letter-spacing: 0.015em;
    line-height: 1.15;
    white-space: nowrap;
}

/* ══════════════════════════════════════════
   BOTONES INFERIORES: GUARDA Y COMPARTIR
   ══════════════════════════════════════════ */
.footer-actions {
    display: flex;
    gap: 0.65rem;
    padding: 0.75rem 1.05rem 0.2rem;
    width: 100%;
    position: relative;
    z-index: 2;
}

.btn {
    height: 3.45rem;
    border-radius: var(--radius-pill);
    border: none;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    letter-spacing: 0.01em;
}

/* Botón "Guarda mi contacto" */
.btn-save {
    flex: 1.75;
    background: #080808;
    color: var(--white);
    border: 0.085rem solid var(--gold-border);
    padding: 0 0.75rem 0 0.45rem;
    gap: 0.48rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.6);
}

.btn-save:hover {
    transform: translateY(-1px);
    border-color: var(--gold);
    box-shadow: 0 0.35rem 1.25rem rgba(216, 178, 87, 0.20);
}

.btn-save:active {
    transform: scale(0.96);
}

.avatar-pill {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 50%;
    border: 0.1rem solid var(--gold);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.avatar-pill-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 57% 37%;
    transform: scale(2.6);
    transform-origin: 57% 37%;
    display: block;
}

.btn-divider {
    width: 0.065rem;
    height: 1.55rem;
    background: rgba(216, 178, 87, 0.55);
    flex-shrink: 0;
}

.icon-add-contact {
    width: 1.15rem;
    height: 1.15rem;
    color: var(--gold);
    flex-shrink: 0;
}

.btn-save span {
    color: var(--white);
    font-weight: 600;
    font-size: 0.80rem;
    white-space: nowrap;
}

/* Botón "Compartir" */
.btn-share {
    flex: 1;
    background: #080808;
    color: var(--white);
    border: 0.085rem solid var(--gold-border);
    padding: 0 0.65rem;
    gap: 0.45rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.6);
}

.btn-share:hover {
    transform: translateY(-1px);
    border-color: var(--gold);
    box-shadow: 0 0.35rem 1.25rem rgba(216, 178, 87, 0.20);
}

.btn-share:active {
    transform: scale(0.96);
}

.icon-share {
    width: 1.15rem;
    height: 1.15rem;
    color: var(--gold);
    flex-shrink: 0;
}

.btn-share span {
    color: var(--white);
    font-weight: 600;
    font-size: 0.80rem;
    white-space: nowrap;
}

/* ══════════════════════════════════════════
   ESLOGAN INFERIOR
   ══════════════════════════════════════════ */
.footer-slogan {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.7rem 1.05rem 1.1rem;
    width: 100%;
    position: relative;
    z-index: 2;
}

.slogan-line {
    flex: 1;
    max-width: 3.8rem;
    height: 0.065rem;
    background: linear-gradient(to right, transparent, var(--gold));
}

.slogan-line.right {
    background: linear-gradient(to left, transparent, var(--gold));
}

.slogan-text {
    font-size: 0.58rem;
    color: var(--white);
    letter-spacing: 0.19em;
    font-weight: 500;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ─── Exclusivamente para Monitores de Escritorio / Laptops ( Formato Horizontal con Mouse ) ─── */
@media (min-width: 768px) and (orientation: landscape) and (hover: hover) and (pointer: fine) {
    html {
        font-size: 16px;
    }

    body {
        background-color: #080808;
        align-items: center;
        padding: 30px 0;
    }

    .card-container {
        max-width: 420px;
        min-height: auto;
        border-radius: 40px;
        border: 1px solid rgba(216, 178, 87, 0.28);
        box-shadow:
            0 30px 90px rgba(0, 0, 0, 0.95),
            0 0 50px rgba(216, 178, 87, 0.08);
    }
}
