/* =========================================
   xPress24
   Global Styles
   ========================================= */

:root {
    --xp-black: #111111;
    --xp-dark: #1b1b1b;
    --xp-red: #d71920;
    --xp-light: #f5f5f5;
    --xp-border: #dddddd;
    --xp-text: #222222;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Noto Sans Telugu", "Nirmala UI", Arial, sans-serif;
    color: var(--xp-text);
    background: #ffffff;
}

a {
    text-decoration: none;
    color: inherit;
}

.xpress24-container {
    width: min(1200px, calc(100% - 30px));
    margin: 0 auto;
}

/* =========================================
   TOP BAR
   ========================================= */

.xpress24-topbar {
    background: var(--xp-black);
    color: #ffffff;
    font-size: 13px;
}

.topbar-inner {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-separator {
    margin: 0 8px;
    opacity: 0.5;
}

/* =========================================
   HEADER
   ========================================= */

.xpress24-header {
    background: #ffffff;
    border-bottom: 1px solid var(--xp-border);
}

.header-inner {
    min-height: 105px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.xpress24-logo {
    font-family: Arial, sans-serif;
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -3px;
}

.logo-x,
.logo-24 {
    color: var(--xp-red);
}

.header-tagline {
    color: #666666;
    font-size: 18px;
}

/* =========================================
   NAVIGATION
   ========================================= */

.xpress24-nav {
    background: var(--xp-black);
    color: #ffffff;
}

.nav-inner {
    display: flex;
    align-items: stretch;
    min-height: 48px;
    overflow: visible;
}

    .nav-inner > a,
    .nav-more-toggle {
        display: flex;
        align-items: center;
        padding: 0 16px;
        white-space: nowrap;
        font-size: 15px;
        cursor: pointer;
    }

        .nav-inner > a:hover,
        .nav-more:hover > span {
            background: var(--xp-red);
        }

.nav-home {
    background: var(--xp-red);
}

.nav-more {
    position: relative;
    display: flex;
    align-items: stretch;
}

.nav-more-toggle {
    border: none;
    outline: none;
    background: transparent;
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 16px;
    font-family: inherit;
    font-size: 15px;
    white-space: nowrap;
    cursor: pointer;
}

    .nav-more-toggle:hover,
    .nav-more-toggle:focus {
        background: var(--xp-red);
    }

.nav-more-menu {
    position: absolute;
    top: 48px;
    right: 0;
    min-width: 190px;
    background: var(--xp-black);
    z-index: 9999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

    .nav-more-menu a {
        display: block;
        padding: 11px 16px;
        white-space: nowrap;
        color: #ffffff;
        text-decoration: none;
    }

        .nav-more-menu a:hover {
            background: var(--xp-red);
        }

/* =========================================
   BREAKING NEWS
   ========================================= */

.xpress24-breaking {
    background: var(--xp-red);
    color: #ffffff;
}

.breaking-inner {
    min-height: 42px;
    display: flex;
    align-items: center;
}

.breaking-label {
    font-weight: 700;
    white-space: nowrap;
    padding-right: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.35);
}

.breaking-text {
    padding-left: 20px;
    overflow: hidden;
    white-space: nowrap;
}

/* =========================================
   CONTENT
   ========================================= */

.xpress24-content {
    min-height: 600px;
    padding-top: 30px;
    padding-bottom: 40px;
}

/* =========================================
   FOOTER
   ========================================= */

.xpress24-footer {
    background: var(--xp-black);
    color: #ffffff;
    text-align: center;
    padding: 35px 0;
}

.footer-brand {
    font-family: Arial, sans-serif;
    font-size: 32px;
    font-weight: 900;
}

.xpress24-footer p {
    margin: 8px 0;
}

.footer-copy {
    font-size: 13px;
    color: #aaaaaa;
}

/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 768px) {

    .header-inner {
        min-height: 80px;
    }

    .xpress24-logo {
        font-size: 38px;
    }

    .header-tagline {
        display: none;
    }

    .topbar-inner {
        font-size: 11px;
    }

    .nav-inner {
        width: 100%;
    }

        .nav-inner > a,
        .nav-more-toggle {
            padding: 0 13px;
            font-size: 14px;
        }

    .xpress24-container {
        width: min(100% - 20px, 1200px);
    }
}

.rss-test {
    padding: 20px 0;
}

    .rss-test h1 {
        border-left: 5px solid var(--xp-red);
        padding-left: 12px;
        margin-bottom: 25px;
    }

.rss-news-item {
    border-bottom: 1px solid var(--xp-border);
    padding: 18px 0;
}

    .rss-news-item h2 {
        font-size: 21px;
        margin: 0 0 8px;
    }

        .rss-news-item h2 a:hover {
            color: var(--xp-red);
        }

    .rss-news-item p {
        color: #555;
        line-height: 1.7;
        margin: 5px 0;
    }

    .rss-news-item small {
        color: #888;
    }

/* =========================================
   xPress24 Homepage
   ========================================= */

.xp-loading,
.xp-empty {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Advertisement */

.xp-ad-banner {
    height: 90px;
    border: 1px dashed #cccccc;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999999;
    margin-bottom: 30px;
    font-size: 13px;
}

/* Home Grid */

.xp-home-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Section Title */

.xp-section-title {
    border-left: 5px solid var(--xp-red);
    padding-left: 12px;
    margin-bottom: 18px;
}

    .xp-section-title h2 {
        margin: 0;
        font-size: 25px;
    }

/* Hero */

.xp-hero-news {
    border: 1px solid var(--xp-border);
    background: #ffffff;
}

.xp-hero-content {
    padding: 25px;
}

    .xp-hero-content h1 {
        font-size: 32px;
        line-height: 1.35;
        margin: 8px 0 15px;
    }

        .xp-hero-content h1 a:hover {
            color: var(--xp-red);
        }

    .xp-hero-content p {
        font-size: 17px;
        line-height: 1.8;
        color: #666666;
    }

/* News Source */

.xp-news-source {
    color: var(--xp-red);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
}

/* News Date */

.xp-news-date {
    color: #888888;
    font-size: 12px;
    margin-top: 8px;
}

/* News Card */

.xp-news-card {
    border-bottom: 1px solid var(--xp-border);
    padding: 0 0 15px;
    margin-bottom: 15px;
}

    .xp-news-card h2 {
        font-size: 19px;
        line-height: 1.5;
        margin: 5px 0;
    }

        .xp-news-card h2 a:hover {
            color: var(--xp-red);
        }

    .xp-news-card p {
        color: #666666;
        font-size: 14px;
        line-height: 1.6;
        margin: 5px 0;
    }

/* More News */

.xp-latest-section {
    margin-top: 30px;
}

.xp-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

    .xp-news-grid .xp-news-card {
        border: 1px solid var(--xp-border);
        padding: 18px;
        margin: 0;
    }

/* Mobile */

@media (max-width: 900px) {

    .xp-home-grid {
        grid-template-columns: 1fr;
    }

    .xp-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .xp-hero-content h1 {
        font-size: 26px;
    }
}

@media (max-width: 600px) {

    .xp-news-grid {
        grid-template-columns: 1fr;
    }

    .xp-hero-content {
        padding: 18px;
    }

        .xp-hero-content h1 {
            font-size: 23px;
        }

    .xp-section-title h2 {
        font-size: 21px;
    }
}

.xp-hero-content h1:focus {
    outline: none;
}

/* =========================================
   News Images
   ========================================= */

.xp-hero-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
}

    .xp-hero-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.xp-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eeeeee;
    color: #999999;
    font-size: 28px;
    font-weight: 700;
}

.xp-news-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 15px;
}

    .xp-news-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .xp-news-card-image .xp-image-placeholder {
        min-height: 0;
        font-size: 22px;
    }

.xp-news-card-body {
    padding: 0;
}

.xp-admin-layout {
    min-height: 100vh;
    background: #f5f5f5;
}

.xp-admin-header {
    height: 64px;
    background: #111111;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
}

.xp-admin-brand {
    font-size: 24px;
    font-weight: 700;
}

    .xp-admin-brand span {
        color: #e31b23;
        font-size: 15px;
        margin-left: 5px;
    }

.xp-admin-user {
    font-size: 14px;
}

.xp-admin-body {
    display: flex;
    min-height: calc(100vh - 64px);
}

.xp-admin-sidebar {
    width: 230px;
    background: #1f1f1f;
}

    .xp-admin-sidebar nav {
        display: flex;
        flex-direction: column;
    }

    .xp-admin-sidebar a {
        color: #dddddd;
        text-decoration: none;
        padding: 14px 20px;
        border-bottom: 1px solid #333333;
        font-size: 15px;
    }

        .xp-admin-sidebar a:hover {
            background: #333333;
            color: #ffffff;
        }

        .xp-admin-sidebar a.active {
            background: #e31b23;
            color: #ffffff;
        }

.xp-admin-divider {
    height: 20px;
}

.xp-admin-content {
    flex: 1;
    padding: 30px;
}

.xp-admin-page {
    background: #ffffff;
    padding: 30px;
    border: 1px solid #dddddd;
}

    .xp-admin-page h1 {
        margin-top: 0;
    }


.xp-test-button {
    background: #e31b23;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
}

    .xp-test-button:hover {
        opacity: 0.9;
    }

    .xp-test-button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }


/* =========================================
   NEWS EDITOR
   ========================================= */

.xp-news-editor {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

.xp-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

    .xp-editor-header h1 {
        margin: 0;
        font-size: 30px;
        font-weight: 700;
    }

.xp-editor-subtitle {
    margin-top: 6px;
    color: #6b7280;
    font-size: 14px;
}

.xp-editor-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.xp-editor-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid transparent;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.xp-editor-btn-primary {
    background: #111827;
    color: white;
}

.xp-editor-btn-secondary {
    background: white;
    color: #374151;
    border-color: #d1d5db;
}

.xp-editor-message {
    margin-bottom: 20px;
    padding: 12px 15px;
    border-radius: 6px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.xp-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 25px;
    align-items: start;
}

.xp-editor-main,
.xp-editor-sidebar {
    min-width: 0;
}

.xp-editor-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.xp-editor-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.xp-editor-sidebar .xp-editor-card {
    margin-bottom: 0;
}

.xp-editor-card-header {
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 16px;
    font-weight: 700;
}

.xp-editor-card-body {
    padding: 20px;
}

.xp-form-group {
    margin-bottom: 20px;
}

    .xp-form-group:last-child {
        margin-bottom: 0;
    }

    .xp-form-group label {
        display: block;
        margin-bottom: 7px;
        font-size: 14px;
        font-weight: 600;
        color: #374151;
    }

.xp-form-control {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #111827;
    font-family: inherit;
    font-size: 15px;
}

    .xp-form-control:focus {
        outline: none;
        border-color: #6b7280;
        box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.12);
    }

.xp-textarea-short {
    min-height: 110px;
    resize: vertical;
}

.xp-textarea-content {
    min-height: 500px;
    resize: vertical;
    line-height: 1.7;
}

.xp-featured-image {
    display: block;
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 6px;
}

.xp-media-empty {
    padding: 25px 10px;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 6px;
}

.xp-image-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.xp-image-item img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

.xp-image-item div {
    margin-top: 5px;
    color: #6b7280;
    font-size: 12px;
}

.xp-video-item video {
    display: block;
    width: 100%;
    max-height: 250px;
    border-radius: 6px;
    background: #000;
}

.xp-video-title {
    margin-top: 7px;
    font-size: 13px;
    color: #4b5563;
}

.xp-editor-loading,
.xp-editor-error {
    padding: 30px;
}

@media (max-width: 1000px) {

    .xp-editor-grid {
        grid-template-columns: 1fr;
    }

    .xp-editor-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

@media (max-width: 700px) {

    .xp-news-editor {
        padding: 15px;
    }

    .xp-editor-header {
        flex-direction: column;
        align-items: stretch;
    }

    .xp-editor-actions {
        justify-content: flex-start;
    }

    .xp-editor-sidebar {
        display: flex;
    }

    .xp-image-grid {
        grid-template-columns: 1fr;
    }
}

.xp-image-featured {
    border: 2px solid #111827;
    border-radius: 8px;
    padding: 4px;
}

.xp-image-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 7px;
}

.xp-featured-label {
    font-size: 12px;
    font-weight: 700;
    color: #111827;
}

.xp-feature-button {
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 5px;
    padding: 5px 8px;
    font-size: 12px;
    cursor: pointer;
}

    .xp-feature-button:hover {
        background: #f3f4f6;
    }


.xp-upload-area {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
}

.xp-upload-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.xp-upload-area input[type="file"] {
    display: block;
    width: 100%;
    margin-bottom: 8px;
}

.xp-upload-area small {
    color: #6b7280;
    font-size: 12px;
}

/* =========================================
   Admin News Table
   ========================================= */

.xp-admin-page .xp-news-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

    .xp-admin-page .xp-news-table th,
    .xp-admin-page .xp-news-table td {
        border: 1px solid #d9dee5;
        padding: 12px 14px;
        vertical-align: middle;
    }

    .xp-admin-page .xp-news-table th {
        background: #f3f4f6;
        color: #1f2937;
        font-weight: 600;
        white-space: nowrap;
    }

    .xp-admin-page .xp-news-table tbody tr:hover {
        background: #f8fafc;
    }

    .xp-admin-page .xp-news-table td {
        color: #374151;
    }

        .xp-admin-page .xp-news-table td:first-child {
            width: 70px;
            text-align: center;
        }

        .xp-admin-page .xp-news-table td:last-child {
            width: 90px;
            text-align: center;
        }

/* =========================================
   News Preview
   ========================================= */

.xp-news-preview {
    min-height: 100vh;
    padding: 40px 20px;
    background: #f5f6f8;
}

.xp-news-preview-article {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px;
    background: #ffffff;
    border: 1px solid #e1e5ea;
    border-radius: 8px;
}

.xp-news-preview-label {
    display: inline-block;
    margin-bottom: 18px;
    padding: 5px 10px;
    background: #dc2626;
    color: #ffffff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.xp-news-preview-article h1 {
    margin: 0 0 18px;
    font-size: 38px;
    line-height: 1.25;
    color: #111827;
}

.xp-news-preview-description {
    margin-bottom: 18px;
    font-size: 18px;
    line-height: 1.6;
    color: #4b5563;
}

.xp-news-preview-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    font-size: 14px;
    color: #6b7280;
}

.xp-news-preview-featured {
    display: block;
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    margin-bottom: 30px;
    border-radius: 6px;
}

.xp-news-preview-content {
    font-size: 18px;
    line-height: 1.9;
    color: #1f2937;
    white-space: pre-wrap;
}

.xp-news-preview-images,
.xp-news-preview-videos {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

    .xp-news-preview-images h3,
    .xp-news-preview-videos h3 {
        margin-bottom: 20px;
    }

.xp-news-preview-image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

    .xp-news-preview-image-grid img {
        width: 100%;
        display: block;
        border-radius: 6px;
    }

.xp-news-preview-video {
    margin-bottom: 30px;
}

    .xp-news-preview-video video {
        width: 100%;
        max-height: 550px;
        display: block;
        background: #000;
        border-radius: 6px;
    }

.xp-news-preview-video-title {
    margin-top: 8px;
    font-weight: 600;
}

.xp-news-preview-footer {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {

    .xp-news-preview {
        padding: 15px;
    }

    .xp-news-preview-article {
        padding: 20px;
    }

        .xp-news-preview-article h1 {
            font-size: 28px;
        }

    .xp-news-preview-content {
        font-size: 17px;
    }

    .xp-news-preview-image-grid {
        grid-template-columns: 1fr;
    }
}

.xp-top-ad {
    width: 100%;
    max-width: 1200px;
    margin: 15px auto;
    overflow: hidden;
}

.xp-top-ad-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* More News */

.xp-latest-section {
    margin-top: 30px;
}

.xp-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

    .xp-news-grid .xp-news-card {
        min-width: 0;
        border: 1px solid var(--xp-border);
        padding: 18px;
        margin: 0;
        overflow: hidden;
    }

.xp-card-image {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin-bottom: 15px;
}

