/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    color: #333;
    line-height: 1.6;
}

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

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #0088cc;
    color: white;
}

.btn-primary:hover {
    background: #006699;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    margin: 0 2px;
}

/* ===== ADMIN LAYOUT ===== */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav a {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 3px solid #0088cc;
}

.sidebar-user {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
}

/* ===== ADMIN HEADER ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
}

/* ===== TABLE ===== */
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ===== FORMS ===== */
.form-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0088cc;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
}

.blog-container {
    display: flex;
    gap: 40px;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state p {
    font-size: 16px;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 24px;
}

/* ===== FRONTEND ===== */
/* ===== FRONTEND BANNER GRID ===== */
.site-header {
    background: #1a1a1a;
    color: white;
    padding: 10px 0;
    text-align: center;
}

.site-header h1 {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.site-main {
    padding: 0;
    background: #ffffff;
    min-height: 0;
}

.container {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.reklam-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile: 1 column */
    gap: 0;
    min-height: 100vh;
    align-content: start;
}

@media (min-width: 768px) {
    .reklam-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Desktop/Tablet: 2 columns */
    }
}

.reklam-banner {
    display: block;
    width: 100%;
    height: 120px;
    /* Fixed height for uniformity */
    border-radius: 0;
    overflow: hidden;
    position: relative;
    background: #000;
    border: 1px solid #111;
}

@media (max-width: 768px) {
    .reklam-banner {
        height: 90px;
        /* Slightly smaller on mobile */
    }
}

.reklam-banner.full-width {
    grid-column: 1 / -1;
    /* Height remains the same or can be adjusted if needed */
}

.reklam-banner:hover {
    z-index: 2;
    filter: brightness(1.1);
}

.reklam-banner img {
    width: 100%;
    height: 100%;
    /* Fill the fixed height */
    display: block;
    object-fit: cover;
}

.site-footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.seo-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: left;
}

.seo-content h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #00d4ff;
}

.seo-content h3 {
    font-size: 20px;
    margin: 20px 0 10px;
    color: #00d4ff;
}

.seo-content h4 {
    font-size: 18px;
    margin: 18px 0 8px;
    color: #00b8e6;
}

.seo-content p {
    line-height: 1.8;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.seo-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.seo-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.seo-content li {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.85);
}

.seo-content strong {
    color: #00d4ff;
    font-weight: 600;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.footer-bottom a {
    color: #00d4ff;
    text-decoration: none;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }


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

/* ===== BLOG / SEO SECTION ===== */
/* This mimics the requested blog layout */
.blog-section {
    background: #f6f6f6;
    padding: 50px 0;
    margin-top: 20px;
    border-top: 1px solid #e8e8e8;
    color: #444;
    text-align: left !important;
    display: block;
}

.blog-section .blog-container {
    display: flex;
    gap: 36px;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0 24px;
    align-items: flex-start;
}

.blog-main {
    flex: 3;
}

.blog-sidebar {
    flex: 1;
    min-width: 260px;
    text-align: left;
}

/* Post Item */
.blog-post {
    margin-bottom: 26px;
    padding: 24px 26px;
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    /* Ensure internal text is valid */
    text-align: left;
}

.post-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #222;
    line-height: 1.3;
}

.post-title a {
    color: #222;
    text-decoration: none;
}

.post-title a:hover {
    color: #0073aa;
}

.post-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 12px;
}

.post-meta a {
    color: #666;
    text-decoration: none;
}

.post-meta span + span::before {
    content: "/";
    color: #bbb;
    padding: 0 6px;
}

.post-excerpt {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 10px;
}

.post-excerpt .read-more {
    color: #0073aa;
    text-decoration: none;
    font-size: 13px;
    margin-left: 6px;
    white-space: nowrap;
}

.post-excerpt .read-more:hover {
    text-decoration: underline;
}

.post-footer {
    font-size: 12px;
    margin-top: 10px;
    color: #888;
}

.post-footer .post-cat a {
    color: #666;
    text-decoration: none;
}

.post-footer .post-cat a:hover {
    color: #0073aa;
}

/* Sidebar Widgets */
.widget {
    margin-bottom: 28px;
}

.widget-title {
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 8px;
    margin-bottom: 12px;
    color: #333;
}

.widget-list {
    list-style: none;
    padding: 0;
}

.widget-list li {
    margin-bottom: 8px;
    border-bottom: 1px solid #f1f1f1;
    padding-bottom: 6px;
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list a {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}

.widget-list a:hover {
    text-decoration: underline;
}

.tag-cloud a {
    display: inline-block;
    background: #f0f0f0;
    padding: 5px 10px;
    margin: 0 6px 6px 0;
    border-radius: 3px;
    color: #555;
    text-decoration: none;
    font-size: 12px;
}

.tag-cloud a:hover {
    background: #e6e6e6;
}

/* SEO Legacy Content (when no posts) */
.seo-content-legacy {
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    padding: 24px 26px;
    color: #444;
    line-height: 1.8;
    text-align: left;
}

.seo-content-legacy h1,
.seo-content-legacy h2,
.seo-content-legacy h3,
.seo-content-legacy h4 {
    color: #222;
    margin: 16px 0 8px;
    line-height: 1.3;
}

.seo-content-legacy h2 {
    font-size: 22px;
}

.seo-content-legacy h3 {
    font-size: 19px;
}

.seo-content-legacy h4 {
    font-size: 17px;
}

.seo-content-legacy p {
    margin-bottom: 14px;
}

.seo-content-legacy ul,
.seo-content-legacy ol {
    margin: 0 0 14px 20px;
}

.seo-content-legacy li {
    margin-bottom: 8px;
}

.seo-content-legacy img {
    max-width: 100%;
    height: auto;
}

/* Single Post */
.single-post .post-title {
    font-size: 32px;
    margin-bottom: 10px;
}

.single-post .post-content {
    font-size: 16px;
    line-height: 1.8;
    margin-top: 20px;
}

/* Post Content in List View */
.post-content {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    text-align: left !important;
    margin-bottom: 20px;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6,
.post-content p {
    text-align: left !important;
}

.single-post .post-content h2 {
    font-size: 24px;
    margin: 20px 0 10px;
    color: #333;
}

.single-post .post-content h3 {
    font-size: 20px;
    margin: 15px 0 10px;
    color: #333;
}

.single-post .post-content p {
    margin-bottom: 15px;
}

/* Responsive Blog */
@media (max-width: 768px) {
    .blog-section .blog-container {
        flex-direction: column;
        padding: 0 14px;
    }

    .blog-sidebar {
        margin-top: 30px;
    }

    .blog-post {
        padding: 20px;
    }

    .seo-content-legacy {
        padding: 18px;
    }

    .post-title {
        font-size: 18px;
    }

    .post-meta {
        font-size: 11px;
    }

    .post-content {
        font-size: 14px;
        line-height: 1.65;
    }

    .post-content h2 {
        font-size: 18px;
    }

    .post-content h3 {
        font-size: 16px;
    }

    .post-content ul,
    .post-content ol {
        list-style: none;
        margin-left: 0;
        padding-left: 0;
    }

    .post-content li {
        margin-bottom: 6px;
    }
}

/* Mobile devices while keeping desktop layout */
@media (max-device-width: 768px) {
    .post-title {
        font-size: 18px;
    }

    .post-meta {
        font-size: 11px;
    }

    .post-content {
        font-size: 14px;
        line-height: 1.65;
    }

    .post-content h2 {
        font-size: 18px;
    }

    .post-content h3 {
        font-size: 16px;
    }

    .post-content ul,
    .post-content ol {
        list-style: none;
        margin-left: 0;
        padding-left: 0;
    }

    .post-content li {
        margin-bottom: 6px;
    }
}
