:root {
    --brand: #0f6b57;
    --brand-dark: #0d302c;
    --accent: #f2b84b;
    --ink: #172321;
    --muted: #64736f;
    --soft: #f4f8f6;
    --line: #e4ece8;
}

* { box-sizing: border-box; letter-spacing: 0; }
html, body { max-width: 100%; overflow-x: hidden; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: #fff; }
.public-site { padding-top: 72px; }
img, iframe { max-width: 100%; }
a { text-decoration: none; }
.public-site .navbar { z-index: 1050; min-height: 72px; }
.navbar > .container { min-height: 64px; display: flex; flex-wrap: nowrap; align-items: center; }
.navbar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: calc(100% - 64px); white-space: normal; line-height: 1.15; overflow: hidden; }
.navbar-brand img { width: auto; height: 52px; max-width: min(170px, 58vw); object-fit: contain; }
.navbar-toggler { width: 44px; height: 38px; padding: 6px 8px; flex: 0 0 auto; }
.nav-link { font-weight: 600; color: var(--ink); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; border-radius: 8px; font-weight: 700; box-shadow: 0 12px 26px rgba(15, 107, 87, .22); }
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-outline-brand { border-color: var(--brand); color: var(--brand); border-radius: 8px; font-weight: 700; }
.btn-outline-brand:hover { background: var(--brand); color: #fff; }
.hero { min-height: 78vh; display: flex; align-items: center; background-size: cover; background-position: center; color: #fff; }
.hero-content { max-width: 780px; padding: 90px 0 120px; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 800; line-height: 1.04; margin-bottom: 20px; }
.hero p { font-size: clamp(1rem, 2vw, 1.35rem); max-width: 680px; color: rgba(255,255,255,.92); }
.section { padding: 84px 0; }
.soft-bg { background: var(--soft); }
.eyebrow { color: var(--brand); font-weight: 800; text-transform: uppercase; font-size: .78rem; }
h2 { font-weight: 800; line-height: 1.15; margin: 8px 0 18px; }
.feature-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 22px 60px rgba(23,35,33,.14); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-item { display: block; overflow: hidden; border-radius: 8px; aspect-ratio: 1; background: var(--soft); box-shadow: 0 12px 28px rgba(23,35,33,.1); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.icon-card, .testimonial-card, .news-card, .program-card, .form-panel, .payment-box, .contact-info, .panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 14px 38px rgba(23,35,33,.08); }
.icon-card { padding: 28px; height: 100%; }
.icon-card i { font-size: 2rem; color: var(--accent); margin-bottom: 16px; }
.icon-card h5 { font-weight: 800; }
.program-card { overflow: hidden; height: 100%; }
.program-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.program-card-body { padding: 24px; }
.program-card-body i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--brand); margin-bottom: 14px; }
.program-card h3 { font-size: 1.35rem; font-weight: 800; margin-bottom: 12px; }
.program-card ul { padding-left: 18px; margin-bottom: 0; color: var(--muted); }
.program-card li { margin-bottom: 7px; }
.testimonial-card { padding: 28px; min-height: 210px; }
.testimonial-card p { color: var(--muted); }
.testimonial-card span { display: block; color: var(--brand); font-size: .9rem; }
.news-card { overflow: hidden; height: 100%; }
.news-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.news-card div { padding: 20px; }
.news-card small { color: var(--brand); font-weight: 700; }
.page-banner { min-height: 340px; display: flex; align-items: center; background-size: cover; background-position: center; color: #fff; }
.page-banner h1 { font-size: clamp(2.2rem, 5vw, 4.25rem); font-weight: 800; }
.page-banner p { max-width: 700px; font-size: 1.15rem; }
.form-panel, .payment-box, .contact-info, .panel { padding: 24px; }
.payment-box p { margin-bottom: 8px; }
.mini-impact { height: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fff; }
.mini-impact i { color: var(--brand); margin-bottom: 8px; }
.mini-impact strong, .mini-impact span { display: block; }
.mini-impact span { color: var(--muted); font-size: .88rem; }
.qr { width: 180px; max-width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.map-box iframe { width: 100%; min-height: 280px; border: 0; border-radius: 8px; }
.site-footer { background: var(--brand-dark); color: rgba(255,255,255,.82); padding: 58px 0 22px; }
.site-footer h5, .site-footer h6 { color: #fff; font-weight: 800; }
.site-footer a { color: rgba(255,255,255,.82); display: block; margin-bottom: 8px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 36px; padding-top: 20px; text-align: center; font-size: .9rem; }
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #edf7f3, #fff7e6); }
.auth-card { width: min(100%, 460px); background: rgba(255,255,255,.86); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.8); border-radius: 8px; padding: 30px; box-shadow: 0 22px 70px rgba(23,35,33,.14); }
.auth-brand { display: block; color: var(--brand-dark); font-weight: 900; font-size: 1.25rem; margin-bottom: 20px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.dashboard-body { background: #f3f6f5; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; padding: 20px; background: #102d2a; overflow-y: auto; z-index: 1030; }
.sidebar-brand { display: block; color: #fff; font-weight: 900; font-size: 1.15rem; margin-bottom: 20px; }
.sidebar a:not(.sidebar-brand) { color: rgba(255,255,255,.82); display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; margin-bottom: 4px; }
.sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; }
.dashboard-main { margin-left: 280px; min-height: 100vh; }
.dashboard-top { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.dashboard-top span { display: block; color: var(--muted); font-size: .9rem; }
.dashboard-content { padding: 28px; }
.stat-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px; height: 100%; box-shadow: 0 12px 32px rgba(23,35,33,.07); }
.stat-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 8px; flex: 0 0 auto; }
.stat-card span { color: var(--muted); font-size: .9rem; }
.stat-card strong { display: block; font-size: 1.35rem; line-height: 1.15; word-break: break-word; }
.panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 16px; }
.gallery-admin img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.admin-thumb { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.admin-image-cell { min-width: 260px; }
.image-upload-help { color: var(--muted); font-size: .78rem; line-height: 1.35; margin: 0 0 8px; }
.image-upload-current { display: grid; gap: 6px; margin-bottom: 8px; }
.image-upload-current span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.image-upload-current img { width: 120px; max-width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); padding: 4px; }
.image-delete-check { align-items: center; gap: 6px; color: var(--muted); font-size: .84rem; font-weight: 600; margin-bottom: 8px; }
.image-upload-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.image-upload-preview img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--soft); }
.table { margin-bottom: 0; }
label { font-weight: 700; margin-bottom: 6px; }
.form-control, .form-select { border-radius: 8px; border-color: #d9e4df; }

@media (max-width: 991px) {
    .public-site { padding-top: 66px; }

    .public-site .navbar {
        min-height: 66px;
    }

    .navbar > .container {
        position: relative;
        width: 100%;
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    .navbar-toggler {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .navbar-collapse {
        position: absolute;
        top: calc(100% + 8px);
        left: 16px;
        right: 16px;
        width: auto;
        padding: 12px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 8px;
        box-shadow: 0 18px 42px rgba(23,35,33,.16);
        max-height: calc(100vh - 92px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .navbar-collapse.collapsing {
        height: auto;
        transition: opacity .18s ease;
    }

    .navbar-nav {
        align-items: flex-start !important;
    }

    .navbar-nav .nav-link {
        padding: 8px 4px;
    }

    .navbar-nav .btn {
        margin-top: 4px;
    }

    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
    .sidebar.open { transform: translateX(0); }
    .dashboard-main { margin-left: 0; }
    .section { padding: 60px 0; }
}

@media (max-width: 575px) {
    .public-site { padding-top: 58px; }
    .public-site .navbar { min-height: 58px; }
    .navbar > .container { min-height: 58px; padding-left: 12px; padding-right: 12px; }
    .navbar-brand { max-width: calc(100% - 54px); }
    .navbar-brand img { height: 44px; max-width: min(148px, 62vw); }
    .navbar-collapse { left: 12px; right: 12px; top: calc(100% + 6px); }
    .hero { min-height: 70vh; }
    .hero-content { padding: 70px 0 90px; }
    .gallery-grid { gap: 10px; }
    .section-head { align-items: flex-start; flex-direction: column; }
    .dashboard-content { padding: 18px; }
    .auth-links { flex-direction: column; }
}

@media (max-width: 360px) {
    .navbar-brand img { height: 40px; max-width: 136px; }
    .navbar-toggler { width: 40px; height: 36px; padding: 5px 7px; }
}
