/* ============================================
   德扑圈 HHPoker - Custom Styles
   Project 0062
   ============================================ */

/* ---------- Base & Scrollbar ---------- */
html {
    scroll-behavior: smooth;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ---------- Navbar ---------- */
#navbar.scrolled {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

/* ---------- Hero Floating Image Animation ---------- */
.hero-image-float {
    animation: floatBounce 4s ease-in-out infinite;
}

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

/* ---------- Feature Cards Icon-Left Layout ---------- */
.feature-card-left:hover {
    transform: translateY(-4px);
}

.feature-card-left:hover .flex-shrink-0 {
    transform: scale(1.05);
}

/* ---------- Stats Counters Animations ---------- */
.counter.visible {
    animation: countUp 2s ease-out forwards;
}

@keyframes countUp {
    from {
        opacity: 0.7;
    }
    to {
        opacity: 1;
    }
}

/* ---------- Radial Gradient CTA ---------- */
.bg-gradient-radial {
    background: radial-gradient(
        circle at center,
        #3b82f6 0%,
        #2563eb 30%,
        #1d4ed8 60%,
        #1e40af 100%
    );
}

/* Dot Pattern Overlay */
.dot-pattern {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.4) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* ---------- Wave Divider ---------- */
@media (max-width: 768px) {
    .wave-divider svg {
        height: 50px;
    }
}

/* ---------- FAQ Accordion ---------- */
.faq-item .faq-toggle {
    cursor: pointer;
}

.faq-item.active .faq-icon {
    background-color: #2563eb;
    color: #ffffff;
    transform: rotate(45deg);
}

.faq-item .faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-content {
    max-height: 500px;
}

/* ---------- Testimonial Quote Marks ---------- */
.testimonial-quote {
    font-size: 5rem;
    line-height: 1;
    color: #dbeafe;
    user-select: none;
    pointer-events: none;
}

.testimonial-card:hover .testimonial-quote {
    color: #93c5fd;
    transition: color 0.3s ease;
}

/* ---------- Fade-in Animations ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for grid items */
.fade-in-stagger > *:nth-child(1) { transition-delay: 0ms; }
.fade-in-stagger > *:nth-child(2) { transition-delay: 100ms; }
.fade-in-stagger > *:nth-child(3) { transition-delay: 200ms; }
.fade-in-stagger > *:nth-child(4) { transition-delay: 300ms; }
.fade-in-stagger > *:nth-child(5) { transition-delay: 400ms; }
.fade-in-stagger > *:nth-child(6) { transition-delay: 500ms; }

/* ---------- Form Validation Styles ---------- */
input.error,
textarea.error,
select.error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

input.valid,
textarea.valid,
select.valid {
    border-color: #10b981 !important;
    background-color: #f0fdf4 !important;
}

.form-error.visible {
    display: block;
    animation: shakeError 0.3s ease;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ---------- Mobile Responsive Adjustments ---------- */

/* Feature cards: on mobile, icon stays left but cards stack vertically */
@media (max-width: 768px) {
    .feature-card-left {
        padding: 1rem;
    }

    .feature-card-left .flex-shrink-0 {
        width: 3rem;
        height: 3rem;
    }

    .feature-card-left .flex-shrink-0 i {
        font-size: 1.25rem;
    }

    .feature-card-left h3 {
        font-size: 1.1rem;
    }

    .feature-card-left p {
        font-size: 0.85rem;
    }

    /* Hero text size adjustments */
    .hero-image-float img {
        width: 16rem;
        height: 16rem;
    }

    /* Testimonials full width on mobile */
    .testimonial-card {
        margin-bottom: 1rem;
    }

    /* FAQ text adjustments */
    .faq-item .faq-toggle span:first-child {
        font-size: 0.95rem;
    }

    .faq-item .faq-content {
        font-size: 0.9rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    .hero-image-float img {
        width: 13rem;
        height: 13rem;
    }

    /* Download cards full width */
    .grid-cols-1 > * {
        margin-bottom: 1rem;
    }

    /* Stats 2 columns on small mobile */
    .grid-cols-2 > * {
        padding: 0.75rem;
    }
}

/* ---------- Hover Effects & Transitions ---------- */

/* Smooth transition for all interactive elements */
a, button, .transition-all, .transition-colors, .transition-shadow, .transition-transform {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card hover lift effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
}

/* Button pulse effect */
.btn-pulse {
    animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(37, 99, 235, 0);
    }
}

/* Image gradient overlay for loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ---------- Timeline Styling for About Page ---------- */
.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 4.5rem;
    top: 2.5rem;
    bottom: -2rem;
    width: 2px;
    background: linear-gradient(to bottom, #3b82f6, #e5e7eb);
}

@media (max-width: 768px) {
    .timeline-item::before {
        display: none;
    }
}

/* ---------- FAQ Plus/Minus Toggle ---------- */
.faq-icon i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon i.fa-plus {
    transform: rotate(45deg);
}

/* ---------- Select dropdown custom arrow ---------- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem !important;
}

/* ---------- Mobile hamburger menu transition ---------- */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

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

/* Hamburger icon rotation */
#mobile-menu-btn i {
    transition: transform 0.3s ease;
}

#mobile-menu-btn.active i::before {
    content: '\f00d'; /* fa-xmark */
}

/* ---------- Print styles ---------- */
@media print {
    nav, footer, .cta-section, #mobile-menu {
        display: none !important;
    }

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

    a {
        color: #000;
        text-decoration: underline;
    }
}
