/* Custom Styles for TARMAQ - Modern Animations Edition */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

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

/* ============================================
   MODERN ANIMATIONS
   ============================================ */

/* Fade In from Bottom */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In from Top */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In from Left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In from Right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate In */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Slide Up with Bounce */
@keyframes slideUpBounce {
    0% {
        opacity: 0;
        transform: translateY(100px);
    }
    60% {
        opacity: 1;
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(218, 47, 44, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(218, 47, 44, 0.6);
    }
}

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

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

/* Wiggle */
@keyframes wiggle {
    0%, 100% {
        transform: rotate(-3deg);
    }
    50% {
        transform: rotate(3deg);
    }
}

/* ============================================
   ANIMATION CLASSES
   ============================================ */

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out;
}

.animate-rotate-in {
    animation: rotateIn 0.8s ease-out;
}

.animate-slide-up-bounce {
    animation: slideUpBounce 1s ease-out;
}

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

.animate-wiggle {
    animation: wiggle 0.5s ease-in-out;
}

/* Delayed animations */
.animate-delay-100 { animation-delay: 0.1s; animation-fill-mode: both; }
.animate-delay-200 { animation-delay: 0.2s; animation-fill-mode: both; }
.animate-delay-300 { animation-delay: 0.3s; animation-fill-mode: both; }
.animate-delay-400 { animation-delay: 0.4s; animation-fill-mode: both; }
.animate-delay-500 { animation-delay: 0.5s; animation-fill-mode: both; }
.animate-delay-600 { animation-delay: 0.6s; animation-fill-mode: both; }

/* Scroll reveal - elements fade in when scrolled into view */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   HOVER EFFECTS
   ============================================ */

/* Navigation hover effects */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

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

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

/* Button styles with 3D effect */
.btn-primary, .btn-secondary {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(218, 47, 44, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(218, 47, 44, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

/* Card hover effects with lift and glow */
.hover\:shadow-xl {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hover\:shadow-xl:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Icon hover effects */
.icon-hover {
    transition: all 0.3s ease;
    display: inline-block;
}

.icon-hover:hover {
    transform: scale(1.2) rotate(5deg);
    color: #DA2F2C;
}

/* Image zoom effect */
.image-zoom {
    overflow: hidden;
    border-radius: 1rem;
    position: relative;
}

.image-zoom img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-zoom:hover img {
    transform: scale(1.15) rotate(2deg);
}

.image-zoom::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(218, 47, 44, 0.2), rgba(0, 0, 0, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-zoom:hover::after {
    opacity: 1;
}

/* ============================================
   GRADIENT & TEXT EFFECTS
   ============================================ */

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #DA2F2C 0%, #ff6b6b 50%, #ff8e53 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 3s ease infinite;
}

/* Animated gradient background */
.gradient-bg-animated {
    background: linear-gradient(135deg, #DA2F2C, #c62828, #b71c1c, #DA2F2C);
    background-size: 400% 400%;
    animation: gradientFlow 8s ease infinite;
}

/* Underline animation */
.hover-underline {
    position: relative;
    display: inline-block;
}

.hover-underline::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #DA2F2C;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.hover-underline:hover::before {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* ============================================
   PARALLAX & SCROLL EFFECTS
   ============================================ */

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

/* Sticky header effect */
.header-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

/* ============================================
   LOADING & STATES
   ============================================ */

/* Language selector active state */
.lang-btn {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.lang-btn.active {
    border-color: #DA2F2C !important;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(218, 47, 44, 0.3);
}

.lang-btn:hover {
    transform: scale(1.1);
}

/* Loading animation */
.loading {
    opacity: 0.5;
    pointer-events: none;
    filter: blur(2px);
    transition: all 0.3s ease;
}

/* Loading spinner with bounce */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #DA2F2C;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

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

/* Skeleton loading */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #DA2F2C, #b82522);
    border-radius: 10px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #b82522, #9a1f1c);
    box-shadow: 0 0 10px rgba(218, 47, 44, 0.5);
}

/* ============================================
   FORM STYLES
   ============================================ */

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #DA2F2C;
    box-shadow: 0 0 0 4px rgba(218, 47, 44, 0.1);
    transform: translateY(-2px);
}

/* ============================================
   STATS & COUNTERS
   ============================================ */

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.stat-number {
    animation: countUp 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Progress bar animation */
@keyframes progressBar {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, #DA2F2C, #ff6b6b);
    animation: progressBar 2s ease-out;
}

/* ============================================
   PULSE & GLOW EFFECTS
   ============================================ */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.glow-effect {
    animation: glowPulse 2s ease-in-out infinite;
}

/* ============================================
   MOBILE MENU
   ============================================ */

#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.show {
    max-height: 600px;
}

/* ============================================
   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-visible {
    outline: 3px solid #DA2F2C;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ============================================
   ALERTS & NOTIFICATIONS
   ============================================ */

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    animation: slideInRight 0.4s ease-out;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* ============================================
   TOOLTIP
   ============================================ */

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

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    padding: 0.5rem 1rem;
    background: #111827;
    color: white;
    border-radius: 0.5rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-4xl {
        font-size: 2rem;
    }
    
    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .hover\:shadow-xl:hover {
        transform: translateY(-5px) scale(1.01);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    header, footer, .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    * {
        animation: none !important;
        transition: none !important;
    }
}
