/* STONEVIA - Advanced GSAP Style Design */

/* Custom scroll-margin for smooth navigation */
.section-scroll-target {
    scroll-margin-top: 5rem;
}

/* Hero Section - Advanced Styles */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-image img {
    will-change: transform;
    transition: transform 0.3s ease;
}

.hero-overlay-image {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-overlay-image img {
    will-change: transform, opacity;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.hero-blob-1,
.hero-blob-2 {
    will-change: transform;
}

.hero-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-title-line-1,
.hero-title-line-2 {
    display: block;
    will-change: transform, opacity, clip-path;
}

.hero-badge,
.hero-subtitle,
.hero-button-1,
.hero-button-2 {
    will-change: transform, opacity;
}

/* Initial states - GSAP will animate */
.hero-badge {
    opacity: 0;
}

.hero-title-line-1,
.hero-title-line-2 {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
}

.hero-subtitle {
    opacity: 0;
}

.hero-button-1,
.hero-button-2 {
    opacity: 0;
}

.scroll-indicator {
    will-change: transform;
}

/* Service Blocks - Alternating Layout */
.service-block {
    position: relative;
    will-change: transform, opacity;
}

.service-content {
    will-change: transform, opacity;
}

.service-image-wrapper {
    will-change: transform, opacity, scale;
    position: relative;
}

.service-image-wrapper img {
    will-change: transform;
    transition: transform 0.3s ease;
}

.service-number {
    will-change: transform, opacity, scale;
}

/* Gallery Section */
.gallery-item {
    will-change: transform, opacity, scale;
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    will-change: transform;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Features Section */
.feature-card {
    will-change: transform, opacity, scale;
    position: relative;
}

.feature-card .absolute {
    will-change: opacity;
}

/* Section Titles */
.section-title-wrapper {
    will-change: transform, opacity;
}

/* Contact Form */
.contact-form-wrapper {
    will-change: transform, opacity, scale;
}

/* Custom Cursor */
.custom-cursor {
    pointer-events: none;
    mix-blend-mode: difference;
}

/* Image Loading */
img {
    max-width: 100%;
    height: auto;
    display: block;
    -webkit-image-rendering: -webkit-optimize-contrast;
    -moz-image-rendering: crisp-edges;
    -o-image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

@supports not (scroll-behavior: smooth) {
    html {
        scroll-behavior: auto;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: #34495e;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2c3e50;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #34495e #ecf0f1;
}

/* Cross-browser compatibility */
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Transform compatibility */
.transform {
    -webkit-transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    -o-transform: translateX(-50%);
    transform: translateX(-50%);
}

/* Backdrop blur fallback */
@supports not (backdrop-filter: blur(10px)) {
    .backdrop-blur-sm,
    .backdrop-blur-md {
        background-color: rgba(255, 255, 255, 0.15);
    }
}

/* Gradient fallback for older browsers */
.gradient-fallback {
    background-color: #2c3e50;
    background-image: -webkit-linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #1e3a5f 100%);
    background-image: -moz-linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #1e3a5f 100%);
    background-image: -o-linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #1e3a5f 100%);
    background-image: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #1e3a5f 100%);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .service-block {
        margin-bottom: 4rem;
    }
    
    .service-image-wrapper img {
        height: 500px;
        max-height: 500px;
    }
    
    .service-number {
        font-size: 80px;
        top: -10px;
        right: -10px;
    }
}

@media (max-width: 768px) {
    .service-block {
        margin-bottom: 3rem;
    }
    
    .service-image-wrapper img {
        height: 400px;
        max-height: 400px;
    }
    
    .service-content h3 {
        font-size: 2rem;
    }
    
    .service-content p {
        font-size: 1.125rem;
    }
    
    .service-number {
        font-size: 60px;
    }
    
    /* Mobile optimizations */
    .hero-title {
        font-size: 3rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.125rem !important;
    }
    
    .gallery-item {
        height: 300px;
    }
}


/* Extra small devices */
@media (max-width: 480px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .gallery-item {
        height: 280px;
    }
    
    .gallery-item h3 {
        font-size: 1.25rem;
    }
    
    .service-number {
        font-size: 50px;
    }
    
    .section-title-wrapper h2 {
        font-size: 2.5rem !important;
    }
    
    /* Projects page mobile */
    .project-card {
        margin-bottom: 1.5rem;
    }
    
    .project-card img {
        height: 250px;
    }
    
    /* Further reduce shadows on small screens */
    .shadow-lg {
        box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1) !important;
    }
}

/* Premium Projects Section */
.projects-preview-section {
    position: relative;
}

.project-card-premium {
    will-change: transform;
}

.project-card-premium .group:hover img {
    transform: scale(1.25) !important;
}

/* Shine effect animation */
@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}
    
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .service-image-wrapper img {
        height: 300px;
        max-height: 300px;
    }
    
    .gallery-item {
        height: 250px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .service-image-wrapper,
    .service-content,
    .gallery-item,
    .feature-card {
        transform: none !important;
        opacity: 1 !important;
    }
    
    .hero-blob-1,
    .hero-blob-2 {
        animation: none !important;
    }
}


/* Print styles */
@media print {
    .hero-section,
    .features-section {
        background: white !important;
        color: black !important;
    }
}
