/* Custom styles for Clinical Psychology Plc */

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

/* Prevent flash of hidden content */
body {
    opacity: 1;
}

/* Navbar transitions */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: #E87461;
    transition: width 0.3s ease;
}

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

/* Mobile menu animation */
#mobileMenu {
    animation: slideDown 0.3s ease forwards;
}

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

/* Menu button animation */
.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

.menu-btn.active .menu-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile links */
.mobile-link {
    display: block;
    transition: color 0.2s ease;
}

.mobile-link:hover {
    color: #E87461;
}

/* Scroll reveal animations - progressive enhancement only */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        transition: none;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: none;
    }
    
    .group:hover {
        transition: none;
    }
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 116, 97, 0.15);
}

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

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

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

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

/* Selection color */
::selection {
    background-color: rgba(232, 116, 97, 0.2);
    color: #2D2D2D;
}

/* Print styles */
@media print {
    header,
    #contactForm,
    button {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
