/* RESET E CONFIGURAÇÕES BÁSICAS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a,
button,
[role="button"] {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

a:focus,
a:active,
button:focus,
button:active,
[role="button"]:focus,
[role="button"]:active {
    outline: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1a1a2e;
    background-image: url('/csm-vidros-3m8p/fundo-csm-vidros.webp'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* CONTAINER DOS CARTÕES */
.card-container {
    display: flex;
    flex-direction: column; 
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    gap: 40px; 
    padding: 40px 20px calc(170px + env(safe-area-inset-bottom, 0px));
}

.card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 550px;
}

/* O CARTÃO - Ajustado para fundo branco puro e sem degradê */
.card {
    width: 90%;
    max-width: 550px;
    min-height: 310px;
    height: auto;
    aspect-ratio: 1.7 / 1;
    padding: 30px; /* Leve ajuste de respiro para ajudar na centralização */
    
    /* Fundo alterado de #dce7f7 para branco puro conforme solicitado */
    background-color: #FFFFFF; 
    
    border-radius: 25px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Sombra leve para destacar o cartão branco sobre o fundo da tela */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); 
    overflow: hidden; 
}


/* CONFIGURAÇÃO DOS PARAFUSOS */
.card-front, .card-back {
    position: relative; /* Essencial para os parafusos ficarem nos cantos de cada face */
}

.parafuso {
    position: absolute;
    width: 36px;
    height: auto;
    z-index: 100;
    pointer-events: none;
}

/* Posicionamento dos parafusos */
.topo-esq { top: 15px; left: 15px; }
.topo-dir { top: 15px; right: 15px; }
.baixo-esq { bottom: 15px; left: 15px; }
.baixo-dir { bottom: 15px; right: 15px; }


/* Contorno */
.bronze-edge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    border-radius: 25px;
    pointer-events: none;
    z-index: 2;

    box-shadow:
        /* Profundidade interna */
        inset 3px 3px 5px rgba(0, 0, 0, 0.20),
        inset -3px -3px 5px rgba(255, 255, 255, 0.60),

        /* Reflexos do vidro */
        inset 0 1px 0 rgba(255,255,255,0.95),
        inset 0 0 12px rgba(255,255,255,0.25),

        /* Camadas da borda de vidro */
        0 0 0 2px rgba(255,255,255,0.60),
        0 0 0 4px rgba(200,230,255,0.25),
        0 0 0 6px rgba(255,255,255,0.12),

        /* Sombra externa */
        0 8px 20px rgba(0,0,0,0.12);
}

.bronze-edge::before {
    content: "";
    position: absolute;
    inset: 3px;

    border-radius: 22px;

    border-top: 1px solid rgba(255,255,255,0.9);
    border-left: 1px solid rgba(255,255,255,0.5);

    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.25) 0%,
        rgba(255,255,255,0.05) 20%,
        transparent 40%
    );

    opacity: 0.9;
}
.bronze-edge {
    overflow: hidden;
}
.bronze-edge::after {
    content: "";
    position: absolute;
    top: 0;
    left: -30%;
    width: 60%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.12),
        transparent
    );

    transform: skewX(-25deg);
}


.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    z-index: 1;
}

/* FRENTE DA PLACA — TIPOGRAFIA E HARMONIA VISUAL */
.card-front {
    padding: 26px 28px;
}

.card-front .content {
    gap: 0;
}

.logo-container-front {
    margin-bottom: 2px;
}

.logo-img-front {
    width: 92px;
    height: auto;
    object-fit: contain;
    margin-bottom: 6px;
}

.brand-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 2px;
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 38px;
    letter-spacing: 0.5px;
    line-height: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
}

.csm-part {
    color: #333333;
    font-weight: 700;
}

.vidros-part {
    color: #0055FF;
    font-weight: 600;
    font-size: 0.85em;
}

.slogan {
    font-family: 'Montserrat', sans-serif;
    color: #555;
    font-size: 13px;
    letter-spacing: 1.5px;
    font-weight: 700;
    line-height: 1.45;
    margin-top: 14px;
    text-transform: uppercase;
}

.sub-slogan {
    font-family: 'Montserrat', sans-serif;
    color: #666666;
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 6px;
}

.divider-line {
    width: 72%;
    height: 1px;
    background-color: #C5A059;
    margin-top: 4px;
    margin-bottom: 8px;
    opacity: 0.6;
}

.engineer-name {
    font-family: 'Montserrat', sans-serif;
    color: #555555;
    font-size: 13px;
    letter-spacing: 1.8px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 4px;
}

/* BLOCO DE CONTATOS */
.contact-info-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.link-contato {
    text-decoration: none;
    color: #555555;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, color 0.3s ease;
}

@media (hover: hover) {
    .link-contato:hover {
        transform: scale(1.05);
        color: #0055FF;
    }

    .link-contato:hover svg {
        fill: #0055FF !important;
    }
}

.whatsapp-icon {
    fill: #25D366;
    transition: fill 0.3s ease;
}

.phone-icon {
    fill: #333333;
    transition: fill 0.3s ease;
}

.address-block {
    margin-top: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: #666666;
    line-height: 1.4;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s, color 0.3s ease;
}

@media (hover: hover) {
    .address-block:hover {
        transform: scale(1.05);
        color: #0055FF;
    }
}

.address-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.maps-icon {
    width: 18px;
    height: 18px;
    fill: #0055FF;
    flex-shrink: 0;
}

/* MARCA CORUX (rodapé) */
.corux-brand {
    position: fixed;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
    user-select: none;
    z-index: 500;
    opacity: 0.55;
}

.corux-brand__link {
    display: inline-block;
    pointer-events: auto;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.35px;
    line-height: 1.2;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s ease;
}

.corux-brand__link:hover,
.corux-brand__link:focus-visible {
    color: #ffffff;
}

.corux-brand__link:active {
    opacity: 0.85;
}

.corux-brand__tagline {
    margin-top: 3px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 9px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 1.4px;
    line-height: 1.2;
}

/* BOTÕES FLUTUANTES */
.whatsapp-float,
.share-float {
    position: fixed;
    bottom: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    z-index: 1100;
    transition: 0.3s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.whatsapp-float {
    right: 30px;
    bottom: calc(30px + 60px + 12px);
    background-color: #25D366;
    border: none;
}

.share-float {
    right: 30px;
    background-color: #ffffff;
    border: 2px solid #0055FF;
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: #FFFFFF !important;
}

.share-float img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    display: block;
    filter: brightness(0) saturate(100%) invert(27%) sepia(98%) saturate(2500%) hue-rotate(210deg) brightness(100%) contrast(105%);
}

.share-float__tooltip {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 12px;
    background-color: #0055FF;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1101;
}

.share-toast {
    position: fixed;
    left: 50%;
    bottom: 180px;
    transform: translateX(-50%) translateY(12px);
    padding: 12px 20px;
    border-radius: 999px;
    background: rgba(26, 26, 46, 0.95);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 1101;
    pointer-events: none;
}

.share-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

@media (hover: hover) {
    .share-float:hover .share-float__tooltip {
        opacity: 1;
        visibility: visible;
    }

    .whatsapp-float:hover {
        transform: scale(1.1);
        background-color: #20ba5a;
    }

    .share-float:hover {
        transform: scale(1.1);
        background-color: #f5f8ff;
        border-color: #0044cc;
    }
}

.whatsapp-float:active,
.share-float:active {
    transform: scale(0.95);
}

.share-float:active {
    background-color: #eef3ff;
    border-color: #0044cc;
}

.whatsapp-float:active {
    background-color: #1da851 !important;
}

/* RESPONSIVIDADE — FRENTE */
@media (max-width: 600px) {
    body {
        justify-content: flex-start;
        padding-top: 24px;
    }

    .card-container {
        padding: 20px 16px calc(150px + env(safe-area-inset-bottom, 0px));
    }

    .corux-brand {
        position: static;
        transform: none;
        left: auto;
        width: 100%;
        margin-top: 4px;
    }

    .card {
        width: 100%;
        max-width: 550px;
        min-height: 280px;
    }
    .card-front { padding: 22px 20px; }
    .logo-img-front { width: 82px; margin-bottom: 5px; }
    .logo-text { font-size: 34px; gap: 4px; }
    .slogan { font-size: 11px; letter-spacing: 1.2px; margin-top: 12px; }
    .sub-slogan { font-size: 10px; letter-spacing: 1.5px; margin-top: 5px; }
    .engineer-name { font-size: 12px; letter-spacing: 1.5px; }
    .divider-line { margin-top: 3px; margin-bottom: 6px; }
    .link-contato { font-size: 18px; }

    .whatsapp-float,
    .share-float {
        width: 50px;
        height: 50px;
    }

    .whatsapp-float {
        bottom: calc(30px + 50px + 10px);
    }

    .share-float img {
        width: 38px;
        height: 38px;
    }

    .share-toast {
        bottom: 160px;
        max-width: calc(100vw - 40px);
        text-align: center;
    }
}

/* ========================================================================
   VERSO DA PLACA — LAYOUT E HARMONIA VISUAL
   Linha superior: QR (destaque) + Selo Blindex
   Linha inferior: contatos compactos e centralizados
   ======================================================================== */

.card-back {
    padding: 26px 28px;
}

.content-back {
    display: grid;
    grid-template-columns: 1fr auto auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    justify-items: center;
    gap: 18px 16px;
    padding: 4px 12px 6px;
    width: 100%;
    height: 100%;
}

.column-left,
.column-right {
    grid-row: 1;
    align-self: center;
    margin-top: -8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.column-left {
    grid-column: 2;
}

.column-right {
    grid-column: 3;
}

.back-qr-code {
    width: 118px;
    height: auto;
    object-fit: contain;
    display: block;
}

.back-blindex-logo {
    width: 110px;
    height: auto;
    object-fit: contain;
}

.content-back .contact-info-block {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
    margin-top: 0;
}

.content-back .link-contato {
    justify-content: center;
    font-size: 19px;
    gap: 10px;
    min-width: 230px;
}

.content-back .link-contato svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.content-back .address-block {
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-top: 18px;
    color: #555555;
    font-weight: 600;
}

@media (hover: hover) {
    .content-back .address-block:hover,
    .content-back .address-block:hover .address-text p {
        color: #0055FF;
    }
}

.content-back .maps-icon {
    width: 18px;
    height: 18px;
}

.content-back .address-text {
    gap: 1px;
}

.content-back .address-text p {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 600;
}

.content-back .address-text p + p {
    margin-top: 1px;
}

/* RESPONSIVIDADE — VERSO */
@media (max-width: 600px) {
    .card-back {
        padding: 22px 20px;
    }

    .content-back {
        grid-template-columns: 1fr auto auto 1fr;
        gap: 14px 10px;
        padding: 2px 8px 4px;
    }

    .column-left,
    .column-right {
        margin-top: -6px;
    }

    .back-qr-code {
        width: 106px;
        height: auto;
    }

    .back-blindex-logo {
        width: 78px;
    }

    .content-back .contact-info-block {
        gap: 4px;
    }

    .content-back .link-contato {
        font-size: 17px;
        min-width: 210px;
        gap: 8px;
    }

    .content-back .address-block {
        margin-top: 3px;
        gap: 2px;
    }

    .content-back .address-text p {
        font-size: 14px;
        line-height: 1.28;
    }
}

/* EFEITO DE TOQUE NO MOBILE (APENAS TELEFONES, ENDEREÇO E BOTÃO FLUTUANTE) */
.link-contato:active,
.address-block:active,
.content-back .address-block:active {
    transform: scale(1.05) !important;
    color: #0055FF !important;
}

/* Força a troca de cor dos ícones internos dos telefones no toque */
.link-contato:active svg {
    fill: #0055FF !important;
}

/* Força a troca de cor do texto do endereço do verso no toque */
.content-back .address-block:active .address-text p {
    color: #0055FF !important;
}