/*
Theme Name: Kal Prakash 2.0
Theme URI: https://kalprakash.com
Author: Ismail Miah
Author URI: https://kalprakash.com
Description: কাল প্রকাশ ২.০ - অত্যাধুনিক, রেসপনসিভ ও ফটোকার্ড জেনারেটর সমৃদ্ধ বাংলা নিউজ পোর্টাল ওয়ার্ডপ্রেস থিম।
Version: 4.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kal-prakash
Tags: news, blog, bengali, responsive-layout, grid-layout, custom-menu, photocard
*/

:root {
    --brand-red: #cc0000;
    --brand-red-hover: #a80000;
    --brand-red-light: #fff1f1;
    --brand-dark: #111827;
    --brand-border: #e5e7eb;
    --font-serif: 'Noto Serif Bengali', serif;
    --font-sans: 'Noto Serif Bengali', serif;
    --font-inter: 'Noto Serif Bengali', serif;
}

/* Strict No Underline Rule across entire site */
*, *::before, *::after, a, a:hover, a:focus, a:active, a:visited,
.underline, .hover\:underline:hover, .hover\:underline:focus {
    text-decoration: none !important;
    text-decoration-line: none !important;
}

/* Hide scrollbar for Chrome, Safari, Opera, IE, Edge and Firefox */
.no-scrollbar::-webkit-scrollbar,
.scrollbar-none::-webkit-scrollbar {
  display: none !important;
}
.no-scrollbar,
.scrollbar-none {
  -ms-overflow-style: none !important;  /* IE and Edge */
  scrollbar-width: none !important;  /* Firefox */
}

html, body {
    overflow-x: clip;
}

/* Universal Typography */
html, body, p, h1, h2, h3, h4, h5, h6, a, span:not(.material-symbols-outlined), div, li, button, input, select, textarea, label {
    font-family: 'Noto Serif Bengali', serif;
}

body {
    background-color: #ffffff;
    font-family: 'Noto Serif Bengali', serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--brand-dark);
}

/* Active Navigation Menu Item (Text Brand Red) & Hover Text Color */
nav ul li.current-menu-item > a,
nav ul li.current-cat > a,
nav ul li.current_page_item > a,
nav ul li.active > a,
nav ul li a.active,
nav ul li a.text-news-red,
nav ul li.current-menu-item,
nav ul li.current-cat {
    color: #cc0000 !important;
    background-color: transparent !important;
}

nav ul li a:hover {
    color: #cc0000 !important;
    background-color: transparent !important;
}

/* Single Article Paragraph Spacing & Justified Alignment */
.entry-content p {
    text-align: justify !important;
    text-justify: inter-word !important;
    margin-bottom: 1.75rem !important;
    line-height: 1.85 !important;
    font-size: 19px !important;
}

/* Tag Link Hover Text Color White */
.tag-link:hover,
a.tag-link:hover {
    color: #ffffff !important;
    background-color: #cc0000 !important;
    border-color: #cc0000 !important;
}

/* Material Symbols Outlined Icon Protection */
.material-symbols-outlined,
.material-icons,
[class^="icon-"],
[class*=" icon-"] {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: normal !important;
    font-style: normal !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    display: inline-block !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    direction: ltr !important;
    -webkit-font-smoothing: antialiased !important;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important;
}

/* Feature Image Custom Favicon Lazyload Placeholder */
.pb-bw-placeholder,
.pb-lazyload-placeholder {
    background-color: #ffffff;
    background-image: url("assets/images/lazyload-placeholder.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

/* Hide Sticky Navbar completely when Mega Menu is active */
body.mega-menu-open #sticky-nav-bar,
body.mega-menu-open .is-sticky-active {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Fail-Safe Fixed Sticky Navbar Class */
.is-sticky-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 40 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    background-color: #ffffff !important;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Full Screen Mega Menu Drawer Solid White Background */
#mega-menu-modal,
#mega-menu-modal-header {
    background-color: #ffffff !important;
}

/* Global Typography System (Option A) */
h1, h2, h3, h4, h5, h6,
.font-serif,
.font-headline {
    font-family: var(--font-serif) !important;
}

body, p, span, a, input, button, select, textarea,
.font-sans,
.font-body {
    font-family: var(--font-sans);
}

/* Article Body Typography Rules (Single Post Page) */
.entry-content,
.article-body-content {
    font-family: var(--font-sans);
    font-size: 18px;
    line-height: 1.8;
    color: #1f2937;
}

.entry-content p,
.article-body-content p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

@media (max-width: 768px) {
    .entry-content,
    .entry-content p,
    .article-body-content p {
        font-size: 16px;
        line-height: 1.75;
    }
}

.entry-content h2, .article-body-content h2 {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #111827;
}

.entry-content h3, .article-body-content h3 {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

/* Brand Color Utility Overrides */
.text-news-red,
.text-brand-red {
    color: var(--brand-red) !important;
}

.bg-news-red,
.bg-brand-red {
    background-color: var(--brand-red) !important;
}

.border-news-red,
.border-brand-red {
    border-color: var(--brand-red) !important;
}

.hover\:text-news-red:hover,
.hover\:text-brand-red:hover {
    color: var(--brand-red) !important;
}

.hover\:bg-news-red:hover,
.hover\:bg-brand-red:hover {
    background-color: var(--brand-red) !important;
}

.hover\:bg-brand-red-dark:hover {
    background-color: var(--brand-red-hover) !important;
}

/* Force 1440px Ultra-Wide Container across all screens */
.container-custom,
.max-w-container-max,
.max-w-7xl,
.max-w-6xl,
.max-w-5xl,
.max-w-\[1200px\],
.max-w-\[1320px\],
.max-w-\[1440px\] {
    max-width: 1440px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.container-custom {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
}

.editorial-border {
    border-bottom: 1px solid #e5e7eb;
}

/* WordPress Core Required Alignment Classes */
.alignnone {
    margin: 5px 20px 20px 0;
}
.aligncenter, div.aligncenter {
    display: block;
    margin: 5px auto 5px auto;
}
.alignright {
    float:right;
    margin: 5px 0 20px 20px;
}
.alignleft {
    float:left;
    margin: 5px 20px 20px 0;
}
a img.alignright {
    float:right;
    margin: 5px 0 20px 20px;
}
a img.alignnone {
    margin: 5px 20px 20px 0;
}
a img.alignleft {
    float:left;
    margin: 5px 20px 20px 0;
}
a img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.wp-caption {
    background: #fff;
    border: 1px solid #f0f0f0;
    max-width: 96%;
    padding: 5px 3px 10px;
    text-align: center;
}
.wp-caption img {
    border: 0 none;
    height: auto;
    margin: 0;
    max-width: 98%;
    padding: 0;
    width: auto;
}
.wp-caption p.wp-caption-text {
    font-size: 13px;
    line-height: 17px;
    margin: 0;
    padding: 0 4px 5px;
}

/* Line Clamp Utilities */
.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;
}

/* =========================================================
   PROTHOM BARTA PHOTOCARD EDITOR MODAL & 1080x1080 CANVAS STYLES
========================================================= */
@import url('https://fonts.maateen.me/kalpurush/font.css');
@import url('https://fonts.cdnfonts.com/css/ekush');
@import url('https://cdn.jsdelivr.net/gh/mhs/bangla-web-fonts@master/css/ekush.css');

@font-face {
    font-family: 'Ekush';
    src: url('https://cdn.jsdelivr.net/gh/mhs/bangla-web-fonts@master/fonts/Ekush/Ekush.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --kp-red: #cb2027;
    --kp-navy: #1f3f5b;
    --kp-border: #e0e0e0;
}

/* Modal Styling */
.kp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}
.kp-modal-content {
    background: #fff;
    width: 100%;
    max-width: 1050px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    animation: kpZoomIn 0.3s ease;
}
@keyframes kpZoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.kp-modal-header {
    background: #111;
    color: #fff;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kp-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #fff;
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
}
.kp-close {
    font-size: 28px;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
}
.kp-close:hover {
    color: #fff;
}

/* Editor Grid Layout */
.kp-editor-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    min-height: 560px;
}
@media (max-width: 880px) {
    .kp-editor-grid {
        grid-template-columns: 1fr;
    }
}

/* Preview Section */
.kp-preview-section {
    padding: 25px;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--kp-border);
    overflow: hidden;
}

/* Scale Wrapper: Scales down the 1080x1080 card to fit smoothly on any screen */
.kp-scale-wrapper {
    width: 500px;
    height: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}
@media (max-width: 600px) {
    .kp-scale-wrapper {
        width: 330px;
        height: 330px;
    }
}

/* 1080x1080 PHOTOCARD CANVAS */
/* =========================================================
   NEW 100% EXACT DYNAMIC PHOTOCARD STYLES (1080x1080 HD)
========================================================= */
.kp-card-exact,
.kp-card-redesign,
.kp-card {
    width: 1080px;
    height: 1080px;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    transform: scale(0.4629); /* 500px / 1080px */
    background: #ffffff;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .kp-card-exact,
    .kp-card-redesign,
    .kp-card {
        transform: scale(0.3055);
    }
}

/* SUBTLE WATERMARK BACKGROUND LAYER */
.kp-watermark-overlay {
    position: absolute;
    top: 470px;
    left: 0;
    width: 100%;
    height: 540px;
    z-index: 1;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='40'%3E%3Ctext x='10' y='26' font-family='Noto Serif Bengali, serif' font-size='16' font-weight='bold' fill='%23cc0000'%3Eকাল প্রকাশ%3C/text%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
}

/* TOP FEATURED IMAGE AREA WITH ROUNDED CORNERS & GRADIENT FADE */
.kp-card-img-box {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    background: #f0f4f8;
    border-top-left-radius: 36px;
    border-top-right-radius: 36px;
    z-index: 2;
}

.kp-card-photo,
.kp-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.kp-card-img-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
    pointer-events: none;
}

/* CENTER CONTENT AREA */
.kp-card-content {
    position: relative;
    padding: 0 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    flex-grow: 1;
    background: transparent;
    z-index: 3;
}

/* BRAND LOGO ROW WITH DOTS */
.kp-card-brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 16px;
    margin-top: 10px;
}

.kp-line-left {
    display: flex;
    align-items: center;
    gap: 5px;
}

.kp-line-bar-red {
    width: 160px;
    height: 3px;
    background: #cc0000;
    border-radius: 2px;
}

.kp-line-dot-red {
    width: 6px;
    height: 6px;
    background: #cc0000;
    border-radius: 50%;
}

.kp-line-right {
    display: flex;
    align-items: center;
    gap: 5px;
}

.kp-line-dot-blue {
    width: 6px;
    height: 6px;
    background: #0f2a4a;
    border-radius: 50%;
}

.kp-line-bar-blue {
    width: 160px;
    height: 3px;
    background: #0f2a4a;
    border-radius: 2px;
}

.kp-brand-logo-wrapper {
    max-height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kp-brand-logo-img {
    max-height: 70px;
    width: auto;
    object-fit: contain;
}

.kp-brand-title-red {
    font-size: 48px;
    font-weight: 700;
    color: #d00000;
    font-family: 'Noto Serif Bengali', serif;
}

.kp-brand-title-blue {
    font-size: 48px;
    font-weight: 700;
    color: #0f2a4a;
    font-family: 'Noto Serif Bengali', serif;
}

/* META DATE & DOMAIN ROW */
.kp-card-meta-row,
.kp-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Noto Serif Bengali', serif;
    font-size: 33px;
    color: #111111;
    margin-top: 5px;
    position: relative;
}

.kp-meta-bar-red {
    color: #cc0000;
    font-weight: 700;
    font-size: 38px;
}

.kp-meta-bar-blue {
    color: #0f2a4a;
    font-weight: 700;
    font-size: 38px;
}

.kp-meta-date {
    color: #111111;
    font-weight: 600;
}

.kp-meta-domain {
    color: #b80000;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kp-globe-icon {
    width: 30px;
    height: 30px;
    stroke: #cc0000;
}

/* HEADLINE TITLE BOX */
.kp-card-title-box {
    width: 100%;
    padding: 10px 15px;
    text-align: center;
}

.kp-card-headline,
.kp-title {
    font-family: 'Noto Serif Bengali', serif;
    font-size: 60px;
    font-weight: 700;
    line-height: 1.28;
    color: #0a2240;
    margin: 0;
    padding: 0;
    word-wrap: break-word;
}

/* "বিস্তারিত কমেন্টে" BADGE */
.kp-card-badge-row {
    margin-bottom: 12px;
}

.kp-comment-badge {
    background: #c00000;
    color: #ffffff;
    font-family: 'Noto Serif Bengali', serif;
    font-size: 26px;
    font-weight: 700;
    padding: 8px 34px;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(192, 0, 0, 0.25);
}

/* FOOTER SOCIAL BAR WITH OFFICIAL BADGES */
.kp-card-social-footer {
    height: 72px;
    width: 100%;
    background: #0f2a4a;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 25px;
    box-sizing: border-box;
    z-index: 3;
}

.kp-social-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-family: sans-serif;
    font-size: 23px;
    font-weight: 600;
}

.kp-social-badge {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.kp-social-badge svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
}

.kp-social-badge.fb { background: #1877f2; }
.kp-social-badge.yt { background: #ff0000; }
.kp-social-badge.ig { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.kp-social-badge.tt { background: #000000; border: 1px solid rgba(255,255,255,0.2); }

.kp-social-divider {
    width: 1px;
    height: 34px;
    background: rgba(255, 255, 255, 0.25);
}

/* Sidebar Customizer Controls */
.kp-controls-sidebar {
    padding: 25px 20px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.kp-controls-sidebar h4 {
    margin: 0 0 20px 0;
    font-size: 17px;
    color: #222;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
}
.control-group {
    margin-bottom: 15px;
}
.control-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
}
.control-group input[type="range"] {
    width: 100%;
    cursor: pointer;
}

/* Action Buttons */
.kp-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}
.kp-btn-primary {
    background: #111;
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
    transition: background 0.3s;
    width: 100%;
}
.kp-btn-primary:hover {
    background: var(--kp-red);
}
.kp-btn-secondary {
    background: #f1f1f1;
    color: #333;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
    transition: background 0.2s;
    width: 100%;
}
.kp-btn-secondary:hover {
    background: #e1e1e1;
}

/* DYNAMIC MEGA MENU STYLING */
.mega-nav-dynamic {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mega-nav-dynamic > li {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 6px;
}
.mega-nav-dynamic > li > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    color: #111827;
    font-weight: 700;
    font-size: 16px;
    transition: color 0.2s;
}
.mega-nav-dynamic > li > a:hover {
    color: #cc0000;
}
.mega-nav-dynamic ul.sub-menu {
    list-style: none;
    padding-left: 10px;
    margin-top: 4px;
}
.mega-nav-dynamic ul.sub-menu li a {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    padding: 2px 0;
    transition: color 0.2s;
}
.mega-nav-dynamic ul.sub-menu li a:hover {
    color: #cc0000;
}

/* DYNAMIC FOOTER MENU STYLING */
ul.footer-nav-dynamic {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
ul.footer-nav-dynamic li {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
ul.footer-nav-dynamic li:not(:last-child)::after {
    content: "•";
    color: #cc0000;
    font-weight: bold;
}
ul.footer-nav-dynamic li a {
    color: #111827;
    font-weight: 800;
    transition: color 0.2s;
}
ul.footer-nav-dynamic li a:hover {
    color: #cc0000;
}

/* HIDE UNWANTED STANDALONE PLUGIN BUTTONS */
#openKpModalBtn,
.kp-circle-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
