@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');


:root {
    --primary: #216be9;
    --text-color: #282424;
    --light-bg: #FAF8FF;
    --border-color: #e9e8ff;
    --surface: #ffffff;
    --nav-bg: #ffffff;
    --footer-bg: #111111;
}


body.dark-mode {
    --primary: #3b82f6;
    --text-color: #f8fafc;
    --light-bg: #0f172a;
    --border-color: #334155;
    --surface: #1e293b;
    --nav-bg: #1e293b;
    --footer-bg: #0b0f19;
}


* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, sans-serif; }


body {
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: 70px; 
    -webkit-user-select: none; 
    -ms-user-select: none; 
    user-select: none; 
    transition: background-color 0.3s, color 0.3s;
}


input, textarea { -webkit-user-select: auto; -ms-user-select: auto; user-select: auto; background: var(--surface); color: var(--text-color); border: 1px solid var(--border-color); }
a { text-decoration: none; color: inherit; }
.container { width: 95%; max-width: 100%; margin: 0 auto; }


#site-header { background: var(--surface); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); transition: background 0.3s; }


.main-header { background: var(--surface); padding: 20px 0 10px 0; transition: background 0.3s; }
.topbar { background: #111; color: #ffffff; font-size: 0.85rem; padding: 10px 0; border-top: 1px solid var(--border-color); }
.topbar-flex { display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: #ffffff; }
.header-flex { display: flex; align-items: center; justify-content: center; position: relative; }
.header-widgets { display: flex !important; align-items: center; gap: 15px; visibility: visible !important; position: absolute;right: 0%;}
.theme-toggle-btn, .hamburger-btn { display: flex !important; align-items: center; justify-content: center; visibility: visible !important; opacity: 1 !important; }
.theme-toggle-btn { background: var(--light-bg); border: 1px solid var(--border-color); color: var(--text-color); padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 1.1rem; transition: 0.2s; }
.theme-toggle-btn:hover { background: var(--border-color); }
.hamburger-btn { background: transparent; border: none; cursor: pointer; font-size: 1.5rem; color: var(--text-color); }
.nav-dropdown { display: none; position: absolute; background: var(--surface); border: 1px solid var(--border-color); z-index: 1000; }


.epaper-calendar-wrap { display: flex; align-items: center; gap: 10px; }
.btn-epaper-small { display: inline-block; background: var(--primary); color: #ffffff; border: none; padding: 5px 15px; border-radius: 4px; font-weight: bold; cursor: pointer; text-decoration: none; transition: background 0.2s;}
.btn-epaper-small:hover { background: #184eb3; color: #fff; }
.center-links { list-style: none; display: flex; justify-content: center; gap: 25px; flex-wrap: wrap; }
.center-links a { font-weight: 600; font-size: 1.05rem; color: var(--text-color); transition: color 0.2s; opacity: 0.8; }
.center-links a.active, .center-links a:hover { color: var(--primary); opacity: 1; }
.main-layout, .bento-grid { margin-top: 35px; }
.bento-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
@media (min-width: 900px) {
    .bento-grid .post-card:first-child { grid-column: span 2; grid-row: span 2; flex-direction: column; }
    .bento-grid .post-card:first-child .post-image-link { height: 400px; width: 100%; }
    .bento-grid .post-card:first-child h2 { font-size: 2rem; }
}
.post-card { background: var(--surface); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.1); cursor: pointer; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.post-image-link { width: 100%; height: 220px; overflow: hidden; display: block; }
.post-image { width: 100%; height: 100%; object-fit: contain;background-color: var(--surface); transition: transform 0.5s; }
.post-card:hover .post-image { transform: scale(1.05); }
.post-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.category-badge { background: var(--primary); color: #fff; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; display: inline-block; margin-bottom: 12px; }
.post-content h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; line-height: 1.4; color: var(--text-color); }
.post-meta { font-size: 0.85rem; color: #888; display: flex; align-items: center; gap: 10px; margin-top: auto; border-top: 1px solid var(--border-color); padding-top: 15px; }
.wp-bottom-menu { position: fixed; bottom: 0; left: 0; width: 100%; background: var(--surface); border-top: 1px solid var(--border-color); display: flex; justify-content: space-around; padding: 12px 0; z-index: 9999; }
.wp-bottom-menu a { display: flex; flex-direction: column; align-items: center; font-size: 0.75rem; color: var(--text-color); font-weight: 500; opacity: 0.7; }
.wp-bottom-menu a i { font-size: 1.4rem; margin-bottom: 4px; }
.wp-bottom-menu a.active { color: var(--primary); opacity: 1; }
@media (min-width: 768px) { .wp-bottom-menu { display: none; } body { padding-bottom: 0;}}
@media (max-width: 768px) { .hide-mobile { display: none !important; } }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.pagination span, .pagination .page-link { padding: 8px 15px; background: var(--surface); border: 1px solid var(--border-color); border-radius: 4px; cursor: pointer; font-weight: 600; color: var(--text-color); transition: 0.2s;}
.pagination .page-link:hover { background: var(--border-color); }
.pagination span.current { background: var(--primary); color: #fff; border-color: var(--primary); cursor: default; }
#site-footer, .site-footer { background: var(--footer-bg); color: #d1d5db; padding: 50px 0 20px 0; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 20px; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 40px; } }
.footer-bottom { text-align: center; padding-top: 30px; margin-top: 40px; border-top: 1px solid #374151; font-size: 0.85rem; color: #9ca3af; }


.admin-body { background: var(--light-bg); }
.admin-header { margin-bottom: 40px; }
.admin-container { max-width: 800px; background: var(--surface); padding: 30px; border-radius: 8px; border: 1px solid var(--border-color); box-shadow: 0 4px 6px rgba(0,0,0,0.05); margin: 0 auto; }
.login-box { max-width: 400px; margin-top: 100px; text-align: center; }
.login-box h2 { margin-bottom: 25px; color: var(--primary); }
.admin-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; border-bottom: 2px solid var(--border-color); padding-bottom: 15px; }
.admin-form .form-section { display: flex; flex-direction: column; margin-bottom: 20px; text-align: left; }
.admin-form label { font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; }
.admin-form input, .admin-form textarea, .admin-form select { padding: 10px; border: 1px solid var(--border-color); border-radius: 4px; font-family: inherit; background: var(--surface); color: var(--text-color);}
.admin-form input:focus, .admin-form textarea:focus { outline: none; border-color: var(--primary); }
.w-100 { width: 100%; }
.admin-post-card { display: flex; justify-content: space-between; align-items: center; padding: 15px; border: 1px solid var(--border-color); border-radius: 6px; margin-bottom: 15px; background: var(--surface); }
.admin-post-card h3 { font-size: 1.1rem; margin-bottom: 5px; color: var(--text-color);}
.btn-admin { display: inline-block; background: #333; color: #ffffff; padding: 10px 24px; border-radius: 6px; font-weight: 600; border: none; cursor: pointer; transition: 0.3s ease; text-decoration: none; }
.btn-admin:hover { background: var(--primary); color: #ffffff; }
.btn-view { display: inline-block; background: #216be9; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; font-size: 0.9rem; text-decoration: none; }
.btn-view:hover { background: #1555c0; color: white;}
.btn-edit { background: #4caf50; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; }
.btn-delete { background: #f44336; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; }
.modern-editor-body { background-color: #0d1117; color: #c9d1d9; height: 100vh; overflow: hidden; padding: 0; }
.app-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; background: #161b22; border-bottom: 1px solid #30363d; height: 60px; }
.app-bar-left, .app-bar-right { display: flex; align-items: center; gap: 15px; flex: 1; }
.app-bar-center { flex: 1; text-align: center; font-weight: 600; color: #8b949e; }
.app-bar-right { justify-content: flex-end; }
.back-btn { color: #c9d1d9; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 6px; transition: background 0.2s; border: none; cursor: pointer; }
.back-btn:hover { background: #21262d; }
.btn-publish { background: #238636; color: #fff; border: 1px solid rgba(240, 246, 252, 0.1); padding: 6px 16px; border-radius: 6px; font-weight: 600; cursor: pointer; }
.btn-publish:hover { background: #2ea043; }
.btn-settings, .btn-secondary { background: #21262d; color: #c9d1d9; border: 1px solid #30363d; padding: 6px 14px; border-radius: 6px; cursor: pointer; text-decoration: none; }
.btn-secondary:hover { background: #30363d; }
.editor-workspace { display: flex; height: calc(100vh - 60px); }
.editor-canvas { flex: 1; overflow-y: auto; padding: 40px 10%; background: #0d1117; }
.editor-sidebar { width: 380px; background: #161b22; border-left: 1px solid #30363d; overflow-y: auto; transition: width 0.3s ease; }
.editor-sidebar.hidden { width: 0; border: none; }
.canvas-title { width: 100%; background: transparent; border: none; color: #fff; font-size: 3rem; font-weight: 800; margin-bottom: 20px; outline: none; }
.canvas-title::placeholder { color: #484f58; }
.canvas-toolbar { display: flex; gap: 8px; background: #21262d; padding: 8px 12px; border-radius: 8px; border: 1px solid #30363d; margin-bottom: 20px; position: sticky; top: 0; z-index: 10; }
.canvas-toolbar button { background: transparent; border: none; color: #8b949e; font-size: 1rem; padding: 6px 10px; cursor: pointer; }
.canvas-toolbar button:hover { color: #fff; background: #30363d; }
.canvas-toolbar .divider { width: 1px; background: #30363d; margin: 0 5px; }
.canvas-content { width: 100%; height: 60vh; background: transparent; border: none; color: #c9d1d9; font-size: 1.2rem; line-height: 1.8; outline: none; resize: none; }
.canvas-content::placeholder { color: #484f58; }
.panel { border-bottom: 1px solid #30363d; }
.panel-header { padding: 18px 20px; font-weight: 600; color: #fff; cursor: pointer; display: flex; justify-content: space-between; }
.panel.collapsed .panel-body { display: none; }
.panel-body { padding: 0 20px 20px; }
.modern-input { width: 100%; background: #0d1117; border: 1px solid #30363d; color: #c9d1d9; padding: 10px 12px; border-radius: 6px; outline: none; }
.modern-input:focus { border-color: #58a6ff; }
.modern-input-group { display: flex; gap: 8px; }
.custom-checkbox-list { display: flex; flex-direction: column; gap: 12px; max-height: 200px; overflow-y: auto; margin-bottom: 15px; }
.custom-checkbox { display: flex; align-items: center; cursor: pointer; position: relative; padding-left: 28px; }
.custom-checkbox input { opacity: 0; position: absolute; }
.checkmark { position: absolute; left: 0; height: 18px; width: 18px; background-color: #0d1117; border: 1px solid #30363d; border-radius: 4px; }
.custom-checkbox input:checked ~ .checkmark { background-color: #58a6ff; border-color: #58a6ff; }
.checkmark:after { content: ""; position: absolute; display: none; left: 5px; top: 2px; width: 4px; height: 8px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.custom-checkbox input:checked ~ .checkmark:after { display: block; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.modern-tag { background: #21262d; border: 1px solid #30363d; padding: 4px 10px; border-radius: 12px; font-size: 0.85rem; display: flex; align-items: center; gap: 6px; }
.modern-tag i { cursor: pointer; color: #f85149; }
.input-group { margin-bottom: 15px; }
.input-group label { display: block; margin-bottom: 6px; font-size: 0.9rem; color: #8b949e; }
.char-counter { text-align: right; font-size: 0.75rem; color: #8b949e; margin-top: 4px; }
.seo-preview-box { background: #0d1117; border: 1px solid #30363d; border-radius: 8px; margin-bottom: 20px; overflow: hidden; }
.seo-preview-header { background: #21262d; padding: 8px 12px; font-size: 0.8rem; color: #8b949e; border-bottom: 1px solid #30363d; display: flex; justify-content: space-between; }
.google-snippet { padding: 15px; background: #202124; }
.g-url { color: #bdc1c6; font-size: 14px; display: block; margin-bottom: 4px; }
.g-title { color: #8ab4f8; font-size: 20px; font-weight: 400; margin: 0 0 4px 0; }
.g-desc { color: #bdc1c6; font-size: 14px; margin: 0; }
.toast { position: fixed; bottom: 20px; right: 20px; padding: 15px 25px; border-radius: 6px; color: #fff; font-weight: 600; z-index: 10000; opacity: 1; transition: opacity 0.3s ease, transform 0.3s ease; transform: translateY(0); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.toast.hidden { opacity: 0; transform: translateY(20px); pointer-events: none; }
.toast.success { background-color: #238636; border: 1px solid #2ea043; }
.toast.error { background-color: #da3633; border: 1px solid #f85149; }
.epaper-page { padding: 40px 0; min-height: 60vh; }
.epaper-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; background: var(--surface); padding: 20px; border-radius: 8px; border: 1px solid var(--border-color); }
.epaper-header h2 { color: var(--primary); font-size: 1.6rem; }
.epaper-search { display: flex; gap: 10px; align-items: center; }
.epaper-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 25px; }
.epaper-card { background: var(--surface); border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; text-align: center; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.epaper-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.epaper-card img { width: 100%; height: 320px; object-fit: cover; border-bottom: 1px solid var(--border-color); }


.carousel-container { position: relative; display: flex; align-items: center; width: 100%; overflow: hidden; }

.carousel-track { 
    display: flex; 
    gap: 20px; 
    width: 100%; 

    padding: 60px 33.333% !important; 
    scroll-snap-type: x mandatory; 
    scroll-behavior: smooth;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }


.carousel-card { 
   
    flex: 0 0 320px !important;
    width: 320px !important;
    scroll-snap-align: center;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    
  
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease !important;
    opacity: 0.5 !important;
    transform: scale(0.75) !important;
}


.carousel-card.active-card { 
    
    opacity: 1 !important;
    transform: scale(1.15) !important;
    z-index: 10 !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}


.carousel-card img { width: 100%; height: 200px; object-fit: cover; }
.carousel-content { padding: 15px; display: flex; flex-direction: column; flex-grow: 1; justify-content: space-between; }
.carousel-title { font-size: 1.1rem; font-weight: 700; color: var(--text-color); margin: 10xp 0 0.5px 0; }


.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.6); color: white; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; z-index: 20; }
.left-btn { left: 10px; }
.right-btn { right: 10px; }


.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 15px; }
.dot { height: 8px; width: 25px; border-radius: 4px; background: #ccc; cursor: pointer; }
.dot.active { background: var(--primary); width: 40px; }

.carousel-card.active-card {
    flex-direction: column !important; 
    width: 700px !important; 
    height: auto !important; 
    flex: 0 0 700px !important;
    transform: scale(1.15) !important;
    max-width: none !important;
}


.carousel-card.active-card img {
    width: 100% !important; 
    height: 250px !important; 
    object-fit: cover !important;
    max-width: none !important;
    flex-shrink: 0 !important;
}


.carousel-card.active-card .carousel-content {
    width: 100% !important; 
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important; 
    align-items: center !important; 
    text-align: center !important;
    padding: 20px !important;
    gap: 15px !important;
}

.master-table-container { width: 100%; overflow-x: auto; background: var(--surface); border-radius: 8px; border: 1px solid var(--border-color); margin-bottom: 30px; }
.master-table { width: 100%; border-collapse: collapse; min-width: 900px; text-align: left; }
.master-table th { background-color: var(--light-bg); color: var(--text-color); padding: 15px; font-size: 0.85rem; text-transform: uppercase; border-bottom: 2px solid var(--border-color); white-space: nowrap !important ; word-break: normal !important; }
.master-table td { padding: 15px; border-bottom: 1px solid var(--border-color); color: var(--text-color); vertical-align: middle; white-space: nowrap !important ; word-break: normal !important; }
.master-table tr:hover { background: var(--light-bg); }

*, *::before, *::after, 
.post-content, .post-content p, .post-content div, 
.article-content, .article-content p, .article-content div,
.comments-section, .comment-body, 
div[class*="content"] {
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-all !important; 
    max-width: 100% !important;
}
.bottom-nav a[href*="admin-login"], 
.nav-item[href*="admin"],
.mobile-nav a:last-child {
    display: none !important;
}

@media (max-width: 768px) {
    .admin-container, .dashboard-layout {
        flex-direction: column !important;
        display: flex !important;
        width: 100% !important;
        padding: 10px !important;
        margin: 0 !important;
    }

    .posts-grid, .news-container, .article-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        padding: 0 10px !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    .sidebar, .control-panel, .main-content {
        width: 100% !important;
        max-width: 100% !important;
    }

    h1, h2, h3, .card-title {
        word-break: normal !important;
        overflow-wrap: break-word;
    }
    
    .admin-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .post-card, .news-card {
        width: 100% !important;
        margin: 0 !important;
    }

    article img, .post-content img, .featured-media img {
        max-width: 100% !important;
        height: auto !important;
        border-radius: 8px;
    }

    body, .main-wrapper {
        overflow-x: hidden;
        padding: 0 !important;
    }
    .site-footer{
        padding-bottom: 80px !important;
    }

    .wp-bottom-menu a[href*="admin"], 
    .wp-bottom-menu a:last-child {
        display: none !important;
    }

    .editor-workspace {
        display: flex;
        flex-direction: column ;
        align-items: flex-start;
        gap: 24px;
        max-width: 1400px;
        margin: 0 auto;
        padding: 20px;
        height: auto ;
        overflow: visible ;
    }
    
    .editor-sidebar {
        display: none;
        width: 100% ;
        flex-shrink: 0;
        border-left: none ;
        border-top: 2px solid #30363d ;
    }

    .editor-sidebar.mobile-open {
      display: block !important;
    }


    .editor-canvas {
        flex: 1;
        min-width: 0;
        padding: 20px !important;
        width: 100% !important;
        min-height: 50vh !important;
    }
    
    .app-bar {
        height: auto !important;
        flex-wrap: wrap !important;
        padding: 15px 10px !important;
        gap: 10px;
    }
    .error-toast, .notification-box, [class*="error"] {
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        max-width: 90% !important;
        z-index: 9999 !important;
    }

html, body {
    height: 100% !important;
    margin: 0 !important;
    overflow-x: hidden !important;
}

.modern-editor-body {
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
}

.wp-bottom-menu, footer {
    margin-top: auto !important;
}
}