﻿/* Reset box-sizing global para facilitar cálculo de padding e margin */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f2f7fa; /* cinza claro suave */
    color: #1a3f5d; /* azul escuro para texto */
    overflow-x: hidden; /* evitar scroll horizontal */

}

.layout-container {
    display: flex;
    min-height: 100vh;
    /* Sidebar é fixa, então não precisa ajustar altura aqui */
}

.sidebar {
    background-color: #5A9BD5; /* azul claro principal */
    width: 280px; /* largura da sidebar */
    padding: 20px;
    position: fixed; /* fixa a sidebar */
    top: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto; /* scroll vertical se necessário */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: white; /* texto branco na sidebar */
}

.sidebar-header {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
    color: #dbe9f4; /* azul claríssimo */
}

.menu a {
    display: block;
    padding: 12px 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
    outline-offset: 2px;
}

    .menu a:hover,
    .menu a:focus {
        background-color: #8FCB9B; /* verde para hover */
        color: #1a3f5d; /* texto azul escuro */
        outline: none;
        box-shadow: 0 0 0 3px rgba(143, 203, 155, 0.5);
    }

    .menu a.active {
        background-color: #F9C784; /* laranja suave para ativo */
        color: #1a3f5d;
    }

.menu i {
    margin-right: 10px;
}

.main-content {
    margin-left: 280px; /* mesma largura da sidebar */
    padding: 30px;
    background-color: #f9fbfc; /* cinza claro */
    flex: 1;
    color: #333; /* texto padrão */
}

/* Toggle menu - botão visível só em telas pequenas */
.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #1a3f5d;
    margin: 10px 20px;
}

/* Responsividade */
@media (max-width: 768px) {
    .layout-container {
        flex-direction: column;
    }

    .sidebar {
        position: relative; /* volta à posição normal */
        width: 100%;
        height: auto;
        overflow-y: visible; /* remove scroll vertical */
        box-shadow: none;
        padding: 20px;
        color: #1a3f5d;
        background-color: #bdd9f1; /* azul claro suave no mobile */
    }

    .menu a {
        color: #1a3f5d;
    }

        .menu a:hover,
        .menu a:focus {
            background-color: #8FCB9B; /* verde hover no mobile */
            color: white;
        }

    .main-content {
        margin-left: 0;
        padding: 20px;
        background-color: #fff;
        color: #1a3f5d;
    }

    /* Toggle menu - botão visível em telas pequenas */
    .menu-toggle {
        display: block;
    }

    /* Esconde a sidebar inicialmente em mobile */
    .sidebar {
        display: none;
    }

    /* Quando a sidebar tiver a classe active, ela aparece */
    .sidebar.active {
        display: block;
    }
}

/* Carrossel ajustes */
.carousel {
    position: relative;
    max-width: 800px;
    /*height: 350px;*/
    margin: 0 auto;
    overflow: visible;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
    background-color: #f2f7fa; /* mesma cor do body, para as barras laterais */
}

    .carousel img {
        width: 100%;
        /*max-height: 350px;*/
        height: auto;
        object-fit: contain; /* mantém a imagem inteira, sem corte */
        display: block;
        background-color: transparent;
    }

.carousel-caption-below {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    margin-top: 8px;
    max-width: 100%;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
}

/* Botões prev e next */
.prev-slide, .next-slide {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 5px 15px;
    cursor: pointer;
    border-radius: 50%;
    user-select: none;
    transition: background 0.3s;
    z-index: 10;
}

.prev-slide {
    left: 15px;
}

.next-slide {
    right: 15px;
}

.prev-slide:hover, .next-slide:hover {
    background: rgba(0,0,0,0.8);
}


/* Outros elementos como cards e carousel */
.card {
    height: 100%;
    max-height: 380px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(143, 203, 155, 0.15); /* sombra verde suave */
}

.card-img-top {
    object-fit: contain;
    height: 200px;
    width: 100%;
}

.card-body {
    padding: 1rem;
    overflow-wrap: break-word;
}

.card-text {
    font-size: 0.9rem;
    white-space: normal;
    overflow-wrap: break-word;
    hyphens: auto;
}

    <style >
    body {
        max-width: 600px;
        margin: 40px auto;
        padding: 0 20px;
    }

    #mensagem-status.sucesso {
        background-color: #dff0d8;
        color: #3c763d;
    }

    #mensagem-status.erro {
        background-color: #f2dede;
        color: #a94442;
    }

    </style>
