:root {
    --bg: #f9fafb;
    --bg-soft: #ffffff;
    --border-soft: #e5e7eb;
    --primary: #c9a227;
    --primary-soft: #f3e8c9;
    --primary-dark: #b0891e;
    --text-main: #111827;
    --text-muted: #6b7280;
    --radius-lg: 1rem;
    --radius-md: 0.75rem;
    --shadow-soft: 0 15px 35px rgba(15, 23, 42, 0.08);
}

/* RESET DASAR */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* NAVBAR */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(249, 250, 251, 0.9);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.nav {
    max-width: min(1280px, 100% - 3rem); /* fleksibel: max 1280px, sisakan margin di layar kecil */
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #1f2933;
}

.nav-links {
    display: flex;
    gap: 1.3rem;
    font-size: 0.9rem;
}

.nav-links a {
    position: relative;
    padding-bottom: 0.25rem;
    color: #4b5563;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(to right, #facc15, #c9a227);
    transition: width 0.2s ease;
}

.nav-links a:hover {
    color: #111827;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--primary);
    font-size: 0.82rem;
    color: #92400e;
    background: linear-gradient(to right, #fefce8, #fef9c3);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.nav-cta span {
    font-size: 0.95rem;
}

/* MAIN LAYOUT */
main {
    max-width: min(1280px, 100% - 3rem); /* fleksibel sama seperti nav */
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* HERO / HOME */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
    margin-bottom: 3rem;
}

.hero-left {
    padding-right: 0.75rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #fefce8;
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    border: 1px solid #facc15;
    font-size: 0.8rem;
    color: #854d0e;
    margin-bottom: 0.8rem;
}

.hero-badge-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
}

.hero-title span {
    background: linear-gradient(to right, #c9a227, #facc15);
    -webkit-background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 0.98rem;
    color: var(--text-muted);
    max-width: 32rem;
    margin-bottom: 1.25rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.hero-right {
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);
    padding: 1.4rem;
    position: relative;
    overflow: hidden;
}

.hero-right::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0 0, rgba(250, 204, 21, 0.18), transparent 55%);
    pointer-events: none;
}

.hero-right-inner {
    position: relative;
    z-index: 1;
}

.hero-tag {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 0.8rem;
    color: #9ca3af;
}

.hero-right-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hero-right-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1rem;
}

.hero-stat {
    padding: 0.6rem 0.5rem;
    border-radius: 0.75rem;
    background: #f9fafb;
    border: 1px dashed #e5e7eb;
    text-align: left;
}

.hero-stat strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.15rem;
    color: #92400e;
}

.hero-stat span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* SECTION GENERIC */
.section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.3rem;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* BOX INFO / PLACEHOLDER */
.placeholder-box {
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-soft);
    padding: 1.3rem 1.4rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* BUTTONS */
.btn-primary {
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(to right, #c9a227, #facc15);
    box-shadow: 0 10px 20px rgba(202, 138, 4, 0.35);
    color: #1f2933;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:hover {
    filter: brightness(0.97);
}

.btn-ghost {
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.86rem;
    color: #6b7280;
    cursor: pointer;
}

.btn-ghost:hover {
    background: #f9fafb;
}

.btn-outline {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--primary-dark);
    background: transparent;
    font-size: 0.8rem;
    color: #92400e;
    cursor: pointer;
}

.btn-outline:hover {
    background: #fef9c3;
}

/* FORM ELEMENTS (untuk kelas_add) */
input[type="text"],
textarea,
select {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.2rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-soft);
    font: inherit;
    color: var(--text-main);
    background-color: #ffffff;
}

textarea {
    resize: vertical;
}

/* ==== CARD INFO KELAS ==== */
/* Grid: desktop 2 card / baris, mobile 1 card */
.classes-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

/* Card dasar */
.class-card {
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

/* Layout dalam card: kiri gambar, kanan teks */
.class-card-horizontal {
    display: flex;
    align-items: stretch;
    height: 100%;
}

/* Bungkus gambar – portrait, rasio 4:5 (lebar 4, tinggi 5) */
.class-img-wrap {
    flex: 0 0 auto;
    width: 40%;           /* kira-kira 40% lebar card */
    max-width: 210px;     /* batas maksimum di desktop */
    aspect-ratio: 4 / 5;  /* poster vertikal */
    overflow: hidden;
}

/* Gambar poster */
.class-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder kalau tidak ada gambar */
.class-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fef3c7, #facc15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #92400e;
    font-weight: 600;
    text-align: center;
    padding: 0 0.75rem;
}

/* Bagian teks di kanan */
.class-body {
    flex: 1;
    padding: 0.9rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.class-pill {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #fef9c3;
    color: #92400e;
}

.class-title {
    font-size: 1rem;
    font-weight: 600;
}

.class-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.class-desc {
    font-size: 0.9rem;
    color: #4b5563;
}

.class-footer {
    margin-top: 0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.class-note {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* FOOTER */
footer {
    border-top: 1px solid #e5e7eb;
    padding: 1rem 0;
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: center;
    background: #f3f4f6;
}

/* FLOATING WHATSAPP BUTTON */
.wa-floating {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 60;
}

.wa-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
    cursor: pointer;
}

.wa-btn span {
    font-size: 1.7rem;
    color: #ffffff;
}

.wa-label {
    position: absolute;
    right: 65px;
    bottom: 14px;
    background: rgba(17,24,39,0.95);
    color: #f9fafb;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    white-space: nowrap;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
    }
    .hero-left {
        order: 1;
        padding-right: 0;
    }
    .hero-right {
        order: 0;
    }

    /* mobile: 1 card per baris */
    .classes-list {
        grid-template-columns: minmax(0, 1fr);
    }
    .class-img-wrap {
        max-width: 180px;
    }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
    }
    main {
        max-width: 100%;
        padding-inline: 1rem;
    }

    .class-img-wrap {
        width: 35%;
        max-width: 160px;
    }
}
