@import url('atimo-tokens.css');

/* CSS Variáveis */
:root {
    /* Cor primaria canonica Atimo Saude — sincronizada com landing/app/admin/email */
    --bs-primary: #0046BE;
    --bs-primary-rgb: 0, 70, 190;
    --bs-primary-darker: #003494;
    --bs-primary-lighter: #1f3a8a;
    --bs-secondary: #6c757d;
    --bs-white: #ffffff;
    --bs-gray-100: #f8f9fa;
    --bs-gray-200: #e9ecef;
    --bs-gray-800: #343a40;
}

/* Estilos Gerais */
body {
    position: relative;
    color: var(--bs-gray-800);
    background-color: var(--bs-gray-100);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 92px;
    /* Ajustado para o height do header fixo */
}

@media (max-width: 991.98px) {
    body {
        padding-top: 70px;
    }
}
@media (max-width: 575.98px) {
    body {
        padding-top: 60px;
    }
}

/* Link Styles */
a {
    color: var(--bs-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--bs-primary-darker);
    text-decoration: underline;
}

/* Cores e Botões */
.bg-atimo {
    background-color: var(--bs-primary);
}

.text-atimo {
    color: var(--bs-primary);
}

.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.btn-outline-atimo {
    color: var(--bs-primary);
    border: 2px solid var(--bs-primary);
    background-color: transparent;
}

.btn-outline-atimo:hover {
    color: var(--bs-white);
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(26, 41, 66, 0.1);
}

.btn-atimo {
    color: var(--bs-white);
    background-color: var(--bs-primary);
    border: 2px solid var(--bs-primary);
}

.btn-atimo:hover {
    color: var(--bs-white);
    background-color: var(--bs-primary-darker);
    border-color: var(--bs-primary-darker);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(26, 41, 66, 0.1);
}

/* Cards e Sombras */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(26, 41, 66, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(26, 41, 66, 0.1);
}

/* Navegação */
.navbar {
    background-color: var(--bs-white) !important;
    box-shadow: 0 2px 4px rgba(26, 41, 66, 0.05);
}

/* Alerts */
.alert-info {
    background-color: rgba(26, 41, 66, 0.1);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

/* Estilos específicos da página de Termos */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--bs-gray-200);
    z-index: 1030;
}

.reading-progress::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--scroll, 0%);
    background-color: var(--bs-primary);
    transition: width 0.1s ease;
}

.fixed-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1020;
}

.sidebar {
    position: sticky;
    top: 120px;
}

.content-section {
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease;
}

.content-section h2 {
    margin-bottom: 1.5rem;
    color: var(--bs-primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#terms-nav .nav-link {
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

#terms-nav .nav-link:hover {
    background-color: var(--bs-gray-200);
}

#terms-nav .nav-link.active {
    color: var(--bs-white);
    background-color: var(--bs-primary);
}

/* Botão volta ao topo */
.floating-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--bs-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.floating-button.show {
    opacity: 1;
    transform: translateY(0);
}

.floating-button:hover {
    background-color: var(--bs-primary-darker);
    transform: translateY(-2px);
}

/* Ajustes responsivos */
@media (max-width: 991.98px) {
    body {
        padding-top: 76px;
    }

    .sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    /* Nav em mobile: grid 2 colunas (evita scroll horizontal inesperado) */
    #terms-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin-bottom: 1rem;
        white-space: normal;
    }

    #terms-nav .nav-link {
        margin: 0;
        flex-shrink: 0;
    }

    .floating-button {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 575.98px) {
    /* Coluna única em phones pequenos e safe-area pro botão flutuante */
    #terms-nav {
        grid-template-columns: 1fr !important;
    }
    .floating-button {
        bottom: max(20px, env(safe-area-inset-bottom)) !important;
    }
}

@media (max-width: 767.98px) {
    .content-section {
        padding: 1.5rem !important;
    }
}

/* Estilo para os blocos de definição */
.term-definition {
    background-color: var(--bs-gray-100);
    border-left: 4px solid var(--bs-primary);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0 0.375rem 0.375rem 0;
}

/* Marcação para destaques */
.highlight {
    background-color: rgba(255, 193, 7, 0.2);
    padding: 0.1rem 0.2rem;
    border-radius: 0.2rem;
}