/* =====================================================
   NewsPortal CMS - Main Stylesheet
   Version: 1.0
   ===================================================== */

/* ------------------- Base Styles ------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary-red: #e11d48;
    --primary-dark: #be123c;
    --text-dark: #1c1917;
    --text-gray: #78716c;
    --bg-light: #fafaf9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans Bengali', 'Noto Sans', 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.font-hindi,
.font-site {
    font-family: 'Noto Sans Bengali', 'Noto Sans', 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* ------------------- Tailwind Utilities ------------------- */
.container {
    max-width: 1280px;
    margin: 0 auto;
}

/* ------------------- Navigation ------------------- */
.nav-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-scroll::-webkit-scrollbar {
    display: none;
}

.nav-link.active {
    background-color: var(--primary-dark);
}

/* ------------------- Breaking News Ticker ------------------- */
.breaking-news-ticker {
    position: relative;
    overflow: hidden;
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
}

.ticker {
    display: inline-flex;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 30px;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.ticker:hover {
    animation-play-state: paused;
}

/* ------------------- Cards ------------------- */
.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.news-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover img {
    transform: scale(1.05);
}

/* ------------------- Line Clamp ------------------- */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ------------------- Swiper Customization ------------------- */
.swiper-button-next,
.swiper-button-prev {
    color: white !important;
    background: rgba(0, 0, 0, 0.5);
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px !important;
    font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--primary-red);
}

.swiper-pagination-bullet {
    background: white !important;
    opacity: 0.7;
}

.swiper-pagination-bullet-active {
    background: var(--primary-red) !important;
    opacity: 1;
    width: 20px;
    border-radius: 10px;
}

/* ------------------- Animations ------------------- */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ------------------- Category Colors ------------------- */
.category-india { color: #dc2626; }
.category-world { color: #2563eb; }
.category-politics { color: #7c3aed; }
.category-entertainment { color: #ec4899; }
.category-sports { color: #16a34a; }
.category-business { color: #ca8a04; }
.category-technology { color: #0891b2; }
.category-lifestyle { color: #f43f5e; }
.category-religion { color: #f97316; }
.category-crime { color: #991b1b; }

/* ------------------- Sidebar Widgets ------------------- */
.widget {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.widget-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

/* ------------------- News Detail Page ------------------- */
.news-content {
    font-size: 17px;
    line-height: 1.8;
}

.news-content p {
    margin-bottom: 16px;
}

.news-content h2,
.news-content h3 {
    font-weight: 700;
    margin: 24px 0 12px;
}

.news-content h2 {
    font-size: 24px;
}

.news-content h3 {
    font-size: 20px;
}

.news-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 16px 0;
}

.news-content blockquote {
    border-left: 4px solid var(--primary-red);
    padding-left: 16px;
    margin: 16px 0;
    font-style: italic;
    color: var(--text-gray);
}

.news-content ul,
.news-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

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

/* ------------------- Breadcrumb ------------------- */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--text-gray);
}

.breadcrumb a {
    color: var(--text-gray);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary-red);
}

.breadcrumb span {
    margin: 0 8px;
}

/* ------------------- Share Buttons ------------------- */
.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    transition: transform 0.2s;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.telegram { background: #0088cc; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.copy { background: #6b7280; }

/* ------------------- Form Styles ------------------- */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-dark);
}

/* ------------------- Buttons ------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-red);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

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

.btn-outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: var(--text-dark);
}

.btn-outline:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

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

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    background: #f9fafb;
    font-weight: 600;
    color: var(--text-gray);
    font-size: 14px;
}

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

/* ------------------- Pagination ------------------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination a {
    background: white;
    color: var(--text-dark);
    border: 1px solid #e5e7eb;
}

.pagination a:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.pagination .active {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

/* ------------------- Loading Spinner ------------------- */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ------------------- Responsive ------------------- */
@media (max-width: 768px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
    
    /* News content on mobile */
    .news-content {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .news-content h2 {
        font-size: 20px;
    }
    
    .news-content h3 {
        font-size: 17px;
    }
    
    .news-content blockquote {
        padding-left: 12px;
        margin: 12px 0;
    }
    
    /* Share buttons smaller on mobile */
    .share-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination a,
    .pagination span {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: 12px;
        overflow-x: auto;
        flex-wrap: nowrap;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 0;
        padding-right: 0;
    }
    
    .news-content {
        font-size: 14px;
    }
    
    .news-content img {
        margin: 10px -10px;
        width: calc(100% + 20px);
        max-width: calc(100% + 20px);
        border-radius: 0;
    }
}

/* ------------------- Print Styles ------------------- */
@media print {
    header, footer, .sidebar, .share-buttons, .breaking-news-ticker {
        display: none !important;
    }
}

/* =====================================================
   ADMIN PANEL STYLES
   ===================================================== */

/* Admin Sidebar */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}

/* Admin Content Area */
.admin-content {
    margin-left: 260px;
    padding: 24px;
    min-height: 100vh;
    background: #f3f4f6;
}

/* Sidebar Navigation Links */
.admin-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #9ca3af;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.admin-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-left-color: var(--primary-red);
}

.admin-sidebar .nav-link.active {
    background: rgba(220, 38, 38, 0.15);
    color: #ffffff;
    border-left-color: var(--primary-red);
}

.admin-sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* Admin Cards */
.admin-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 24px;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.admin-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Admin Stats Card */
.stats-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stats-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stats-icon.red {
    background: #fee2e2;
    color: var(--primary-red);
}

.stats-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.stats-icon.green {
    background: #dcfce7;
    color: #16a34a;
}

.stats-icon.yellow {
    background: #fef3c7;
    color: #d97706;
}

.stats-icon.purple {
    background: #f3e8ff;
    color: #9333ea;
}

.stats-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.stats-label {
    font-size: 14px;
    color: var(--text-gray);
    margin-top: 4px;
}

/* Admin Form Styles */
.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form input[type="number"],
.admin-form input[type="url"],
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.admin-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* Admin Buttons */
.btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-admin-primary {
    background: var(--primary-red);
    color: white;
}

.btn-admin-primary:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-admin-secondary {
    background: #e5e7eb;
    color: var(--text-dark);
}

.btn-admin-secondary:hover {
    background: #d1d5db;
}

.btn-admin-success {
    background: #16a34a;
    color: white;
}

.btn-admin-success:hover {
    background: #15803d;
}

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

.btn-admin-danger:hover {
    background: #b91c1c;
}

.btn-admin-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.admin-table th {
    background: #f9fafb;
    font-weight: 600;
    color: var(--text-gray);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tbody tr:hover {
    background: #f9fafb;
}

.admin-table .actions {
    display: flex;
    gap: 8px;
}

/* Admin Badge */
.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.admin-badge.green {
    background: #dcfce7;
    color: #16a34a;
}

.admin-badge.red {
    background: #fee2e2;
    color: #dc2626;
}

.admin-badge.yellow {
    background: #fef3c7;
    color: #d97706;
}

.admin-badge.blue {
    background: #dbeafe;
    color: #2563eb;
}

.admin-badge.gray {
    background: #f3f4f6;
    color: #6b7280;
}

/* Admin Modal */
.admin-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-modal.active {
    display: flex;
}

.admin-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.admin-modal-title {
    font-size: 18px;
    font-weight: 600;
}

.admin-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-gray);
    cursor: pointer;
}

.admin-modal-body {
    padding: 24px;
}

.admin-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 16px 16px;
}

/* Admin Responsive */
@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
    }
}

/* Admin Utilities */
.admin-grid {
    display: grid;
    gap: 24px;
}

.admin-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.admin-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.admin-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .admin-grid-2,
    .admin-grid-3,
    .admin-grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) and (min-width: 769px) {
    .admin-grid-3,
    .admin-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-gray);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

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

/* Image Thumbnail */
.img-thumbnail {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

/* Status Toggle */
.status-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.status-toggle.active {
    background: #16a34a;
}

.status-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.status-toggle.active::after {
    transform: translateX(20px);
}
