/* Custom styles for Autoescola Sansaloni */

/* Base styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: rgba(200, 164, 90, 0.3);
    color: #fff;
}

/* Navbar scroll effect */
nav.scrolled {
    background-color: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(200, 164, 90, 0.1);
}

/* Hero animations */
.hero-subtitle {
    animation: slideUp 0.8s ease forwards 0.2s;
}

.hero-title {
    animation: slideUp 0.8s ease forwards 0.4s;
}

.hero-desc {
    animation: slideUp 0.8s ease forwards 0.6s;
}

.hero-cta-primary,
.hero-cta-secondary {
    animation: slideUp 0.8s ease forwards 0.8s;
}

.hero-image-wrapper {
    animation: fadeInRight 1s ease forwards 0.5s;
    opacity: 0;
}

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

@keyframes fadeInRight {
    from {
        transform: translateX(60px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Floating card animation */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

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

/* Scroll indicator */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scaleY(1);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.2);
    }
}

/* Stat counter animation */
.stat-item {
    opacity: 0;
    transform: translateY(20px);
}

.stat-item.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service cards */
.service-card {
    opacity: 0;
    transform: translateY(30px);
}

.service-card.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

/* Testimonial cards */
.testimonial-card {
    opacity: 0;
    transform: translateY(30px);
}

.testimonial-card.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.testimonial-card:nth-child(1) { animation-delay: 0.1s; }
.testimonial-card:nth-child(2) { animation-delay: 0.2s; }
.testimonial-card:nth-child(3) { animation-delay: 0.3s; }

/* Section animations */
.section-label {
    opacity: 0;
    transform: translateY(20px);
}

.section-label.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.section-title {
    opacity: 0;
    transform: translateY(20px);
}

.section-title.visible {
    animation: fadeInUp 0.6s ease forwards 0.1s;
}

/* Mobile menu */
.mobile-menu-open {
    overflow: hidden;
}

.mobile-menu-open .mobile-menu {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Menu animation */
.menu-line {
    transition: all 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.75rem;
}

/* Nav links hover effect */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #c8a45a;
    transition: width 0.3s ease;
}

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

.nav-link {
    position: relative;
}

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

::-webkit-scrollbar-track {
    background: #0d1b2a;
}

::-webkit-scrollbar-thumb {
    background: #c8a45a;
    border-radius: 4px;
}

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

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Image hover zoom */
img {
    transition: transform 0.7s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .floating-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}
