/* SunwoodHomes Custom CSS - ARHomes.com Inspired Design */

/* CSS Custom Properties */
:root {
    /* Colors */
    --color-primary: #1f2937;
    --color-primary-light: #374151;
    --color-secondary: #6b7280;
    --color-accent: #d97706;
    --color-white: #ffffff;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    
    /* Typography */
    --font-display: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Borders */
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 0.2s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-gray-900);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
.font-display {
    font-family: var(--font-display);
}

.font-body {
    font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
}

h3 {
    font-size: 2rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.75rem;
    }
}

/* Navigation */
.nav-link {
    @apply text-gray-600 hover:text-gray-900 px-3 py-2 text-sm font-medium transition-colors duration-200;
}

.nav-link.active {
    @apply text-gray-900 font-semibold;
}

.mobile-nav-link {
    @apply block px-3 py-2 text-base font-medium text-gray-600 hover:text-gray-900 hover:bg-gray-50 rounded-md transition-colors duration-200;
}

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

/* Buttons */
.btn-base {
    @apply inline-flex items-center justify-center px-6 py-3 border border-transparent text-base font-medium rounded-md transition-all duration-200 cursor-pointer no-underline;
}

.btn-primary {
    @apply btn-base bg-gray-900 text-white hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-900;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary-large {
    @apply btn-primary px-8 py-4 text-lg;
}

.btn-primary-light {
    @apply btn-base bg-white text-gray-900 hover:bg-gray-50 border border-gray-300;
}

.btn-secondary {
    @apply btn-base bg-transparent text-gray-900 border border-gray-300 hover:bg-gray-50 hover:border-gray-400;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary-large {
    @apply btn-secondary px-8 py-4 text-lg;
}

.btn-secondary-light {
    @apply btn-base bg-transparent text-white border border-white hover:bg-white hover:text-gray-900;
}

.btn-secondary-light-large {
    @apply btn-secondary-light px-8 py-4 text-lg;
}

/* Form Elements */
.form-input {
    @apply w-full px-4 py-3 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-900 focus:border-transparent transition-all duration-200;
}

.form-input:focus {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.form-select {
    @apply form-input bg-white;
}

.form-textarea {
    @apply form-input resize-vertical;
    min-height: 120px;
}

/* Cards */
.community-card {
    @apply bg-white rounded-lg overflow-hidden transition-all duration-300;
}

.community-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.blog-card {
    @apply bg-white rounded-lg overflow-hidden transition-all duration-300;
}

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

.testimonial-card {
    @apply bg-white p-8 rounded-lg shadow-sm border border-gray-100 text-center transition-all duration-300;
}

.testimonial-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.value-tile {
    @apply transition-all duration-300;
}

.value-tile:hover {
    transform: translateY(-4px);
}

/* Hero Sections */
.hero-section {
    position: relative;
    background-attachment: fixed;
}

@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
    }
}

.hero-background {
    transition: transform 20s ease-out;
}

.hero-section:hover .hero-background {
    transform: scale(1.02);
}

/* Alerts */
.alert {
    @apply px-4 py-3 rounded-md shadow-sm border;
}

.alert-success {
    @apply bg-green-50 border-green-200 text-green-800;
}

.alert-error {
    @apply bg-red-50 border-red-200 text-red-800;
}

/* Prose Styling for Blog Content */
.prose {
    @apply text-gray-600 leading-relaxed;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    @apply text-gray-900 font-display font-semibold mt-8 mb-4 leading-tight;
}

.prose h2 {
    @apply text-3xl;
}

.prose h3 {
    @apply text-2xl;
}

.prose h4 {
    @apply text-xl;
}

.prose p {
    @apply mb-6;
}

.prose a {
    @apply text-gray-900 underline hover:text-gray-700 transition-colors;
}

.prose blockquote {
    @apply border-l-4 border-gray-300 pl-6 italic text-gray-700 my-6;
}

.prose ul,
.prose ol {
    @apply mb-6 pl-6;
}

.prose li {
    @apply mb-2;
}

.prose img {
    @apply rounded-lg shadow-md my-8;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    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);
    }
}

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

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

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

/* Scroll Animations */
@media (prefers-reduced-motion: no-preference) {
    .scroll-animate {
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.6s ease-out;
    }
    
    .scroll-animate.in-view {
        opacity: 1;
        transform: translateY(0);
    }
}

/* High-End Luxury Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

/* Scroll-triggered luxury animations */
.luxury-animate {
    opacity: 0;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.luxury-animate.animate {
    opacity: 1;
}

.fade-up-luxury {
    transform: translateY(50px);
}

.fade-up-luxury.animate {
    transform: translateY(0);
}

.fade-left-luxury {
    transform: translateX(-40px);
}

.fade-left-luxury.animate {
    transform: translateX(0);
}

.fade-right-luxury {
    transform: translateX(40px);
}

.fade-right-luxury.animate {
    transform: translateX(0);
}

.scale-in-luxury {
    transform: scale(0.9);
}

.scale-in-luxury.animate {
    transform: scale(1);
}

/* Enhanced hover effects */
.luxury-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.luxury-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Sophisticated card effects */
.premium-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.premium-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(245, 158, 11, 0.4);
}

/* Parallax and smooth reveals */
.parallax-element {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* Staggered animations */
.stagger-item {
    animation-fill-mode: both;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

/* Elegant loading shimmer */
.luxury-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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

/* Smooth text reveal */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: textReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes textReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image zoom on scroll */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Sale Banner - Using Custom Graphic */
.sale-banner {
    position: absolute;
    top: 16px;
    left: -20px;
    width: 240px;
    height: 50px;
    background-image: url('/static/images/banner-red.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 32px;
    font-weight: 900;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    z-index: 10;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Sale banner animation */
@keyframes bannerSlide {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.sale-banner {
    animation: bannerSlide 0.6s ease-out 0.8s both;
}

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

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

@keyframes loading {
    100% {
        transform: translateX(100%);
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--color-gray-900), var(--color-gray-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.text-shadow-light {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.aspect-ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.aspect-ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.aspect-ratio-square {
    aspect-ratio: 1 / 1;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1 {
        font-size: 18pt;
    }
    
    h2 {
        font-size: 16pt;
    }
    
    h3 {
        font-size: 14pt;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #000000;
        --color-secondary: #666666;
        --color-gray-600: #000000;
        --color-gray-700: #000000;
        --color-gray-800: #000000;
        --color-gray-900: #000000;
    }
    
    .btn-primary {
        border: 2px solid;
    }
    
    .btn-secondary {
        border: 2px solid;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-background {
        transition: none;
    }
    
    .hero-section:hover .hero-background {
        transform: none;
    }
}

/* Focus Styles for Accessibility */
*:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    border-radius: 4px;
    text-decoration: none;
    transition: top 0.3s;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

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

::-webkit-scrollbar-track {
    background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-400);
    border-radius: 4px;
}

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

/* Selection Styles */
::selection {
    background: var(--color-primary);
    color: white;
}

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

/* Hero Carousel Styles */
.hero-carousel {
    position: relative;
}

.hero-slide {
    transition: opacity 1000ms ease-in-out;
    opacity: 0;
}

.hero-slide.active {
    opacity: 1;
}

.carousel-indicator {
    transition: all 0.3s ease;
    cursor: pointer;
}

.carousel-indicator.active {
    background-color: rgba(255, 255, 255, 1) !important;
    transform: scale(1.2);
}

.carousel-indicator:hover {
    background-color: rgba(255, 255, 255, 0.9) !important;
    transform: scale(1.1);
}

/* Ensure carousel indicators are accessible */
.carousel-indicator:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Navigation hover effects */
nav a {
    transition: all 0.3s ease;
    transform: translateY(0);
}

nav a:hover {
    transform: translateY(-2px);
}

/* Loading animations */
.loading {
    opacity: 0.6;
    filter: blur(2px);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.loaded {
    opacity: 1;
    filter: blur(0);
}
