/* ===== Custom Styles for Whitfield Associates Construction ===== */

/* Base Styles */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #c9a84c;
    color: #0a1628;
}

/* ===== Navigation ===== */
#navbar {
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

#navbar.scrolled .nav-logo-text {
    color: #faf8f4;
}

#navbar.scrolled .nav-link {
    color: rgba(250, 248, 244, 0.7);
}

#navbar.scrolled .nav-link:hover {
    color: #d4b96a;
}

.nav-link {
    color: rgba(250, 248, 244, 0.7);
}

.nav-link:hover {
    color: #d4b96a;
}

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

#mobile-menu.open .mobile-nav-link {
    animation: fadeInUp 0.5s ease forwards;
}

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

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

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

#menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* ===== Hero Section ===== */
.hero-eyebrow {
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

.hero-headline {
    animation: fadeInUp 0.8s ease 0.5s forwards;
}

.hero-subheadline {
    animation: fadeInUp 0.8s ease 0.7s forwards;
}

.hero-cta {
    animation: fadeInUp 0.8s ease 0.9s forwards;
}

.hero-scroll {
    animation: fadeInUp 0.8s ease 1.1s forwards;
}

/* ===== Section Headers ===== */
.service-header,
.gallery-header,
.testimonials-header {
    animation: fadeInUp 0.6s ease forwards;
}

/* ===== Service Cards ===== */
.service-card {
    will-change: transform;
}

.service-card:hover {
    transform: translateY(-4px);
}

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

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

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

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

/* ===== Form Styles ===== */
input:focus,
select:focus,
textarea:focus {
    border-bottom-color: #c9a84c !important;
}

/* ===== Scroll Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===== Back to Top ===== */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

#back-to-top.show {
    opacity: 1;
    pointer-events: all;
}

#back-to-top:hover {
    transform: translateY(-2px);
}

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

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

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

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

/* ===== Responsive Adjustments ===== */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.15;
    }
}

@media (min-width: 1024px) {
    /* Subtle parallax feel on hero */
    #hero {
        will-change: transform;
    }
}

/* ===== Print Styles ===== */
@media print {
    #navbar,
    #back-to-top,
    .hero-scroll {
        display: none;
    }
}
