:root {
    --primary-color: #0056b3;
    --secondary-color: #6c757d;
    --success-color: #25d366;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --font-family: 'Inter', sans-serif;
    --border-radius: 10px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #ffffff;
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

.container {
    max-width: 1200px;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}

/* Prevenir overflow em todas as resoluções */
@media (max-width: 1600px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    .container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 1366px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    .container {
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.9), rgba(0, 86, 179, 0.7)),
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            /* url('/assets/images/hero-bg.jpg') center/cover no-repeat; */
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 86, 179, 0.1);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    animation: fadeInRight 1s ease-out 0.3s both;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    color: white;
    transition: var(--transition);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Search Section */
.search-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin-top: -100px;
    position: relative;
    z-index: 10;
}

/* Property Cards */
.property-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.property-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.property-card:hover .property-image img {
    transform: scale(1.05);
}

/* Estilo para link da imagem do card */
.property-image-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.property-image-link:hover img,
.card-img-top:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.property-image-link img,
.card-img-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.badge-destaque {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #00ff00;
    color: var(--dark-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.property-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: var(--transition);
}

.property-card:hover .property-actions {
    opacity: 1;
}

.property-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

/* Botões Ver Detalhes e WhatsApp sempre visíveis nos cards em destaque */
.property-card-actions {
    display: flex !important;
    flex-shrink: 0;
    margin-top: auto;
    visibility: visible !important;
    opacity: 1 !important;
}

.property-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.property-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.property-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    margin-top: auto;
}

.badge-custom {
    background: var(--light-color);
    color: var(--secondary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--cta-dark-color, #004494));
    color: white;
}

/* Navigation */
.navbar {
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--box-shadow);
}

.nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(0, 86, 179, 0.1);
    color: var(--primary-color) !important;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #004494;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #1ea952;
    transform: translateY(-2px);
}

/* Forms */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
}

/* Footer */
footer {
    background: var(--dark-color) !important;
}

footer a:hover {
    color: var(--primary-color) !important;
    text-decoration: none !important;
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    to {
        left: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .search-card {
        margin-top: -80px;
        padding: 1.2rem 0.9rem;
    }
    
    .property-image {
        height: 200px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .navbar-nav .btn {
        margin-top: 1rem;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .search-card {
        margin-top: -60px;
        padding: 0.9rem;
    }
    
    .property-features {
        flex-direction: column;
    }
    
    .badge-custom {
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .cta-section,
    footer,
    .property-actions,
    .btn {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
        min-height: auto !important;
    }
    
    .property-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ===== SLIDESHOW STYLES =====
/* Search Form Floating */
.search-floating {
    position: absolute;
    top: calc(var(--header-height, 77px) + 5px); /* 5px abaixo da base do header */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 1200px;
}

.search-floating .search-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin: 0;
}

/* Mobile Search Toggle */
.search-toggle {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 10px;
    padding: 9px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 86, 179, 0.2);
}

.search-toggle:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-toggle h6 {
    color: var(--primary-color);
    font-weight: 600;
}

.search-arrow {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.search-arrow.rotated {
    transform: rotate(180deg);
}

/* Search Form Content */
.search-form-content {
    /* Sem propriedades especiais - comportamento padrão */
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
    .search-floating {
        top: calc(var(--header-height, 70px) + 5px); /* 5px abaixo da base do header no mobile */
        width: 95%;
    }
    
    .search-form-content {
        display: none !important;
    }
    
    .search-form-content.show {
        display: block !important;
        animation: slideDown 0.3s ease-out;
        background: rgba(255, 255, 255, 0.95);
        padding: 12px;
        border-radius: 10px;
        margin-top: 15px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    
    .search-form-content form {
        margin: 0;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop - sempre visível */
@media (min-width: 768px) {
    .search-form-content {
        display: block !important;
    }
}

.hero-slideshow {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: 1;
}

.slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

.slideshow .slide.active {
    opacity: 1;
    z-index: 2;
}

.slideshow .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-caption {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    text-align: center;
    width: 90%;
}

.slide-title {
    font-family: 'Inter', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 4px;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.slide-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: #fff;
    letter-spacing: 1px;
    margin: 0;
}

/* Efeito de máquina de escrever */
.slide-title.typing::after,
.slide-subtitle.typing::after {
    content: '|';
    font-weight: normal;
    animation: blink 1s infinite;
    margin-left: 3px;
}

@keyframes blink {
    0%, 50% { 
        opacity: 1; 
    }
    51%, 100% { 
        opacity: 0; 
    }
}

/* Garantir que o texto dos slides não ativos esteja invisível */
.slide:not(.active) .slide-title,
.slide:not(.active) .slide-subtitle {
    opacity: 0;
}

.slide.active .slide-title,
.slide.active .slide-subtitle {
    opacity: 1;
}

/* Overlay gradiente para melhor legibilidade */
.slideshow .slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    z-index: 2;
}

/* Responsive Design para Slideshow */
@media (max-width: 768px) {
    .hero-slideshow {
        height: 400px;
    }
    
    .slide-caption {
        left: 50%;
        top: 50%;
        text-align: center;
        width: 90%;
    }
    
    .slide-title {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
    
    .slide-subtitle {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .hero-slideshow {
        height: 350px;
    }
    
    .slide-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    .slide-subtitle {
        font-size: 1.1rem;
    }
}
