/* =====================================================================
   Website Universitas Muhammadiyah Pontianak
   Tema warna: Biru (aksen gedung kampus) + Emas (identitas logo resmi)
   ===================================================================== */

:root {
    --ump-navy-darkest: #00157B;
    --ump-navy-dark: #0A1F8F;
    --ump-navy: #14309E;
    --ump-blue: #2D79C4;
    --ump-sky: #4FA0DA;
    --ump-sky-light: #EAF4FC;
    --ump-sky-pale: #F5FAFE;
    --ump-gold: #F0B429;
    --ump-gold-dark: #C9951E;
    --ump-gold-light: #FDF1D6;
    --ump-terracotta: #C15B3F;
    --ump-white: #FFFFFF;
    --text-dark: #131A33;
    --text-body: #2E3550;
    --text-muted: #656C87;
    --border-color: #E2E8F3;
    --shadow-sm: 0 1px 3px rgba(0, 21, 123, 0.08);
    --shadow-md: 0 6px 18px rgba(0, 21, 123, 0.12);
    --radius: 10px;
    --font-heading: 'Poppins', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text-body);
    background: var(--ump-white);
    line-height: 1.6;
}

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

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    line-height: 1.25;
    margin: 0 0 0.5em;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------------- Top utility bar ---------------- */
.topbar {
    background: var(--ump-navy-darkest);
    color: #c7d8f7;
    font-size: 13px;
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    padding-bottom: 6px;
    flex-wrap: wrap;
    gap: 8px;
}
.topbar a { color: #c7d8f7; opacity: .9; }
.topbar a:hover { opacity: 1; text-decoration: underline; }
.topbar-links { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---------------- Language switcher ---------------- */
.lang-switch { position: relative; }
.lang-switch-toggle {
    background: rgba(255,255,255,.10);
    border: none;
    color: #c7d8f7;
    font-size: 12.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
}
.lang-switch-toggle:hover { background: rgba(255,255,255,.18); color: #fff; }
.lang-switch-menu {
    display: none;
    position: absolute; top: 100%; right: 0; margin-top: 6px; min-width: 170px;
    background: var(--ump-white); border: 1px solid var(--border-color); border-radius: 8px;
    box-shadow: var(--shadow-md); padding: 6px; list-style: none; z-index: 200;
}
.lang-switch.open .lang-switch-menu { display: block; }
.lang-switch-menu li a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; font-size: 13.5px; color: var(--text-body); }
.lang-switch-menu li a:hover { background: var(--ump-sky-light); }
.lang-switch-menu li a.active { color: var(--ump-navy-darkest); font-weight: 700; background: var(--ump-sky-light); }
[dir="rtl"] .lang-switch-menu { right: auto; left: 0; }

/* ---------------- Header / Main nav ---------------- */
.site-header {
    background: var(--ump-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    gap: 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand img { height: 54px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-heading); font-size: 16px; color: var(--ump-navy-darkest); }
.brand-text span { font-size: 12px; color: var(--text-muted); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > ul { list-style: none; display: flex; margin: 0; padding: 0; gap: 2px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
    display: block;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 14.5px;
    color: var(--text-dark);
    border-radius: 6px;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a { color: var(--ump-navy); background: var(--ump-sky-light); }

.dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 240px;
    background: var(--ump-white); border: 1px solid var(--border-color); border-radius: 0 0 10px 10px;
    box-shadow: var(--shadow-md); padding: 8px; }
.main-nav li:hover > .dropdown { display: block; }
.dropdown li a { display: block; padding: 9px 12px; border-radius: 6px; font-size: 14px; color: var(--text-body); }
.dropdown li a:hover { background: var(--ump-sky-light); color: var(--ump-navy-darkest); }
.dropdown li.active a { background: var(--ump-sky-light); color: var(--ump-navy-darkest); font-weight: 700; }

.btn-cta {
    background: var(--ump-navy);
    color: var(--ump-white) !important;
    padding: 10px 20px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: background .15s ease;
}
.btn-cta:hover { background: var(--ump-navy-darkest); }
.btn-outline {
    border: 1.5px solid var(--ump-navy);
    color: var(--ump-navy) !important;
    padding: 9px 18px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
}
.btn-outline:hover { background: var(--ump-sky-light); }
.btn-gold { background: var(--ump-gold); color: var(--ump-navy-darkest) !important; }
.btn-gold:hover { background: var(--ump-gold-dark); color: var(--ump-white) !important; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--ump-white);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ump-navy-darkest); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle:hover { background: var(--ump-sky-light); }

/* ---------------- Mobile navigation drawer ---------------- */
.mobile-nav-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0, 10, 40, .45);
    z-index: 200;
    opacity: 0;
    transition: opacity .25s ease;
}
.mobile-nav-backdrop.open { display: block; opacity: 1; }
.mobile-nav-drawer {
    position: fixed;
    top: 0; bottom: 0;
    right: -100%;
    width: min(340px, 86vw);
    background: var(--ump-white);
    z-index: 201;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 30px rgba(0, 10, 40, .18);
    transition: right .28s ease;
    overflow-y: auto;
}
[dir="rtl"] .mobile-nav-drawer { right: auto; left: -100%; box-shadow: 8px 0 30px rgba(0, 10, 40, .18); transition: left .28s ease; }
.mobile-nav-drawer.open { right: 0; }
[dir="rtl"] .mobile-nav-drawer.open { left: 0; }
.mobile-nav-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border-color); }
.mobile-nav-head .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.mobile-nav-head .brand img { height: 34px; width: 34px; }
.mobile-nav-close { background: none; border: none; font-size: 26px; line-height: 1; color: var(--text-muted); cursor: pointer; padding: 4px 8px; }
.mobile-nav-list { list-style: none; margin: 0; padding: 8px 0; flex: 1; }
.mobile-nav-row { display: flex; align-items: center; justify-content: space-between; }
.mobile-nav-list > li { border-bottom: 1px solid var(--border-color); }
.mobile-nav-list > li.active > .mobile-nav-row > a { color: var(--ump-navy); font-weight: 700; }
.mobile-nav-list > li > .mobile-nav-row > a { display: block; padding: 15px 20px; font-size: 15.5px; font-weight: 600; color: var(--text-dark); flex: 1; }
.mobile-nav-expand { background: none; border: none; font-size: 16px; color: var(--text-muted); padding: 15px 18px; cursor: pointer; transition: transform .2s; }
.mobile-nav-list > li.expanded .mobile-nav-expand { transform: rotate(180deg); }
.mobile-nav-submenu { list-style: none; margin: 0; padding: 0 0 10px 12px; display: none; }
.mobile-nav-list > li.expanded .mobile-nav-submenu { display: block; }
.mobile-nav-submenu li a { display: block; padding: 10px 20px; font-size: 14px; color: var(--text-muted); }
.mobile-nav-submenu li.active a { color: var(--ump-navy); font-weight: 700; }
.mobile-nav-foot { padding: 18px 20px 24px; border-top: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 12px; }
.mobile-nav-portal { text-align: center; font-size: 13.5px; font-weight: 600; color: var(--ump-navy); }
body.nav-open { overflow: hidden; }

/* ---------------- Hero ---------------- */
.hero {
    background: linear-gradient(135deg, var(--ump-navy-darkest) 0%, var(--ump-navy) 55%, var(--ump-blue) 130%);
    color: var(--ump-white);
    padding: 100px 0 90px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute; right: -80px; top: -80px; width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(240,180,41,.25) 0%, transparent 70%);
    z-index: 1;
}
.hero-building {
    position: absolute;
    right: -40px;
    bottom: -30px;
    height: 105%;
    width: auto;
    max-width: 62%;
    object-fit: contain;
    object-position: bottom right;
    opacity: 0.96;
    filter: drop-shadow(0 25px 40px rgba(0, 8, 40, .45));
    z-index: 1;
    pointer-events: none;
}
.hero::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(100deg, var(--ump-navy-darkest) 0%, rgba(0,21,123,.94) 30%, rgba(10,31,143,.55) 55%, rgba(10,31,143,.08) 78%);
    z-index: 2;
}
.hero-inner { max-width: 640px; position: relative; z-index: 3; }
.hero-eyebrow { color: var(--ump-gold-light); text-transform: uppercase; letter-spacing: 1.5px; font-size: 13px; font-weight: 700; margin-bottom: 14px; display: inline-flex; align-items: center; gap: 8px; }
.hero-eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--ump-terracotta); display: inline-block; }
.hero h1 { color: var(--ump-white); font-size: 42px; font-weight: 700; margin-bottom: 20px; }
.hero p { font-size: 17px; color: #dbe8fb; margin-bottom: 28px; max-width: 620px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 860px) {
    .hero-building { display: none; }
    .hero::before { background: linear-gradient(135deg, var(--ump-navy-darkest) 0%, var(--ump-navy) 60%, var(--ump-blue) 130%); }
}

/* ---------------- Stats strip ---------------- */
.stats-strip {
    background: var(--ump-white);
    margin-top: -60px;
    position: relative;
    z-index: 2;
}
.stats-card {
    background: var(--ump-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
}
.stat-item { padding: 26px 20px; text-align: center; border-right: 1px solid var(--border-color); }
.stat-item:last-child { border-right: none; }
.stat-value { font-family: var(--font-heading); font-size: 30px; font-weight: 700; color: var(--ump-navy-darkest); }
.stat-label { font-size: 13.5px; color: var(--text-muted); margin-top: 4px; }

/* ---------------- Section generic ---------------- */
.section { padding: 72px 0; }
.section-alt { background: var(--ump-sky-pale); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 36px; gap: 20px; flex-wrap: wrap; }
.section-eyebrow { color: var(--ump-blue); font-weight: 700; text-transform: uppercase; font-size: 12.5px; letter-spacing: 1px; margin-bottom: 8px; display: inline-flex; align-items: center; gap: 8px; }
.section-eyebrow::before { content: ""; width: 18px; height: 3px; border-radius: 2px; background: var(--ump-terracotta); display: inline-block; }
.section-head h2 { font-size: 30px; margin: 0; }
.section-head p.lead { color: var(--text-muted); max-width: 560px; margin-top: 8px; }
.link-more { font-weight: 700; color: var(--ump-navy); white-space: nowrap; }
.link-more:hover { text-decoration: underline; }

/* ---------------- Card grid (berita / fakultas) ---------------- */
.grid { display: grid; gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: var(--ump-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
    display: flex;
    flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-media { aspect-ratio: 16/10; background: var(--ump-sky-light) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--ump-navy); font-size: 13px; }
.card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card-tag { color: var(--ump-navy); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.card-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.card-title a:hover { color: var(--ump-navy); }
.card-excerpt { color: var(--text-muted); font-size: 14px; flex: 1; }
.card-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-color); }

/* ---------------- Faculty icon card ---------------- */
.faculty-card { padding: 26px 22px; text-align: left; }
.faculty-icon {
    width: 52px; height: 52px; border-radius: 12px; background: var(--ump-sky-light);
    color: var(--ump-navy-darkest); display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700; margin-bottom: 16px;
}
.faculty-card h3 { font-size: 17px; margin-bottom: 8px; }
.faculty-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 14px; }

/* ---------------- Split feature (image + text) ---------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }
.quote-box { background: var(--ump-white); border-left: 4px solid var(--ump-gold); padding: 18px 20px; border-radius: 8px; margin: 20px 0; box-shadow: var(--shadow-sm); font-style: italic; color: var(--text-dark); }

/* ---------------- Testimonials ---------------- */
.testimonial-card { background: var(--ump-white); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); }
.testimonial-card .quote { font-size: 15px; color: var(--text-body); margin-bottom: 18px; }
.testimonial-person { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--ump-sky-light); color: var(--ump-navy-darkest); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.testimonial-name { font-weight: 700; font-size: 14px; }
.testimonial-role { font-size: 12.5px; color: var(--text-muted); }

/* ---------------- CTA banner ---------------- */
.cta-banner {
    background: linear-gradient(120deg, var(--ump-navy-darkest), var(--ump-navy));
    color: var(--ump-white);
    border-radius: 16px;
    padding: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}
.cta-banner h3 { color: var(--ump-white); font-size: 24px; margin-bottom: 6px; }
.cta-banner p { color: #d7e6fb; margin: 0; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--ump-navy-darkest); color: #c7d8f7; padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); gap: 28px; padding-bottom: 40px; }
.footer-col h4 { color: var(--ump-white); font-size: 14px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; font-size: 13.5px; }
.footer-col a { color: #adc6ef; }
.footer-col a:hover { color: var(--ump-white); text-decoration: underline; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand .logo-chip {
    background: var(--ump-white);
    border-radius: 50%;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}
.footer-brand img { height: 44px; }
.footer-brand strong { color: var(--ump-white); font-family: var(--font-heading); font-size: 15px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 20px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: #93b1e6; }
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; }
.social-icons { display: flex; gap: 10px; margin-top: 6px; }
.social-icons a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.10); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.social-icons a:hover { background: var(--ump-gold); color: var(--ump-navy-darkest); }

/* ---------------- Breadcrumb / page header ---------------- */
.page-header { background: var(--ump-sky-light); padding: 40px 0; border-bottom: 1px solid var(--border-color); }
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--ump-navy); }
.page-header h1 { font-size: 30px; margin: 0; }

/* ---------------- Utility ---------------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; background: var(--ump-gold-light); color: #8a6a10; }
.badge-green { background: var(--ump-sky-light); color: var(--ump-navy-darkest); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.flash { padding: 12px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.flash-success { background: #e5f6ec; color: #14803c; border: 1px solid #b8e6c9; }
.flash-error { background: #fdecec; color: #b91c1c; border: 1px solid #f7c5c5; }

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
    .grid-4, .stats-card { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .split { grid-template-columns: 1fr; }
}
/* Breakpoint navigasi dibuat lebih lebar (980px, mencakup tablet) karena menu utama
   butuh cukup ruang horizontal untuk seluruh item + logo + tombol CTA agar tidak saling tumpang tindih. */
@media (max-width: 980px) {
    .main-nav { display: none; }
    .nav-toggle { display: flex; }
    .header-inner .btn-cta:not(.mobile-nav-foot .btn-cta) { display: none; }
}
@media (max-width: 720px) {
    .grid-3, .grid-4, .stats-card { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 30px; }
}
@media (max-width: 480px) {
    .grid-3, .grid-4, .stats-card, .footer-grid { grid-template-columns: 1fr; }
}

/* ---------------- RTL (Arabic) overrides ---------------- */
[dir="rtl"] body { font-family: 'Noto Kufi Arabic', 'Inter', sans-serif; }
[dir="rtl"] .hero-building { right: auto; left: -40px; object-position: bottom left; }
[dir="rtl"] .hero::before {
    background: linear-gradient(260deg, var(--ump-navy-darkest) 0%, rgba(0,21,123,.94) 30%, rgba(10,31,143,.55) 55%, rgba(10,31,143,.08) 78%);
}
@media (max-width: 860px) {
    [dir="rtl"] .hero::before { background: linear-gradient(45deg, var(--ump-navy-darkest) 0%, var(--ump-navy) 60%, var(--ump-blue) 130%); }
}
[dir="rtl"] .dropdown { left: auto; right: 0; }
[dir="rtl"] .quote-box { border-left: none; border-right: 4px solid var(--ump-gold); }
[dir="rtl"] .stat-item { border-right: none; border-left: 1px solid var(--border-color); }
[dir="rtl"] .stat-item:last-child { border-left: none; }
[dir="rtl"] .split.reverse > * { direction: rtl; }
[dir="rtl"] .breadcrumb { direction: rtl; }
