:root {
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1100px;

    /* Light Theme Hardcoded */
    --bg-primary: #fcfcfc;
    --bg-secondary: #ffffff;
    --text-primary: #111111;
    --text-secondary: #666666;
    --accent-color: #1e3a8a;
    --accent-glow: rgba(30, 58, 138, 0.1);
    --border-color: #eeeeee;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 1.2rem 0;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-group {
    display: flex;
    flex-direction: column;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.subtitle {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.5;
    margin-top: 2px;
}

.header-center {
    flex: 1;
    max-width: 450px;
    margin: 0 3rem;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 0.3rem 1rem;
    transition: var(--transition);
}

.search-bar:focus-within {
    background: #fff;
    box-shadow: 0 0 0 2px var(--accent-color);
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.6rem;
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
}

.search-bar input:focus {
    outline: none;
}

.search-icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.btn-admin {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--text-primary);
    color: #fff;
    padding: 0.8rem 1.6rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background: #000;
}

/* Section Labels */
.section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

/* Highlights Section Refined */
.highlights {
    padding: 3rem 0;
}

.highlight-slider {
    margin: 0 -1rem;
    overflow-x: auto;
    padding: 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.highlight-track {
    display: flex;
    gap: 1.5rem;
}

.highlight-card {
    min-width: 320px;
    height: 440px;
    flex: 1;
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.highlight-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.highlight-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.highlight-card .highlight-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.highlight-card .category {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: var(--accent-color);
    padding: 4px 12px;
    border-radius: 6px;
    width: fit-content;
    margin-bottom: 1rem;
}

.highlight-card .title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

/* No Cover Highlight */
.highlight-card.no-cover {
    background: #f8fafc;
    border: 1px solid var(--border-color);
}

.highlight-card.no-cover .highlight-content {
    background: transparent;
    color: var(--text-primary);
    position: relative;
    height: 100%;
    justify-content: center;
    text-align: center;
}

.highlight-card.no-cover .category {
    margin: 0 auto 1.5rem;
    background: #e2e8f0;
    color: #475569;
}

/* All Posts Section */
.all-posts {
    padding: 4rem 0 8rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.sort-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* All Posts List Refined */
.posts-list {
    display: grid;
    gap: 1.5rem;
}

.post-item {
    display: flex;
    gap: 2.5rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.post-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transform: translateY(-4px);
}

.post-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-category {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.post-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.post-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    line-height: 1.6;
}

.post-meta {
    margin-top: auto;
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
}

.post-img {
    width: 200px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
}

.post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-item:hover .post-img img {
    transform: scale(1.1);
}

/* News Style List Adjustments */
.post-item.no-cover {
    background: #fff;
}

.post-item.no-cover .post-text {
    max-width: 100%;
}


/* --- Premium Responsive Optimizations --- */
@media (max-width: 1024px) {
    .container {
        padding: 0 40px;
    }

    .highlight-card {
        min-width: 300px;
        height: 400px;
    }

    .header-center {
        margin: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 0;
    }

    .container {
        padding: 0 24px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.6rem;
        letter-spacing: 2px;
    }

    .header-center {
        margin: 0 1rem;
    }

    .search-bar {
        padding: 0.2rem 0.8rem;
    }

    .search-bar input {
        padding: 0.5rem;
    }

    .btn-admin {
        padding: 0.6rem 1.2rem;
    }

    .btn-admin span {
        display: none;
    }

    .highlights {
        padding: 2rem 0;
    }

    .highlight-card {
        min-width: 260px;
        height: 360px;
        border-radius: 20px;
    }

    .highlight-card .title {
        font-size: 1.2rem;
    }

    .all-posts {
        padding: 2rem 0 4rem;
    }

    .post-item {
        flex-direction: column-reverse;
        gap: 1.2rem;
        padding: 1.5rem;
        border-radius: 16px;
    }

    .post-img {
        width: 100%;
        height: 180px;
    }

    .post-title {
        font-size: 1.25rem;
    }

    .post-subtitle {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    .logo-group .subtitle {
        display: none;
    }

    .logo {
        font-size: 1.3rem;
    }

    header .container {
        gap: 10px;
    }

    .header-center {
        flex: 1;
        max-width: none;
        margin: 0;
    }

    .search-bar {
        border-radius: 10px;
    }

    .header-actions {
        display: none;
        /* Move to bottom or hide on tiny screens */
    }

    .section-label {
        font-size: 0.7rem;
        margin-bottom: 1rem;
    }

    .highlight-card {
        min-width: 240px;
        height: 320px;
    }

    .highlight-card .highlight-content {
        padding: 1.5rem;
    }

    .post-item {
        padding: 1.2rem;
    }

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

    .ad-wrapper-feed {
        margin: 2.5rem 0;
        padding: 1.5rem;
        min-height: 200px;
    }
}

/* --- Additional Home UI Refinements --- */
.highlight-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.highlight-card:hover {
    transform: scale(0.98);
}

.post-item {
    cursor: pointer;
    transition: background 0.2s ease;
}

.post-item:hover {
    background: #f8fafc;
}

.meta-item small {
    display: block;
    font-weight: 700;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.meta-item p {
    margin: 0;
    font-size: 0.9rem;
}

/* --- Ads Styling - Premium & Clean --- */
.ad-wrapper {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(30, 58, 138, 0.08);
    margin-bottom: 2.5rem;
    overflow: hidden;
    min-height: 100px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    position: relative;
}

.ad-wrapper-feed {
    margin: 4rem 0;
    padding: 2rem;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    text-align: center;
    min-height: 280px;
    position: relative;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.01);
}

.ad-wrapper::before,
.ad-wrapper-feed::before,
.ad-wrapper-article::before {
    content: "ADVERTISEMENT";
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    color: #cbd5e1;
    margin-bottom: 1rem;
    letter-spacing: 0.15em;
    text-align: center;
}

.ad-wrapper:hover,
.ad-wrapper-feed:hover {
    border-color: var(--accent-glow);
}