@font-face {
  font-family: "Archivo";
  src: url("/static/fonts/archivo/Archivo-Regular.ttf") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "Archivo";
  src: url("/static/fonts/archivo/Archivo-Bold.ttf") format("truetype");
  font-weight: 700;
}


:root {
    --pink: #FF5BB6;
    --cyan: #00B0BE;
    --bg: #fff7ee;
    --text: #1e1e1e;
    --card-bg: #ffffff;
    --radius: 20px;
}

/* GLOBAL */
html, body {
    overflow-x: hidden;
}

* {
  font-family: "Archivo", sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
}

/* ADMIN AREA */
.admin-container {
    width: 90%;
    max-width: 700px;
    margin: 40px auto;
    color: #1e1e1e;
}

input, textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #444;
    background: #ffffff;
    color: #1e1e1e;
}

.save-btn {
    background: #FF5BB6;
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    color: white;
    cursor: pointer;
    font-weight: 600;
}

.save-btn:hover { opacity: .85; }

.back-link {
    display: inline-block;
    margin-top: 15px;
    color: #00B0BE;
}

/* HERO */
.blog-hero {
    width: 100%;
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--pink), var(--cyan));
    color: #1e1e1e;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    margin-bottom: 40px;
    box-shadow: 0 0 25px rgba(255,91,182,0.5),
                0 0 25px rgba(0,176,190,0.5);
}

.blog-hero h1 {
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
}

.blog-hero p {
    font-size: 20px;
    opacity: 0.9;
    margin-top: 10px;
    color: #ffffff;
}

/* GRID */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto 80px auto;
}

/* POST CARD */
.post-card {
    display: block;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: #1e1e1e;
    transition: transform .2s, box-shadow .2s;
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

/* Thumbnail */
.post-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 15px;
}

/* Meta Row */
.post-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.post-tag {
    display: inline-block;
    background: linear-gradient(45deg, var(--pink), var(--cyan));
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.post-date-small {
    font-size: 0.8rem;
    color: #777;
}

/* Title */
.post-card h2 {
    color: var(--cyan);
    margin-top: 8px;
    margin-bottom: 8px;
    font-size: 1.25rem;
    font-weight: 700;
}

.post-card:hover h2 {
    background: linear-gradient(90deg, var(--pink), var(--cyan));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Summary */
.post-card p {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.5;
    max-height: 4.5em;
    overflow: hidden;
}

/* POST PAGE */
.post-container {
    max-width: 1200px;
    margin: 40px auto;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.post-container h1 {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(90deg, #FF5BB6, #00B0BE);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.post-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

/* Content */
.post-content {
    line-height: 1.7;
    font-size: 1.1rem;
}

.post-content h2,
.post-content h3 {
    margin-top: 25px;
    background: linear-gradient(90deg, #00B0BE, #FF5BB6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* CTA */
.cta-box {
    margin-top: 50px;
    padding: 30px;
    border-radius: 16px;
    background: linear-gradient(135deg, #FF5BB6, #00B0BE);
    color: white;
    text-align: center;
}

.cta-button {
    display: inline-block;
    margin-top: 12px;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: bold;
    background: white;
    color: #FF5BB6;
    text-decoration: none;
    transition: 0.2s;
}

.cta-button:hover {
    background: #f1f1f1;
}

/* FOOTER */
.blog-footer {
    margin-top: 60px;
    padding: 20px;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    text-align: center;
    color: #555;
    box-shadow: 0 14px 50px rgba(0,0,0,0.4);
}

.footer-inner { max-width: 900px; margin: auto; }
.footer-logo { height: 100px; margin-bottom: 15px; }

.footer-text {
    font-size: 16px;
    margin-bottom: 20px;
    color: #444;
}

.footer-links a {
    margin: 0 12px;
    color: #0e7ac7;
    font-weight: 600;
    text-decoration: none;
}

.footer-links a:hover { text-decoration: underline; }

.footer-copy {
    font-size: 14px;
    color: #777;
    margin-top: 10px;
}

/* BACK BUTTON */
.back-button {
    display: inline-block;
    margin: 10px 0;
    padding: 10px 18px;
    border-radius: 10px;
    background: #f0f4ff;
    color: #0e7ac7;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s ease;
}

.back-button:hover {
    background: #e2edff;
    transform: translateX(-3px);
}

/* PAGINATION */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin: 40px 0 20px 0;
}

.page-btn {
    padding: 10px 18px;
    border-radius: 10px;
    background: linear-gradient(45deg, var(--pink), var(--cyan));
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s ease;
}

.page-btn:hover { opacity: 0.85; }

.page-btn.disabled {
    background: #ccc;
    pointer-events: none;
    opacity: 0.6;
}

.page-number {
    font-weight: 600;
    color: #444;
    background: white;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.1);
}

/* ADMIN TABLE */ .admin-table { width: 100%; border-collapse: collapse; margin-top: 30px; } .admin-table td, .admin-table th { padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); text-align: center; } .admin-table a { color: var(--pink); text-decoration: none; }

/* ADMIN BUTTON */ .loosen-btn { background: linear-gradient(45deg, var(--pink), var(--cyan)); color: white; border: none; padding: 10px 20px; border-radius: var(--radius); cursor: pointer; font-size: 16px; transition: opacity .2s; } .loosen-btn:hover { opacity: 0.85; }

/* MOBILE FIXES */
@media (max-width: 600px) {
    .post-grid { grid-template-columns: 1fr; padding: 0 15px; }

    .post-container {
        padding: 22px;
        margin: 20px;
    }
    
    .post-container h1 {
        font-size: 1.9rem;
    }

    .cta-box { padding: 20px; }
}
