* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== HEADER FIXO ===== */
.header {
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
    background: #fff;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1030;
    padding: 0;
}

/* ===== TOPO ===== */
#top {
    display: flex;
    margin: auto;
    align-items: center;
    vertical-align: middle;
    height: 45px;
    font-family: var(--bs-body-font-family);
    font-size: 1.0em;
    font-weight: 600;
    line-height: var(--bs-body-line-height);
    color: rgb(67, 62, 144);
    text-align: center;
    background-color: rgb(210, 210, 210);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* ===== MENU PRINCIPAL ===== */
#menu {
    position: relative; /* Permite controle de z-index */
    z-index: 1032; /* Maior que o wave-connector (1031) */
    font-size: 1.0em;
    text-transform: uppercase;
    font-weight: 600;
    background-color: rgb(255, 255, 255);
    padding: 1rem 0 0 0; /* Remove padding inferior */
    margin-bottom: -1px; /* Remove espaçamento */
}

#menu .navbar {
    display: flex;
    justify-content: space-between;
    width: 100%;
    height: 120px; /* Altera a altura do efeito wave */
}

#menu .navbar-nav {
    flex-direction: row;
    align-items: center;
}

#menu .nav-item {
    margin-left: 1rem;
    margin-top: 30px;
}

/* ===== ONDA SEPARADORA ===== */
.wave-connector {
    position: absolute;
    bottom: -30px;
    width: 100%;
    z-index: 1031;
    /* filter: drop-shadow(0px 4px 3px rgba(0,0,0,0.15)); Sombra suave */
    filter: drop-shadow(0px 5px 4px rgba(0,0,0,0.25)); /* Sombra mais intensa */
}

.wave-fixed-overlay {
    height: 50px;
}

.wave-fixed-overlay svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: url(#wave-shadow); /* Filtro SVG para sombra mais precisa */
}

.wave-fixed-overlay path {
    fill: #fff;
    stroke: #fff; /* Borda sutil */
    stroke-width: 1px;
    paint-order: stroke; /* Garante que a borda fique por baixo */
}

/* ===== CONTENT ===== */
.content {
    margin-top: 15px;
}

/* ===== CAROUSEL ===== */
#carousel {
    background-color: rgb(236, 255, 247);
    border: 0px solid rgb(236, 255, 247);
}

#picture {
    display: block;
    width: 100%;
    height: 700px;
    object-position: center center;
    object-fit: cover;
}

/* ===== MAPS ===== */
#maps {
    background-color: rgb(248, 247, 247);
    margin: 0 auto;
    width: auto;
    height: auto;
    border: 1px solid rgb(248, 247, 247);
    padding: 18px;
    object-fit: cover;
}

/* ===== FOOTER ===== */
footer {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.0em;
    font-weight: 500;
    text-align: center;
    color: #fff;
    text-decoration: none;
    background-color: rgb(52, 57, 65);
    margin: 0 auto;
    width: 100%;
    height: auto;
    padding: 18px;
}

footer a {
    color: #fff !important;
    text-decoration: none;
}

footer a:hover {
    color: #fed136 !important;
    text-decoration: none;
}

footer .cizgi {
    border-right: 1px solid #535e67;
}

#jumbotron-bg {
    background-image: url("portal/files/templates/img/background.jpg") !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 300px;
    color: white;
    padding: 50px 0;
    color: rgb(255, 255, 255);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.8em;
    font-weight: 600;
    line-height: var(--bs-body-line-height);
    margin-top: 0px;
    margin-bottom: 0px;
    padding: 2rem 1rem; /* Padding mais adequado */
    min-height: 300px;
}

.jumbotron a {
    color: #fff !important;
    text-decoration: none;
}

.jumbotron a:hover {
    color: #fbc531 !important;
}

.jumbotron .active>a {
    color: #fbc531;
}

/* ===== MEDIA QUERIES ===== */
@media (min-width: 576px) {
    #menu .dropdown:hover>.dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

@media (max-width: 992px) {
    footer .cizgi {
        border-right: none;
    }
}

/* ===== AJUSTE DE ESPAÇO PARA HEADER FIXO ===== */
body {
    padding-top: 180px; /* Ajuste conforme altura total do header */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

section {
    margin: 0;
}

/* ===== SEÇÃO DE DOWNLOADS ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.breadcrumb {
    background-color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 0.5rem;
    color: #6c757d;
}

.content {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.sidebar {
    flex: 1;
    min-width: 300px;
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.main-content {
    flex: 2;
    min-width: 300px;
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    color: #495057;
}

.directory-list {
    list-style: none;
}

.directory-item {
    margin-bottom: 0.8rem;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    background-color: #f8f9fa;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.directory-item:hover {
    background-color: #e9ecef;
}

.directory-link {
    display: flex;
    align-items: center;
    color: ' . $color . ';
    text-decoration: none;
    font-weight: 500;
    flex-grow: 1;
}

.directory-link:hover {
    color: #007bff;
}

.directory-icon {
    margin-right: 0.7rem;
    font-size: 1.2rem;
    color: #ffc107;
}

.badge {
    background-color: #6c757d;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.file-list {
    list-style: none;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
}

.file-item:hover {
    background-color: #f8f9fa;
}

.file-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.file-icon {
    margin-right: 0.8rem;
    font-size: 1.4rem;
    color: #6c757d;
}

.file-details {
    flex-grow: 1;
    max-width: calc(100% - 150px);
}

.file-name {
    font-weight: 500;
    margin-bottom: 0.2rem;
    word-wrap: break-word;
}

.file-meta {
    font-size: 0.85rem;
    color: #6c757d;
}

.btn-download {
    background-color: #28a745;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.btn-download:hover {
    background-color: #218838;
    color: white;
}

.btn-icon {
    margin-right: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.directory-tree {
    list-style: none;
    padding-left: 1.5rem;
}

.directory-tree .directory-item {
    background-color: transparent;
    padding: 0.5rem 0;
}

.search-box {
    margin-bottom: 1.5rem;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.error-container {
    text-align: center;
    padding: 3rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
    max-width: 600px;
}

.error-icon {
    font-size: 4rem;
    color: #dc3545;
    margin-bottom: 1.5rem;
}

.error-title {
    font-size: 1.8rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.error-back {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.error-back:hover {
    background-color: #0056b3;
    color: white;
}

@media (max-width: 768px) {
    .content {
        flex-direction: column;
    }

    .sidebar, .main-content {
        width: 100%;
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .file-details {
        max-width: 100%;
    }

    .btn-download {
        margin-top: 1rem;
        align-self: flex-end;
    }
}