/* Evitar quebra lateral no mobile e corrigir o modal */
body {
    overflow-x: hidden;
}

.profile-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    max-width: 200px;
    word-wrap: break-word;
    overflow: hidden;
    position: absolute;
    right: 0;
    top: 40px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* Ícone de perfil branco no modo escuro */
.dark-mode #profileIcon {
    color: white !important;
}

/* Ícone de perfil preto no modo claro */
#profileIcon {
    color: black;
}

.card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-img-top {
    object-fit: cover;
    height: 200px;
    width: 100%;
}

.card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    font-size: 1rem;
    font-weight: bold;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

.card-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

.card-text1 {
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

.btn-sm {
    align-self: flex-start;
}

.floating-ad {
    position: fixed;
    bottom: -300px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    z-index: 9999;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: bottom 1s ease-in-out;
}

.floating-ad img {
    width: 100%;
    height: auto;
}

.close-ad {
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
}

.news-ticker-container {
    background-color: #f8f9fa;
    overflow: hidden;
    width: 100%;
    height: 50px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.news-ticker-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 10px;
    background-color: #e0e0e0;
    height: 50px;
    border-right: 1px solid #ddd;
    min-width: 120px;
    z-index: 2;
}

.highlight-icon {
    display: flex;
    align-items: center;
}

.dot {
    height: 10px;
    width: 10px;
    background-color: #000;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.highlight-text {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
}

.cabecalho {
    background-color: #F6CD01;
}

.nav-link {
    color: #F6CD01 !important;
    font-weight: 500;
}

.navbar .navbar-brand {
    font-weight: 500;
}

.dark-mode {
    background-color: #121212;
    color: white;
}

.dark-mode .card {
    background-color: #333;
    border-color: yellow;
}

.dark-mode .navbar {
    background-color: #333 !important;
}

.dark-mode .cabecalho {
    background-color: #444 !important;
}

.dark-mode .btn-dark {
    background-color: #555;
    border: none;
}

.dark-mode .nav-link {
    color: yellow !important;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 34px;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 17px;
    width: 17px;
    border-radius: 50%;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
}

input:checked+.slider {
    background-color: yellow;
}

input:checked+.slider:before {
    transform: translateX(24px);
    background-color: black;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    max-width: 200px;
    height: auto;
    margin-left: 235px;
}

.logo-ad img {
    max-width: 300px;
    height: auto;
}

@media (max-width: 768px) {
    .cabecalho h1 {
        font-size: 1.2rem;
        text-align: center;
    }

    .cabecalho {
        padding: 1rem;
    }

    .logo {
        display: flex;
    }

    .logo img {
        max-width: 150px;
        height: auto;
        margin-left: 2px;
    }

    .logo-ad img {
        max-width: 200px;
        height: auto;
    }
    
    .dropdown-menu {
        width: calc(100vw - 20px); /* Largura ajustada ao viewport */
        left: auto;
        right: 0;
        box-sizing: border-box;
    }
}