/* ============================================
   HHpoker - Custom Styles (0030 青蓝 Theme)
   Primary: #0891B2 (cyan-600)
   ============================================ */

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

/* --- Selection Colors --- */
::selection {
    background-color: rgba(8, 145, 178, 0.25);
    color: #164e63;
}

/* --- Navbar Scroll Effect (supports JS class toggles) --- */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

/* --- Hero Diagonal/Slanted Bottom Edge --- */
.hero-slant {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 80px), 0 100%);
}

/* --- Floating Animations --- */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

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

.animate-float-delayed {
    animation: floatDelayed 4.5s ease-in-out 1.5s infinite;
}

/* --- Gradient Text Utility --- */
.gradient-text {
    background: linear-gradient(135deg, #22d3ee, #0891b2, #0e7490);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Stats Dark Background Gradient Text --- */
.stats-gradient-number {
    background: linear-gradient(to right, #22d3ee, #38bdf8, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- FAQ Accordion Styles --- */
.faq-item .faq-toggle {
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-item.active .faq-toggle {
    border-bottom: 1px solid #e5e7eb;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    background-color: #0891b2;
    color: #fff;
}

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

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

/* --- Counter Animation (for stats numbers) --- */
.counter {
    display: inline-block;
}

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

/* --- Glass Morphism --- */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- Diagonal Dividers --- */
.diagonal-top {
    clip-path: polygon(0 60px, 100% 0, 100% 100%, 0 100%);
}

.diagonal-bottom {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 60px), 0 100%);
}

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

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(8, 145, 178, 0.12);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0891b2, #06b6d4);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0e7490, #0891b2);
}

/* --- Dark Section Pattern Background --- */
.bg-dot-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(8, 145, 178, 0.15) 1px, transparent 0);
    background-size: 40px 40px;
}

/* --- Testimonial Card --- */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(8, 145, 178, 0.1);
}

/* --- Button Shine Effect --- */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-shine:hover::after {
    left: 100%;
}

/* --- Section Transition (Angled Dividers between sections) --- */
.section-angle-top {
    position: relative;
}

.section-angle-top::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 0;
    width: 100%;
    height: 40px;
    background: inherit;
    clip-path: polygon(0 0, 100% 100%, 100% 100%, 0 0);
}

/* --- Mobile Navbar --- */
@media (max-width: 1023px) {
    #mobile-menu.show {
        display: block;
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 640px) {
    .hero-slant {
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 0 100%);
    }
}

/* --- Loading Skeleton (for images) --- */
img {
    transition: opacity 0.4s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

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

/* --- Focus Visible for Accessibility --- */
:focus-visible {
    outline: 2px solid #0891b2;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Pulse Dot --- */
@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

.animate-pulse-dot {
    animation: pulse-dot 2s ease-in-out infinite;
}

/* --- Divider Angled Edge --- */
.clip-angle {
    clip-path: polygon(0 0, 100% 30%, 100% 100%, 0% 100%);
}

/* --- Gradient Border --- */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 16px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0891b2, #22d3ee, #0891b2);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gradient-border:hover::before {
    opacity: 1;
}
