/**
 * Sanvita Laboratório - Estilos Globais
 * @author     Ana Apolinário (https://anaapolinario.com.br)
 * @version    1.0.0
 * @date       2026-09-01
 * @copyright  2026 Sanvita Laboratório. Todos os direitos reservados.
 */

:root {
    --color-primary: #003237;
    --color-primary-container: #0d4a50;
    --color-primary-fixed: #b6ecf3;
    --color-primary-fixed-dim: #9ad0d6;
    
    --color-secondary-fixed: #67f8ef;
    --color-secondary-fixed-dim: #43dbd3;
    --color-on-secondary-fixed-variant: #00504c;
    
    --color-tertiary-fixed: #c6f24b;
    --color-tertiary-fixed-dim: #abd52e;
    --color-tertiary-container: #374900;
    --color-on-tertiary-fixed-variant: #3b4d00;
    
    --color-background: #f8f9ff;
    --color-surface: #f8f9ff;
    --color-surface-dim: #cbdbf5;
    --color-surface-container: #e5eeff;
    --color-surface-container-low: #f2f4fb;
    --color-surface-container-lowest: #ffffff;
    --color-surface-container-high: #e7e8f0;
    --color-surface-container-highest: #d3e4fe;
    
    --color-on-surface: #191c1d;
    --color-on-surface-variant: #3f4849;
    --color-on-primary: #ffffff;
    --color-on-background: #0b1c30;
    --color-inverse-on-surface: #eaf1ff;
    
    --color-outline: #70797a;
    --color-outline-variant: #bfc8c9;
    --color-whatsapp: #25D366;
    --color-whatsapp-dark: #128C7E;

    --spacing-gutter: 16px;
    --spacing-margin: 24px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--color-surface);
    color: var(--color-on-surface);
}

.bg-hex-pattern {
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='103.92304845413263' viewBox='0 0 60 103.92304845413263' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23e5eeff' stroke-width='1'%3E%3Cpath d='M30 0l25.98 15v30L30 60 4.02 45V15zM30 103.92l25.98-15v-30l-25.98-15-25.98 15v30z'/%3E%3C/g%3E%3C/svg%3E");
}

@media (min-width: 768px) {
    .clip-diagonal {
        clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
    }
}

.carousel-item {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-in-out;
    position: absolute;
    inset: 0;
    z-index: 0;
}

.carousel-item.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

@keyframes specialtyFadeIn {
    0% {
        opacity: 0;
        transform: translateY(14px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.specialty-pane {
    display: none;
    opacity: 0;
}

.specialty-pane.active {
    display: block;
    animation: specialtyFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.exam-row {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.exam-row:hover {
    background-color: rgba(13, 74, 80, 0.04);
    transform: translateX(4px);
}

/* Acesso prioritário aos resultados no celular */
.resultado-mobile {
    display: none;
}

@media (max-width: 767px) {
    .pagina-inicial {
        padding-bottom: calc(88px + env(safe-area-inset-bottom));
    }

    .resultado-mobile {
        position: fixed;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        left: 12px;
        z-index: 50;
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) 24px;
        align-items: center;
        gap: 10px;
        min-height: 64px;
        padding: 9px 14px 9px 10px;
        color: #fff;
        background: linear-gradient(110deg, #003237, #0d4a50);
        border: 1px solid rgba(182, 236, 243, .28);
        border-radius: 18px;
        box-shadow: 0 14px 34px rgba(0, 50, 55, .3);
        text-decoration: none;
    }

    .resultado-mobile-icone {
        display: grid;
        width: 42px;
        height: 42px;
        place-items: center;
        color: #003237;
        background: #b6ecf3;
        border-radius: 13px;
    }

    .resultado-mobile small,
    .resultado-mobile strong {
        display: block;
        line-height: 1.15;
    }

    .resultado-mobile small {
        margin-bottom: 3px;
        color: rgba(255, 255, 255, .72);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .resultado-mobile strong {
        font-size: 15px;
        font-weight: 800;
    }

    .resultado-mobile:focus-visible {
        outline: 3px solid #c6f24b;
        outline-offset: 3px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .resultado-mobile {
        scroll-behavior: auto;
    }
}


/* Pop-up responsivo e modal do site */
.site-popup-overlay[hidden]{display:none}.site-popup-overlay{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:1rem;background:rgba(8,30,33,.72);backdrop-filter:blur(5px)}
.site-popup-dialog{position:relative;width:min(100%,52rem);max-height:92dvh;margin:0;outline:none}
.site-popup-image{display:block;width:100%;max-height:92dvh;object-fit:contain;border-radius:14px;box-shadow:0 24px 80px rgba(0,0,0,.3)}
.site-popup-close{position:absolute;top:.65rem;right:.65rem;z-index:2;display:grid;width:42px;height:42px;place-items:center;border:1px solid rgba(255,255,255,.8);border-radius:50%;background:rgba(13,74,80,.88);color:#fff;font-size:1.6rem;line-height:1;cursor:pointer}
.site-popup-close:hover{background:#003237}
@media(max-width:600px){.site-popup-overlay{padding:.65rem}.site-popup-dialog{width:100%;max-height:90dvh}.site-popup-image{max-height:90dvh;border-radius:10px}.site-popup-close{top:.45rem;right:.45rem;width:38px;height:38px}}
@media(prefers-reduced-motion:no-preference){.site-popup-dialog{animation:site-popup-in .22s ease-out}@keyframes site-popup-in{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}}

/* Acessos do cabeçalho no celular */
.mobile-site-nav { display: none; }
@media (max-width: 767px) {
    .mobile-site-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        padding: 8px 12px;
        background: #f8f9ff;
        border-top: 1px solid #dce6e7;
    }
    .mobile-site-nav a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-height: 44px;
        border-radius: 10px;
        color: #0d4a50;
        background: #e5f3f4;
        font-size: 12px;
        font-weight: 700;
        text-decoration: none;
    }
    .mobile-site-nav .material-symbols-outlined { font-size: 18px; }
    .mobile-site-nav a:hover,
    .mobile-site-nav a[aria-current="page"] { background: #0d4a50; color: #fff; }
    .mobile-site-nav a:focus-visible { outline: 3px solid #0d4a50; outline-offset: 2px; }
    header.fixed + main,
    #hero-carousel { padding-top: 176px; }
    section[id] { scroll-margin-top: 176px; }
}