/* ====== Root Variables ====== */
:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --bg-light: #f7f8fc;
    --surface-color: #ffffff;
    --text-primary: #1d2b3a;
    --text-secondary: #5a677d;
    --text-muted: #9aa5b8;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --shadow-card: 0 4px 8px rgba(29, 43, 58, 0.05), 0 15px 30px rgba(29, 43, 58, 0.07);
    --shadow-header: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --border-radius: 16px;
    --transition-curve: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====== Global Styles ====== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-secondary);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

/* ====== Preloader ====== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ====== Particles Background ====== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--border-color);
    border-radius: 50%;
    animation: float 30s infinite linear;
}

@keyframes float {
    0% { transform: translateY(100vh); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh); opacity: 0; }
}

/* ====== Header ====== */
.header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(247, 248, 252, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: box-shadow 0.3s ease, border-bottom-color 0.3s ease, background-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    box-shadow: var(--shadow-header);
    border-bottom-color: var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo i {
    color: var(--primary-color);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--primary-color);
}


/* ====== Hero Section ====== */
.hero {
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -1.5px;
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    max-width: 600px;
    margin: 0 auto 32px;
    color: var(--text-secondary);
}

/* ====== Features Section ====== */
.features-square-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    max-width: 100%;
}

.feature-item-square {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s var(--transition-curve);
    max-width: 200px;
}

.feature-item-square:hover {
    transform: translateY(-2px);
}

.feature-item-square i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    transition: color 0.2s ease;
}

.feature-item-square h4 {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

.feature-item-square:hover i {
    color: var(--primary-dark);
}

.feature-item-square:hover h4 {
    color: var(--primary-dark);
}

/* ====== Testimonials Section ====== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: auto;
}
.testimonial-card {
    background: var(--surface-color);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}
.testimonial-card blockquote {
    font-style: italic;
    color: var(--text-secondary);
    border-left: 3px solid var(--primary-color);
    padding-left: 20px;
    margin: 0 0 20px;
    flex-grow: 1;
}
.testimonial-card figcaption {
    display: flex;
    align-items: center;
    gap: 15px;
}
.testimonial-card img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
.testimonial-card cite {
    font-weight: 600;
    color: var(--text-primary);
    font-style: normal;
}
.testimonial-card span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ====== Pricing Section (Diperbarui untuk Scrolling) ====== */
.pricing-container {
    overflow-x: auto; /* Mengaktifkan scroll horizontal */
    -webkit-overflow-scrolling: touch; /* Scroll lebih halus di iOS */
    padding: 10px;
    margin: 0 -10px; /* Kompensasi padding agar shadow terlihat */
}
/* Menyembunyikan scrollbar untuk estetika */
.pricing-container::-webkit-scrollbar {
    display: none;
}
.pricing-container {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.pricing-grid {
    display: flex; /* Mengubah grid menjadi flexbox */
    gap: 25px;
    width: max-content; /* Memastikan lebar total melebihi container */
    padding-bottom: 20px; /* Jarak untuk shadow kartu */
}

.pricing-card {
    flex: 0 0 280px; /* Kartu tidak akan menyusut, dengan lebar dasar 280px */
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: all 0.3s var(--transition-curve);
    box-shadow: var(--shadow-card);
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(29, 43, 58, 0.15);
}

.pricing-card.popular {
    border-color: var(--primary-color);
    transform: translateY(-10px); /* Dibuat sedikit naik */
}

.pricing-card.popular:hover {
    transform: translateY(-15px);
}

.popular-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    margin: -16px auto 16px;
}

.pricing-card h3 {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-primary);
}

.pricing-card .price {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 12px 0;
}

.pricing-card .price span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.pricing-card ul {
    list-style: none;
    margin: 16px 0 24px;
    text-align: left;
    flex-grow: 1;
}

.pricing-card ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
}

.pricing-card ul li i.fa-check { 
    color: var(--success-color);
    margin-top: 2px;
}
.pricing-card ul li i.fa-times { 
    color: var(--text-muted);
    margin-top: 2px;
}

/* ====== CTA Button ====== */
.cta-button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s var(--transition-curve);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(79, 70, 229, 0.25);
}

.cta-button.large {
    padding: 16px 32px;
    font-size: 16px;
}

.cta-button.full-width {
    width: 100%;
    justify-content: center;
}

/* ====== Contact & Footer ====== */
.contact-action {
    max-width: 450px;
    margin: 0 auto;
    text-align: center;
}

.footer {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

.footer-social {
    display: flex;
    gap: 15px;
}
.footer-social a {
    color: var(--text-muted);
    font-size: 18px;
    transition: color 0.2s ease, transform 0.2s ease;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
}
.footer-social a:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ====== Responsive Design ====== */
.mobile-nav-toggle { display: none; }

@media (max-width: 1024px) {
    /* Menghapus gaya transform agar tidak bentrok dengan scroll */
    .pricing-card.popular {
        transform: none;
    }
    .pricing-card.popular:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 768px) {
    .section { padding: 60px 0; }
    .header-container { height: 70px; }
    .main-nav { display: none; }
    .mobile-nav-toggle { 
        display: block;
        background: none;
        border: none;
        color: var(--text-primary);
        font-size: 24px;
        cursor: pointer;
        z-index: 1002;
    }
    .hero { padding: 50px 15px; }
    .hero h1 { font-size: clamp(1.8rem, 8vw, 2.5rem); letter-spacing: -1px; }
    .hero p { font-size: 1rem; }
}

@media (max-width: 480px) {
    .section { padding: 50px 0; }
    .hero { padding: 40px 10px; }
    .hero h1 { font-size: clamp(1.6rem, 8vw, 2rem); }
    .hero p { font-size: 0.9rem; }
    .footer { font-size: 13px; }
    .footer-links { gap: 15px; flex-wrap: wrap; justify-content: center; }
    .footer-links a { font-size: 12px; }
}

.mobile-nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-light);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.4s var(--transition-curve);
}
.mobile-nav-menu.active {
    transform: translateX(0);
}
.mobile-nav-menu nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}
.mobile-nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
}


/* ====== Animations & Accessibility ====== */
.anim-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--transition-curve), transform 0.6s var(--transition-curve);
}
.anim-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
.anim-fade-in:nth-child(2) { transition-delay: 0.1s; }
.anim-fade-in:nth-child(3) { transition-delay: 0.2s; }
.anim-fade-in:nth-child(4) { transition-delay: 0.3s; }
.anim-fade-in:nth-child(5) { transition-delay: 0.4s; }
.anim-fade-in:nth-child(6) { transition-delay: 0.5s; }


@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ====== Dark Mode ====== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #0f172a;
        --surface-color: #1e293b;
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #64748b;
        --border-color: #334155;
    }
    
    .header {
        background-color: rgba(15, 23, 42, 0.85);
    }
}