/*
 * Finder Imóveis - CSS Principal
 * Versão: 1.0
 * Última atualização: Março 2026
 */

/* =====================================================
   VARIÁVEIS CSS
   ===================================================== */
:root {
    /* Cores Primárias */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-lighter: #60a5fa;
    
    /* Cores Secundárias */
    --secondary-color: #1e293b;
    --secondary-light: #334155;
    
    /* Cores de Destaque */
    --accent-orange: #f97316;
    --accent-yellow: #f59e0b;
    --accent-green: #10b981;
    --accent-teal: #14b8a6;
    --accent-purple: #8b5cf6;
    --accent-red: #ef4444;
    --accent-indigo: #6366f1;
    
    /* Cores de Texto */
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --text-light: #94a3b8;
    --text-lighter: #cbd5e1;
    
    /* Cores de Background */
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray: #f1f5f9;
    --bg-dark: #0f172a;
    
    /* Bordas */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transições */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Fontes */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* =====================================================
   RESET E BASE
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-normal);
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-dark) !important;
    text-decoration: none;
}

.navbar-brand .logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-link {
    color: var(--text-gray) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-anunciar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white !important;
    border-radius: 50px;
    padding: 0.5rem 1.5rem !important;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.btn-anunciar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

/* =====================================================
   TIPOGRAFIA
   ===================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

.text-primary { color: var(--primary-color); }
.text-gray { color: var(--text-gray); }
.text-light { color: var(--text-light); }

/* =====================================================
   COMPONENTES UTILITÁRIOS
   ===================================================== */
.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    margin-bottom: 0;
}

/* Container Personalizado */
.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* =====================================================
   BOTÕES
   ===================================================== */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary-custom {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--transition-normal);
}

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

.btn-white {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-normal);
}

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

.btn-outline-white {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-normal);
}

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

/* =====================================================
   CARDS
   ===================================================== */
.card-custom {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-bordered {
    border: 1px solid var(--border-color);
}

.card-bordered:hover {
    border-color: transparent;
}

/* =====================================================
   FORMULÁRIOS
   ===================================================== */
.form-input-custom {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-normal);
    background-color: white;
}

.form-input-custom:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-input-custom::placeholder {
    color: var(--text-light);
}

.form-select-custom {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* =====================================================
   BADGES
   ===================================================== */
.badge-custom {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

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

.badge-premium {
    background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
    color: white;
}

.badge-verified {
    background: var(--accent-teal);
    color: white;
}

.badge-sale {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.badge-rent {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

/* =====================================================
   ANIMAÇÕES
   ===================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

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

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* =====================================================
   UTILITÁRIOS DE HOVER
   ===================================================== */
.hover-lift {
    transition: transform var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: transform var(--transition-normal);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-shadow {
    transition: box-shadow var(--transition-normal);
}

.hover-shadow:hover {
    box-shadow: var(--shadow-xl);
}

/* =====================================================
   RESPONSIVIDADE
   ===================================================== */
@media (max-width: 1199px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .section-title { font-size: 2rem; }
}

@media (max-width: 991px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    .section-title { font-size: 1.75rem; }
}

@media (max-width: 767px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    .section-title { font-size: 1.5rem; }
    .section-subtitle { font-size: 1rem; }
}

@media (max-width: 575px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.375rem; }
    .section-title { font-size: 1.375rem; }
}

/* =====================================================
   SCROLLBAR PERSONALIZADA
   ===================================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-gray);
}

/* =====================================================
   SELEÇÃO DE TEXTO
   ===================================================== */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* =====================================================
   FOCUS STATES (ACESSIBILIDADE)
   ===================================================== */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background: #f8fafc;
    color: #1e293b;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid #e2e8f0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-brand img {
    height: 36px;
    width: auto;
    filter: none !important;
}

.footer-brand span {
    font-weight: 700;
    font-size: 1.25rem;
    color: #1e293b;
}

.footer-text {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-3px);
}

.footer-title {
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: #1e293b;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #2563eb;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: #64748b;
    font-size: 0.9rem;
}

.footer-contact i {
    color: #2563eb;
    font-size: 1rem;
}

.footer-bottom {
    border-top: 1px solid #e2e8f0;
    margin-top: 3rem;
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0;
}

/* =====================================================
   DARK MODE (FUTURO)
   ===================================================== */
@media (prefers-color-scheme: dark) {
    /* Adicionar estilos dark mode aqui quando necessário */
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
    .navbar,
    .footer,
    .btn,
    button {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .property-card,
    .card-custom {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* =====================================================
   GALLERY CAROUSEL (Swiper)
   ===================================================== */

.gallery-section {
    padding-top: 6rem;
    padding-bottom: 2rem;
}

.gallery-swiper {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.gallery-swiper .swiper-slide {
    height: 500px;
}

.gallery-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-swiper .swiper-button-next,
.gallery-swiper .swiper-button-prev {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
}

.gallery-swiper .swiper-button-next::after,
.gallery-swiper .swiper-button-prev::after {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.gallery-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: white;
    opacity: 0.7;
}

.gallery-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary-color);
}

/* Thumbnails */
.gallery-thumbs {
    margin-top: 1rem;
}

.gallery-thumbs .swiper-slide {
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    box-shadow: 0 0 0 3px var(--primary-color);
}

.gallery-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gallery badges */
.gallery-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    z-index: 10;
    pointer-events: none;
}

.badge-verified {
    background: var(--accent-teal);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.badge-premium {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Photo counter */
.gallery-counter {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

@media (max-width: 991.98px) {
    .gallery-swiper .swiper-slide {
        height: 350px;
    }
}

@media (max-width: 767.98px) {
    .gallery-swiper .swiper-slide {
        height: 280px;
    }
    
    .gallery-thumbs .swiper-slide {
        height: 60px;
    }
}
