/* Custom styles for Al Anthony's Professional Haircutting */

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

/* Custom selection color */
::selection {
    background-color: #f05a1a;
    color: #ffffff;
}

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

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

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

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

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

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f05a1a, #ff7a3d);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* Gallery hover effect */
.gallery-item {
    position: relative;
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(31, 31, 31, 0);
    transition: background 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    background: rgba(31, 31, 31, 0.2);
}

/* Navbar scroll effect */
.nav-scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* Mobile menu animation */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Menu button animation */
.menu-line {
    display: block;
}

.menu-open .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 5;
}

/* Fade-in animations for below-fold sections */
.fade-in-section {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .fade-in-section {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .fade-in-section.is-visible {
        opacity: 1;
        transform: none;
    }
}

/* Subtle entrance animation for hero (visible by default, JS enhances) */
.hero-content {
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
    .hero-content {
        animation: heroFadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
    
    .hero-image {
        animation: heroImageIn 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
        opacity: 0;
    }
}

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

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

/* Floating card animation */
@media (prefers-reduced-motion: no-preference) {
    .floating-card {
        animation: float 6s ease-in-out infinite;
    }
}

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

/* Form styles */
input, textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #1f1f1f;
    background: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

input::placeholder, textarea::placeholder {
    color: #a3a3a3;
}

input:focus, textarea:focus {
    border-color: #f05a1a;
    box-shadow: 0 0 0 3px rgba(240, 90, 26, 0.08);
}

/* Success message */
.success-message {
    display: none;
    padding: 16px 20px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    color: #166534;
    font-size: 14px;
    margin-top: 16px;
}

.success-message.show {
    display: block;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
