/* style.css */
:root {
    --cor-primaria: #019590;
    --cor-secundaria: #2596be;
    --cor-terciaria: #038181;
    --cor-destaque: #fc9f0b;
    --cor-texto: #333;
    --cor-branco: #ffffff;
    --animacao-entrada: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    overflow-x: hidden;
    color: var(--cor-texto);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Animações de entrada */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--animacao-entrada), transform 0.6s var(--animacao-entrada);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

#primeira-parte {
    background-color: var(--cor-secundaria);
    padding-top: 80px;
    min-height: calc(100vh - 80px);
    flex: 1;
    padding-bottom: 80px;
}

/*------------------------------- Navbar-------------------------- */
.navbar-caasp {
    background-color: transparent !important;
    padding: 12px 0;
    height: 80px;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.navbar-caasp.scrolled {
    background-color: rgba(6, 161, 161, 0.603) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-caasp ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.navbar-caasp li {
    margin: 0 10px;
}

.nav-item a {
    color: black;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    transition: color 0.3s;
}

.logo-img img {
    max-height: 70px;
    height: auto;
    width: auto;
    margin-right: 20px;
}

.navbar-caasp a:hover {
    color: #09e7e0 !important;
}

.nav-item {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    position: relative;
    text-decoration: none;
    color: #333;
    padding-bottom: 4px;
    padding: 10px;
    transition: color 0.3s ease;
}

/* Linha animada */
.nav-item::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: #6bfaf5;
    transition: width 0.3s ease, right 0.3s ease;
}

/* Hover anima da direita para esquerda */
.nav-item:hover {
    color: var(--cor-branco);
}
.nav-item:hover::after{
    width: 100%;
    right: auto;
    left: 0;
}

/* Página ativa com linha fixa */
.nav-item.ativo::after {
    width: 100%;
    right: 0;
}

#dynamicNavbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
}

/* Offcanvas Menu Lateral */
.offcanvas {
    background-color: rgba(6, 161, 161, 0.98) !important;
    color: white;
    width: 280px !important;
}

.offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.offcanvas-title {
    color: #FFC874;
    font-weight: bold;
}

.btn-close {
    filter: invert(1);
}

/* Itens do menu lateral */
.offcanvas-body .navbar-nav {
    flex-direction: column !important;
    padding: 0 15px;
}

.offcanvas-body .nav-item {
    margin: 8px 0;
    width: 100%;
    text-align: left;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.offcanvas-body .nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.offcanvas-body .nav-item a {
    color: white !important;
    font-size: 1rem;
    display: block;
}


/* Botão do menu hamburguer personalizado */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Logo mobile */
.logo-img-mobile {
    max-height: 50px;
    margin-right: 15px;
}
.adesão{
    background-color: var(--cor-destaque);
    color: white !important;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    margin-top: 20px !important;
}
/*------------------------------- Cards ---------------------------*/
.card-oque-somos {
    background-color: var(--cor-destaque);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--cor-branco);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 800px;
    margin: 30px auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-oque-somos:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.card-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--cor-branco);
}

.card-text {
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--cor-branco);
}

/*-------------------------- Formulário de Adesão --------------------------*/
.form-label {
    font-weight: 500;
    color: var(--cor-branco);
    margin-top: 1rem;
}

.form-control {
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 0.25rem rgba(1, 149, 144, 0.25);
    transform: scale(1.02);
}

.text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.85rem;
    display: block;
    margin-top: 0.25rem;
}

.btn-enviar-adesao {
    background-color: var(--cor-primaria);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    width: 100%;
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

.btn-enviar-adesao:hover {
    background-color: var(--cor-terciaria);
    transform: translateY(-2px);
}

.btn-enviar-adesao i {
    margin-right: 8px;
}

.btn-success {
    background-color: var(--cor-primaria);
    border: none;
    padding: 12px 25px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-success:hover {
    background-color: var(--cor-terciaria);
    transform: translateY(-2px);
}

/* Mensagens de validação */
.invalid-feedback {
    color: #dc3545;
    font-weight: 500;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

.is-invalid {
    border-color: #dc3545 !important;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
    border-color: #badbcc;
    padding: 1rem;
    border-radius: 8px;
}

/*------------------------------ FOOTER -----------------------------*/
.footer-caasp {
    background-color: #3E342B;
    color: var(--cor-branco);
    box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
    width: 100%;
}

@keyframes fadeInUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-caasp h5 {
    color: #FFC874;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer-caasp p, .footer-caasp a {
    color: var(--cor-branco);
    font-size: 1rem;
    text-decoration: none;
}

.footer-caasp a.footer-link:hover {
    color: #ea4b21;
    text-decoration: underline;
}

#logos {
    max-height: 40px;
    height: auto;
    width: auto;
    cursor: pointer;
    margin-top: 15px;
    transition: transform 0.3s ease;
}

#logos:hover {
    transform: scale(1.1);
}

/*------------------------------- Responsividade ---------------------------*/
@media (max-width: 1199.98px) {
    .nav-item a {
        font-size: 1rem;
    }
    
    .card-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 991.98px) {
    /* Ajustes para a navbar em mobile */
    .navbar-caasp {
        height: auto;
        padding: 10px 0;
        background-color: rgba(6, 161, 161, 0.95) !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    /* Esconde o menu desktop em mobile */
    #navbarCAASP {
        display: none !important;
    }
    
    .card-oque-somos {
        margin-top: 100px;
        padding: 25px;
    }
    
    .card-title {
        font-size: 1.6rem;
    }
    
    .card-text {
        font-size: 1.1rem;
    }
    
    .btn-enviar-adesao, .btn-success {
        padding: 10px 20px;
    }
}

@media (min-width: 992px) {
    .offcanvas {
        display: none !important;
    }
    
    .navbar-toggler {
        display: none;
    }
    
    #navbarCAASP {
        display: flex !important;
    }
}

@media (max-width: 767.98px) {
    .card-oque-somos {
        margin-top: 80px;
        padding: 20px;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .form-label {
        font-size: 0.95rem;
    }
    
    .form-control {
        padding: 10px 12px;
    }
}

@media (max-width: 575.98px) {
    .nav-item a {
        font-size: 0.9rem;
    }
    
    .card-oque-somos {
        margin-top: 70px;
        padding: 15px;
    }
    
    .card-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .footer-caasp p, .footer-caasp a {
        font-size: 0.9rem;
    }
    
    .offcanvas {
        width: 250px !important;
    }
    
    #logos {
        max-height: 35px;
    }
    
    .btn-enviar-adesao {
        font-size: 1rem;
    }
    
    #botao-cadastro {
        margin-left: 5px;
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

/*-------------------------------  Estilos para validação ------------------------------- */
.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid:focus,
.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Animações para mensagens */
.alert {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Spinner no botão */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}