/* ===== Custom Styles for Phillips Group ===== */

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

/* Base styles */
body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: #2d461e;
    color: #faf9f6;
}

/* ===== Scroll Reveal Animations ===== */
/* Default state: always visible for accessibility */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

/* When JS is enabled and user prefers motion, animate on scroll */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal-up.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: none;
    }
}

/* ===== Navbar Styles ===== */
#navbar {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(45, 70, 30, 0.08);
}

#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(15, 22, 10, 0.08);
}

/* ===== Mobile Menu ===== */
.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: none;
}

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

/* ===== Button focus styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #527a35;
    outline-offset: 2px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #527a35;
}

/* ===== Hover lift effect for cards ===== */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 22, 10, 0.12);
}

/* ===== Image hover zoom ===== */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ===== Decorative line animation ===== */
@keyframes growWidth {
    from { width: 0; }
    to { width: 100%; }
}

/* ===== Print styles ===== */
@media print {
    nav, #backToTop, .reveal-up, .reveal-left, .reveal-right {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }
}
