/* Custom styles for Mosbey Makeovers */

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

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

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

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

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

/* Hero animation */
.hero-content {
    animation: fadeInUp 1s ease-out forwards;
}

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

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* For browsers that support prefers-reduced-motion, ensure content is always visible */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(20px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.1);
}

#navbar.scrolled .nav-text {
    color: #1B4332;
}

#navbar.scrolled .nav-subtext {
    color: #1B4332;
}

#navbar.scrolled .nav-link {
    color: #1B4332;
}

#navbar.scrolled .menu-line {
    background: #1B4332;
}

/* Mobile menu animations */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Mobile nav link animation */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

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

#mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.3s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.4s; }

/* Hamburger menu animation */
.menu-line {
    transform-origin: center;
}

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

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

#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

/* Image hover effects */
.group img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.group:hover img {
    transform: scale(1.05);
}

/* Button hover effects */
button, a {
    transition: all 0.3s ease;
}

/* Focus styles for accessibility */
input:focus,
select:focus,
textarea:focus,
button:focus,
a:focus {
    outline: 2px solid #D4A373;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    #navbar,
    #mobile-menu,
    .scroll-reveal {
        display: block !important;
        opacity: 1 !important;
    }
    
    .hero-content {
        animation: none !important;
    }
}

/* 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;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .group:hover img {
        transform: none;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-content {
        padding-top: 2rem;
    }
}
