/* ══════════════════════════════════════════════
   blog.css  –  selaras penuh dengan index.css
   ══════════════════════════════════════════════ */
:root {
    --teal: #75a9b3;
    --purple: #a374ff;
    --dark: #222225;
    --cream: #f3ede0;
    --shadow-cream: #e3d9c2;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "League Spartan", sans-serif;
    font-weight: 700;
    overflow-x: hidden;
    background-color: var(--cream);
    color: var(--dark);
}

/* ── NAV (identik dengan index) ── */
.nav {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 200;
    pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
}
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}
.nav-links a {
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.9;
    transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; }
.nav-links a.active {
    opacity: 1;
    color: var(--teal);
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.nav-icon-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: #fff;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.nav-icon-btn:hover { opacity: 1; }
.nav-toggle {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.icon-wrapper {
    width: 26px; height: 16px;
    display: flex; flex-direction: column;
    justify-content: space-between;
}
.line {
    display: block;
    width: 100%; height: 2.5px;
    background: var(--teal);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.7, 0, 0.3, 1);
}
.nav-toggle.active .line.top    { transform: translateY(6.75px) rotate(45deg); background: #fff; }
.nav-toggle.active .line.middle { opacity: 0; transform: translateX(-10px); }
.nav-toggle.active .line.bottom { transform: translateY(-6.75px) rotate(-45deg); background: #fff; }

/* ── AUTH NAV BUTTON ── */
.nav-auth-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 20px;
    font-family: 'League Spartan', sans-serif;
    font-size: 13px; font-weight: 700;
    cursor: pointer; text-decoration: none;
    transition: all 0.2s; border: none;
}
.nav-auth-btn.login {
    background: rgba(255,255,255,0.15); color: #fff;
    border: 1.5px solid rgba(255,255,255,0.3);
}
.nav-auth-btn.login:hover  { background: rgba(255,255,255,0.25); }
.nav-auth-btn.logout {
    background: rgba(117,169,179,0.2); color: #75a9b3;
    border: 1.5px solid rgba(117,169,179,0.4);
}
.nav-auth-btn.logout:hover { background: rgba(117,169,179,0.35); }
.nav-user-name {
    font-size: 12px; color: rgba(255,255,255,0.7);
    max-width: 100px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}

/* ── ADMIN BADGE NAVBAR ── */
.admin-badge {
    display: none; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 12px;
    background: rgba(163,116,255,0.25);
    color: #a374ff; font-size: 11px; font-weight: 700;
    letter-spacing: 0.5px; text-transform: uppercase;
}
.admin-badge.visible { display: flex; }

/* ── ADMIN INFO BAR ── */
.admin-info-bar {
    display: none;
    background: linear-gradient(135deg, #f0f7ff, #e8f0fe);
    border-bottom: 1px solid rgba(163,116,255,0.2);
    padding: 10px 2rem;
    text-align: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #6a3bbf;
    margin-top: 80px;
}
.admin-info-bar.visible { display: block; }
.admin-info-bar span { font-weight: 700; }

/* ── HERO BLOG ── */
.blog-hero {
    width: 100%;
    height: 65vh;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('Biru\ Muda\ dan\ Putih\ Modern\ Minimalis\ Agensi\ Wisata\ Web\ UI\ Prototipe.svg') center/cover no-repeat;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.1) 55%, rgba(0,0,0,0.35) 100%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 1.5rem;
}
.hero-content h1 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 300;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.1;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}
.hero-content p {
    font-family: "DM Sans", sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── FILTER ── */
.blog-filter {
    padding: 2.5rem 2rem 1rem;
    scroll-margin-top: 80px;
}
.blog-filter .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 8px 22px;
    border: 1.5px solid #e0d9cb;
    background: #fcfef1;
    border-radius: 20px;
    cursor: pointer;
    font-family: "League Spartan", sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #999;
    transition: all 0.2s;
}
.filter-btn.active,
.filter-btn:hover {
    background: var(--teal);
    color: #fff;
    border-color: var(--teal);
    box-shadow: 0 4px 12px rgba(117, 169, 179, 0.3);
}

/* ── BLOG GRID ── */
.blog-grid {
    padding: 2rem 2rem 5rem;
}
.blog-grid .container {
    max-width: 1200px;
    margin: 0 auto;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

/* ── BLOG CARD ── */
.blog-card {
    background: #fcfef1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
.blog-card.hidden { display: none; }
.card-img {
    position: relative;
    overflow: hidden;
}
.card-img img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    transition: transform 0.4s;
}
.blog-card:hover .card-img img { transform: scale(1.06); }
.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--teal);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.card-content {
    padding: 20px 22px 24px;
}
.card-date {
    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #aaa;
}
.card-date i { margin-right: 5px; }
.card-content h3 {
    margin: 10px 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.3;
    letter-spacing: -0.2px;
}
.card-content p {
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #888;
    line-height: 1.7;
    margin-bottom: 16px;
}
.read-more {
    text-decoration: none;
    color: var(--teal);
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s;
}
.read-more:hover { gap: 12px; }

/* ── CARD ADMIN OVERLAY ── */
.card-admin-actions {
    position: absolute; top: 10px; right: 10px;
    display: flex; gap: 6px; opacity: 0; transition: opacity 0.2s;
}
.blog-card:hover .card-admin-actions { opacity: 1; }
.card-admin-btn {
    width: 30px; height: 30px; border-radius: 8px; border: none;
    cursor: pointer; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.15s;
}
.card-admin-btn:hover { transform: scale(1.1); }
.card-admin-btn.edit { background: #fff; }
.card-admin-btn.del  { background: #fff3f3; color: #e74c3c; }

/* ── ADMIN FAB ── */
.admin-fab {
    position: fixed; bottom: 32px; right: 32px;
    z-index: 300; display: none;
    flex-direction: column; align-items: flex-end; gap: 10px;
}
.admin-fab.visible { display: flex; }
.fab-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 13px 22px; border-radius: 28px;
    font-family: 'League Spartan', sans-serif;
    font-size: 14px; font-weight: 700;
    cursor: pointer; border: none;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.fab-btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.2); }
.fab-btn:active { transform: translateY(0); }
.fab-btn.primary { background: #2c6e7a; color: #fff; }

/* ── BLOG MODAL ── */
.blog-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.blog-modal-overlay.open { opacity: 1; visibility: visible; }
.blog-modal {
    background: #fff; border-radius: 20px;
    width: 100%; max-width: 640px; max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.25s;
}
.blog-modal-overlay.open .blog-modal { transform: translateY(0); }
.modal-header {
    padding: 24px 28px 0;
    display: flex; justify-content: space-between; align-items: flex-start;
}
.modal-header h2 {
    font-family: 'League Spartan', sans-serif;
    font-size: 20px; font-weight: 800; color: #222225;
}
.modal-header p {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px; color: #999; margin-top: 4px;
}
.modal-close {
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: #f3f3f3; cursor: pointer;
    font-size: 16px; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background 0.2s;
}
.modal-close:hover { background: #e8e8e8; }
.modal-body {
    padding: 20px 28px 28px;
    display: flex; flex-direction: column; gap: 14px;
}
.modal-field { display: flex; flex-direction: column; gap: 5px; }
.modal-field label {
    font-family: 'League Spartan', sans-serif;
    font-size: 12px; font-weight: 700; color: #4a6e78;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.modal-field input,
.modal-field select,
.modal-field textarea {
    padding: 10px 14px; border: 1.5px solid #e0eef2; border-radius: 10px;
    font-family: 'DM Sans', sans-serif; font-size: 14px; color: #222225;
    background: #f8fcfd; outline: none; transition: border-color 0.2s; resize: vertical;
}
.modal-field input:focus,
.modal-field select:focus,
.modal-field textarea:focus { border-color: #2c6e7a; background: #fff; }
.modal-field textarea { min-height: 90px; }
.modal-field textarea.content-area { min-height: 200px; font-size: 13px; }
.modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-msg {
    padding: 10px 14px; border-radius: 8px;
    font-family: 'DM Sans', sans-serif; font-size: 13px; display: none;
}
.modal-msg.show    { display: block; }
.modal-msg.error   { background: #fde8e8; color: #c0392b; border: 1px solid #f5c0c0; }
.modal-msg.success { background: #e8f8f0; color: #1e7e4e; border: 1px solid #b0e0c8; }
.modal-footer {
    padding: 0 28px 24px;
    display: flex; gap: 10px; justify-content: flex-end;
}
.btn-cancel {
    padding: 11px 22px; border: 1.5px solid #e0e0e0; background: #fff;
    border-radius: 10px; font-family: 'League Spartan', sans-serif;
    font-size: 14px; font-weight: 700; cursor: pointer; color: #888; transition: all 0.2s;
}
.btn-cancel:hover { background: #f5f5f5; }
.btn-save {
    padding: 11px 24px; background: #2c6e7a; color: #fff;
    border: none; border-radius: 10px;
    font-family: 'League Spartan', sans-serif; font-size: 14px; font-weight: 700;
    cursor: pointer; transition: background 0.2s;
}
.btn-save:hover    { background: #1e5460; }
.btn-save:disabled { background: #a0c4cc; cursor: not-allowed; }

/* ── IMAGE PREVIEW ── */
.img-upload-area { display: flex; gap: 10px; align-items: center; }
.img-preview {
    width: 80px; height: 60px; border-radius: 8px;
    object-fit: cover; border: 1.5px solid #e0eef2; display: none;
}
.img-preview.show { display: block; }

/* ── TOAST ── */
.toast-blog {
    position: fixed; bottom: 90px; right: 32px;
    padding: 12px 20px; border-radius: 10px;
    font-family: 'League Spartan', sans-serif; font-size: 14px; font-weight: 700;
    color: #fff; background: #2c6e7a;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    z-index: 9999; transform: translateY(20px); opacity: 0;
    pointer-events: none; transition: transform 0.3s, opacity 0.3s;
}
.toast-blog.show  { transform: translateY(0); opacity: 1; }
.toast-blog.error { background: #e74c3c; }

/* ── LOADING / EMPTY STATE ── */
.blog-loading {
    grid-column: 1/-1; text-align: center; padding: 60px 20px;
    font-family: 'DM Sans', sans-serif; color: #aaa;
}
.blog-loading .spinner {
    width: 36px; height: 36px;
    border: 3px solid #e0eef2; border-top-color: #75a9b3;
    border-radius: 50%; animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.blog-empty { grid-column: 1/-1; text-align: center; padding: 60px 20px; }
.blog-empty p { font-family: 'DM Sans', sans-serif; color: #aaa; font-size: 14px; }

/* ── FOOTER ── */
.footer {
    background: var(--dark);
    color: #fff;
    padding: 3rem 2rem 0;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-brand h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.footer-brand h3 span { color: var(--teal); }
.footer-brand p {
    font-family: "DM Sans", sans-serif;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}
.footer-links h4,
.footer-contact h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #fff;
}
.footer-links a {
    display: block;
    font-family: "DM Sans", sans-serif;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 8px;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--teal); }
.footer-contact p {
    font-family: "DM Sans", sans-serif;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 8px;
}
.footer-contact i {
    margin-right: 8px;
    color: var(--teal);
}
.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
}
.footer-bottom p {
    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.3);
}

/* ── MENU OVERLAY (identik dengan index) ── */
.menu {
    position: fixed; inset: 0;
    display: flex;
    padding: 2.5rem;
    opacity: 0;
    visibility: hidden;
    z-index: 150;
    pointer-events: none;
}
.menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.menu-bg-svg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    z-index: -1;
}
.menu-col-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 10;
}
.menu-col-info p {
    margin-bottom: 0.75rem;
    color: var(--purple);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.menu-col-info h3 {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: #fff;
}
.menu-col-info h6 {
    font-weight: 400;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255,255,255,0.7);
}
.menu-col-links {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    z-index: 10;
}
.button-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}
.pick-needs {
    font-family: 'Courier New', monospace;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 400;
    margin-bottom: 8px;
}
.block-btn {
    background: #fff;
    color: var(--teal);
    border: none;
    border-radius: 18px;
    padding: 14px 40px;
    font-family: "League Spartan", sans-serif;
    font-size: 26px;
    font-weight: 800;
    width: 280px;
    cursor: pointer;
    box-shadow: 0px 7px 0px var(--shadow-cream);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    text-align: center;
}
.block-btn:active {
    transform: translateY(5px);
    box-shadow: 0px 2px 0px var(--shadow-cream);
}
.char { display: inline-block; }

/* ── MENU BRAND ── */
.menu-brand {
    position: absolute;
    top: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 20;
}
.menu-logo-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.menu-brand-name {
    font-family: "League Spartan", sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    text-shadow: 0 0 20px rgba(117, 169, 179, 0.6);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .blog-hero { height: 45vh; }
    .hero-content h1 { font-size: clamp(32px, 9vw, 48px); }
    .blog-filter { padding: 2rem 1.5rem 0.5rem; }
    .blog-grid   { padding: 1.5rem 1.5rem 3rem; }
    .grid { grid-template-columns: 1fr; }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .menu { padding: 2rem 1.5rem; flex-direction: column; justify-content: center; align-items: center; }
    .menu-col-info { align-items: center; text-align: center; margin-top: 2rem; }
    .menu-col-links { position: relative; top: auto; left: auto; transform: none; margin-bottom: 2rem; }
    .admin-info-bar { font-size: 11px; padding: 8px 1rem; }
    .modal-row { grid-template-columns: 1fr; }
    .blog-modal { border-radius: 14px; }
    .admin-fab { bottom: 20px; right: 20px; }
}