/* ============================================================
   德扑之家 - Custom Styles
   ============================================================ */

/* --- Font Smoothing & Base --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica,
        Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
        "Segoe UI Symbol";
}

/* --- Selection --- */
::selection {
    background-color: #ea580c33;
    color: #1f2937;
}

/* --- Navbar Scroll Effect --- */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(12px);
}

/* --- Feature Card Hover --- */
.feature-card:hover {
    transform: translateY(-6px);
}

/* --- FAQ Accordion --- */
.faq-item .faq-answer {
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
    animation: fadeInDown 0.35s ease-out;
}

.faq-item.active .fa-chevron-down {
    transform: rotate(180deg);
}

.faq-item.active {
    border-color: #ea580c33;
    box-shadow: 0 4px 20px rgba(234, 88, 12, 0.08);
}

.faq-item.active .faq-toggle {
    color: #ea580c;
}

/* --- Animations --- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

@keyframes bounceSlow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.animate-bounce-slow {
    animation: bounceSlow 3s ease-in-out infinite;
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }

/* --- Back to Top Button --- */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* --- Smooth Transition for Mobile Menu --- */
#mobile-menu {
    transition: max-height 0.35s ease;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.open {
    max-height: 500px;
}

/* --- Focus Outline --- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #ea580c;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Image Responsive --- */
img {
    max-width: 100%;
    height: auto;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1023px) {
    #hero {
        text-align: center;
    }
}

@media (max-width: 640px) {
    html {
        scroll-padding-top: 4rem;
    }

    #back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
}
