/* Hero Detail Component Animation Styles */

/* Base styles for hero-detail component */
.hero-detail {
    position: relative;
    transition: all 0.3s ease;
    will-change: transform, opacity;
    transform-origin: center;
    overflow: hidden;
}

/* Ensure smooth animations for all child elements */
.hero-detail * {
    will-change: transform, opacity, color, background-color, box-shadow;
}

/* Container styling */
.hero-detail .container {
    transition: all 0.3s ease;
    position: relative;
}

/* Header section styling */
.hero-detail .text-center {
    transition: all 0.3s ease;
    position: relative;
}

/* Title styling */
.hero-detail h2 {
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.hero-detail h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc2626, #ef4444);
    transition: width 0.4s ease;
    border-radius: 2px;
}

.hero-detail h2:hover::after {
    width: 80%;
}

/* Description styling */
.hero-detail .text-center p {
    transition: all 0.3s ease;
    position: relative;
}

.hero-detail .text-center p strong {
    transition: all 0.3s ease;
    position: relative;
}

.hero-detail .text-center p:hover strong {
    color: #dc2626;
    text-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

/* Service cards grid styling */
.hero-detail .grid {
    transition: all 0.3s ease;
}

/* Individual service card styling */
.hero-detail .grid > div {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    transform-origin: center;
    cursor: pointer;
}

.hero-detail .grid > div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05), rgba(239, 68, 68, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.hero-detail .grid > div:hover::before {
    opacity: 1;
}

/* Service card icons */
.hero-detail .grid > div svg {
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.hero-detail .grid > div svg:hover {
    filter: drop-shadow(0 8px 16px rgba(220, 38, 38, 0.3));
}

/* Service card titles */
.hero-detail .grid > div h3 {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.hero-detail .grid > div h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #dc2626, #ef4444);
    transition: width 0.4s ease;
    border-radius: 1px;
}

.hero-detail .grid > div:hover h3::after {
    width: 100%;
}

/* Service card descriptions */
.hero-detail .grid > div p {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

/* Service card lists */
.hero-detail .grid > div ul {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.hero-detail .grid > div li {
    transition: all 0.3s ease;
    position: relative;
}

.hero-detail .grid > div li::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #dc2626, rgba(220, 38, 38, 0.3));
    transition: width 0.3s ease;
    border-radius: 2px;
    z-index: -1;
}

.hero-detail .grid > div:hover li::before {
    width: calc(100% + 20px);
}

.hero-detail .grid > div li svg {
    transition: all 0.3s ease;
}

.hero-detail .grid > div:hover li svg {
    transform: scale(1.2);
    color: #dc2626;
}

/* Loading state */
.hero-detail.hero-detail-loading {
    pointer-events: none;
}

.hero-detail.hero-detail-loading .container {
    opacity: 0;
    transform: translateY(50px);
}

.hero-detail.hero-detail-loading h2 {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
}

.hero-detail.hero-detail-loading .text-center p {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
}

.hero-detail.hero-detail-loading .grid > div {
    opacity: 0;
    transform: translateY(60px) scale(0.9) rotateX(15deg);
}

.hero-detail.hero-detail-loading .grid > div svg {
    opacity: 0;
    transform: scale(0.5) rotate(-180deg);
}

.hero-detail.hero-detail-loading .grid > div h3 {
    opacity: 0;
    transform: translateX(-20px);
}

.hero-detail.hero-detail-loading .grid > div p {
    opacity: 0;
    transform: translateY(15px);
}

.hero-detail.hero-detail-loading .grid > div ul {
    opacity: 0;
    transform: translateY(20px);
}

.hero-detail.hero-detail-loading .grid > div li {
    opacity: 0;
    transform: translateX(-20px);
}

/* Ready state - floating animation */
.hero-detail.hero-detail-ready .grid > div svg {
    animation: iconFloat 2s ease-in-out infinite;
}

.hero-detail.hero-detail-ready .grid > div:nth-child(1) svg {
    animation-delay: 0s;
    animation-duration: 2s;
}

.hero-detail.hero-detail-ready .grid > div:nth-child(2) svg {
    animation-delay: 0.2s;
    animation-duration: 2.3s;
}

.hero-detail.hero-detail-ready .grid > div:nth-child(3) svg {
    animation-delay: 0.4s;
    animation-duration: 2.6s;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Ripple effect */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.3);
    pointer-events: none;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    margin-top: -5px;
    z-index: 10;
}

/* Hover enhancements */
.hero-detail:hover {
    transform: translateY(-5px);
}

.hero-detail .grid > div:hover {
    transform: translateY(-20px) scale(1.05);
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.3);
}

.hero-detail .grid > div:hover svg {
    transform: scale(1.2) rotate(360deg);
}

.hero-detail .grid > div:hover h3 {
    transform: translateX(10px);
}

.hero-detail .grid > div:hover p {
    transform: translateY(-5px);
}

.hero-detail .grid > div:hover li {
    transform: translateX(10px);
}

/* Click effects */
.hero-detail .grid > div:active {
    transform: translateY(-15px) scale(0.95);
}

.hero-detail h2:active {
    transform: scale(0.98);
}

/* Special styling for center card (red background) */
.hero-detail .grid > div.bg-red-600 {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    position: relative;
    overflow: hidden;
}

.hero-detail .grid > div.bg-red-600::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
}

.hero-detail .grid > div.bg-red-600:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 25px 50px rgba(220, 38, 38, 0.4);
}

.hero-detail .grid > div.bg-red-600 h3::after {
    background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.8));
}

.hero-detail .grid > div.bg-red-600 li::before {
    background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.3));
}

.hero-detail .grid > div.bg-red-600:hover li svg {
    color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-detail {
        padding: 1rem;
    }
    
    .hero-detail h2 {
        font-size: 2rem;
    }
    
    .hero-detail .text-center p {
        font-size: 1rem;
    }
    
    .hero-detail .grid > div {
        padding: 1.5rem;
    }
    
    .hero-detail .grid > div svg {
        width: 2rem;
        height: 2rem;
    }
    
    .hero-detail .grid > div h3 {
        font-size: 1.25rem;
    }
    
    .hero-detail .grid > div p {
        font-size: 0.875rem;
    }
    
    .hero-detail .grid > div li {
        font-size: 0.875rem;
    }
}

@media (max-width: 640px) {
    .hero-detail h2 {
        font-size: 1.75rem;
    }
    
    .hero-detail .text-center p {
        font-size: 0.9rem;
    }
    
    .hero-detail .grid > div {
        padding: 1rem;
    }
    
    .hero-detail .grid > div svg {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .hero-detail .grid > div h3 {
        font-size: 1.125rem;
    }
    
    .hero-detail .grid > div p {
        font-size: 0.8rem;
    }
    
    .hero-detail .grid > div li {
        font-size: 0.8rem;
    }
    
    /* Reduce hover effects on mobile */
    .hero-detail .grid > div:hover {
        transform: translateY(-10px) scale(1.02);
    }
    
    .hero-detail .grid > div:hover svg {
        transform: scale(1.1) rotate(180deg);
    }
    
    .hero-detail .grid > div:hover h3 {
        transform: translateX(5px);
    }
    
    .hero-detail .grid > div:hover li {
        transform: translateX(5px);
    }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-detail,
    .hero-detail * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-detail h2::after,
    .hero-detail .grid > div::before,
    .hero-detail .grid > div h3::after,
    .hero-detail .grid > div li::before {
        display: none;
    }
    
    .hero-detail.hero-detail-ready .grid > div svg {
        animation: none;
    }
}

/* Focus states for accessibility */
.hero-detail h2:focus-visible,
.hero-detail .grid > div:focus-visible {
    outline: 3px solid #dc2626;
    outline-offset: 2px;
}

.hero-detail .grid > div svg:focus-visible {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-detail .grid > div {
        border: 2px solid currentColor;
    }
    
    .hero-detail .grid > div:hover {
        background-color: #f0f0f0;
    }
    
    .hero-detail .grid > div.bg-red-600 {
        border: 2px solid #ffffff;
    }
    
    .hero-detail .grid > div.bg-red-600:hover {
        background-color: #dc2626;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .hero-detail {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .hero-detail h2 {
        color: #ef4444;
    }
    
    .hero-detail .text-center p {
        color: #d1d5db;
    }
    
    .hero-detail .grid > div {
        background-color: #2d2d2d;
        color: #ffffff;
    }
    
    .hero-detail .grid > div:hover {
        background-color: #3a3a3a;
    }
    
    .hero-detail .grid > div.bg-red-600 {
        background: linear-gradient(135deg, #dc2626, #b91c1c);
    }
    
    .hero-detail .grid > div.bg-red-600:hover {
        background: linear-gradient(135deg, #ef4444, #dc2626);
    }
}

/* Print styles */
@media print {
    .hero-detail {
        transform: none !important;
        opacity: 1 !important;
        box-shadow: none !important;
        background: #fff !important;
    }
    
    .hero-detail::before,
    .hero-detail::after,
    .hero-detail *::before,
    .hero-detail *::after {
        display: none !important;
    }
    
    .hero-detail .grid > div {
        transform: none !important;
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .hero-detail .grid > div.bg-red-600 {
        background: #dc2626 !important;
        color: #fff !important;
    }
}

/* Performance optimizations */
.hero-detail .grid > div,
.hero-detail .grid > div svg,
.hero-detail h2 {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Text selection styling */
.hero-detail ::selection {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

.hero-detail ::-moz-selection {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

/* Loading spinner for delayed content */
.hero-detail.hero-detail-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #dc2626;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Smooth scrolling behavior */
.hero-detail {
    scroll-behavior: smooth;
}

/* Additional visual enhancements */
.hero-detail .grid > div {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-detail .grid > div:hover {
    background-position: center 20px;
}

/* Shimmer effect for loading */
.hero-detail.hero-detail-loading .grid > div::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Gradient overlay for better text readability */
.hero-detail .grid > div.bg-red-600::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.05));
    pointer-events: none;
    z-index: 1;
}

/* Ensure content is above overlay */
.hero-detail .grid > div.bg-red-600 * {
    position: relative;
    z-index: 2;
} 