/* ==========================================================================
   News Portal Stylesheet - style.css
   ========================================================================== */

/* 1. Global Variables & Root */
:root {
    --primary-color: #dc2626;      /* Crimson Red */
    --secondary-color: #2563eb;    /* Royal Blue */
    --bg-color: #f8fafc;           /* Light slate background */
    --card-bg: #ffffff;            /* Card/Surface background */
    --border-color: #e5e7eb;       /* Border gray */
    --text-color: #1f2937;         /* Dark charcoal body text */
    --text-muted: #6b7280;         /* Gray description text */
    --light-accent: #f1f5f9;       /* Light gray highlight */
    --font-primary: 'Noto Sans', sans-serif;
    --font-telugu: 'Noto Sans Telugu', 'Noto Sans', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.05);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. Base Reset & Font Settings */
body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Override font-family for elements that might display Telugu */
.telugu-text, 
h1, h2, h3, h4, h5, h6,
.navbar-nav, .nav-link,
.card-title,
.breaking-news-ticker,
.rich-text-editor-area {
    font-family: var(--font-telugu);
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition-base);
}
a:hover {
    color: var(--primary-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 3. Header & Navigation */
.top-header {
    background-color: #0f172a;
    color: #f8fafc;
    padding: 8px 0;
    font-size: 0.85rem;
}
.top-header a {
    color: #cbd5e1;
}
.top-header a:hover {
    color: #ffffff;
}

.logo-area {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 25px 0;
}
.main-logo {
    font-family: var(--font-telugu);
    font-weight: 800;
    font-size: 2.5rem;
    color: #0f172a;
    letter-spacing: -1px;
}
.main-logo span {
    color: var(--primary-color);
}

.navbar-main {
    background-color: #ffffff;
    border-bottom: 3px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    z-index: 1020;
}
.navbar-main.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    animation: slideDown 0.3s ease-out;
    box-shadow: var(--shadow-md);
}
@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.navbar-main .nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 15px 12px !important;
    text-transform: uppercase;
    position: relative;
}
.navbar-main .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 3px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition-base);
}
.navbar-main .nav-link:hover::after,
.navbar-main .nav-item.active .nav-link::after {
    transform: scaleX(1);
}
.navbar-main .nav-link:hover,
.navbar-main .nav-item.active .nav-link {
    color: var(--primary-color) !important;
}

/* 4. Breaking News Ticker */
.breaking-news-container {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: stretch;
    height: 46px;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
}
.breaking-title {
    background: var(--primary-color);
    color: #ffffff;
    font-weight: bold;
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    font-size: 0.9rem;
    white-space: nowrap;
}
.breaking-title::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 23px solid transparent;
    border-bottom: 23px solid transparent;
    border-left: 15px solid var(--primary-color);
    z-index: 2;
}
.breaking-news-ticker {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 20px;
}
.ticker-wrap {
    width: 100%;
    overflow: hidden;
}
.ticker-move {
    display: inline-block;
    white-space: nowrap;
    animation: ticker 30s linear infinite;
}
.ticker-item {
    display: inline-block;
    padding: 0 2rem;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
}
.ticker-item span {
    color: var(--primary-color);
    margin-right: 8px;
}
.ticker-wrap:hover .ticker-move {
    animation-play-state: paused;
}
@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* 5. Custom UI Components (Cards, Badges, etc.) */

/* Category Badge */
.category-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 8px;
    transition: var(--transition-base);
}
.category-badge.badge-blue {
    background-color: var(--secondary-color);
}
.category-badge:hover {
    opacity: 0.9;
    color: #ffffff;
}

/* Card Structures */
.card-custom {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    height: 100%;
}
.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.card-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}
.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}
.card-custom:hover .card-img-wrapper img {
    transform: scale(1.05);
}

/* Image Overlay Card (Hero Section) */
.hero-card-large {
    position: relative;
    aspect-ratio: 16/10;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 100%;
}
.hero-card-large .card-img-overlay-custom {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 40%, rgba(15, 23, 42, 0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    color: #ffffff;
    transition: var(--transition-base);
}
.hero-card-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}
.hero-card-large:hover img {
    transform: scale(1.03);
}

.hero-card-small {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: 100%;
}
.hero-card-small .card-img-overlay-custom {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 30%, rgba(15, 23, 42, 0.85) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
    color: #ffffff;
}
.hero-card-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}
.hero-card-small:hover img {
    transform: scale(1.05);
}

/* Horizontal Cards */
.card-horizontal {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    margin-bottom: 20px;
}
.card-horizontal:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.card-horizontal .card-img-wrapper {
    width: 35%;
    min-width: 120px;
    aspect-ratio: 4/3;
}
.card-horizontal .card-content {
    padding: 15px;
    width: 65%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Sidebar News Cards */
.sidebar-list-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-list-item:last-child {
    border-bottom: none;
}
.sidebar-list-item .rank-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #e2e8f0;
    line-height: 1;
    margin-right: 15px;
    min-width: 40px;
    text-align: center;
}
.sidebar-list-item .item-content {
    flex: 1;
}
.sidebar-list-item .item-content h6 {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.4;
}

/* 6. Sidebar Widgets */
.sidebar-widget {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
}
.widget-title {
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}
.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

/* 7. Advertisement Banners */
.ad-banner {
    background-color: var(--light-accent);
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    font-weight: 600;
    margin: 25px 0;
    text-align: center;
}
.ad-banner span {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.ad-728x90 {
    width: 100%;
    height: 90px;
    max-width: 728px;
    margin-left: auto;
    margin-right: auto;
}
.ad-300x250 {
    width: 300px;
    height: 250px;
    margin-left: auto;
    margin-right: auto;
}
.ad-300x600 {
    width: 300px;
    height: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 8. Public Article Details Details UI */
.article-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 15px;
}
.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}
.article-content p {
    margin-bottom: 20px;
}
.article-content blockquote {
    font-size: 1.25rem;
    font-style: italic;
    border-left: 4px solid var(--primary-color);
    padding: 15px 25px;
    margin: 30px 0;
    background-color: var(--light-accent);
    border-radius: 0 8px 8px 0;
}
.article-content table {
    width: 100%;
    margin: 30px 0;
    border-collapse: collapse;
}
.article-content table th,
.article-content table td {
    border: 1px solid var(--border-color);
    padding: 12px;
}
.article-content table th {
    background-color: var(--light-accent);
}
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}
.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.code-block {
    background: #1e293b;
    color: #f1f5f9;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    margin: 25px 0;
}

/* Social Share Block */
.share-buttons-container {
    display: flex;
    gap: 8px;
    margin: 15px 0;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #ffffff !important;
    font-size: 0.95rem;
    transition: var(--transition-base);
}
.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}
.share-facebook { background-color: #3b5998; }
.share-twitter { background-color: #1da1f2; }
.share-whatsapp { background-color: #25d366; }
.share-linkedin { background-color: #0077b5; }
.share-telegram { background-color: #0088cc; }

/* 9. Pagination UI */
.pagination-custom .page-link {
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    margin: 0 3px;
    border-radius: 6px;
    font-weight: 600;
}
.pagination-custom .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}
.pagination-custom .page-link:hover {
    background-color: var(--light-accent);
}

/* 10. Admin Module Dashboard Layout styling */
.admin-sidebar {
    min-height: 100vh;
    background-color: #0f172a;
    color: #94a3b8;
    width: 260px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
}
.admin-sidebar .sidebar-heading {
    padding: 20px;
    color: #ffffff;
    font-weight: 800;
    border-bottom: 1px solid #1e293b;
    font-size: 1.25rem;
}
.admin-sidebar .nav-link {
    color: #94a3b8;
    padding: 12px 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    border-left: 4px solid transparent;
}
.admin-sidebar .nav-link i {
    margin-right: 12px;
    font-size: 1.1rem;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-item.active .nav-link {
    color: #ffffff;
    background-color: #1e293b;
    border-left-color: var(--primary-color);
}
.admin-content-wrapper {
    margin-left: 260px;
    min-height: 100vh;
    background-color: #f8fafc;
    transition: var(--transition-base);
}
.admin-topbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    height: 70px;
}

/* Admin Dashboard Counters */
.stat-card {
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* 11. Visual CKEditor 5 / Rich Text Editor UI Placeholder */
.rich-text-editor-container {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #ffffff;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.rte-toolbar {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.rte-btn-grp {
    display: flex;
    border-right: 1px solid #e2e8f0;
    padding-right: 6px;
    margin-right: 2px;
}
.rte-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #475569;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-base);
}
.rte-btn:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}
.rte-btn.active {
    background-color: #cbd5e1;
    color: #0f172a;
}
.rich-text-editor-area {
    min-height: 350px;
    padding: 20px;
    outline: none;
    overflow-y: auto;
    font-size: 1.05rem;
}
.rich-text-editor-area:focus {
    background-color: #fff;
}
.rte-statusbar {
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 6px 15px;
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* 12. Skeleton Loading Elements */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}
.skeleton-img {
    aspect-ratio: 16/9;
    width: 100%;
    border-radius: 8px;
}
.skeleton-title {
    height: 20px;
    width: 80%;
    margin-top: 12px;
    margin-bottom: 8px;
}
.skeleton-text {
    height: 14px;
    width: 100%;
    margin-bottom: 6px;
}
.skeleton-text.short {
    width: 60%;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Newsletter Subscription Box */
.newsletter-box {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
}
.newsletter-box h5 {
    font-weight: 700;
}
.newsletter-box input {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
.newsletter-box input:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    box-shadow: none;
    color: #ffffff;
}
.newsletter-box input::placeholder {
    color: #94a3b8;
}
.newsletter-box .btn-submit {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    font-weight: bold;
    width: 100%;
}
.newsletter-box .btn-submit:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}
