/* ============================================
   PC28 Official - Custom Styles
   ============================================ */

/* ---- CSS Variables ---- */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --gradient-start: #4f46e5;
    --gradient-end: #7c3aed;
    --gray-50: #f9fafb;
    --gray-900: #111827;
}

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

/* ---- Selection ---- */
::selection {
    background-color: rgba(79, 70, 229, 0.2);
    color: #1f2937;
}

/* ---- Gradient Text ---- */
.gradient-text {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ---- Navbar Glass Morphism ---- */
#navbar {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

/* ---- Nav Link Hover Underline ---- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #4f46e5, #7c3aed);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-link:hover::after {
    width: 100%;
}

/* ---- Mobile Menu Transition ---- */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

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

/* Hide mobile menu completely when not open (for accessibility) */
#mobile-menu:not(.open) {
    pointer-events: none;
}

/* ---- Feature Cards ---- */
.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.feature-card {
    border: 1px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    border-color: rgba(79, 70, 229, 0.15);
}

/* Icon gradient backgrounds are set inline via Tailwind */

/* ---- Stats Counter ---- */
.stat-item {
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
}

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

/* ---- FAQ Accordion ---- */
.faq-toggle i {
    transition: transform 0.3s ease;
}

.faq-toggle.active i {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
}

.faq-content.open {
    max-height: 800px;
    padding-bottom: 1.25rem; /* pb-5 */
}

/* ---- Fade-in Up Animation (Intersection Observer) ---- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

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

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

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

/* ---- Pulse Dot ---- */
@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

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

/* ---- CTA Section Glow ---- */
#cta {
    position: relative;
}

#cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4f46e5, #7c3aed);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4338ca, #6d28d9);
}

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

/* ---- Loading State (optional) ---- */
img {
    transition: opacity 0.4s ease;
}

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

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

/* ============================================
   Responsive Fixes
   ============================================ */

/* Small screens: reduce font sizes */
@media (max-width: 640px) {
    #home h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    #home p {
        font-size: 0.95rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

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

    .stat-item .text-5xl {
        font-size: 2rem;
    }

    #cta h2 {
        font-size: 1.75rem;
    }

    #cta a {
        width: 100%;
        justify-content: center;
    }

    footer .grid {
        gap: 2rem;
    }
}

/* Medium screens */
@media (min-width: 641px) and (max-width: 1024px) {
    #home h1 {
        font-size: 2.5rem;
    }

    .feature-card {
        padding: 1.75rem;
    }

    .stat-item .text-5xl {
        font-size: 2.5rem;
    }
}

/* Large screens: fine-tune hero spacing */
@media (min-width: 1025px) {
    #home {
        min-height: 100vh;
        padding-top: 6rem;
        padding-bottom: 5rem;
    }
}

/* ---- Reduce motion for accessibility ---- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .fade-in-up {
        transition: none;
    }

    .animate-float,
    .animate-float-delayed {
        animation: none;
    }

    .feature-card:hover {
        transform: none;
    }
}

/* ---- Print Styles ---- */
@media print {
    #navbar,
    #mobile-menu,
    #cta,
    footer {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
    }
}
