/* =====================================================
   NewsPortal CMS - Premium Inner Pages Stylesheet
   All page-specific premium styles
   ===================================================== */

/* ─── CSS Variables ─── */
:root {
    --pg-primary: #dc2626;
    --pg-primary-dark: #b91c1c;
    --pg-gradient: linear-gradient(135deg, #dc2626, #ef4444);
    --pg-bg: #f8fafc;
    --pg-card: #ffffff;
    --pg-border: #e2e8f0;
    --pg-text: #1e293b;
    --pg-text-secondary: #64748b;
    --pg-radius: 16px;
    --pg-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
    --pg-shadow-lg: 0 4px 6px rgba(0,0,0,.05), 0 10px 40px rgba(0,0,0,.08);
    --pg-shadow-hover: 0 8px 30px rgba(0,0,0,.12);
}

/* ─── Page Background ─── */
main.min-h-screen {
    background: var(--pg-bg);
}

/* ─── Premium Card Overrides ─── */
.bg-white.rounded-xl.shadow-lg,
.bg-white.rounded-xl.shadow-md {
    border: 1px solid rgba(226,232,240,.6);
    box-shadow: var(--pg-shadow);
    transition: box-shadow .3s ease, transform .3s ease;
}

/* ─── Page Header Banners ─── */
.container .bg-white.rounded-xl.shadow-lg:first-child h1 .fa-envelope,
.container .bg-white.rounded-xl.shadow-lg:first-child h1 .fa-info-circle,
.container .bg-white.rounded-xl.shadow-lg:first-child h1 .fa-shield-alt,
.container .bg-white.rounded-xl.shadow-lg:first-child h1 .fa-file-contract,
.container .bg-white.rounded-xl.shadow-lg:first-child h1 .fa-user-circle,
.container .bg-white.rounded-xl.shadow-lg:first-child h1 .fa-video,
.container .bg-white.rounded-xl.shadow-lg:first-child h1 .fa-newspaper {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Breadcrumb Premium ─── */
nav.breadcrumb {
    background: var(--pg-card);
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid var(--pg-border);
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
    font-weight: 500;
}
nav.breadcrumb a {
    color: var(--pg-primary) !important;
    font-weight: 600;
}
nav.breadcrumb a:hover { text-decoration: underline; }
nav.breadcrumb span:not(:last-child) { color: #cbd5e1; }

/* ─── News Detail Article Card ─── */
article.lg\:col-span-2 > .bg-white.rounded-xl.shadow-lg {
    border: none;
    box-shadow: var(--pg-shadow-lg);
    border-radius: var(--pg-radius);
}

/* Article Title */
article h1 {
    font-weight: 800 !important;
    letter-spacing: -0.01em;
    line-height: 1.3 !important;
}

/* Article Excerpt */
article .border-l-4.border-red-600 {
    background: linear-gradient(135deg, #fef2f2, #fff1f2);
    padding: 16px 20px !important;
    border-radius: 0 12px 12px 0;
    border-left-width: 4px;
    font-style: italic;
}

/* Author info */
article .flex.items-center.pb-6.mb-6.border-b {
    background: #f8fafc;
    margin-left: -24px;
    margin-right: -24px;
    padding: 16px 24px !important;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
}

/* Share Buttons Premium */
.share-buttons {
    gap: 10px !important;
}
.share-btn {
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.share-btn:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
}

/* News Content Premium */
.news-content {
    font-size: 17px;
    line-height: 1.85;
    color: #334155;
}
.news-content p {
    margin-bottom: 20px;
}
.news-content h2 {
    position: relative;
    padding-bottom: 10px;
    margin-top: 32px;
}
.news-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--pg-gradient);
    border-radius: 2px;
}
.news-content blockquote {
    background: linear-gradient(135deg, #fef2f2, #fef9f9);
    padding: 20px 24px;
    border-radius: 0 14px 14px 0;
    border-left: 4px solid var(--pg-primary);
    margin: 24px 0;
    font-size: 16px;
    position: relative;
}
.news-content blockquote::before {
    content: '\201C';
    position: absolute;
    top: -8px;
    left: 12px;
    font-size: 48px;
    color: rgba(220,38,38,.15);
    font-family: Georgia, serif;
    line-height: 1;
}
.news-content img {
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.news-content a {
    color: var(--pg-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.news-content ul, .news-content ol {
    background: #f8fafc;
    padding: 16px 16px 16px 36px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
}
.news-content li {
    margin-bottom: 10px;
}

/* Tags Premium */
article .mt-8.pt-6.border-t a {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    transition: all .2s;
    border-radius: 20px !important;
    padding: 6px 14px !important;
}
article .mt-8.pt-6.border-t a:hover {
    background: linear-gradient(135deg, #fef2f2, #fee2e2) !important;
    border-color: #fca5a5;
    color: var(--pg-primary) !important;
    transform: translateY(-1px);
}

/* ─── Category Page ─── */
/* Category Header Card */
.container > .bg-white.rounded-xl.shadow-lg:has(.rounded-full) {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-left: 4px solid var(--pg-primary);
}

/* Category News Cards */
.space-y-6 > article.bg-white.rounded-xl {
    border: 1px solid rgba(226,232,240,.5);
    border-radius: var(--pg-radius) !important;
    overflow: hidden;
    transition: all .35s cubic-bezier(.4,0,.2,1);
}
.space-y-6 > article.bg-white.rounded-xl:hover {
    box-shadow: var(--pg-shadow-hover) !important;
    transform: translateY(-4px);
    border-color: rgba(220,38,38,.15);
}
.space-y-6 > article.bg-white.rounded-xl h2 {
    font-weight: 800 !important;
    letter-spacing: -0.01em;
}

/* ─── Pagination Premium ─── */
.pagination {
    gap: 6px !important;
}
.pagination a, .pagination span {
    border-radius: 10px !important;
    font-weight: 600 !important;
    min-width: 42px;
    text-align: center;
    font-size: 14px;
}
.pagination a {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.pagination a:hover {
    background: #fef2f2 !important;
    border-color: var(--pg-primary) !important;
    color: var(--pg-primary) !important;
    transform: translateY(-1px);
}
.pagination .active {
    background: var(--pg-gradient) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(220,38,38,.3) !important;
}

/* ─── Sidebar Premium ─── */
aside.lg\:col-span-1 > div {
    border-radius: var(--pg-radius) !important;
}

/* Sidebar Widget Cards */
aside .bg-white.rounded-xl.shadow-lg {
    border: 1px solid rgba(226,232,240,.5);
    border-radius: var(--pg-radius) !important;
    overflow: hidden;
    transition: box-shadow .3s;
}
aside .bg-white.rounded-xl.shadow-lg:hover {
    box-shadow: var(--pg-shadow-lg);
}

/* Sidebar Widget Headers */
aside .bg-white.rounded-xl .p-4.border-b {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid #f1f5f9 !important;
}
aside .bg-white.rounded-xl .p-4.border-b h3 {
    font-size: 15px !important;
    letter-spacing: -0.01em;
}

/* Sidebar Trending Numbers */
aside .text-2xl.font-bold.text-gray-300 {
    background: linear-gradient(135deg, #dc2626, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900 !important;
    font-size: 20px !important;
    opacity: 0.7;
}

/* Sidebar Trending Items */
aside .divide-y > a {
    transition: all .2s;
    border-left: 3px solid transparent;
}
aside .divide-y > a:hover {
    background: #fef2f2 !important;
    border-left-color: var(--pg-primary);
}
aside .divide-y > a h4 {
    font-weight: 600 !important;
}

/* Sidebar Newsletter */
aside .bg-gradient-to-br {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%) !important;
    border-radius: var(--pg-radius) !important;
    position: relative;
    overflow: hidden;
}
aside .bg-gradient-to-br::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
}
aside .bg-gradient-to-br::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
}
aside .bg-gradient-to-br > * { position: relative; z-index: 1; }
aside .bg-gradient-to-br input {
    border-radius: 10px !important;
}
aside .bg-gradient-to-br button {
    border-radius: 10px !important;
    font-weight: 700 !important;
    transition: all .2s;
}
aside .bg-gradient-to-br button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* Category Sidebar - Active Category */
aside .bg-red-50.text-red-600 {
    background: linear-gradient(135deg, #fef2f2, #fee2e2) !important;
    border-radius: 10px !important;
    font-weight: 700;
    border-left: 3px solid var(--pg-primary);
}

/* Category Sidebar Items */
aside .space-y-2 > a {
    border-radius: 10px !important;
    transition: all .2s;
}
aside .space-y-2 > a:hover {
    background: #fef2f2 !important;
    padding-left: 16px;
}

/* ─── Contact Page ─── */
/* Contact Info Cards */
.text-center.p-4.bg-red-50.rounded-lg {
    border-radius: 14px !important;
    border: 1px solid #fce7e7;
    transition: all .3s;
}
.text-center.p-4.bg-red-50.rounded-lg:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(220,38,38,.1);
}
.text-center.p-4.bg-red-50.rounded-lg .fa-3x {
    font-size: 28px;
}

/* Contact Form Fields */
input.border-gray-300.rounded-lg,
textarea.border-gray-300.rounded-lg,
select.border-gray-300.rounded-lg {
    border-radius: 12px !important;
    border: 1.5px solid #e2e8f0 !important;
    transition: all .2s;
    font-size: 14px;
}
input.border-gray-300.rounded-lg:focus,
textarea.border-gray-300.rounded-lg:focus,
select.border-gray-300.rounded-lg:focus {
    border-color: var(--pg-primary) !important;
    box-shadow: 0 0 0 3px rgba(220,38,38,.08) !important;
}

/* ─── Login & Register Pages ─── */
.min-h-\[60vh\] .bg-white.rounded-xl.shadow-lg {
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,.04), 0 20px 60px rgba(0,0,0,.08);
    border-radius: 20px !important;
    position: relative;
    overflow: hidden;
}
.min-h-\[60vh\] .bg-white.rounded-xl.shadow-lg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--pg-gradient);
}

/* Login/Register Buttons */
.min-h-\[60vh\] button[type="submit"],
.min-h-\[60vh\] .bg-red-600.text-white {
    border-radius: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(220,38,38,.25);
    transition: all .3s !important;
}
.min-h-\[60vh\] button[type="submit"]:hover,
.min-h-\[60vh\] .bg-red-600.text-white:hover {
    box-shadow: 0 6px 20px rgba(220,38,38,.35);
    transform: translateY(-1px);
}

/* Google Login Button */
.min-h-\[60vh\] .border.border-gray-300,
.min-h-\[60vh\] .border-gray-300 {
    border-radius: 12px !important;
    transition: all .2s;
}
.min-h-\[60vh\] .border.border-gray-300:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    transform: translateY(-1px);
}

/* ─── Profile Page ─── */
/* Profile Avatar Card */
.lg\:col-span-1 .bg-white.rounded-xl.shadow-lg.text-center {
    position: relative;
    overflow: hidden;
}
.lg\:col-span-1 .bg-white.rounded-xl.shadow-lg.text-center::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--pg-gradient);
}
.lg\:col-span-1 .bg-white.rounded-xl.shadow-lg.text-center > * {
    position: relative;
    z-index: 1;
}
.lg\:col-span-1 .bg-white.rounded-xl.shadow-lg.text-center img.rounded-full {
    border: 4px solid #fff !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    margin-top: 20px;
}

/* ─── Search Page ─── */
main.bg-gray-50 {
    background: var(--pg-bg) !important;
}
/* Search Box */
main .bg-white.rounded-xl.shadow-lg.p-2,
main .bg-white.rounded-2xl.shadow-lg.p-2 {
    border: 2px solid rgba(220,38,38,.1);
    box-shadow: 0 4px 20px rgba(220,38,38,.08);
    border-radius: 18px !important;
}
main .bg-white.rounded-xl.shadow-lg.p-2:focus-within,
main .bg-white.rounded-2xl.shadow-lg.p-2:focus-within {
    border-color: rgba(220,38,38,.3);
    box-shadow: 0 8px 30px rgba(220,38,38,.12);
}

/* Search results cards */
main .grid article.bg-white {
    border: 1px solid rgba(226,232,240,.5);
    transition: all .35s cubic-bezier(.4,0,.2,1);
}
main .grid article.bg-white:hover {
    border-color: rgba(220,38,38,.15);
    box-shadow: var(--pg-shadow-hover);
    transform: translateY(-4px);
}

/* ─── Videos Page ─── */
/* Video Cards */
.grid article.bg-white.rounded-xl.overflow-hidden {
    border: 1px solid rgba(226,232,240,.5);
    border-radius: var(--pg-radius) !important;
    transition: all .35s cubic-bezier(.4,0,.2,1);
}
.grid article.bg-white.rounded-xl.overflow-hidden:hover {
    border-color: rgba(220,38,38,.15);
    box-shadow: var(--pg-shadow-hover);
    transform: translateY(-6px);
}
/* Video Play Button Overlay */
.grid article .absolute.inset-0.bg-black .w-16.h-16 {
    box-shadow: 0 4px 20px rgba(220,38,38,.4);
    transition: transform .3s;
}
.grid article:hover .absolute.inset-0.bg-black .w-16.h-16 {
    transform: scale(1.1);
}

/* ─── 404 Page ─── */
main .text-7xl, main .text-9xl {
    background: var(--pg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900 !important;
    letter-spacing: -0.04em;
    text-shadow: none;
}

/* ─── E-Paper Page ─── */
.w-24.h-24.bg-red-100.rounded-full {
    background: linear-gradient(135deg, #fef2f2, #fee2e2) !important;
    box-shadow: 0 4px 20px rgba(220,38,38,.1);
}

/* ─── Comments Section ─── */
section#comments > .bg-white.rounded-xl.shadow-lg {
    border: 1px solid var(--pg-border);
    box-shadow: var(--pg-shadow-lg);
    border-radius: var(--pg-radius) !important;
}
section#comments .border-b:first-child {
    background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
    border-radius: var(--pg-radius) var(--pg-radius) 0 0;
}

/* ─── Recommendation Section ─── */
section .grid article.bg-white.rounded-lg.shadow-md {
    border: 1px solid rgba(226,232,240,.5);
    border-radius: 14px !important;
    transition: all .3s;
}
section .grid article.bg-white.rounded-lg.shadow-md:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    transform: translateY(-2px);
    border-color: rgba(220,38,38,.15);
}

/* Load More Button */
.btn-load-more {
    border-radius: 12px !important;
    font-weight: 700 !important;
    transition: all .3s !important;
}
.btn-load-more:hover {
    background: #fef2f2 !important;
    border-color: var(--pg-primary) !important;
    color: var(--pg-primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220,38,38,.1) !important;
}

/* ─── Prose Content (About, Privacy, Terms etc) ─── */
.prose h2 {
    position: relative;
    padding-bottom: 12px;
    color: var(--pg-text) !important;
}
.prose h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--pg-gradient);
    border-radius: 2px;
}
.prose p {
    color: #475569;
    line-height: 1.8;
}
.prose ul, .prose ol {
    color: #475569;
}
.prose a {
    color: var(--pg-primary);
    font-weight: 600;
}
.prose strong {
    color: var(--pg-text);
}
.prose section {
    padding: 20px 0;
    border-bottom: 1px solid #f1f5f9;
}
.prose section:last-child {
    border-bottom: none;
}

/* ─── Alert/Message Boxes ─── */
.bg-green-100.text-green-700 {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7) !important;
    border: 1px solid #bbf7d0;
    border-radius: 14px !important;
}
.bg-red-100.text-red-700 {
    background: linear-gradient(135deg, #fef2f2, #fee2e2) !important;
    border: 1px solid #fecaca;
    border-radius: 14px !important;
}

/* ─── Button Enhancements ─── */
.bg-red-600.text-white.rounded-lg {
    background: var(--pg-gradient) !important;
    box-shadow: 0 4px 14px rgba(220,38,38,.2);
    transition: all .3s;
    font-weight: 700;
}
.bg-red-600.text-white.rounded-lg:hover {
    box-shadow: 0 6px 20px rgba(220,38,38,.3);
    transform: translateY(-1px);
}
.border-2.border-red-600.text-red-600.rounded-lg {
    transition: all .3s;
    font-weight: 700;
}
.border-2.border-red-600.text-red-600.rounded-lg:hover {
    box-shadow: 0 4px 14px rgba(220,38,38,.15);
    transform: translateY(-1px);
}

/* ─── Scrollbar ─── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ─── Page Header Accent ─── */
.container .max-w-4xl .bg-white.rounded-xl.shadow-lg:first-child,
.container > .bg-white.rounded-xl.shadow-lg:first-child {
    position: relative;
    overflow: hidden;
}
.container .max-w-4xl .bg-white.rounded-xl.shadow-lg:first-child::before,
.container > .bg-white.rounded-xl.shadow-lg:first-child::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--pg-gradient);
}

/* Red accent line */
.w-20.h-1.bg-red-600.rounded {
    height: 3px;
    width: 60px;
    background: var(--pg-gradient) !important;
    border-radius: 4px;
}

/* ─── Responsive Fixes ─── */
@media (max-width: 768px) {
    .share-btn {
        width: 38px !important;
        height: 38px !important;
        border-radius: 10px !important;
        font-size: 14px;
    }
    
    .news-content {
        font-size: 15px;
        line-height: 1.75;
    }
    .news-content blockquote {
        padding: 14px 16px;
        margin: 16px 0;
    }
    .news-content ul, .news-content ol {
        padding: 12px 12px 12px 28px;
    }
    
    nav.breadcrumb {
        padding: 10px 14px;
        border-radius: 10px;
    }
    
    article .border-l-4.border-red-600 {
        padding: 12px 14px !important;
    }
    
    .pagination a, .pagination span {
        padding: 6px 10px !important;
        min-width: 36px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .news-content {
        font-size: 14.5px;
    }
    .news-content h2 { font-size: 18px; }
    .news-content h3 { font-size: 16px; }
    .news-content img {
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,.06);
    }
}

/* ─── Smooth Transitions ─── */
* {
    -webkit-tap-highlight-color: transparent;
}

/* ─── Ad Label ─── */
.ad-label {
    text-align: center;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #94a3b8;
    margin-bottom: 6px;
    font-weight: 600;
}

/* ─── Video Modal Premium ─── */
#videoModal {
    backdrop-filter: blur(8px);
}

/* ─── Popular Search Tags ─── */
.bg-red-50.text-red-600.rounded-full {
    border: 1px solid #fecaca;
    font-weight: 600;
    transition: all .2s;
}
.bg-red-50.text-red-600.rounded-full:hover {
    background: #fef2f2 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220,38,38,.1);
}

/* ─── Category Page Chips ─── */
.px-4.py-2.bg-gray-100.rounded-full {
    border: 1px solid #e2e8f0;
    font-weight: 600;
    transition: all .25s;
}
.px-4.py-2.bg-gray-100.rounded-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220,38,38,.1);
}

/* ─── Featured Image on News Detail ─── */
article .relative img.w-full.object-cover {
    transition: transform .5s cubic-bezier(.4,0,.2,1);
}
article .relative:hover img.w-full.object-cover {
    transform: scale(1.02);
}

/* ─── Hover Animations ─── */
@keyframes subtle-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* ─── Print ─── */
@media print {
    .share-buttons, .pagination, nav.breadcrumb, aside, #comments, section:has(.btn-load-more) {
        display: none !important;
    }
    .news-content {
        font-size: 14px;
        line-height: 1.6;
    }
    article .bg-white {
        box-shadow: none !important;
        border: none !important;
    }
}
