/* ============================================================
   SEREX QR CARD — Frontend CSS
   Alimentos Serex · Grupo Serex
   Brand colors: #1c335f #2261a8 #97b8da #115cfc #d5dde6
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --s-navy:       #0a1628;
    --s-dark:       #1c335f;
    --s-blue:       #2261a8;
    --s-light-blue: #97b8da;
    --s-electric:   #115cfc;
    --s-pale:       #d5dde6;
    --s-black:      #1b1b1a;
    --s-white:      #ffffff;
    --s-wa:         #25d366;
    --s-wa-dark:    #128c4b;
    --s-glass:      rgba(255,255,255,.06);
    --s-glass-border: rgba(255,255,255,.12);
    --s-radius:     20px;
    --s-radius-sm:  12px;
    --s-shadow:     0 25px 60px rgba(0,0,0,.5);
}

html, body { height: 100%; }

/* ── Background ─────────────────────────────────────────── */
.serex-card-body {
    min-height: 100vh;
    background: var(--s-navy);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--s-white);
    overflow-x: hidden;
}

.serex-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.serex-particles {
    position: absolute;
    inset: 0;
}

.serex-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(34,97,168,.25);
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0%   { transform: translateY(100vh) scale(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-20vh) scale(1); opacity: 0; }
}

.serex-bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: pulseGlow 8s ease-in-out infinite;
}
.serex-bg-glow-1 {
    width: 500px; height: 500px;
    background: rgba(34,97,168,.18);
    top: -150px; left: -100px;
}
.serex-bg-glow-2 {
    width: 400px; height: 400px;
    background: rgba(17,92,252,.12);
    bottom: -100px; right: -100px;
    animation-delay: -3s;
}
.serex-bg-glow-3 {
    width: 300px; height: 300px;
    background: rgba(151,184,218,.08);
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    animation-delay: -6s;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1);   opacity: .7; }
    50%       { transform: scale(1.3); opacity: 1;  }
}

/* ── Wrapper & Card ─────────────────────────────────────── */
.serex-card-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px 40px;
}

.serex-card {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(160deg, rgba(28,51,95,.85) 0%, rgba(10,22,40,.95) 100%);
    border: 1px solid var(--s-glass-border);
    border-radius: var(--s-radius);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--s-shadow), inset 0 1px 0 rgba(255,255,255,.1);
    overflow: hidden;
    animation: cardIn .6s cubic-bezier(.22,1,.36,1) both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(30px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1);   }
}

/* ── Brand Top ──────────────────────────────────────────── */
.serex-brand-top {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 28px 24px 0;
}

.serex-logo-img {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: .9;
}

.serex-brand-text {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--s-light-blue);
    text-transform: uppercase;
}

/* ── Profile ────────────────────────────────────────────── */
.serex-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 24px 24px;
    text-align: center;
}

.serex-avatar-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    margin-bottom: 20px;
}

.serex-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    border: 3px solid var(--s-blue);
}

.serex-avatar-placeholder {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--s-blue), var(--s-electric));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    font-weight: 800;
    color: var(--s-white);
    position: relative;
    z-index: 2;
}

.serex-avatar-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(34,97,168,.4);
    animation: ringPulse 2.5s ease-in-out infinite;
    z-index: 1;
}

.serex-avatar-ring-2 {
    inset: -14px;
    border-color: rgba(34,97,168,.2);
    animation-delay: -.8s;
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 1;  }
    50%       { transform: scale(1.06); opacity: .4; }
}

.serex-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--s-white);
    letter-spacing: -.3px;
    line-height: 1.2;
    margin-bottom: 6px;
}

.serex-cargo {
    font-size: 14px;
    font-weight: 600;
    color: var(--s-electric);
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.serex-empresa {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--s-light-blue);
    font-weight: 500;
    margin-bottom: 14px;
}

.serex-empresa-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--s-electric);
    flex-shrink: 0;
}

.serex-bio {
    font-size: 13px;
    color: rgba(151,184,218,.8);
    line-height: 1.6;
    max-width: 320px;
}

/* ── Divider ────────────────────────────────────────────── */
.serex-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px 20px;
}

.serex-divider::before,
.serex-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(151,184,218,.25), transparent);
}

.serex-divider-text {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(151,184,218,.5);
    white-space: nowrap;
}

/* ── WhatsApp Button ────────────────────────────────────── */
.serex-wa-section {
    padding: 0 24px 20px;
}

.serex-btn-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--s-wa) 0%, var(--s-wa-dark) 100%);
    border-radius: var(--s-radius-sm);
    color: var(--s-white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .2px;
    box-shadow: 0 8px 30px rgba(37,211,102,.35), 0 2px 8px rgba(0,0,0,.3);
    transition: transform .2s, box-shadow .2s;
    animation: waPulse 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.serex-btn-wa::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.15) 0%, transparent 50%);
    pointer-events: none;
}

.serex-btn-wa:hover,
.serex-btn-wa:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 14px 40px rgba(37,211,102,.45), 0 4px 12px rgba(0,0,0,.4);
    color: var(--s-white);
}

@keyframes waPulse {
    0%, 100% { box-shadow: 0 8px 30px rgba(37,211,102,.35), 0 2px 8px rgba(0,0,0,.3); }
    50%       { box-shadow: 0 8px 40px rgba(37,211,102,.55), 0 2px 8px rgba(0,0,0,.3); }
}

.serex-wa-icon {
    width: 24px; height: 24px;
    flex-shrink: 0;
}

.serex-btn-wa span { flex: 1; text-align: center; }

.serex-arrow {
    width: 18px; height: 18px;
    flex-shrink: 0;
    opacity: .7;
}

/* ── Contact Buttons ────────────────────────────────────── */
.serex-contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 24px 16px;
}

.serex-contact-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--s-glass);
    border: 1px solid var(--s-glass-border);
    border-radius: var(--s-radius-sm);
    color: var(--s-white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background .2s, border-color .2s, transform .15s;
}

.serex-contact-btn:hover {
    background: rgba(34,97,168,.25);
    border-color: rgba(34,97,168,.5);
    transform: translateX(4px);
    color: var(--s-white);
}

.serex-contact-btn svg {
    width: 18px; height: 18px;
    flex-shrink: 0;
    color: var(--s-electric);
}

/* ── Social Buttons ─────────────────────────────────────── */
.serex-socials {
    display: flex;
    gap: 10px;
    padding: 0 24px 20px;
}

.serex-social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    padding: 12px;
    border-radius: var(--s-radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .15s, opacity .15s;
    border: 1px solid var(--s-glass-border);
}

.serex-social-btn svg {
    width: 18px; height: 18px;
}

.serex-social-btn:hover { transform: scale(1.04); opacity: .9; }

.serex-social-li {
    background: rgba(10,102,194,.2);
    color: #6ab4f0;
    border-color: rgba(10,102,194,.3);
}

.serex-social-ig {
    background: rgba(225,48,108,.15);
    color: #f7a5bb;
    border-color: rgba(225,48,108,.25);
}

/* ── Lead Form ──────────────────────────────────────────── */
.serex-lead-section {
    padding: 0 24px 24px;
}

.serex-lead-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 18px;
    background: rgba(17,92,252,.1);
    border: 1px solid rgba(17,92,252,.25);
    border-radius: var(--s-radius-sm);
    color: var(--s-light-blue);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, border-color .2s;
    text-align: left;
}

.serex-lead-toggle:hover {
    background: rgba(17,92,252,.2);
    border-color: rgba(17,92,252,.45);
}

.serex-lead-toggle svg:first-child {
    width: 18px; height: 18px;
    color: var(--s-electric);
    flex-shrink: 0;
}

.serex-lead-toggle span { flex: 1; }

.serex-toggle-arrow {
    width: 16px; height: 16px;
    flex-shrink: 0;
    transition: transform .3s;
}

.serex-lead-toggle.open .serex-toggle-arrow {
    transform: rotate(180deg);
}

.serex-lead-form {
    display: none;
    padding: 18px 0 0;
    animation: formIn .3s ease both;
}

@keyframes formIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.serex-lead-intro {
    font-size: 13px;
    color: rgba(151,184,218,.7);
    margin-bottom: 14px;
    text-align: center;
}

.serex-field {
    margin-bottom: 10px;
}

.serex-field input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--s-radius-sm);
    color: var(--s-white);
    font-size: 14px;
    outline: none;
    transition: border-color .2s, background .2s;
}

.serex-field input::placeholder { color: rgba(151,184,218,.5); }

.serex-field input:focus {
    border-color: var(--s-electric);
    background: rgba(17,92,252,.1);
}

.serex-btn-lead {
    width: 100%;
    padding: 15px;
    margin-top: 6px;
    background: linear-gradient(135deg, var(--s-blue), var(--s-electric));
    border: none;
    border-radius: var(--s-radius-sm);
    color: var(--s-white);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, opacity .15s;
    box-shadow: 0 6px 24px rgba(17,92,252,.35);
}

.serex-btn-lead:hover { transform: translateY(-1px); opacity: .95; }
.serex-btn-lead:active { transform: scale(.99); }

.serex-lead-success {
    text-align: center;
    padding: 14px;
    background: rgba(37,211,102,.12);
    border: 1px solid rgba(37,211,102,.3);
    border-radius: var(--s-radius-sm);
    color: var(--s-wa);
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
}

.serex-lead-error {
    text-align: center;
    padding: 12px;
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.3);
    border-radius: var(--s-radius-sm);
    color: #f87171;
    font-size: 13px;
    margin-top: 10px;
}

/* ── Footer ─────────────────────────────────────────────── */
.serex-card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(255,255,255,.06);
}

.serex-footer-brand {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 3px;
    color: rgba(151,184,218,.4);
    text-transform: uppercase;
}

.serex-footer-sep,
.serex-footer-year {
    font-size: 11px;
    color: rgba(151,184,218,.3);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .serex-card-wrapper { padding: 16px 12px 32px; }
    .serex-name { font-size: 22px; }
}

@media (min-width: 600px) {
    .serex-card-wrapper { padding: 40px 16px 60px; }
    .serex-card { border-radius: 28px; }
    .serex-contacts { flex-direction: row; }
    .serex-contact-btn { flex: 1; justify-content: center; }
}
