/* ========================================
   Akai Ito Lab - Custom Styles
   ======================================== */

/* General Styles */
* {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Custom Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(196, 30, 58, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(196, 30, 58, 0.6);
    }
}

.animate-fade-in {
    animation: fade-in 1s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Navigation Styles */
#navbar {
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #C41E3A;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Button Styles */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Hero Section */
#home {
    position: relative;
}

#home h1 {
    line-height: 1.1;
}

/* Scroll Indicator */
.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    50% {
        transform: translateY(-10px) translateX(-50%);
    }
}

/* Stats Section Counters */
.stat-number {
    transition: all 0.5s ease;
}

/* Timeline Styles */
.timeline-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Team Cards */
.team-card {
    transition: all 0.3s ease;
}

.team-card:hover {
    transform: translateY(-10px) scale(1.02);
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(196, 30, 58, 0.1), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

/* Portfolio Filter */
.portfolio-filter {
    cursor: pointer;
    transition: all 0.3s ease;
}

.portfolio-filter.active {
    background-color: #C41E3A;
    color: white;
}

.portfolio-item {
    transition: all 0.3s ease;
}

.portfolio-item.hidden {
    display: none;
}

/* Case Study Cards */
.case-study {
    transition: all 0.3s ease;
}

.case-study:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Testimonial Cards */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Blog Cards */
article {
    transition: all 0.3s ease;
}

/* Contact Form */
#contact-form input,
#contact-form select,
#contact-form textarea {
    transition: all 0.3s ease;
}

#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
    border-color: #C41E3A;
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

/* Scroll to Top Button */
#scroll-top {
    transition: all 0.3s ease;
}

#scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

#scroll-top:hover {
    transform: translateY(-5px);
}

/* Loading Animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #C41E3A;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Utilities */
@media (max-width: 768px) {
    #home h1 {
        font-size: 2.5rem;
    }
    
    .timeline-vertical-line {
        display: none;
    }
    
    .stat-number {
        font-size: 3rem;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: #C41E3A;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a01828;
}

/* Selection Color */
::selection {
    background-color: #C41E3A;
    color: white;
}

::-moz-selection {
    background-color: #C41E3A;
    color: white;
}

/* Print Styles */
@media print {
    nav, footer, #scroll-top {
        display: none;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #C41E3A;
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-duration: 0.3s;
    transition-timing-function: ease-in-out;
}

/* Prevent transition on page load */
.preload * {
    transition: none !important;
}

/* Image Lazy Loading Effect */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, #C41E3A 0%, #ff4757 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Effect */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(196, 30, 58, 0.2);
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-primary {
    background-color: rgba(196, 30, 58, 0.1);
    color: #C41E3A;
}

/* Divider */
.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #C41E3A, transparent);
    margin: 2rem 0;
}

/* Glassmorphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

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

/* Tooltip */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 0.5rem 1rem;
    background-color: #1a1a1a;
    color: white;
    font-size: 0.875rem;
    white-space: nowrap;
    border-radius: 0.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

[data-tooltip]:hover::before {
    opacity: 1;
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Text Gradient Animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background: linear-gradient(270deg, #C41E3A, #ff4757, #C41E3A);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    * {
        border-color: currentColor !important;
    }
}

/* 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;
    }
}
