/* Custom Styles for Fit Alanya */

/* Hero Background Animation */
.hero-bg {
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 50%, #9CAF88 100%);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.7;
}

.topBackground {
    background-image: url(/uploads/formofis6.jpg);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.9;
    z-index: -10;
    height: 100%;
    width: 100%;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>') no-repeat center center;
    background-size: cover;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

/* Hero Content Animation */
.hero-content {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F5F1E8;
}

::-webkit-scrollbar-thumb {
    background: #9CAF88;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7A9B6B;
}

/* Button Hover Effects */
.btn-hover-effect {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-hover-effect:hover::before {
    left: 100%;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Text Gradient Animation */
.text-gradient {
    background: linear-gradient(135deg, #9CAF88, #C5705D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Loading Animation */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 2s infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Mobile Menu Animation */
.mobile-menu-enter {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Typography */
@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-content p {
        font-size: 1.125rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States */
*:focus {
    outline: 2px solid #9CAF88;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav, .hero-bg, footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Custom Animations for Elements */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Pulse Animation for CTA Buttons */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(156, 175, 136, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(156, 175, 136, 0); }
    100% { box-shadow: 0 0 0 0 rgba(156, 175, 136, 0); }
}

/* Stagger Animation for Service Cards */
.stagger-animation {
    opacity: 0;
    transform: translateY(30px);
    animation: staggerFadeIn 0.6s ease forwards;
}

.stagger-animation:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation:nth-child(6) { animation-delay: 0.6s; }

@keyframes staggerFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar Scroll Effect */
nav.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Make images and media scale responsively */
img, picture, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Make form elements and tables more mobile-friendly */
input, textarea, select, button {
    max-width: 100%;
    box-sizing: border-box;
}

/* Additional small-screen hero tuning */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.1;
    }

    .hero-content p {
        font-size: 1rem;
    }

    nav .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}