/* ApisWP Premium Styles v2.0 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
    /* Base Colors - Light Mode (Default) */
    --color-bg-body: #f8fafc; /* slate-50 */
    --color-bg-card: #ffffff;
    --color-bg-sidebar: #ffffff;
    --color-text-primary: #0f172a; /* slate-900 */
    --color-text-secondary: #64748b; /* slate-500 */
    --color-border: #e2e8f0; /* slate-200 */
    
    /* Brand Colors */
    --color-brand-primary: #22c55e;
    --color-brand-secondary: #0ea5e9;
    --color-dark-bg: #0b0f19;
}

[data-theme="dark"] {
    /* Base Colors - Dark Mode */
    --color-bg-body: #0f172a; /* slate-900 */
    --color-bg-card: #1e293b; /* slate-800 */
    --color-bg-sidebar: #0f172a;
    --color-text-primary: #f8fafc; /* slate-50 */
    --color-text-secondary: #94a3b8; /* slate-400 */
    --color-border: #334155; /* slate-700 */
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    background-color: var(--color-bg-body);
    color: var(--color-text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Utilities */
.bg-theme-body { background-color: var(--color-bg-body); }
.bg-theme-card { background-color: var(--color-bg-card); }
.bg-theme-sidebar { background-color: var(--color-bg-sidebar); }
.text-theme-primary { color: var(--color-text-primary); }
.text-theme-secondary { color: var(--color-text-secondary); }
.border-theme { border-color: var(--color-border); }

/* Scroll Progress Bar */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1000;
    background: transparent;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #0ea5e9);
    width: 0%;
    transition: width 0.1s ease-out;
}

/* --- Animations --- */

/* Floating Blobs */
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Marquee (Infinite Scroll) */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 7)); }
}

.slider {
    height: 100px;
    margin: auto;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.slider .slide-track {
    animation: scroll 40s linear infinite;
    display: flex;
    width: calc(250px * 14);
}

.slider .slide {
    height: 100px;
    width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.slider .slide:hover {
    opacity: 1;
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

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

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: floatParticle 20s infinite linear;
}

@keyframes floatParticle {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}

/* Social Proof Toast */
.toast-notification {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 90;
    max-width: 320px;
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Exit Popup */
.exit-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.exit-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.exit-popup-content {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.exit-popup-overlay.show .exit-popup-content {
    transform: scale(1);
}

.exit-close {
    position: absolute;
    top: 16px;
    right: 16px;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 24px;
    transition: color 0.2s;
}

.exit-close:hover {
    color: white;
}

/* Theme Switcher Button */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--color-bg-card);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.theme-toggle:hover {
    background-color: var(--color-border);
    color: var(--color-text-primary);
}

/* --- Components --- */

/* Glass Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Text */
.text-gradient-brand {
    background: linear-gradient(135deg, #4ade80 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Grid Background */
.bg-grid-slate-900 {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='32' height='32' fill='none' stroke='rgb(30 41 59 / 0.15)'%3e%3cpath d='M0 .5H31.5V32'/%3e%3c/svg%3e");
}

.bg-grid-white {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='32' height='32' fill='none' stroke='rgb(255 255 255 / 0.05)'%3e%3cpath d='M0 .5H31.5V32'/%3e%3c/svg%3e");
}

/* Feature Icon Glow */
.feature-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.feature-icon-wrapper::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.5), rgba(14, 165, 233, 0.5));
    filter: blur(8px);
    opacity: 0.5;
    z-index: -1;
}

/* Perspective Container for 3D Transforms */
.perspective-1000 {
    perspective: 1000px;
}

.rotate-y-12 {
    transform: rotateY(12deg) rotateX(5deg);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* WhatsApp Widget */
.wa-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    transition: transform 0.3s ease;
}

.wa-widget:hover {
    transform: scale(1.1);
}

.wa-widget-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f172a;
}
