/* Enhanced Homepage Specific Styles */

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--gradient-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(231, 76, 60, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(52, 152, 219, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(46, 204, 113, 0.05) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(transparent, #f8f9fa);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    background: var(--gradient-accent);
    border-radius: var(--border-radius-lg);
    z-index: -1;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite alternate;
}

.hero-image img {
    border-radius: var(--border-radius-lg);
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.25),
        0 0 0 1px rgba(255,255,255,0.1);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: var(--transition-slow);
    filter: brightness(1.05) contrast(1.1);
}

.hero-image:hover img {
    transform: perspective(1000px) rotateY(0) rotateX(0) scale(1.02);
    box-shadow: 
        0 35px 70px rgba(0,0,0,0.3),
        0 0 0 1px rgba(255,255,255,0.2);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(1deg);
    }
}

/* Enhanced Services Preview */
.services-preview {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.services-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

.service-card {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: var(--border-radius-lg);
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 
        var(--shadow-md),
        inset 0 1px 0 rgba(255,255,255,0.8);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: var(--transition-slow);
}

.service-card:hover::before {
    left: 100%;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-icon {
    margin-bottom: 2rem;
    position: relative;
}

.service-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    opacity: 0.1;
    transition: var(--transition);
}

.service-card:hover .service-icon::before {
    transform: translate(-50%, -50%) scale(1.1);
}

.service-icon img {
    max-height: 60px;
    width: auto;
    filter: grayscale(0.3);
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.service-card:hover .service-icon img {
    transform: scale(1.15) rotate(5deg);
    filter: grayscale(0) brightness(1.1);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Enhanced Mission Section */
.mission {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.mission::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.mission-content {
    position: relative;
    z-index: 2;
}

.mission h2 {
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.mission h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.mission-stats {
    position: relative;
}

.mission-stats::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.stat {
    text-align: center;
    padding: 2.5rem 1.5rem;
    position: relative;
    transition: var(--transition);
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    opacity: 0;
    transition: var(--transition);
}

.stat:hover::before {
    opacity: 1;
}

.stat:hover {
    transform: translateY(-5px);
}

.stat h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 800;
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat p {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

/* Enhanced Responsive Adjustments */
@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero-btns {
        justify-content: center;
    }
    
    .hero-btns .btn {
        display: inline-block;
        width: auto;
        margin-bottom: 1rem;
    }
    
    .hero-image {
        margin-top: 3rem;
    }
    
    .hero-image::before {
        display: none;
    }
    
    .mission-stats::before {
        display: none;
    }
    
    .mission-stats .col-md-4 {
        margin-bottom: 2rem;
    }
    
    .stat {
        padding: 2rem 1rem;
    }
    
    .stat h3 {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btns .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
    }
}

/* Enhanced Hover Effects */
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 
        var(--shadow-xl),
        0 10px 30px rgba(44, 62, 80, 0.1);
}

.service-card:hover .service-icon {
    transform: none; /* Override the individual icon transform */
}

/* Enhanced Animation Delays with Staggering */
.service-card {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.service-card:nth-child(1) { 
    animation-delay: 0.1s; 
}
.service-card:nth-child(2) { 
    animation-delay: 0.2s; 
}
.service-card:nth-child(3) { 
    animation-delay: 0.3s; 
}
.service-card:nth-child(4) { 
    animation-delay: 0.4s; 
}

.stat {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.stat:nth-child(1) { animation-delay: 0.1s; }
.stat:nth-child(2) { animation-delay: 0.2s; }
.stat:nth-child(3) { animation-delay: 0.3s; }

/* Particle Background Effect */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: float-particle 6s ease-in-out infinite;
}

@keyframes float-particle {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Gradient Text Animation */
.gradient-text {
    background: linear-gradient(
        135deg,
        #2c3e50 0%,
        #3498db 25%,
        #e74c3c 50%,
        #f39c12 75%,
        #2c3e50 100%
    );
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border-right: 2px solid rgba(255,255,255,0.8);
    border-bottom: 2px solid rgba(255,255,255,0.8);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    50% {
        transform: rotate(45deg) translateY(-10px);
    }
}

/* Enhanced Section Transitions */
.section-transition {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-transition.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}