/* Estilos personalizados para Cida Imóveis - Template Moderno */

/* Animações suaves */
* {
    transition: all 0.3s ease;
}

/* Efeito de fade-in */
.fade-in {
    animation: fade-in 0.5s ease-out both;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efeito de brilho nos botões */
.shine {
    position: relative;
    overflow: hidden;
}

.shine:after {
    content: "";
    position: absolute;
    inset: -100% -50%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-20deg);
}

.shine:hover:after {
    animation: shine 1s;
}

@keyframes shine {
    from {
        transform: translateX(-120%) skewX(-20deg);
    }
    to {
        transform: translateX(120%) skewX(-20deg);
    }
}

/* Scroll snap para galeria */
.snap-x {
    scroll-snap-type: x mandatory;
}

.snap-center {
    scroll-snap-align: center;
}

/* Estilos do Swiper */
.swiper {
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    overflow: hidden;
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.swiper-pagination {
    position: relative;
    margin-top: 1rem;
}

.swiper-pagination-bullet {
    background: rgba(16, 185, 129, 0.3);
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: #10b981;
}

.swiper-button-next,
.swiper-button-prev {
    color: #10b981;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    margin-top: -22px;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Responsividade do Swiper */
@media (max-width: 640px) {
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
    
    .swiper-pagination {
        margin-top: 0.5rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .swiper {
        height: 500px !important;
    }
}

@media (min-width: 769px) {
    .swiper {
        height: 800px !important;
    }
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Efeito de fade-in */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

/* Responsividade melhorada */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .property-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Otimizações de performance */
img {
    loading: lazy;
}

/* Estilos para o Swiper */
.swiper-button-next,
.swiper-button-prev {
    color: #3b82f6 !important;
}

.swiper-pagination-bullet {
    background: rgba(59, 130, 246, 0.5) !important;
}

.swiper-pagination-bullet-active {
    background: #3b82f6 !important;
}

/* Efeito de parallax sutil */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

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

p {
    line-height: 1.6;
}

/* Estilos para formulários */
.form-input {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

.form-textarea {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none;
}

/* Efeito de glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Animações de entrada */
.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

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

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

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

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

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

/* Estilos para botões de ação */
.cta-button {
    @apply inline-flex items-center justify-center px-8 py-4 rounded-lg font-semibold text-lg transition-all duration-300 transform hover:scale-105;
}

.cta-primary {
    @apply bg-blue-600 hover:bg-blue-700 text-white shadow-lg hover:shadow-xl;
}

.cta-secondary {
    @apply bg-green-500 hover:bg-green-600 text-white shadow-lg hover:shadow-xl;
}

/* Melhorias na acessibilidade */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible para melhor acessibilidade */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Estilos para o mapa */
.map-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.map-container iframe {
    border: none;
    width: 100%;
    height: 100%;
}
