* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #5B9FA8;
    --secondary: #7AB8C1;
    --accent: #3D7A82;
    --dark: #2C5F66;
    --light: #A8D5DC;
    --highlight: #303030;
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --texto-bio: #1C1C1C;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    background: linear-gradient(135deg, var(--light) 0%, var(--primary) 100%);
    color: var(--text-dark);
    /* Garante que o body ocupe toda a largura sem overflow */
    max-width: 100vw;
}

main {
    position: relative;
    z-index: 1;
    /* Impede que o main cause overflow */
    max-width: 100%;
    overflow-x: hidden;
}

.texto-bio {
    color: var(--texto-bio);
}

#neural-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    /* 
     * Usando 100% ao invés de 100vw/100vh
     * 100vw pode incluir a largura da scrollbar, causando overflow
     */
    max-width: 100vw;
    max-height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.95;
}

/* ============================= FUNDO: CÉREBRO "FANTASMA" ============================= */
.brain-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    /* 
     * IMPORTANTE: overflow hidden garante que elementos 
     * posicionados fora da tela não causem scroll horizontal
     */
    overflow: hidden;
}

.brain-float {
    position: absolute;
    width: min(520px, 70vw);
    aspect-ratio: 1 / 1;
    left: -25%;
    top: 10%;
    background: url('/assets/img/brain-bg.png') center/contain no-repeat;
    opacity: 0.12;
    filter: grayscale(1) contrast(1.05);
    animation: brainDrift 36s linear infinite, brainRotate 18s linear infinite;
    will-change: transform;
}

@keyframes brainDrift {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(55vw, 12vh) rotate(-3deg);
    }
    50% {
        transform: translate(92vw, 40vh) rotate(-1deg);
    }
    75% {
        transform: translate(55vw, 68vh) rotate(2deg);
    }
    100% {
        transform: translate(0, 0) scale(1);
    }
}

@keyframes brainRotate {
    from {
        rotate: 0deg;
    }
    to {
        rotate: 360deg;
    }
}

/* Acessibilidade: respeita preferências do usuário */
@media (prefers-reduced-motion: reduce) {
    .brain-float {
        animation: none !important;
    }
    .synapse,
    .synapse-line {
        animation: none !important;
    }
}

/* Base: um motor só (floatDrift), e cada ícone ajusta via variáveis */
.float-symbol {
    position: absolute;
    width: min(260px, 35vw);
    opacity: .14;
    filter: grayscale(1) contrast(1.1);
    pointer-events: none;
    --dur: 16s;
    --ampX: 42vw;
    --ampY: 26vh;
    --scale: 1.06;
    --rot: 6deg;
    --delay: 0s;
    animation: floatDrift var(--dur) ease-in-out infinite;
    animation-delay: var(--delay);
    will-change: transform;
}

/* Posicionamento + "personalidade" por símbolo */
.float-symbol.autismo {
    top: 15%;
    right: -10%;
    --dur: 12s;
    --ampX: 52vw;
    --ampY: 30vh;
    --rot: 7deg;
    --delay: -2s;
}

.float-symbol.toc {
    bottom: 10%;
    left: -12%;
    --dur: 14s;
    --ampX: 48vw;
    --ampY: 34vh;
    --rot: 6deg;
    --delay: -6s;
}

.float-symbol.tdah {
    top: 55%;
    right: 20%;
    --dur: 10s;
    --ampX: 58vw;
    --ampY: 26vh;
    --rot: 8deg;
    --delay: -4s;
}

/* Drift com amplitude configurável */
@keyframes floatDrift {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    20% {
        transform: translate(calc(var(--ampX) * .35), calc(var(--ampY) * -0.45)) scale(calc(1 + (var(--scale) - 1) * .6)) rotate(calc(var(--rot) * .35));
    }
    45% {
        transform: translate(calc(var(--ampX) * .75), calc(var(--ampY) * .40)) scale(calc(1 + (var(--scale) - 1) * .35)) rotate(calc(var(--rot) * -0.45));
    }
    70% {
        transform: translate(calc(var(--ampX) * .22), calc(var(--ampY) * .95)) scale(var(--scale)) rotate(calc(var(--rot) * .55));
    }
    88% {
        transform: translate(calc(var(--ampX) * -0.35), calc(var(--ampY) * .35)) scale(calc(1 + (var(--scale) - 1) * .4)) rotate(calc(var(--rot) * -0.6));
    }
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
}

/* Acessibilidade certa: reduz movimento */
@media (prefers-reduced-motion: reduce) {
    .float-symbol,
    .brain-float {
        animation: none !important;
        transform: none !important;
    }
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.5s ease-out;
    /* Garante largura total sem overflow */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    /* 
     * RESPONSIVO: usa min() para limitar o logo
     * - Em desktop: máximo 500px
     * - Em mobile: máximo 85% da largura da viewport
     * Isso garante que o logo nunca ultrapasse a tela
     */
    max-width: min(500px, 85vw);
    width: 100%;
    height: auto;
    border-radius: 10px;
    background: #fff;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.brain-btn {
    position: relative;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(61, 122, 130, 0.3);
    padding-left: 45px;
    white-space: nowrap;
}

.brain-btn::before {
    content: '🧠';
    position: absolute;
    left: 15px;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.brain-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(61, 122, 130, 0.4);
}

.brain-btn:hover::before {
    transform: rotate(20deg) scale(1.2);
}

/* Hero Section - centralização */
.hero {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    will-change: transform;
    /* Impede overflow */
    width: 100%;
    box-sizing: border-box;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
    max-width: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Título principal com fonte responsiva usando clamp() */
.hero-content h1 {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    color: var(--dark);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    white-space: nowrap;
}

.hero-content .highlight-text {
    color: var(--highlight);
    position: relative;
    display: inline-block;
}

.hero-content .highlight-text::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--highlight);
    animation: expandWidth 1s ease-out 0.5s both;
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Subtítulo com fonte responsiva */
.hero-content p {
    font-size: clamp(0.95rem, 2.5vw, 1.25rem);
    color: var(--texto-bio);
    margin-bottom: 1.25rem;
    line-height: 2;
    font-weight: 500;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content p strong,
.hero-content p b,
.hero-content p a {
    color: #000000;
}

/* ============================= 
   SEÇÃO DE ESPECIALIDADES / EXAMES 
   ============================= */

.especialidades {
    background: rgba(255, 255, 255, 0.92);
    padding: 4rem 2rem;
    position: relative;
    z-index: 2;
    /* 
     * CORREÇÃO: Garante que a seção ocupe toda a largura
     * sem causar overflow horizontal
     */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.especialidades-container {
    max-width: 1300px;
    margin: 0 auto;
    /* Impede overflow do container interno */
    width: 100%;
    box-sizing: border-box;
}

.especialidades-title {
    text-align: center;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    color: var(--primary);
    margin-bottom: 3rem;
    font-weight: 700;
    letter-spacing: 2px;
    position: relative;
}

.especialidades-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--primary);
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

/* Grid 4x2 para 8 cards */
.especialidades-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.8rem;
}

/* Card do Exame */
.exame-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.8rem 1.2rem;
    text-align: center;
    transition: all 0.35s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.exame-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(91, 159, 168, 0.18);
}

/* Ícone do Exame */
.exame-icon {
    width: 140px;
    height: 90px;
    border-radius: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* MUITO IMPORTANTE */
    transition: all 0.35s ease;
    margin-bottom: 0.6rem;
}

.exame-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}


.exame-card:hover .exame-icon {
    border-color: var(--primary);
    background: rgba(91, 159, 168, 0.08);
}

.exame-card:hover .exame-icon img {
    transform: scale(1.1);
}

/* Nome do Exame */
.exame-nome {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sigla do Exame */
.exame-sigla {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(91, 159, 168, 0.1);
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

/* Wrapper do Botão (necessário para posicionar o tooltip) */
.exame-btn-wrapper {
    position: relative;
    margin-top: auto;
    padding-top: 0.5rem;
}

/* Botão "Mais Detalhes" */
.exame-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--primary);
    border-radius: 6px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
}

.exame-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* ============================= 
   TOOLTIP - Popup ao hover 
   ============================= */

.exame-tooltip {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 300px;
    background: #fff;
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(91, 159, 168, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    text-align: left;
    pointer-events: none;
}

/* Seta do tooltip */
.exame-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.08));
}

/* Mostra o tooltip no hover do wrapper */
.exame-btn-wrapper:hover .exame-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Título do Tooltip */
.tooltip-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Descrição do Tooltip */
.tooltip-desc {
    font-size: 0.82rem;
    color: #555;
    line-height: 1.55;
    margin: 0;
}

/* Variantes dentro do Tooltip */
.tooltip-variantes {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px dashed rgba(91, 159, 168, 0.3);
}

.variantes-titulo {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.4rem;
}

.tooltip-variantes ul {
    margin: 0;
    padding-left: 1rem;
    list-style: none;
}

.tooltip-variantes li {
    font-size: 0.78rem;
    color: #666;
    line-height: 1.6;
    position: relative;
}

.tooltip-variantes li::before {
    content: '•';
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: -0.9rem;
}

/* Testimonials Section */
.testimonials {
    background: rgba(255, 255, 255, 0.50);
    backdrop-filter: none;
    position: relative;
    z-index: 1;
}

.testimonials-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::before {
    content: '🧠';
    position: absolute;
    left: -50px;
    font-size: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--highlight), transparent);
    transition: left 0.5s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.testimonial-card:hover::before {
    left: 100%;
}

.testimonial-card.active {
    border-color: var(--highlight);
    box-shadow: 0 18px 50px rgba(255, 107, 157, 0.18);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    font-weight: bold;
}

.testimonial-info h4 {
    color: var(--dark);
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.rating {
    color: #FFD700;
    font-size: 0.9rem;
}

.testimonial-text {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

.quote-icon {
    color: var(--light);
    font-size: 3rem;
    position: absolute;
    top: 10px;
    right: 20px;
    opacity: 0.3;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark), var(--accent));
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--highlight);
}

.footer-section p {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-decoration: none;
}

.social-icon:hover {
    background: var(--highlight);
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.4);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    padding-left: 20px;
    position: relative;
}

.footer-links a::before {
    position: absolute;
    left: 0;
    transition: transform 0.3s ease;
}

.footer-links a:hover {
    color: var(--highlight);
    padding-left: 25px;
}

.footer-links a:hover::before {
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.footer-admin {
    margin-top: 10px;
    font-weight: 600;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-block;
}

/* ============================= 
   RESPONSIVO 
   ============================= */

/* Desktop médio - 3 colunas */
@media (max-width: 1200px) {
    .especialidades-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Tablets - 2 colunas */
@media (max-width: 968px) {
    .hero {
        padding: 3rem 1.5rem;
        min-height: 60vh;
    }

    .hero-content h1 {
        white-space: normal;
    }

    .especialidades-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    /* 
     * CORREÇÃO: Centraliza o header em tablets/mobile
     * Antes estava align-items: flex-start que desalinhava
     */
    .header-content {
        flex-direction: column;
        align-items: center;
    }

    /* Tooltip ajuste para tablets */
    .exame-tooltip {
        width: 260px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    /* 
     * CORREÇÃO: Garante que nada ultrapassa a tela
     * overflow-x: hidden no body evita scroll horizontal
     */
    body {
        overflow-x: hidden;
    }

    /* 
     * CORREÇÃO: Header com padding menor e centralizado
     */
    header {
        padding: 0.8rem 1rem;
    }

    .header-content {
        justify-content: center;
    }

    .logo-container {
        width: 100%;
        justify-content: center;
    }

    .especialidades-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .exame-card {
        padding: 1.2rem 0.8rem;
    }

     .exame-icon {
        width: 120px;
        height: 75px;
    }


    .exame-icon img {
        width: 40px;
        height: 40px;
    }

    .exame-nome {
        font-size: 0.85rem;
        min-height: 2.2rem;
    }

    .exame-sigla {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .exame-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    /* Tooltip em mobile - posição e tamanho */
    .exame-tooltip {
        width: 220px;
        padding: 1rem;
        left: 50%;
        transform: translateX(-50%) translateY(10px);
    }

    .tooltip-title {
        font-size: 0.85rem;
    }

    .tooltip-desc {
        font-size: 0.78rem;
    }
}

@media (max-width: 480px) {
    /* 
     * CORREÇÃO: Esconde elementos flutuantes em mobile
     * Eles podem causar overflow horizontal e consumir recursos
     */
    .float-symbol {
        display: none;
    }

    .brain-float {
        display: none;
    }

    .hero {
        padding: 2rem 1rem;
        min-height: 50vh;
    }

    .hero-content h1 {
        margin-bottom: 1rem;
    }

    .hero-content p {
        line-height: 1.8;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    /* 
     * CORREÇÃO: Container com overflow hidden e largura controlada
     * Garante que nenhum elemento filho ultrapasse a tela
     */
    .especialidades {
        padding: 3rem 1rem;
        overflow: hidden;
    }

    .especialidades-container {
        max-width: 100%;
        overflow: hidden;
    }

    .especialidades-title {
        margin-bottom: 2rem;
    }

    .especialidades-ia {
        font-size: 0.75rem;
        color: #8a9aa0;
        font-weight: 500;
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
    }
    /* Mobile pequeno: 1 coluna */
    .especialidades-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        max-width: 100%;
    }

    /* 
     * CORREÇÃO PRINCIPAL: Card com largura máxima controlada
     * - max-width: 100% impede que ultrapasse o container
     * - overflow: hidden corta qualquer excesso
     * - flex-wrap: wrap permite quebra de linha dos elementos internos
     */
    .exame-card {
        flex-direction: row;
        flex-wrap: wrap;
        text-align: left;
        gap: 0.8rem;
        padding: 1rem;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .exame-icon {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }

    .exame-icon img {
        width: 32px;
        height: 32px;
    }

    /* 
     * Área de conteúdo do card (nome, sigla, botão)
     * - flex: 1 1 0 permite crescer/encolher
     * - min-width: 0 é crucial para permitir que flex items encolham
     *   abaixo do seu conteúdo mínimo (resolve overflow em flex)
     */
    .exame-card > *:not(.exame-icon) {
        flex: 1 1 auto;
        min-width: 0;
    }

    .exame-nome {
        min-height: auto;
        justify-content: flex-start;
        font-size: 0.9rem;
        /* Permite quebra de palavra se necessário */
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .exame-sigla {
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
    }

    /* 
     * Wrapper do botão com largura controlada
     */
    .exame-btn-wrapper {
        padding-top: 0.3rem;
        max-width: 100%;
    }

    .exame-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }
}

/* Loading */
.loading {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease-out 1.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.brain-loader {
    font-size: 5rem;
    animation: brainPulse 1s ease-in-out infinite;
}

@keyframes brainPulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}