:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-color: #3b82f6;
    --border-color: #e2e8f0;
    --font-heading: 'Merriweather', serif;
    --font-body: 'Inter', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--secondary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background-color: var(--surface-color);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
    /* Reduced padding for more compact header */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.15rem;
    /* Slightly smaller to fit */
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    white-space: nowrap;
    /* Prevent logo text from wrapping */
}

.logo span {
    white-space: nowrap;
}

.logo img {
    height: 48px;
    /* Slightly larger for better clarity */
    width: auto;
}

.nav-links {
    display: flex;
    gap: 1.25rem;
    /* Slightly reduced gap */
    align-items: center;
    white-space: nowrap;
    /* Prevent nav items from wrapping */
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
}

/* Modal / Popup Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: 1.5rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.modal-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.modal-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-modal {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    border: none;
}

.btn-confirm {
    background: var(--primary-color);
    color: white;
}

.btn-confirm:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-cancel {
    background: #f1f5f9;
    color: var(--text-secondary);
}

.btn-cancel:hover {
    background: #e2e8f0;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    z-index: 2000;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 0;
    /* Remove any potential top margin */
}

.hero h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
}

.blog-card {
    background: var(--surface-color);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    width: 100%;
    height: 200px;
    background-color: #e2e8f0;
    object-fit: cover;
    object-position: center;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    /* Standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    margin-top: auto;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Single Post */
.post-content {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    background: var(--surface-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 10;
}

.post-header {
    text-align: center;
    margin-bottom: 2rem;
}

.post-header img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.post-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.article-body {
    font-family: var(--font-heading);
    /* Serif for better reading */
    font-size: 1.125rem;
    color: #334155;
}

.article-body h2 {
    font-family: var(--font-body);
    font-weight: 700;
    margin-top: 2.5rem;
    font-size: 1.75rem;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.prompt-box {
    background-color: #0f172a;
    /* Darker background */
    color: #e2e8f0;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    border-left: 4px solid var(--accent-color);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    /* Ensure wrapping */
    word-wrap: break-word;
    /* Ensure wrapping */
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    position: relative;
}

/* Social Share */
.social-share {
    margin: 2rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    text-align: center;
}

.social-share h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-color);
}

.share-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 0.375rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}

.share-btn:hover {
    opacity: 0.9;
}

.share-whatsapp {
    background-color: #25D366;
}

.share-twitter {
    background-color: #1DA1F2;
}

.share-facebook {
    background-color: #1877F2;
}

/* Related Posts */
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.related-posts h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.related-card>a {
    display: flex;
    width: 100%;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.related-card:hover {
    transform: translateY(-2px);
}

.related-card img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
}

.related-content {
    padding: 0.75rem 1rem;
    flex-grow: 1;
}

.related-title {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    font-family: var(--font-heading);
    color: var(--primary-color);
    line-height: 1.4;
}

.related-read-more {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}


.prompt-box code {
    font-family: inherit;
    color: inherit;
    background: transparent;
    padding: 0;
}

/* Global Improvements */
body {
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 1100px;
    /* Slimmer for better text measure */
}

/* Header & Nav */
header {
    position: relative;
    top: 0;
    z-index: 1000;
}

.post-featured-image {
    display: none !important;
}

.nav-links {
    gap: 1rem;
}

/* Blog Grid */
.blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Post Styling */
.post-content {
    margin: 1.5rem auto;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.7;
}

.prompt-box {
    padding: 1.25rem;
    margin: 1.5rem -1.5rem;
    /* Break out on mobile */
    border-radius: 0;
    font-size: 0.9rem;
}

/* Responsive Overrides */
@media (min-width: 768px) {
    .blog-grid {
        gap: 2rem;
    }

    .post-content {
        margin: 3rem auto;
        padding: 3rem;
        border-radius: 1rem;
    }

    .prompt-box {
        margin: 2rem 0;
        border-radius: 0.75rem;
        padding: 2rem;
        font-size: 1rem;
    }

    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 2.5rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .card-title {
        font-size: 1.15rem;
    }

    .article-body {
        font-size: 1.05rem;
    }

    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }



    .logo {
        font-size: 1.1rem;
    }

    .logo img {
        height: 32px;
    }
}

/* Footer */
footer {
    background-color: #0f172a;
    color: #e2e8f0;
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-col p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-links-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links-col a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.footer-links-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 2rem;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* Mobile Nav Toggle - Slide Drawer */
@media (max-width: 768px) {
    nav {
        flex-direction: row;
        /* Keep logo and toggle on same line */
        justify-content: space-between;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        width: 70%;
        height: 100vh;
        background: var(--surface-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: 0.4s ease-in-out;
        z-index: 1500;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.25rem;
        padding: 1rem;
    }
}

/* FAQ Styling */
.faq-section {
    margin-top: 3rem;
    border-top: 2px solid var(--border-color);
    padding-top: 2rem;
}

.faq-section h3 {
    color: var(--primary-color);
}

.faq-section h4 {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* Prompt Actions (PromptWale Emulation) */
.prompt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: -1rem;
    margin-bottom: 2rem;
}

.btn-copy {
    background: #334155;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: #1e293b;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-action:hover {
    opacity: 0.9;
}

.btn-action.whatsapp {
    background-color: #25D366;
}

.btn-action.telegram {
    background-color: #0088cc;
}

.btn-action.chatgpt {
    background-color: #10a37f;
}

.btn-action.gemini {
    background-color: #174ea6;
}

.prompt-box {
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .prompt-box {
        margin-bottom: 1.5rem;
    }
}