/* Custom CSS for animations and additional styling */

/* Navigation underline animation */
.nav-underline {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    transform: scaleX(0);
    transition: transform 0.3s ease-in-out;
    transform-origin: left;
}

/* Mobile menu animations */
.mobile-menu-enter {
    animation: slideDown 0.3s ease-out forwards;
}

.mobile-menu-exit {
    animation: slideUp 0.3s ease-in forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Slide Progress Animation - Super Fast */
@keyframes slideProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Smooth scrolling for navigation links */
html {
    scroll-behavior: smooth;
}

/* Custom animations for expertise cards */
.expertise-card:hover {
    animation: cardFloat 0.3s ease-in-out;
}

@keyframes cardFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(-2px); }
}

/* Product card hover effects */
.product-card:hover {
    animation: productCardHover 0.3s ease-in-out;
}

@keyframes productCardHover {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-5px) scale(1.02); }
    100% { transform: translateY(-8px) scale(1.01); }
}

/* Hitachi logo pulse animation */
.hitachi-logo .animate-pulse {
    animation: hitachiPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes hitachiPulse {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.05);
    }
}

/* Slide transition improvements - Super Fast */
.slide, .principle-slide {
    will-change: transform;
    transition: transform 0.3s ease-in-out;
}

/* Progress bar animation - Super Fast */
#progress-bar {
    transition: width 0.1s linear;
}

#principles-progress-bar {
    transition: width 0.3s linear;
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

/* Button hover effects */
button:hover {
    transform: translateY(-1px);
}

/* Enhanced button animations */
.group:hover button {
    animation: buttonPulse 0.6s ease-in-out;
}

@keyframes buttonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1.02); }
}

/* Social media button animations */
.group:hover svg {
    animation: iconSpin 0.5s ease-in-out;
}

@keyframes iconSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(5deg) scale(1.1); }
    100% { transform: rotate(0deg) scale(1); }
}

/* Smooth transitions for all interactive elements */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Loading animation for images */
img {
    transition: opacity 0.3s ease-in-out;
}

img:not([src]) {
    opacity: 0;
}

/* Focus states for accessibility */
button:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* WhatsApp button animations */
.whatsapp-button {
    animation: whatsappPulse 2s infinite;
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Map container styling */
.map-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.map-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    pointer-events: none;
    z-index: 1;
}

/* Principles slider specific animations */
.principle-slide {
    transition: transform 0.7s ease-in-out;
}

/* Enhanced card animations */
.bg-blue-50:hover,
.bg-green-50:hover,
.bg-purple-50:hover {
    animation: cardGlow 0.5s ease-in-out;
}

@keyframes cardGlow {
    0% { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.2), 0 10px 10px -5px rgba(59, 130, 246, 0.1); }
    100% { box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.1), 0 4px 6px -2px rgba(59, 130, 246, 0.05); }
}

/* Floating animation for contact cards */
.bg-blue-50 {
    animation: float 6s ease-in-out infinite;
}

.bg-blue-50:nth-child(2) {
    animation-delay: -2s;
}

.bg-blue-50:nth-child(3) {
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Print styles */
@media print {
    .fixed,
    #mobile-menu,
    button,
    .whatsapp-button {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .slide, .principle-slide {
        position: relative !important;
        transform: none !important;
        height: auto !important;
    }
    
    .slide img, .principle-slide img {
        max-height: 200px;
        object-fit: cover;
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .hitachi-logo {
        top: 4px;
        right: 4px;
        transform: scale(0.8);
    }
    
    .slide h1 {
        font-size: 2.5rem;
    }
    
    .slide p {
        font-size: 1rem;
    }
    
    .whatsapp-button {
        bottom: 20px;
        right: 20px;
        padding: 12px;
    }
    
    .map-container iframe {
        min-height: 300px;
    }
    
    .nav-underline {
        display: none;
    }

    /* Mobile footer center alignment */
    footer .grid {
        text-align: center;
    }
    
    footer .grid > div {
        text-align: center;
    }
    
    footer .flex {
        justify-content: center;
    }
}

/* Enhanced accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .slide, .principle-slide {
        transition: none !important;
    }
    
    #progress-bar, #principles-progress-bar {
        transition: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-blue-50 {
        background-color: #ffffff;
        border: 2px solid #1e40af;
    }
    
    .text-gray-600 {
        color: #000000;
    }
    
    .bg-white-10 {
        background-color: rgba(255, 255, 255, 0.9);
        color: #000000;
    }
}

/* Gradient text effects */
.gradient-text {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced hover states */
.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Staggered animations for cards */
.expertise-card:nth-child(1) { animation-delay: 0.1s; }
.expertise-card:nth-child(2) { animation-delay: 0.2s; }
.expertise-card:nth-child(3) { animation-delay: 0.3s; }

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }