/**
 * GRCK Soluções - Company Page Styles
 * Follows BEM methodology for naming conventions
 */

/* Base styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    padding-top: 56px; /* Compensate for fixed navbar height */
    color: #333;
}

/* Navbar components */
.navbar {
    background-color: #343a40;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.navbar a:hover {
    cursor: pointer;
}

/* Fixed footer */
.footer {
    background-color: #343a40;
    color: white;
    text-align: center;
    padding: 15px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1020;
}

.navbar__link {
    color: white;
    text-decoration: none;
}

.navbar__link:hover {
    cursor: pointer;
    text-decoration: underline;
}

.navbar__menu-icon {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

/* Content structure */
.content-container {
    margin-top: 2rem;
    padding-bottom: 70px; /* Space for fixed footer */
}

/* Summary sidebar */
.summary {
    padding-top: 20px;
    height: auto;
}

.summary__toc {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 1rem;
    margin-top: 15px;
}

/* Sticky sidebar styles */
.sidebar-bg {
    background-color: #e9ecef;
    border-radius: 5px;
    padding: 1.5rem;
    height: 100%;
}

.sticky-sidebar {
    position: sticky;
    top: 71px; /* navbar height + padding */
}

.sticky-active {
    /* Classe adicional para controle via JS se necessário */
}

.summary__link, .sidebar-link {
    color: #343a40;
    text-decoration: none;
    font-size: 1rem;
    display: block;
    padding: 5px 0;
}

.summary__link:hover, .sidebar-link:hover {
    text-decoration: underline;
}

/* Content sections */
.section {
    padding-top: 60px; /* Add padding at the top of sections */
    margin-top: -56px; /* Compensate padding for correct positioning */
    margin-bottom: 2rem;
}

/* Card styles */
.card-header {
    background-color: #e9ecef;
}

.section__card-header {
    background-color: #e9ecef;
}

.list-group-item {
    border: none;
    padding: 0.5rem 0;
}

.section__list-item {
    border: none;
    padding: 0.5rem 0;
}

.section__text,
.section__list-item,
.card-body p,
.card-body li {
    text-align: justify;
}

/* Content padding for fixed footer */
main.content-container {
    padding-bottom: 70px; /* Espaço para o footer fixo */
}

/* Mobile menu */
#menu-icon {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
}

/* Mobile styles */
@media screen and (max-width: 667px) {
    .summary, .col-md-4 {
        display: none;
    }
    
    #menu-icon, .navbar__menu-icon {
        display: block;
        z-index: 1035;
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    body.menu-open .summary,
    body.menu-open .col-md-4 {
        display: block;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        overflow-y: auto;
        z-index: 1000;
        padding: 1rem;
        background-color: #fff;
    }
    
    body.menu-open .sidebar-bg {
        height: auto;
        background-color: #fff;
        border-radius: 0;
        box-shadow: none;
        padding: 1rem;
    }
    
    /* Ajuste do padding para o menu hamburguer */
    .navbar .container {
        position: relative;
        padding-right: 50px;
    }
}

/* Estilos para orientação landscape */
@media screen and (max-height: 500px) {
    .summary, .col-md-4 {
        max-height: calc(100vh - 106px);
        overflow-y: auto;
    }
    
    .summary__toc, .sidebar-bg {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
}
