/* ===== Custom Styles for Mesa Barber Shop ===== */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #952a28;
}

/* Selection color */
::selection {
    background: rgba(149, 42, 40, 0.4);
    color: #fff;
}

/* ===== Navbar ===== */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(10, 12, 16, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(149, 42, 40, 0.15);
}

/* ===== Hero ===== */
#hero {
    min-height: 100vh;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #dd5856, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 12, 16, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    right: 24px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 80px;
    color: rgba(149, 42, 40, 0.1);
    line-height: 1;
    pointer-events: none;
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ===== Button hover effects ===== */
a[href^="tel:"],
button[type="submit"] {
    position: relative;
    overflow: hidden;
}

a[href^="tel:"]::after,
button[type="submit"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

a[href^="tel:"]:hover::after,
button[type="submit"]:hover::after {
    opacity: 1;
}

/* ===== Input focus animations ===== */
input:focus,
select:focus,
textarea:focus {
    animation: none;
}

/* ===== Mobile menu ===== */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #dd5856;
    transition: width 0.3s ease;
}

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

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    .gallery-item img {
        transition: none;
    }
    
    .gallery-item:hover img {
        transform: none;
    }
}

/* ===== Responsive adjustments ===== */
@media (max-width: 640px) {
    .font-display {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .service-card {
        padding: 2rem;
    }
}

/* ===== Loading state for form ===== */
button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Print styles ===== */
@media print {
    #navbar,
    #mobile-menu,
    .gallery-item img,
    iframe {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
