/* ==========================
   GERAL.CSS - CSS GLOBAL DO SITE
   ========================== */

/* Reset de elementos padrão */
body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    overflow-x: hidden;
}

/* Links padrão */
a {
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

a:hover {
    text-decoration: underline;
}

/* Responsividade de imagens */
img {
    max-width: 100%;
    height: auto;
}

/* ==========================
   HEADER BANNER
   ========================== */

.header-banner {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 2px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    padding: 0.5rem 0;
}

/* Logo Section */
.logo-section {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-section .mod-image {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    display: flex;
    align-items: center;
}

.logo-section .mod-image img {
    max-height: 75px;
    width: auto;
    object-fit: contain;
    margin: 0;
    padding: 0;
    transition: transform 0.3s ease;
}

.logo-section .mod-image img:hover {
    transform: scale(1.05);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-item {
    margin: 0;
    position: relative;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #495057;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 0.25rem;
    min-width: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,123,255,0.1) 0%, rgba(0,86,179,0.1) 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before {
    left: 0;
}

.nav-link:hover {
    color: #007bff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
}

.nav-link i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    transition: transform 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.1);
}

.nav-link span {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ==========================
   CONTEXTOS DE MÓDULOS
   ========================== */

/* Estilo quando o módulo mod-images.php é usado no topo */
.modulo-logo-topo .mod-image {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}

.modulo-logo-topo .mod-image img {
    max-height: 45px;
    width: auto;
    object-fit: contain;
}

/* Responsivo */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem 0;
        min-height: auto;
    }
    
    .nav-list {
        gap: 0.25rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-link {
        min-width: 70px;
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
    }
    
    .nav-link i {
        font-size: 1rem;
    }
    
    .nav-link span {
        font-size: 0.65rem;
    }
    
    .logo-section .mod-image img {
        max-height: 75px;
    }
    
    /* Dropdown responsivo para mobile */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        margin-top: 0;
        padding-left: 1rem;
    }
    
    .dropdown-item {
        padding: 8px 12px;
        font-size: 0.8rem;
        border-bottom: 1px solid #e9ecef;
    }
    
    .dropdown-item small {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .header-content {
        padding: 0.5rem 0;
    }
    
    .modulo-logo-topo .mod-image img {
        max-height: 35px;
    }
    
    .nav-list {
        gap: 0.2rem;
    }
    
    .nav-link {
        min-width: 60px;
        padding: 0.4rem 0.6rem;
        margin: 0 0.1rem;
    }
    
    .nav-link i {
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
    }
    
    .nav-link span {
        font-size: 0.6rem;
    }
    
    /* Dropdown responsivo para telas muito pequenas */
    .dropdown-menu {
        padding-left: 0.5rem;
    }
    
    .dropdown-item {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .dropdown-item small {
        font-size: 0.65rem;
    }
}

/* ==========================
   NAVEGAÇÃO
   ========================== */

/* Dropdown Menu Styles */
.nav-item.dropdown {
    position: relative;
}

.nav-link.dropdown-toggle {
    cursor: pointer;
}

.nav-link.dropdown-toggle .fa-chevron-down {
    font-size: 0.6rem;
    margin-left: 4px;
    transition: transform 0.2s ease-in-out;
}

.nav-link.dropdown-toggle:hover .fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease-in-out;
    margin-top: 5px;
}

.nav-item.dropdown:hover .dropdown-menu,
.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #495057;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s ease-in-out;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
    text-decoration: none;
}

.dropdown-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    color: #6c757d;
}

.dropdown-item:hover i {
    color: #007bff;
}

.dropdown-item small {
    margin-left: auto;
    font-size: 0.75rem;
    color: #6c757d;
}

.navbar {
    font-size: 0.95rem;
}

.navbar-brand .brand-text {
    line-height: 1;
}

.navbar-brand .brand-text span {
    display: block;
}

.navbar-brand .brand-text small {
    font-size: 0.75rem;
    color: #888;
}

/* ==========================
   PÁGINA DE AGRADECIMENTO
   ========================== */

.obrigado-container {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.obrigado-content {
    text-align: center;
    max-width: 600px;
    background: white;
    padding: 3rem 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.6s ease-out;
}

.obrigado-icon {
    margin-bottom: 2rem;
}

.obrigado-icon i {
    font-size: 5rem;
    color: #28a745;
    animation: bounceIn 0.8s ease-out 0.2s both;
}

.obrigado-text h1 {
    color: #212529;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.obrigado-text p {
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.obrigado-text p:last-of-type {
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out 0.8s both;
}

.obrigado-actions {
    animation: fadeInUp 0.6s ease-out 1s both;
}

.btn-voltar {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-voltar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    text-decoration: none;
    color: white;
}

.btn-voltar i {
    font-size: 1.1rem;
}

main.main-imovel.container.mt-4 {
    margin-top: 0px !important;
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsivo */
@media (max-width: 768px) {
    .obrigado-container {
        min-height: 50vh;
        padding: 1rem;
    }
    
    .obrigado-content {
        padding: 2rem 1.5rem;
    }
    
    .obrigado-icon i {
        font-size: 4rem;
    }
    
    .obrigado-text h1 {
        font-size: 2rem;
    }
    
    .obrigado-text p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .obrigado-content {
        padding: 1.5rem 1rem;
    }
    
    .obrigado-icon i {
        font-size: 3.5rem;
    }
    
    .obrigado-text h1 {
        font-size: 1.75rem;
    }
}

/* ==========================
   FOOTER
   ========================== */

.footer-custom {
    background-color: #f1f1f1 !important;
    color: #333;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.footer-custom .footer-logo img {
    max-height: 60px;
    transition: transform 0.3s ease;
}

.footer-custom .footer-logo:hover img {
    transform: scale(1.05);
}

.footer-badges {
    display: flex;
    align-items: center;
}

.footer-custom .footer-badges img {
    max-height: 40px;
    transition: transform 0.3s ease;
}

.footer-custom .footer-badges:hover img {
    transform: scale(1.05);
}

/* Responsivo do Footer */
@media (max-width: 768px) {
    .footer-custom .footer-logo img {
        max-height: 50px;
    }
    
    .footer-custom .footer-badges img {
        max-height: 35px;
    }
}

@media (max-width: 576px) {
    .footer-custom .footer-logo img {
        max-height: 45px;
    }
    
    .footer-custom .footer-badges img {
        max-height: 30px;
    }
}

/* ==========================
   CARROSSEL DE FUNDO DA INDEX
   ========================== */

/* Carrossel de fundo da página index */
.carrossel-fundo-index {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    margin-left: calc(-50vw + 50%);
}

.carrossel-item-index {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.carrossel-item-index.active {
    opacity: 1;
}

.imagem-fundo-index {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Indicadores do carrossel */
.carrossel-indicadores-index {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.indicador-index {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicador-index.ativo {
    background: white;
    border-color: white;
}

.indicador-index:hover {
    background: rgba(255,255,255,0.7);
}

/* Ajustar posicionamento do main-index */
.main-index {
    position: relative;
    z-index: 2;
    margin-top: 0 !important;
    padding-top: 0;
}

/* ==========================
   LAYOUT DA PÁGINA INICIAL
   ========================== */

/* Seção de busca - ocupa toda a altura da tela inicial */
.busca-imoveis {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    position: relative;
    z-index: 2;

}

/* Seção de parceiros - posicionada abaixo da busca */
.parceiros-carousel {
    position: relative;
    z-index: 2;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.code-icon {
    max-width: 55px;
}

/* Responsividade do carrossel */
@media (max-width: 768px) {

    .main-index {
        background: var(--cor-primaria);
    }

    .footer-custom {
        margin-top: 1rem !important;
    }

    .carrossel-fundo-index {
        height: 100vh;
        display: none;
    }
    
    .busca-imoveis {
        min-height: 0vh;
        padding: 1rem 0;
    }
    
    .parceiros-carousel {
        margin: 0;
        padding: 0;
        overflow: hidden;
    }

    footer .container div.row .col-md-8 div.row {
        justify-content: center!important;
        padding-top: 1rem;
    }
}

@media (max-width: 576px) {
    
    .parceiros-carousel {
        margin: 0;
        padding: 0;
        overflow: hidden;
    }
}

/* ==========================
   BOTÃO VOLTAR AO TOPO
   ========================== */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--cor-primaria);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top:hover {
    background-color: var(--cor-secundaria);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.scroll-to-top.show {
    display: flex;
}
