/* =========================================================
   RITME
   Ruang Inovasi Teknologi Musik Edukatif
   Program Studi Pendidikan Musik FBS UNIMED

   MASTER STYLESHEET
   - Header / Navigation
   - Homepage Hero
   - Quick Access
   - Mata Kuliah
   - Bidang
   - Referensi
   - Sumber Belajar
   - Filter / Search
   - Detail Sumber
   - Footer
   - Responsive
   ========================================================= */


/* =========================================================
   01. RESET & DESIGN TOKENS
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-width: 320px;
    max-width: 100%;
    overflow-x: hidden;

    color: #17212b;
    background: #ffffff;

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 16px;
    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

:root {
    --primary: #123b5d;
    --primary-dark: #082b48;
    --primary-deep: #062f63;

    --cyan: #00cfe8;
    --cyan-dark: #00aeca;
    --accent: #d7a84a;

    --text: #17212b;
    --muted: #65727e;
    --light-text: #8a97a2;

    --bg: #f7f9fb;
    --white: #ffffff;
    --border: #e4e9ee;

    --success: #247a57;
    --danger: #b33a3a;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --shadow-sm: 0 6px 20px rgba(16, 48, 72, 0.05);
    --shadow-md: 0 12px 32px rgba(16, 48, 72, 0.09);
    --shadow-lg: 0 20px 50px rgba(16, 48, 72, 0.12);
}


/* =========================================================
   02. BASE ELEMENTS
   ========================================================= */

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
    overflow-wrap: break-word;
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

.hero-text {
    max-width: 780px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}


/* =========================================================
   03. HEADER / NAVIGATION
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-wrap {
    min-height: 76px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.brand {
    display: inline-flex;
    align-items: center;

    min-width: 0;
    flex-shrink: 0;

    color: inherit;
}

.brand-logo {
    display: block;

    width: auto;
    height: 58px;

    max-width: 250px;
    object-fit: contain;
}

.brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;

    display: grid;
    place-items: center;

    margin-right: 10px;

    border-radius: 12px;
    background: var(--primary);
    color: var(--white);

    font-size: 21px;
    font-weight: 800;
}

.brand strong {
    display: block;

    color: var(--primary);
    font-size: 18px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.brand small {
    display: block;

    margin-top: 3px;

    color: var(--muted);
    font-size: 11px;
    line-height: 1.3;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 5px;
    flex-wrap: wrap;
}

.main-nav a {
    position: relative;

    display: inline-flex;
    align-items: center;

    min-height: 42px;
    padding: 8px 13px;

    border-radius: 10px;

    color: #27333d;
    font-size: 14px;
    font-weight: 650;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    color: var(--primary);
    background: #eef5f9;
}


/* =========================================================
   04. GENERIC HERO
   Used by non-homepage pages if needed
   ========================================================= */

.hero {
    padding: 86px 0 72px;

    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(215, 168, 74, 0.13),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #f7f9fb 0%,
            #ffffff 58%,
            #eef5f9 100%
        );

    border-bottom: 1px solid var(--border);
}

.hero .container {
    max-width: 920px;
}

.hero h1 {
    max-width: 850px;

    margin: 0 0 18px;

    color: var(--primary);

    font-size: clamp(36px, 5vw, 60px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.hero p {
    max-width: 760px;

    margin: 0;

    color: var(--muted);
    font-size: 18px;
}

.hero-actions {
    display: flex;
    align-items: center;

    gap: 12px;
    margin-top: 28px;

    flex-wrap: wrap;
}


/* =========================================================
   05. HOMEPAGE HERO IMAGE
   The supplied RITME hero artwork is 1920 × 1200.
   It is intentionally displayed as a controlled banner.
   ========================================================= */

.ritme-hero {
    width: 100%;

    /*
     * Desktop target:
     * keeps the hero visually strong without allowing
     * the original 1920 × 1200 artwork to become too tall.
     */
    height: clamp(460px, 38vw, 650px);

    overflow: hidden;

    background: var(--primary-deep);
}

.ritme-hero-container {
    width: 100%;
    max-width: none;

    height: 100%;
    padding: 0;
}

.ritme-hero-image {
    display: block;

    width: 100%;
    height: 100%;

    max-width: none;

    object-fit: cover;
    object-position: center center;
}


/* =========================================================
   06. HOMEPAGE QUICK ACCESS
   ========================================================= */

.ritme-explore {
    padding: 54px 0 72px;

    background: #ffffff;
}

.ritme-explore-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;
    margin-bottom: 28px;
}

.ritme-explore-heading .eyebrow {
    margin-bottom: 4px;
}

.ritme-explore-heading h2 {
    margin: 0;

    color: var(--primary);

    font-size: clamp(30px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.ritme-explore-heading p {
    margin: 0 0 5px;

    color: var(--muted);
    font-size: 15px;
}

.ritme-explore-grid {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 16px;
}

.ritme-explore-card {
    position: relative;

    display: flex;
    align-items: center;

    min-height: 126px;
    padding: 20px;

    gap: 15px;

    border: 1px solid transparent;
    border-radius: var(--radius-lg);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.ritme-explore-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(18, 59, 93, 0.10);
}

.explore-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    font-size: 25px;
}

.explore-content {
    min-width: 0;
    padding-right: 20px;
}

.explore-content h3 {
    margin: 0 0 5px;

    color: var(--primary);

    font-size: 17px;
    line-height: 1.25;
}

.explore-content p {
    margin: 0;

    color: #526372;

    font-size: 13px;
    line-height: 1.45;
}

.explore-arrow {
    position: absolute;
    top: 50%;
    right: 18px;

    transform: translateY(-50%);

    font-size: 25px;
    font-weight: 500;
}

.explore-blue {
    background: #eef7ff;
    border-color: #d7eafb;
}

.explore-blue .explore-icon {
    background: #cfe7ff;
    color: #1254a1;
}

.explore-blue .explore-arrow {
    color: #1254a1;
}

.explore-green {
    background: #effaf5;
    border-color: #d8eee4;
}

.explore-green .explore-icon {
    background: #ccefdc;
    color: #18805a;
}

.explore-green .explore-arrow {
    color: #18805a;
}

.explore-purple {
    background: #f6f1ff;
    border-color: #e7dcfb;
}

.explore-purple .explore-icon {
    background: #e3d2ff;
    color: #6331ae;
}

.explore-purple .explore-arrow {
    color: #6331ae;
}

.explore-orange {
    background: #fff4ec;
    border-color: #f5dfce;
}

.explore-orange .explore-icon {
    background: #ffd7bd;
    color: #c65320;
}

.explore-orange .explore-arrow {
    color: #c65320;
}


/* =========================================================
   07. GENERAL SECTION
   ========================================================= */

.section {
    padding: 72px 0;
}

.section-alt {
    background: var(--bg);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 24px;
    margin-bottom: 28px;
}

.section-head h2,
.section-title {
    margin: 0;

    color: var(--primary);

    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.section-head p {
    max-width: 680px;

    margin: 8px 0 0;

    color: var(--muted);
}


/* =========================================================
   08. BUTTONS
   ========================================================= */

.btn {
    min-height: 46px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 10px 18px;

    border: 1px solid transparent;
    border-radius: 12px;

    font-size: 14px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
}

.btn-secondary {
    border-color: #d9e2ea;
    background: #ffffff;
    color: var(--text);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    border-color: #b9c8d4;
    background: #f8fafc;
}

.btn-accent {
    border-color: var(--accent);
    background: var(--accent);
    color: #18222b;
}


/* =========================================================
   09. FEATURE CARDS
   Used by Mata Kuliah / Bidang / Referensi
   ========================================================= */

.feature-grid {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 18px;
}

.feature-card {
    position: relative;

    min-width: 0;
    padding: 25px;

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    background: #ffffff;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-3px);

    border-color: #cad8e2;

    box-shadow: var(--shadow-md);
}

.feature-card-link {
    display: block;
    height: 100%;
    cursor: pointer;
}

.feature-card-icon {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    margin-bottom: 18px;

    border-radius: 14px;

    background: #eaf2f7;
    color: var(--primary);

    font-size: 22px;
    font-weight: 800;
}

.feature-card h3 {
    margin: 0 0 8px;

    color: var(--primary);

    font-size: 18px;
    line-height: 1.3;
}

.feature-card p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
}

.feature-card-arrow {
    display: inline-flex;
    align-items: center;

    gap: 6px;
    margin-top: 18px;

    color: var(--primary);

    font-size: 13px;
    font-weight: 800;
}


/* =========================================================
   10. RESOURCE / SUMBER BELAJAR
   ========================================================= */

.resource-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 20px;
}

.resource-card {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    background: #ffffff;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.resource-card:hover {
    transform: translateY(-3px);

    border-color: #cad8e2;

    box-shadow: var(--shadow-md);
}

.resource-thumbnail {
    position: relative;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: linear-gradient(
        135deg,
        #eaf2f7,
        #f5f8fa
    );
}

.resource-thumbnail img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.resource-thumbnail-placeholder {
    width: 100%;
    height: 100%;

    display: grid;
    place-items: center;

    color: var(--primary);

    font-size: 30px;
    font-weight: 800;
}

.resource-content {
    padding: 20px;
}

.resource-card h3 {
    margin: 0 0 9px;

    color: var(--primary);

    font-size: 18px;
    line-height: 1.35;
}

.resource-card p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
}

.resource-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 7px;
    margin-top: 15px;
}

.resource-meta span,
.meta-badge {
    display: inline-flex;
    align-items: center;

    min-height: 28px;
    padding: 4px 9px;

    border-radius: 999px;

    background: #f1f5f8;
    color: #50606d;

    font-size: 11px;
    font-weight: 700;
}

.resource-type {
    background: #eaf2f7 !important;
    color: var(--primary) !important;
}


/* =========================================================
   11. RESOURCE FILTER / SEARCH
   ========================================================= */

.resource-filter {
    display: grid;

    grid-template-columns:
        minmax(280px, 1.8fr)
        minmax(180px, 0.9fr)
        minmax(180px, 0.9fr)
        auto
        auto;

    align-items: center;

    gap: 12px;

    padding: 20px;
    margin: 32px 0 38px;

    border: 1px solid #dfe7ee;
    border-radius: 22px;

    background: #ffffff;

    box-shadow: var(--shadow-sm);
}

.resource-filter-search,
.resource-filter-select {
    min-width: 0;
}

.resource-filter input,
.resource-filter select {
    width: 100%;
    min-height: 56px;

    padding: 0 18px;

    border: 1px solid #d9e2ea;
    border-radius: 14px;

    outline: none;

    background: #ffffff;
    color: var(--text);

    font-family: inherit;
    font-size: 15px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.resource-filter input::placeholder {
    color: #8a97a2;
}

.resource-filter input:focus,
.resource-filter select:focus {
    border-color: #7da2bc;

    box-shadow:
        0 0 0 4px rgba(18, 59, 93, 0.08);
}

.resource-filter button,
.resource-filter .btn {
    min-height: 56px;

    padding-inline: 24px;

    border-radius: 14px;
}


/* =========================================================
   12. SEARCH SUMMARY / EMPTY STATE
   ========================================================= */

.search-summary {
    margin: 0 0 22px;

    color: var(--muted);

    font-size: 14px;
}

.empty-state {
    grid-column: 1 / -1;

    padding: 56px 24px;

    border: 1px solid var(--border);
    border-radius: var(--radius-xl);

    background: var(--bg);

    text-align: center;
}

.empty-state-icon {
    width: 64px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 24px;

    border-radius: 50%;

    background: #eaf2f7;
    color: var(--primary);

    font-size: 30px;
    font-weight: 800;
}

.empty-state h3 {
    margin: 0 0 10px;

    color: var(--primary);
}

.empty-state p {
    max-width: 620px;

    margin: 0 auto;

    color: var(--muted);
}


/* =========================================================
   13. DETAIL PAGE
   ========================================================= */

.detail-wrap {
    padding: 64px 0 80px;
}

.detail-card {
    max-width: 900px;

    margin-inline: auto;
    padding: 34px;

    border: 1px solid var(--border);
    border-radius: var(--radius-xl);

    background: #ffffff;

    box-shadow: var(--shadow-sm);
}

.detail-card h1 {
    margin: 0 0 16px;

    color: var(--primary);

    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.detail-description {
    margin: 0;

    color: var(--muted);

    font-size: 16px;
}

.detail-meta {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px;

    margin: 28px 0;
}

.detail-meta-item {
    padding: 15px 16px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: #fbfcfd;
}

.detail-meta-item small {
    display: block;

    margin-bottom: 3px;

    color: var(--muted);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.detail-meta-item strong {
    color: var(--text);
    font-size: 14px;
}

.detail-actions {
    display: flex;

    gap: 10px;
    flex-wrap: wrap;

    margin-top: 26px;
}


/* =========================================================
   14. GENERAL CONTENT / TABLE
   ========================================================= */

.content-card {
    padding: 28px;

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    background: #ffffff;
}

.table-wrap {
    overflow-x: auto;

    border: 1px solid var(--border);
    border-radius: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 15px;

    border-bottom: 1px solid var(--border);

    text-align: left;
    vertical-align: top;
}

th {
    color: var(--primary);
    background: #f6f9fb;

    font-size: 13px;
}

td {
    font-size: 14px;
}

tr:last-child td {
    border-bottom: 0;
}


/* =========================================================
   15. FOOTER
   ========================================================= */

.site-footer {
    margin-top: 60px;

    padding: 42px 0;

    border-top: 1px solid var(--border);

    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.78);
}

.footer-grid {
    display: grid;

    grid-template-columns: 1.4fr 1fr 1fr;

    gap: 32px;
}

.site-footer h3,
.site-footer h4 {
    margin: 0 0 10px;

    color: #ffffff;
}

.site-footer p {
    margin: 0;

    font-size: 14px;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.78);
}

.site-footer a:hover {
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin-top: 32px;
    padding-top: 20px;

    border-top: 1px solid rgba(255, 255, 255, 0.12);

    font-size: 12px;
}


/* =========================================================
   16. UTILITY CLASSES
   ========================================================= */

.text-muted {
    color: var(--muted) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-center {
    text-align: center !important;
}

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }


/* =========================================================
   17. ACCESSIBILITY / FOCUS
   ========================================================= */

:focus-visible {
    outline: 3px solid rgba(0, 207, 232, 0.45);
    outline-offset: 2px;
}


/* =========================================================
   18. RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resource-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resource-filter {
        grid-template-columns: 1fr 1fr;
    }

    .resource-filter-search {
        grid-column: 1 / -1;
    }

    .ritme-explore-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

}


/* =========================================================
   19. RESPONSIVE — MOBILE / TABLET SMALL
   ========================================================= */

@media (max-width: 760px) {

    .container {
        width: min(100% - 28px, 1120px);
    }

    .nav-wrap {
        min-height: auto;

        padding: 12px 0;

        align-items: flex-start;
        flex-direction: column;

        gap: 10px;
    }

    .brand-logo {
        height: 50px;
        max-width: 220px;
    }

    .main-nav {
        width: 100%;

        justify-content: flex-start;

        flex-wrap: nowrap;

        overflow-x: auto;

        padding-bottom: 2px;

        scrollbar-width: thin;
    }

    .main-nav a {
        flex: 0 0 auto;

        padding-inline: 10px;
    }

    /* Homepage hero */
    .ritme-hero {
        height: auto;

        /*
         * The original artwork is 16:10.
         * This keeps the full composition visible on mobile.
         */
        aspect-ratio: 16 / 10;

        min-height: 0;
        max-height: none;
    }

    .ritme-hero-image {
        object-fit: cover;
        object-position: center center;
    }

    /* Generic hero */
    .hero {
        padding: 58px 0 52px;
    }

    .hero p,
    .hero-text {
        font-size: 16px;
    }

    .section {
        padding: 54px 0;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;

        gap: 10px;
    }

    /* Feature / resource */
    .feature-grid,
    .resource-grid {
        grid-template-columns: 1fr;
    }

    /* Homepage */
    .ritme-explore {
        padding: 45px 0 58px;
    }

    .ritme-explore-heading {
        align-items: flex-start;
        flex-direction: column;

        gap: 8px;
    }

    .ritme-explore-heading p {
        margin: 0;
    }

    .ritme-explore-grid {
        grid-template-columns: 1fr;
    }

    /* Detail */
    .detail-meta {
        grid-template-columns: 1fr;
    }

    .detail-card {
        padding: 24px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

}


/* =========================================================
   20. RESPONSIVE — SMALL MOBILE
   ========================================================= */

@media (max-width: 640px) {

    .brand-logo {
        height: 46px;
        max-width: 205px;
    }

    .resource-filter {
        grid-template-columns: 1fr;

        padding: 16px;

        border-radius: 18px;
    }

    .resource-filter-search {
        grid-column: auto;
    }

    .resource-filter button,
    .resource-filter .btn {
        width: 100%;
    }

    .hero-actions,
    .detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions .btn,
    .detail-actions .btn {
        width: 100%;
    }

    .feature-card,
    .resource-content {
        padding: 20px;
    }

    .ritme-explore-card {
        min-height: 110px;
        padding: 17px;
    }

    .explore-icon {
        width: 50px;
        height: 50px;
        flex-basis: 50px;

        font-size: 22px;
    }

    .explore-content h3 {
        font-size: 16px;
    }

    .explore-content p {
        font-size: 12px;
    }

}


/* =========================================================
   21. VERY SMALL SCREEN
   ========================================================= */

@media (max-width: 420px) {

    .container {
        width: min(100% - 22px, 1120px);
    }

    .main-nav a {
        font-size: 13px;
        padding-inline: 8px;
    }

    .ritme-explore-heading h2 {
        font-size: 28px;
    }

    .feature-card {
        padding: 20px;
    }

    .resource-content {
        padding: 18px;
    }

}
