/* We Vibe Stays - Brand-Aligned Custom CSS */

/* Performance & Core Web Vitals Optimizations */
html {
    scroll-behavior: smooth;
}

/* Improve rendering performance */
* {
    box-sizing: border-box;
}

/* Optimize font loading */
body {
    font-display: swap;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Reduce layout shift with proper image containers */
img {
    max-width: 100%;
    height: auto;
}

/* Optimize carousel performance */
.carousel-container {
    contain: layout style paint;
}

/* GPU acceleration for smooth animations */
.animate-fade-in-up,
.animate-slide-in-left,
.animate-float,
.animate-wave {
    will-change: transform, opacity;
}

/* Reduce repaints during scroll */
.fixed,
.sticky {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Brand colors as CSS custom properties */
:root {
    --we-vibe-primary: #3A7CA5;
    --we-vibe-secondary: #A0522D;
    --we-vibe-accent: #D9D2B6;
    --we-vibe-dark: #231d21;
    --we-vibe-light: #F1F1EF;
    --we-vibe-white: #ffffff;
}

/* Custom animations with resort-meets-city vibe */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-5deg);
    }
}

/* Animation classes with resort vibes */
.animate-fade-in-up {
    animation: fadeInUp 1.2s ease-out forwards;
}

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

.animate-float {
    animation: floatGentle 4s ease-in-out infinite;
}

.animate-wave {
    animation: wave 6s ease-in-out infinite;
}

/* Header with brand-aligned blur effect */
#header.scrolled {
    background: rgba(241, 241, 239, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--we-vibe-accent);
    box-shadow: 0 4px 20px rgba(35, 29, 33, 0.1);
}

/* Brand-aligned gradient backgrounds */
.gradient-hero {
    background: linear-gradient(135deg, var(--we-vibe-light) 0%, var(--we-vibe-white) 50%, rgba(217, 210, 182, 0.2) 100%);
}

.gradient-card {
    background: linear-gradient(145deg, var(--we-vibe-white) 0%, var(--we-vibe-light) 100%);
}

.gradient-primary {
    background: linear-gradient(135deg, var(--we-vibe-primary) 0%, rgba(58, 124, 165, 0.8) 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, var(--we-vibe-secondary) 0%, rgba(160, 82, 45, 0.8) 100%);
}

/* Hero section enhancements */
.hero-image {
    object-position: center center;
    transform: scale(1.05);
    transition: transform 10s ease-out;
}

.hero-image:hover {
    transform: scale(1.1);
}

/* Enhanced backdrop blur for modern glass effect */
.backdrop-blur-enhanced {
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
}

/* Scroll indicator animation */
@keyframes scrollIndicator {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.5;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-indicator {
    animation: scrollIndicator 2s ease-in-out infinite;
}

/* Logo blending effects - Remove white background */
.logo-blend {
    mix-blend-mode: multiply;
    background: transparent !important;
    transition: all 0.3s ease;
    /* Alternative approach for white background removal */
    filter: contrast(1.2) brightness(1.1);
}

.logo-blend:hover {
    mix-blend-mode: normal;
    transform: scale(1.02);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Ensure the logo container doesn't add background */
.logo-blend {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Brand-aligned button effects with airy feel */
.btn-primary {
    background: linear-gradient(135deg, var(--we-vibe-primary) 0%, rgba(58, 124, 165, 0.9) 100%);
    box-shadow: 0 8px 25px rgba(58, 124, 165, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1.5rem;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(58, 124, 165, 0.4);
}

/* Property card with resort-inspired hover effects */
.property-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2rem;
}

.property-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(35, 29, 33, 0.15);
}

/* FAQ accordion styles */
.faq-item {
    transition: all 0.3s ease;
}

.faq-question {
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background-color: #f8fafc;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer.open {
    max-height: 300px;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-icon.rotate {
    transform: rotate(180deg);
}

/* Review card styles */
.review-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    transition: all 0.3s ease;
}

.review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.star-rating {
    color: #fbbf24;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.show {
    max-height: 300px;
}

/* Status badges */
.status-live {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.status-coming-soon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* Booking button styles */
.booking-btn {
    transition: all 0.2s ease;
}

.booking-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive typography and hero optimizations */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    /* Mobile hero adjustments */
    #home {
        min-height: 100vh;
        padding-top: 88px; /* Add space for mobile header (header ~64px + buffer ~24px) */
    }
    
    /* Ensure hero image covers properly on mobile */
    .hero-image {
        object-position: center 40%;
        transform: scale(1);
    }
    
    /* Mobile-optimized overlay */
    .hero-overlay-mobile {
        background: linear-gradient(
            to bottom,
            rgba(35, 29, 33, 0.7) 0%,
            rgba(35, 29, 33, 0.5) 50%,
            rgba(35, 29, 33, 0.8) 100%
        );
    }
    
    /* Mobile text adjustments */
    .hero-brand-mobile {
        text-align: left;
        margin-bottom: 2rem;
    }
    
    .hero-tagline-mobile {
        font-size: 2.5rem;
        line-height: 1.1;
        margin-bottom: 1.5rem;
        margin-top: 0; /* Ensure no extra top margin */
    }
    
    /* Mobile hero content container - reduce top padding since section already has padding-top */
    #home .container {
        padding-top: 1rem !important; /* Reduce from py-16 (4rem) to 1rem on top */
        padding-bottom: 4rem; /* Keep original bottom padding */
    }
    
    /* Mobile stats grid */
    .hero-stats-mobile {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 300px;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-tagline-tablet {
        font-size: 4rem;
        line-height: 1.1;
    }
    
    .hero-stats-tablet {
        max-width: 600px;
    }
}

/* Footer responsive adjustments */
@media (max-width: 768px) {
    .footer-logo {
        height: 4rem; /* h-16 equivalent */
        max-width: 180px;
    }
    
    .footer-brand-section {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .footer-brand-section .space-y-3 {
        align-items: center;
        text-align: center;
    }
    
    .footer-brand-section .max-w-sm {
        max-width: 14rem;
    }
}

@media (min-width: 769px) {
    .footer-logo {
        height: 5rem; /* h-20 equivalent */
        max-width: 200px;
    }
}

/* Focus states for accessibility */
button:focus,
a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #374151;
    }
    
    .text-gray-500 {
        color: #4b5563;
    }
    
    .border-gray-100 {
        border-color: #d1d5db;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* Reviews Carousel Styles */
.reviews-track {
    will-change: transform;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.review-slide {
    min-height: 280px;
}

/* Responsive carousel behavior */
@media (max-width: 768px) {
    .review-slide {
        width: 100% !important;
        min-height: 320px;
    }
}

@media (min-width: 769px) {
    .review-slide {
        width: 33.3333% !important;
    }
}

/* Carousel dot animations */
.carousel-dot {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-dot:hover {
    transform: scale(1.2);
    background-color: var(--we-vibe-primary);
}

.carousel-dot.active {
    background-color: var(--we-vibe-primary);
    transform: scale(1.3);
}

/* Pause animation on hover */
#reviews-carousel:hover .reviews-track {
    animation-play-state: paused;
}

/* Smooth card hover effects */
.review-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(35, 29, 33, 0.15);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .reviews-track {
        transition: none !important;
        animation: none !important;
    }
    
    .carousel-dot {
        transition: none !important;
    }
    
    .review-card {
        transition: none !important;
    }
}

/* Focus styles for accessibility */
.carousel-dot:focus {
    outline: 2px solid var(--we-vibe-primary);
    outline-offset: 2px;
}

/* Coming Soon Property Styling */
.property-card.coming-soon {
    opacity: 0.85;
    transition: all 0.3s ease;
}

.property-card.coming-soon:hover {
    opacity: 0.95;
    transform: translateY(-2px);
}

.property-card.coming-soon img {
    filter: grayscale(100%) contrast(0.8) brightness(0.9);
    transition: filter 0.3s ease;
}

.property-card.coming-soon:hover img {
    filter: grayscale(80%) contrast(0.9) brightness(1);
}

/* Coming Soon Carousel Specific Styling */
.property-card.coming-soon .carousel-slide img {
    filter: grayscale(100%) contrast(0.8) brightness(0.9);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.property-card.coming-soon:hover .carousel-slide img {
    filter: grayscale(80%) contrast(0.9) brightness(1);
    opacity: 0.8;
}

.property-card.coming-soon .carousel-dot {
    background-color: rgba(255, 255, 255, 0.5) !important;
}

.property-card.coming-soon .carousel-dot.active {
    background-color: rgba(255, 255, 255, 0.8) !important;
}

/* Property Carousel Styles */
.property-carousel {
    cursor: pointer;
    overflow: hidden !important;
}

.carousel-track {
    will-change: transform;
    display: flex !important;
    width: 500% !important; /* 5 slides * 100% each */
    transition: transform 0.7s ease-in-out !important;
}

.carousel-slide {
    flex-shrink: 0;
    width: 20% !important; /* 100% / 5 slides = 20% each */
    min-width: 20% !important;
    height: 100%;
    transition: opacity 0.3s ease;
}

.carousel-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.property-carousel:hover .carousel-slide {
    animation-play-state: paused;
}

/* Mobile-specific carousel fixes */
@media (max-width: 768px) {
    .property-carousel {
        touch-action: pan-y pinch-zoom;
        -webkit-overflow-scrolling: touch;
        position: relative;
        width: 100%;
        height: 256px; /* h-64 equivalent */
    }
    
    .carousel-track {
        width: 500% !important;
        display: flex !important;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
    }
    
    .carousel-slide {
        width: 20% !important;
        min-width: 20% !important;
        max-width: 20% !important;
        flex-shrink: 0 !important;
        height: 100%;
        position: relative;
    }
    
    .carousel-slide img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
    }
    
    /* Ensure carousel container doesn't overflow */
    .property-carousel .h-64 {
        height: 256px;
        overflow: hidden !important;
        position: relative;
    }
}

/* Carousel dots styling */
.property-carousel .carousel-dot {
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
}

.property-carousel .carousel-dot.active {
    background-color: white !important;
    transform: scale(1.2);
}

.property-carousel .carousel-dot:hover {
    background-color: white !important;
    transform: scale(1.1);
}

/* Smooth carousel transitions */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.carousel-slide img {
    transition: transform 8s ease-out;
}

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

/* Footer logo styling with enhanced visibility */
.footer-logo {
    background: transparent !important;
    background-color: transparent !important;
    mix-blend-mode: screen;
    filter: brightness(1.4) contrast(1.3) saturate(1.2) drop-shadow(0 1px 2px rgba(255, 255, 255, 0.1));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

.footer-logo:hover {
    filter: brightness(1.5) contrast(1.4) saturate(1.3) drop-shadow(0 2px 4px rgba(255, 255, 255, 0.2));
    transform: scale(1.03);
}

/* Property Description Toggle Styles */
.property-description .description-preview,
.property-description .description-full {
    transition: all 0.3s ease;
}

.read-more-btn {
    cursor: pointer;
    transition: all 0.2s ease;
}

.read-more-btn:hover {
    transform: translateY(-1px);
}

.read-more-btn i {
    transition: transform 0.2s ease;
}

/* Enhanced footer brand section styling */
.footer-brand-section {
    position: relative;
}

.footer-brand-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* Footer tagline animation */
@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

.footer-tagline-glow {
    animation: pulseGlow 3s ease-in-out infinite;
}