/* ==========================================================================
   1. MENGIMPOR ATURAN DASAR & KONFIGURASI TAILWIND
   ========================================================================== */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* ==========================================================================
   2. MENDEFINISIKAN VARIABEL & GAYA DASAR
   ========================================================================== */
@layer base {
    :root {
        --brand: #a30060;
        --brand-600: #ff69b4;
        --text: #0f172a;
        --muted: #475569;
        --bg: #ffffff;
        --card-bg: #ffffff;
        --border-light: #e7eef8;
        --ring: rgba(163, 0, 96, 0.35);
        --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
        --radius: 16px;
        --gap: clamp(1rem, 2vw, 1.25rem);
        --section-y: clamp(3rem, 7vw, 5.5rem);
    }

    html {
        scroll-behavior: smooth;
    }
}

/* ==========================================================================
   3. MENDEFINISIKAN KOMPONEN & GAYA KUSTOM
   ========================================================================== */
@layer components {
    .active-link {
        color: var(--brand);
        font-weight: 600;
        /* Tambahkan style lain jika Anda inginkan */
    }

    /* --- Komponen Mobile Menu --- */
    .mobile-menu {
        display: none;
    }
    .mobile-menu.active {
        display: block;
    }

    .hamburger {
        cursor: pointer;
        width: 24px;
        height: 24px;
        transition: all 0.25s;
        position: relative;
    }
    .hamburger-top,
    .hamburger-middle,
    .hamburger-bottom {
        position: absolute;
        top: 0;
        left: 0;
        width: 24px;
        height: 2px;
        background: #000;
        transform: rotate(0);
        transition: all 0.5s;
    }
    .hamburger-middle { transform: translateY(7px); }
    .hamburger-bottom { transform: translateY(14px); }

    /* --- Komponen Kartu Tim --- */
    .team-card {
        background: white;
        border-radius: 1rem;
        padding: 2rem;
        text-align: center;
        transition: all 0.3s ease;
        border: 1px solid #e5e7eb;
    }
    .team-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
        border-color: rgba(163, 0, 96, 0.3);
    }
    .team-avatar {
        width: 6rem;
        height: 6rem;
        background: linear-gradient(135deg, #a30060, #9333ea);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 1rem;
        color: white;
        font-size: 1.5rem;
        font-weight: bold;
    }

    /* --- Komponen Grid Logo --- */
    .logo-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 2rem;
        margin: 2rem 0;
    }
    .logo-item {
        background: white;
        border-radius: 1rem;
        padding: 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        border: 1px solid #e5e7eb;
        min-height: 120px;
    }
    .logo-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        border-color: rgba(163, 0, 96, 0.3);
    }
    .logo-item img {
        max-width: 100%;
        max-height: 80px;
        object-fit: contain;
    }
    
    /* --- Komponen Daftar Legalitas --- */
    .legality-list dl {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem 2rem;
        margin: 2rem 0;
    }
    .legality-list dt {
        font-weight: 600;
        color: #a30060;
        padding: 1rem 0;
        border-bottom: 1px solid #e5e7eb;
    }
    .legality-list dd {
        color: #6b7280;
        padding: 1rem 0;
        border-bottom: 1px solid #e5e7eb;
    }
    
    @media (max-width: 768px) {
        .legality-list dl {
            grid-template-columns: 1fr;
        }
        .logo-grid {
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 1rem;
        }
    }

    /* --- Komponen Halaman Jaringan --- */
    .tab-btn.active {
        color: var(--brand);
        border-bottom-color: var(--brand);
    }
    .tab-panel {
        display: none;
    }
    .tab-panel.active {
        display: block;
    }

    /* --- Komponen Kartu Keunggulan --- */
    .benefits-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
        margin-top: 3rem;
    }
    .benefit-card {
        background: white;
        border-radius: 1rem;
        padding: 2rem;
        text-align: center;
        transition: all 0.3s ease;
        border: 1px solid #e5e7eb;
    }
    .benefit-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
        border-color: rgba(163, 0, 96, 0.3);
    }
    .benefit-icon {
        width: 4rem;
        height: 4rem;
        background: linear-gradient(135deg, #a30060, #9333ea);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 1.5rem;
        color: white;
    }

    /* --- Komponen FAQ --- */
    .faq-item {
        background: white;
        border-radius: 0.75rem;
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    .faq-item:hover {
        border-color: rgba(163, 0, 96, 0.3);
    }
    .faq-question {
        padding: 1.5rem;
        background: #f9fafb;
        font-weight: 600;
        color: #374151;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: all 0.3s ease;
    }
    .faq-question:hover {
        background: rgba(163, 0, 96, 0.05);
        color: #a30060;
    }
    .faq-answer {
        padding: 1.5rem;
        color: #6b7280;
        line-height: 1.6;
        display: none;
    }
    .faq-item.active .faq-answer {
        display: block;
    }
    .faq-item.active .faq-question {
        background: rgba(163, 0, 96, 0.05);
        color: #a30060;
    }

    /* --- Komponen Kartu Blog --- */
    .blog-card {
        background: white;
        border-radius: 1rem;
        overflow: hidden;
        transition: all 0.3s ease;
        border: 1px solid #e5e7eb;
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    .blog-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
        border-color: rgba(163, 0, 96, 0.3);
    }
    .blog-card-image {
        width: 100%;
        height: 200px;
        object-fit: cover;
        transition: transform 0.3s ease;
    }
    .blog-card:hover .blog-card-image {
        transform: scale(1.05);
    }
    .blog-card-content {
        padding: 1.5rem;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }
    .blog-date-chip {
        display: inline-block;
        background: linear-gradient(135deg, #A30060, #9333ea);
        color: white;
        padding: 0.25rem 0.75rem;
        border-radius: 9999px;
        font-size: 0.75rem;
        font-weight: 600;
        margin-bottom: 1rem;
        width: fit-content;
    }
    .blog-card-title {
        font-size: 1.25rem;
        font-weight: 700;
        color: #1f2937;
        margin-bottom: 0.75rem;
        line-height: 1.4;
        text-decoration: none;
    }
    .blog-card-title:hover {
        color: #A30060;
    }
    .blog-card-excerpt {
        color: #6b7280;
        line-height: 1.6;
        margin-bottom: 1.5rem;
        flex-grow: 1;
    }
    .blog-read-more {
        color: #A30060;
        font-weight: 600;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        transition: all 0.3s ease;
    }
    .blog-read-more:hover {
        color: #8B0051;
        transform: translateX(4px);
    }

    /* --- Komponen Grid Blog & Featured Post --- */
    .blog-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2rem;
        margin-top: 3rem;
    }
    @media (max-width: 768px) {
        .blog-grid {
            grid-template-columns: 1fr;
            gap: 1.5rem;
        }
    }
    .featured-post {
        background: linear-gradient(135deg, #A30060, #9333ea);
        border-radius: 1.5rem;
        padding: 3rem;
        color: white;
        margin-bottom: 4rem;
    }
    .featured-post h2 {
        font-size: 2rem;
        font-weight: 800;
        margin-bottom: 1rem;
    }
    .featured-post p {
        font-size: 1.125rem;
        opacity: 0.9;
        margin-bottom: 2rem;
    }
    .featured-cta {
        background: white;
        color: #A30060;
        padding: 0.75rem 2rem;
        border-radius: 0.5rem;
        font-weight: 600;
        text-decoration: none;
        display: inline-block;
        transition: all 0.3s ease;
    }
    .featured-cta:hover {
        background: #f3f4f6;
        transform: translateY(-2px);
    }
}

/* ==========================================================================
   4. UTILITAS KUSTOM
   ========================================================================== */
@layer utilities {
    .gradient-text {
        background: linear-gradient(to right, #a30060, #9333ea);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .backdrop-glass {
        -webkit-backdrop-filter: saturate(180%) blur(8px);
        backdrop-filter: saturate(180%) blur(8px);
    }

    .hero-bg {
        background: linear-gradient(135deg, #f9fafb 0%, #dbeafe 50%, #faf5ff 100%);
    }

    .card-hover {
        transition: all 0.3s ease;
    }
    .card-hover:hover {
        transform: translateY(-8px);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }

    .animate-bounce-slow {
        animation: bounce 2s infinite;
    }
    @keyframes bounce {
        0%, 100% {
            transform: translateY(-25%);
            animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
        }
        50% {
            transform: none;
            animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
        }
    }
}