/* =========================================================
   STIBA PERSADA BUNDA - Main Stylesheet
   Palette: deep navy institutional blue + warm amber + crimson
   Typography: Playfair Display (headings) + Poppins (body)
   ========================================================= */

:root {
    --primary: #0a3d62;
    --primary-dark: #073554;
    --primary-light: #1e5b8a;
    --accent: #d4a017;
    --accent-dark: #b08610;
    --crimson: #a01e2a;
    --text: #1e2a38;
    --text-muted: #5c6b7f;
    --bg: #ffffff;
    --bg-soft: #f5f8fb;
    --bg-alt: #edf2f7;
    --border: #dfe4ea;
    --shadow-sm: 0 2px 8px rgba(10, 61, 98, 0.08);
    --shadow-md: 0 6px 20px rgba(10, 61, 98, 0.12);
    --shadow-lg: 0 12px 40px rgba(10, 61, 98, 0.18);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: 0.3s cubic-bezier(.4,0,.2,1);
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 15px;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary);
    line-height: 1.25;
    font-weight: 700;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1rem; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

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

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

/* =========================================================
   TOPBAR
   ========================================================= */
.topbar {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.9);
    font-size: 0.82rem;
    padding: 8px 0;
    border-bottom: 2px solid var(--accent);
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.topbar-left { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar-left span { display: inline-flex; align-items: center; gap: 6px; }
.topbar-left i { color: var(--accent); font-size: 0.75rem; }
.topbar-right { display: flex; gap: 4px; }
.topbar-right a {
    color: rgba(255,255,255,0.85);
    width: 26px; height: 26px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: all var(--transition);
    font-size: 0.75rem;
}
.topbar-right a:hover { background: var(--accent); color: var(--primary-dark); }

/* =========================================================
   HEADER + NAV
   ========================================================= */
.site-header {
    background: var(--bg);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--primary);
    flex-shrink: 0;
}
.brand-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--primary);
    letter-spacing: 0.5px;
}
.brand-text span {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    max-width: 280px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
}
.nav-toggle span {
    width: 26px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: all var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.main-nav {}
.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-menu > li { position: relative; }
.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all var(--transition);
}
.nav-menu > li > a:hover,
.nav-menu > li.active > a {
    color: var(--primary);
    background: var(--bg-soft);
}
.nav-menu > li.active > a { color: var(--accent-dark); }
.nav-menu > li > a i.fa-chevron-down { font-size: 0.6rem; transition: transform var(--transition); }
.nav-menu > li.has-dropdown:hover > a i.fa-chevron-down { transform: rotate(180deg); }

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg);
    min-width: 240px;
    list-style: none;
    padding: 8px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border-top: 3px solid var(--accent);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
    z-index: 100;
}
.has-dropdown:hover > .dropdown,
.has-dropdown.open > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text);
    font-size: 0.87rem;
    border-radius: 5px;
    transition: all var(--transition);
}
.dropdown li a i { color: var(--accent); width: 18px; text-align: center; }
.dropdown li a:hover { background: var(--bg-soft); color: var(--primary); padding-left: 18px; }

/* Mega dropdown */
.mega-dropdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    min-width: 720px;
    padding: 20px;
    left: 50%;
    transform: translate(-50%, 10px);
}
.has-dropdown.mega:hover > .mega-dropdown { transform: translate(-50%, 0); }
.mega-col { display: flex; flex-direction: column; gap: 4px; }
.mega-col .mega-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
    font-size: 0.85rem;
    padding: 6px 10px 8px;
    border-bottom: 2px solid var(--accent);
    margin-bottom: 4px;
}
.mega-col a {
    padding: 7px 10px;
    color: var(--text);
    font-size: 0.85rem;
    border-radius: 5px;
    transition: all var(--transition);
}
.mega-col a:hover { background: var(--bg-soft); color: var(--primary); padding-left: 14px; }

.cta-item { margin-left: 8px; }
.btn-cta {
    background: var(--accent);
    color: var(--primary-dark) !important;
    padding: 10px 20px !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    transition: all var(--transition) !important;
}
.btn-cta:hover {
    background: var(--primary) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* =========================================================
   HERO / CAROUSEL
   ========================================================= */
.hero {
    position: relative;
    height: 620px;
    max-height: 85vh;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.hero-slides {
    position: absolute;
    inset: 0;
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
    display: flex;
    align-items: center;
}
.hero-slide.active { opacity: 1; }
.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,61,98,0.92) 0%, rgba(7,53,84,0.78) 60%, rgba(160,30,42,0.6) 100%);
    z-index: 1;
}
.hero-slide-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    color: #fff;
    padding: 0 20px;
}
.hero-eyebrow {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(212, 160, 23, 0.2);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 30px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero-title .accent { color: var(--accent); }
.hero-sub {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 30px;
    max-width: 600px;
    opacity: 0.95;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary {
    background: var(--accent);
    color: var(--primary-dark);
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
}
.btn-secondary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-secondary:hover {
    background: var(--primary-dark);
    color: #fff;
}

.hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}
.hero-indicators button {
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.4);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: all var(--transition);
}
.hero-indicators button.active { background: var(--accent); width: 60px; }

/* =========================================================
   SECTIONS / GENERAL
   ========================================================= */
.section {
    padding: 80px 0;
}
.section-alt { background: var(--bg-soft); }
.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 50px;
}
.section-eyebrow {
    display: inline-block;
    color: var(--accent-dark);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.section-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}
.section-desc { color: var(--text-muted); font-size: 1.02rem; margin-top: 24px; }

/* =========================================================
   QUICK LINKS / FEATURES
   ========================================================= */
.quicklinks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.quicklink {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    border-top: 4px solid transparent;
}
.quicklink:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--accent);
}
.quicklink-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--accent);
    border-radius: 50%;
    font-size: 1.7rem;
    transition: all var(--transition);
}
.quicklink:hover .quicklink-icon {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff;
    transform: rotate(-8deg) scale(1.05);
}
.quicklink h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--primary);
}
.quicklink p { font-size: 0.87rem; color: var(--text-muted); margin: 0; }

/* =========================================================
   STATS / COUNTERS
   ========================================================= */
.stats {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.stats::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(212,160,23,0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(160,30,42,0.15) 0%, transparent 50%);
}
.stats .container { position: relative; z-index: 1; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    text-align: center;
}
.stat-item i { font-size: 2rem; color: var(--accent); margin-bottom: 12px; }
.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    display: block;
    line-height: 1;
}
.stat-label {
    display: block;
    margin-top: 8px;
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================================
   NEWS CARDS
   ========================================================= */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.news-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.news-image {
    width: 100%;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, var(--accent) 100%);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.news-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.4) 100%);
}
.news-cat {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--accent);
    color: var(--primary-dark);
    font-size: 0.72rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.news-body { padding: 22px 24px; flex-grow: 1; display: flex; flex-direction: column; }
.news-meta {
    display: flex;
    gap: 14px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.news-meta i { color: var(--accent); margin-right: 4px; }
.news-body h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.35;
}
.news-body h3 a { color: var(--primary); }
.news-body h3 a:hover { color: var(--accent-dark); }
.news-body p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; flex-grow: 1; }
.news-body .btn-read {
    color: var(--accent-dark);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    transition: gap var(--transition);
}
.news-body .btn-read:hover { gap: 10px; }

/* =========================================================
   PROGRAM STUDI CARDS
   ========================================================= */
.prodi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.prodi-card {
    position: relative;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}
.prodi-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.prodi-header {
    padding: 40px 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.prodi-header::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(212,160,23,0.15);
}
.prodi-header .prodi-icon {
    font-size: 2.4rem;
    color: var(--accent);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}
.prodi-header h3 { color: #fff; font-size: 1.4rem; margin-bottom: 8px; position: relative; z-index: 1; }
.prodi-header .degree { font-size: 0.85rem; opacity: 0.85; position: relative; z-index: 1; }
.prodi-body { padding: 28px 30px; }
.prodi-body p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 20px; }
.prodi-body ul { list-style: none; margin-bottom: 20px; }
.prodi-body ul li {
    padding: 6px 0;
    padding-left: 24px;
    position: relative;
    font-size: 0.87rem;
}
.prodi-body ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.75rem;
    top: 8px;
}

/* =========================================================
   PAGE HEADER / BREADCRUMB
   ========================================================= */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, transparent 0%, var(--bg) 100%);
    opacity: 0.05;
}
.page-header::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212,160,23,0.25) 0%, transparent 70%);
}
.page-header h1 {
    color: #fff;
    font-size: 2.6rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.85);
    font-size: 0.87rem;
    position: relative;
    z-index: 1;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb i { font-size: 0.6rem; color: rgba(255,255,255,0.5); }

/* =========================================================
   CONTENT BLOCKS
   ========================================================= */
.content-wrap {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 50px;
    margin: 60px 0;
}
.content-main {
    background: #fff;
    padding: 40px 50px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.content-main h1, .content-main h2, .content-main h3 { margin-top: 1.5em; margin-bottom: 0.6em; }
.content-main h1:first-child, .content-main h2:first-child { margin-top: 0; }
.content-main p { margin-bottom: 1.1em; text-align: justify; color: var(--text); line-height: 1.8; }
.content-main ul, .content-main ol { padding-left: 24px; margin-bottom: 1.1em; }
.content-main ul li, .content-main ol li { margin-bottom: 6px; line-height: 1.7; }
.content-main img { border-radius: var(--radius); margin: 20px 0; }
.content-main blockquote {
    border-left: 4px solid var(--accent);
    padding: 16px 24px;
    background: var(--bg-soft);
    margin: 20px 0;
    font-style: italic;
    color: var(--text-muted);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-widget {
    background: #fff;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.sidebar-widget h4 {
    font-size: 1.05rem;
    color: var(--primary);
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--accent);
}
.sidebar-recent { display: flex; flex-direction: column; gap: 12px; }
.sidebar-recent a {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 0.85rem;
    line-height: 1.4;
}
.sidebar-recent a:last-child { border-bottom: none; }
.sidebar-recent a:hover { color: var(--primary); }
.sidebar-recent .thumb {
    width: 60px; height: 60px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    flex-shrink: 0;
}
.sidebar-recent .date { font-size: 0.72rem; color: var(--text-muted); display: block; margin-top: 2px; }

/* =========================================================
   PIMPINAN / STAFF CARDS
   ========================================================= */
.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 26px;
}
.person {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all var(--transition);
}
.person:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.person-photo {
    width: 100%;
    aspect-ratio: 1/1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-size: 4rem;
}
.person-body { padding: 20px 18px; }
.person-body h3 { font-size: 1rem; margin-bottom: 6px; line-height: 1.3; }
.person-body .position { font-size: 0.83rem; color: var(--accent-dark); font-weight: 600; margin-bottom: 8px; }
.person-body .nidn { font-size: 0.75rem; color: var(--text-muted); }
.person-body .edu { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }
.person-cat {
    margin-top: 60px;
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    color: var(--primary);
}
.person-cat:first-of-type { margin-top: 0; }

/* =========================================================
   PORTAL LOGIN CARDS
   ========================================================= */
.portal-card {
    max-width: 500px;
    margin: 40px auto;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.portal-card-header {
    padding: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    text-align: center;
}
.portal-card-header i { font-size: 3rem; color: var(--accent); margin-bottom: 14px; }
.portal-card-header h2 { color: #fff; margin-bottom: 8px; }
.portal-card-header p { opacity: 0.9; margin: 0; }
.portal-card-body { padding: 34px 40px; }
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text);
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all var(--transition);
    background: var(--bg);
    color: var(--text);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212,160,23,0.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-block { width: 100%; justify-content: center; }

/* =========================================================
   TABLES
   ========================================================= */
.table-wrap { overflow-x: auto; margin: 20px 0; }
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.table th, .table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}
.table th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.78rem;
}
.table tr:hover { background: var(--bg-soft); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.85);
    padding: 60px 0 20px;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.05rem;
    position: relative;
    padding-bottom: 12px;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}
.footer-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}
.footer-brand img { width: 54px; height: 54px; object-fit: contain; }
.footer-brand strong { color: #fff; font-family: var(--font-heading); font-size: 1.05rem; display: block; line-height: 1.2; }
.footer-brand span { font-size: 0.75rem; color: rgba(255,255,255,0.7); }
.footer-tagline { font-size: 0.87rem; line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 8px; }
.footer-social a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.footer-social a:hover { background: var(--accent); color: var(--primary-dark); transform: translateY(-3px); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { color: rgba(255,255,255,0.8); font-size: 0.88rem; transition: all var(--transition); }
.footer-col ul a:hover { color: var(--accent); padding-left: 5px; }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.86rem; line-height: 1.5; }
.footer-contact li i { color: var(--accent); margin-top: 4px; flex-shrink: 0; width: 16px; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.82rem;
}
.footer-bottom a { color: rgba(255,255,255,0.7); }
.footer-bottom a:hover { color: var(--accent); }

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
    z-index: 100;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--accent); color: var(--primary-dark); }

/* =========================================================
   ADMIN PANEL
   ========================================================= */
.admin-body {
    background: var(--bg-soft);
    min-height: 100vh;
    font-family: var(--font-body);
}
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 260px;
    background: var(--primary-dark);
    color: #fff;
    padding: 24px 0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #fff;
}
.admin-brand img { width: 40px; height: 40px; }
.admin-brand strong { display: block; color: #fff; font-family: var(--font-heading); font-size: 0.95rem; }
.admin-brand span { font-size: 0.72rem; opacity: 0.75; }
.admin-nav { padding: 20px 0; }
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: rgba(255,255,255,0.8);
    font-size: 0.88rem;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}
.admin-nav a:hover, .admin-nav a.active {
    background: rgba(255,255,255,0.05);
    color: var(--accent);
    border-left-color: var(--accent);
}
.admin-nav a i { width: 20px; text-align: center; }

.admin-content { flex-grow: 1; padding: 30px; overflow-x: auto; }
.admin-topbar {
    background: #fff;
    padding: 14px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-topbar h1 { font-size: 1.4rem; margin: 0; }
.admin-topbar .user-info { display: flex; align-items: center; gap: 12px; font-size: 0.88rem; }
.admin-topbar .user-info a { color: var(--crimson); }

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: #fff;
    padding: 22px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 4px solid var(--accent);
}
.stat-card.primary { border-left-color: var(--primary); }
.stat-card.crimson { border-left-color: var(--crimson); }
.stat-card.success { border-left-color: #16a34a; }
.stat-card i {
    font-size: 1.8rem;
    color: var(--accent);
    background: var(--bg-soft);
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-card .stat-info strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.7rem;
    color: var(--primary);
    line-height: 1;
}
.stat-card .stat-info span { font-size: 0.82rem; color: var(--text-muted); }

.card {
    background: #fff;
    padding: 24px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.card h2 {
    font-size: 1.15rem;
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent);
}
.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.alert-success { background: #dcfce7; color: #166534; border-left: 3px solid #16a34a; }
.alert-error { background: #fee2e2; color: #991b1b; border-left: 3px solid var(--crimson); }
.alert-info { background: #dbeafe; color: #1e40af; border-left: 3px solid var(--primary); }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-danger { background: var(--crimson); color: #fff; border-color: var(--crimson); }
.btn-danger:hover { background: #7d1720; }

/* =========================================================
   IMAGE UPLOADER (news admin)
   ========================================================= */
.image-uploader {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}
.image-preview-current,
.image-preview-new {
    position: relative;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 14px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: opacity 0.3s ease;
}
.image-preview-current img,
.image-preview-new img {
    width: 200px;
    height: 130px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.image-preview-current.will-remove {
    opacity: 0.4;
    background: #fee2e2;
    border-color: var(--crimson);
}
.image-preview-current.will-remove::after {
    content: '\f00d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%; left: 100px;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--crimson);
    opacity: 0.8;
}
.image-preview-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
}
.badge-current,
.badge-new {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    align-self: flex-start;
}
.badge-current { background: #dcfce7; color: #166534; }
.badge-new     { background: #dbeafe; color: #1e40af; }

.remove-image-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #fff;
    border: 1px dashed var(--crimson);
    border-radius: var(--radius);
    color: var(--crimson);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}
.remove-image-toggle:hover { background: #fee2e2; }
.remove-image-toggle input { accent-color: var(--crimson); cursor: pointer; }

.image-dropzone {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 26px 28px;
    background: #fff;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}
.image-dropzone:hover,
.image-dropzone.dragging {
    border-color: var(--accent);
    background: #fffbf0;
    transform: translateY(-1px);
}
.image-dropzone.has-file {
    border-color: var(--primary);
    background: #f0f6fc;
}
.dropzone-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.image-dropzone:hover .dropzone-icon,
.image-dropzone.dragging .dropzone-icon {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff;
    transform: rotate(-6deg) scale(1.05);
}
.dropzone-text { display: flex; flex-direction: column; gap: 2px; }
.dropzone-text strong { color: var(--primary); font-size: 1rem; }
.dropzone-text span { color: var(--text); font-size: 0.87rem; }
.dropzone-text small { color: var(--text-muted); font-size: 0.76rem; margin-top: 4px; }

/* Thumbnails in admin news list */
.news-thumb {
    width: 70px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    display: block;
}
.news-thumb-empty {
    background: var(--bg-alt);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .image-preview-current,
    .image-preview-new { flex-direction: column; align-items: stretch; }
    .image-preview-current img,
    .image-preview-new img { width: 100%; height: 180px; }
    .image-preview-current.will-remove::after { left: 50%; top: 90px; }
    .image-dropzone { flex-direction: column; text-align: center; }
}

/* =========================================================
   404 PAGE
   ========================================================= */
.error-page {
    text-align: center;
    padding: 100px 20px;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.error-code {
    font-family: var(--font-heading);
    font-size: 8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.error-page h2 { font-size: 1.8rem; margin-bottom: 14px; }
.error-page p { color: var(--text-muted); max-width: 500px; margin: 0 auto 24px; }

/* =========================================================
   MAP SECTION (Google Maps embed on Kontak)
   ========================================================= */
.map-section { padding: 80px 0; }
.map-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 4px solid #fff;
    margin-top: 20px;
    line-height: 0;
}
.map-wrapper iframe {
    display: block;
    width: 100%;
    filter: grayscale(0.15) contrast(1.02);
    transition: filter var(--transition);
}
.map-wrapper:hover iframe { filter: grayscale(0) contrast(1); }

.map-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 24px;
    padding: 22px 28px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}
.map-address {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1 1 300px;
}
.map-address > i {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.map-address strong {
    display: block;
    font-family: var(--font-heading);
    color: var(--primary);
    font-size: 1.05rem;
    line-height: 1.2;
    margin-bottom: 4px;
}
.map-address span {
    display: block;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}
.map-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.map-buttons .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .map-section { padding: 60px 0; }
    .map-wrapper iframe { height: 360px; }
    .map-actions { padding: 18px 20px; text-align: center; }
    .map-address { justify-content: center; flex-direction: column; text-align: center; }
    .map-buttons { justify-content: center; width: 100%; }
    .map-buttons .btn { flex: 1 1 auto; justify-content: center; }
}

/* =========================================================
   ANIMATIONS
   ========================================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease;
}
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

/* Safety net: admin area doesn't rely on scroll animations */
.admin-body .fade-in-up { opacity: 1; transform: none; }

/* Safety net: if JS is disabled, reveal content after a short delay so nothing stays invisible forever */
@media (prefers-reduced-motion: reduce) {
    .fade-in-up { opacity: 1; transform: none; transition: none; }
}
html.no-js .fade-in-up { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .content-wrap { grid-template-columns: 1fr; }
    .hero-title { font-size: 2.4rem; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
}

@media (max-width: 768px) {
    .topbar-left { display: none; }
    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed;
        top: 0;
        right: -320px;
        width: 300px;
        height: 100vh;
        background: #fff;
        padding: 80px 20px 30px;
        overflow-y: auto;
        transition: right var(--transition);
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }
    .main-nav.open { right: 0; }
    .nav-menu { flex-direction: column; align-items: stretch; gap: 2px; }
    .nav-menu > li > a { padding: 12px 16px; justify-content: space-between; }
    .dropdown, .mega-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        box-shadow: none;
        border: none;
        border-left: 3px solid var(--accent);
        border-radius: 0;
        min-width: auto;
        padding: 4px 0 4px 12px;
        margin: 4px 0;
        grid-template-columns: 1fr;
    }
    .has-dropdown.open > .dropdown,
    .has-dropdown.open > .mega-dropdown {
        display: block;
    }
    .cta-item { margin: 12px 0 0; }
    .btn-cta { display: inline-block; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-brand { justify-content: center; }
    .footer-col h4::after { left: 50%; transform: translateX(-50%); }
    .footer-social { justify-content: center; }
    .content-main { padding: 24px 20px; }
    .section { padding: 60px 0; }
    .page-header { padding: 60px 0 40px; }
    .page-header h1 { font-size: 1.9rem; }
    .hero { height: 500px; }
    .hero-title { font-size: 1.9rem; }
    .admin-shell { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; position: static; }
    .admin-nav { display: flex; overflow-x: auto; padding: 12px; }
    .admin-nav a { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
    .admin-nav a:hover, .admin-nav a.active { border-left: none; border-bottom-color: var(--accent); }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.6rem; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .btn { justify-content: center; }
    .section-title { font-size: 1.6rem; }
    .container { padding: 0 16px; }
    .brand-text span { display: none; }
    .stat-number { font-size: 2.2rem; }
}
