@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&display=swap');

:root {
    --bg: #f2f2ef;
    --card: #ffffff;
    --ink: #0f1512;
    --muted: #5d6a63;
    --accent: #efb427;
    --accent-2: #1f8f5f;
    --line: #d8ddd9;
    --danger: #cb3f3f;
    --font-heading: "Google Sans", "Poppins", "Segoe UI", sans-serif;
    --font-body: "Google Sans", "Manrope", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

.font-merriweather {
  font-family: "Merriweather", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings:
    "wdth" 100;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: 0.01em;
    font-weight: 400;
    color: var(--ink);
    background: radial-gradient(circle at top right, #f7efd8, transparent 42%),
        radial-gradient(circle at bottom left, #d5ece0, transparent 48%),
        var(--bg);
    min-height: 100vh;
}

p {
    margin: 0 0 0.95rem;
    color: #223229;
}

img,
iframe {
    max-width: 100%;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    margin-top: 0;
    line-height: 1.2;
    letter-spacing: -0.015em;
    font-weight: 700;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(8px);
    background: rgba(242, 242, 239, 0.8);
    border-bottom: 1px solid var(--line);
    padding: 8px max(4vw, 18px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.brand {
    font-weight: 800;
    letter-spacing: 0.2px;
    text-decoration: none;
    color: var(--ink);
}

.brand img {
    width: 90px;
    height: auto;
    display: block;
}

.brand small {
    font-size: 9px;
    color: #274635;
    margin-top: 4px;
}

.logo {
    font-weight: 800;
    letter-spacing: 0.2px;
    text-decoration: none;
    color: var(--ink);
}

.logo img {
    width: 100%;
    height: auto;
    display: block;
}

.logo small {
    font-size: 22px;
    color: #274635;
    margin-top: 4px;
}

.about-icons {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    font-size: 155px;
}

.main-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-toggle {
    display: none;
    border: 1px solid #b7c7be;
    background: #fff;
    border-radius: 12px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nav-toggle-icon {
    font-size: 24px;
    color: #203c2d;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 10px;
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

.main-nav a:hover {
    background: #ffffff;
}

.menu-icon {
    font-size: 18px;
    line-height: 1;
}

/* Language switcher */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 6px;
    background: rgba(255,255,255,0.55);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.lang-switcher a {
    color: var(--muted);
    text-decoration: none;
    padding: 2px 5px !important;
    border-radius: 999px !important;
    transition: color 0.2s, background 0.2s;
    background: transparent !important;
}

.lang-switcher a:hover,
.lang-switcher a.lang-active {
    color: var(--accent-2) !important;
    background: transparent !important;
}

.lang-switcher a.lang-active {
    font-weight: 700;
    color: var(--accent-2) !important;
}

.lang-sep {
    color: var(--line);
    user-select: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

h1 {
    font-size: clamp(1.8rem, 2.2vw + 1rem, 3.2rem);
    letter-spacing: -0.022em;
}

h2 {
    font-size: clamp(1.4rem, 1.2vw + 1rem, 2.2rem);
}

h3 {
    font-size: clamp(1.1rem, 0.5vw + 1rem, 1.5rem);
}

.card,
.auth-card,
.stat-card,
.card-lite {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.subtitle {
    font-size: clamp(1.02rem, 0.4vw + 0.95rem, 1.2rem);
    line-height: 1.5;
    font-weight: 500;
    color: #2b3b33;
}

.eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: #3b5c4d;
    background: #e9f2ed;
    border-radius: 999px;
    padding: 6px 11px;
    margin-bottom: 12px;
}

.metric-grid {
    display: grid;
    gap: 14px;
}

.metric {
    background: #f6f7f6;
    border-radius: 16px;
    padding: 14px;
    border: 1px solid #ecf0ec;
}

.metric strong {
    display: block;
    font-size: 1.8rem;
}

.cta-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 10px 16px;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(120deg, #efb427, #f2ca6c);
    color: #231a07;
}

.btn-ghost {
    border-color: #9ab8a9;
    color: #20432f;
    background: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.service-grid,
.partner-grid,
.stats-grid,
.two-col {
    display: grid;
    gap: 16px;
}

.service-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.service-box {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
    background: #fcfdfc;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.service-box:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
    transform: translateY(-3px);
    border-color: #a8ccba;
}

.service-box h3 {
    margin-bottom: 6px;
    margin-top: 10px;
}

.service-box p {
    font-size: 0.96rem;
    line-height: 1.58;
    margin-bottom: 0;
    flex: 1;
}

.service-read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-2);
}

.service-read-more .material-symbols-rounded {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.service-box:hover .service-read-more .material-symbols-rounded {
    transform: translateX(4px);
}

/* Service detail page */
.service-detail-page {
    display: grid;
    gap: 20px;
}

.service-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.service-detail-icon {
    font-size: 48px;
    color: var(--accent-2);
    flex-shrink: 0;
    margin-top: 4px;
}

.service-detail-body {
    line-height: 1.75;
}

.service-detail-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.service-detail-cta .btn .material-symbols-rounded {
    font-size: 18px;
    margin-right: 6px;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-2);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.back-link .material-symbols-rounded {
    font-size: 18px;
}

/* Admin service slug badge */
.service-slug-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    background: #edf5ef;
    border: 1px solid #b4d5be;
    border-radius: 999px;
    padding: 4px 10px;
    color: #1e4f36;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.service-slug-badge .material-symbols-rounded {
    font-size: 14px;
}

.service-slug-badge a {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.service-slug-badge a:hover {
    text-decoration: underline;
}

/* Admin detail edit page */
.detail-edit-header {
    margin-bottom: 20px;
    display: grid;
    gap: 8px;
}

.slug-field {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    border: 1px solid #c5d1cb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.slug-prefix {
    padding: 11px 10px 11px 14px;
    background: #f2f5f3;
    color: #5d6a63;
    font-size: 13px;
    border-right: 1px solid #c5d1cb;
    white-space: nowrap;
}

.slug-field input {
    border: 0;
    border-radius: 0;
    padding-left: 10px;
}

.service-box i {
    font-size: 1.4rem;
    color: var(--accent-2);
}

.service-icon {
    font-size: 30px;
    color: var(--accent-2);
}

.icon-field {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    align-items: center;
}

.icon-preview {
    width: 42px;
    height: 42px;
    border: 1px solid #c5d1cb;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-2);
    background: #f5fbf8;
}

.partner-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.partner-chip {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    min-height: 72px;
}

.partner-chip:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.partner-chip img {
    max-width: 100%;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    filter: grayscale(40%);
    opacity: 0.85;
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.partner-chip:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.partner-chip a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    text-decoration: none;
}

.split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.site-footer {
    padding: 18px 24px 36px;
    text-align: center;
    color: var(--muted);
}

.login-page,
.admin-page {
    min-height: 100vh;
}

.login-page {
    display: grid;
    place-items: center;
    padding: 20px;
}

.auth-card {
    width: min(460px, 100%);
}

.admin-page {
    display: grid;
    grid-template-columns: 260px 1fr;
}

.admin-sidebar {
    border-right: 1px solid var(--line);
    padding: 24px;
    background: #fcfdfb;
}

.admin-sidebar nav {
    display: grid;
    gap: 8px;
    margin-bottom: 22px;
}

.admin-sidebar nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #183324;
    padding: 8px 0;
}

.admin-sidebar nav a .menu-icon {
    font-size: 18px;
    color: #3a5f4c;
}

.admin-main {
    padding: 24px;
    overflow-y: auto;
}

.admin-form {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.editor-tabs {
    display: grid;
    gap: 16px;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f4f7f5;
}

.tab-btn {
    border: 1px solid #c7d2cb;
    background: #fff;
    color: #254434;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
}

.tab-btn.is-active {
    background: #e8f4ee;
    border-color: #9ec7b1;
    color: #1d5a3e;
}

.tab-pane[hidden] {
    display: none !important;
}

input,
textarea {
    width: 100%;
    border: 1px solid #c5d1cb;
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
}

label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.005em;
    color: #274635;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.check-row input {
    width: auto;
}

.flash {
    margin-bottom: 12px;
    border: 1px solid #8bb89f;
    background: #e8f8ef;
    color: #1e4f36;
    padding: 10px 12px;
    border-radius: 10px;
}

.flash-error {
    border-color: #e0a8a8;
    background: #fdeeee;
    color: #7d2525;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card h3 {
    font-size: 2rem;
    margin: 0;
}

.card-lite {
    margin-bottom: 10px;
}

.inline-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.fancy-file-wrap {
    display: grid;
    gap: 8px;
}

.fancy-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.fancy-file-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    border: 1px solid #9ec7b1;
    background: #edf6f1;
    color: #1f6043;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fancy-file-label:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(20, 56, 41, 0.12);
}

.fancy-file-label .material-symbols-rounded {
    font-size: 18px;
}

.fancy-file-name {
    display: inline-block;
    width: fit-content;
    background: #f4f7f5;
    border: 1px solid #d8e0db;
    color: #55675d;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
}

.admin-image-preview {
    width: 100%;
    max-width: 280px;
    border-radius: 12px;
    border: 1px solid var(--line);
    display: block;
    object-fit: cover;
    background: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.gallery-item {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    padding: 12px;
}

.gallery-caption h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.gallery-caption p {
    font-size: 0.92rem;
    margin-bottom: 0;
}

.gallery-sort-help {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.92rem;
}

.gallery-sort-list {
    display: grid;
    gap: 10px;
}

.gallery-sort-item {
    display: grid;
    grid-template-columns: auto 64px 1fr;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 8px 10px;
    cursor: grab;
}

.gallery-sort-item:active {
    cursor: grabbing;
}

.gallery-sort-item.is-dragging {
    opacity: 0.55;
}

.gallery-sort-item .material-symbols-rounded {
    color: #5a6a61;
}

.gallery-sort-item img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.gallery-sort-item strong {
    display: block;
    font-size: 0.93rem;
}

.gallery-sort-item small {
    color: var(--muted);
    font-size: 0.8rem;
}

.apply-form {
    display: grid;
    gap: 12px;
}

.form-help {
    color: var(--muted);
    font-size: 0.92rem;
    margin-top: -2px;
}

.apply-form .btn .material-symbols-rounded {
    font-size: 18px;
    margin-right: 6px;
}

.submission-list {
    display: grid;
    gap: 14px;
}

.submission-item {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
}

.submission-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.submission-head h3 {
    margin: 0;
}

.submission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 4px 12px;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: grid;
    gap: 8px;
}

.contact-list li {
    line-height: 1.55;
}

.reveal-item {
    opacity: 0;
    transform: translateY(22px);
    transition: transform 0.7s ease, opacity 0.7s ease;
}

.reveal-item.in {
    opacity: 1;
    transform: translateY(0);
}

.reveal-wrap > * {
    margin-bottom: 20px;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
    z-index: -1;
}

.bg-orb-a {
    background: rgba(239, 180, 39, 0.27);
    width: 250px;
    height: 250px;
    top: -60px;
    right: -40px;
}

.bg-orb-b {
    background: rgba(31, 143, 95, 0.2);
    width: 300px;
    height: 300px;
    bottom: -90px;
    left: -50px;
}

@media (max-width: 930px) {
    .hero,
    .split,
    .two-col {
        grid-template-columns: 1fr;
        display: grid;
    }

    .admin-page {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .main-nav {
        gap: 8px;
    }

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

    .container {
        padding-top: 24px;
    }

    .card,
    .auth-card,
    .stat-card,
    .card-lite {
        padding: 20px;
    }

    .admin-main {
        padding: 18px;
    }
}

@media (max-width: 700px) {
    body {
        font-size: 15px;
        line-height: 1.6;
    }

    h1 {
        letter-spacing: -0.018em;
    }

    .site-header {
        align-items: flex-start;
        padding: 14px 16px;
        position: relative;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 16px;
        left: 16px;
        width: auto;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 10px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
        width: 100%;
        justify-content: flex-start;
        overflow-x: visible;
    }

    .main-nav a {
        white-space: normal;
        width: 100%;
        border-radius: 10px;
    }

    .lang-switcher {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }

    body.nav-open .main-nav {
        display: grid;
    }

    .split {
        align-items: flex-start;
    }

    .btn {
        min-height: 42px;
    }

    .admin-sidebar {
        padding: 16px;
    }

    .admin-sidebar form .btn {
        width: 100%;
    }

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

@media (max-width: 520px) {
    body {
        font-size: 14.5px;
    }

    .container {
        padding: 16px 14px 48px;
    }

    .card,
    .auth-card,
    .stat-card,
    .card-lite {
        border-radius: 16px;
        padding: 16px;
    }

    .cta-row .btn {
        width: 100%;
    }

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

    .icon-field {
        grid-template-columns: 1fr;
    }

    .icon-preview {
        width: 100%;
    }

    .metric strong {
        font-size: 1.5rem;
    }

    .admin-main {
        padding: 14px;
    }
}
