/* =========================================
   NEXORA NEWS - BENGALI NEWSPAPER THEME
   ========================================= */

/* --- Variables --- */
:root {
    --primary-color: #D32F2F;
    /* Deep Red */
    --secondary-color: #1976D2;
    /* Deep Blue */
    --dark-text: #212121;
    --light-text: #757575;
    --bg-color: #F8F9FA;
    --white: #FFFFFF;
    --border-color: #E0E0E0;
    --hover-bg: #F5F5F5;
    --font-main: 'Hind Siliguri', sans-serif;
    --font-heading: 'Hind Siliguri', sans-serif;
    --font-en: 'Playfair Display', serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* --- Reset & Global --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--dark-text);
    background-color: var(--bg-color);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--dark-text);
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Utility Classes --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.grid-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 30px;
}

/* --- Top Bar --- */
.top-bar {
    background-color: #111;
    color: #ccc;
    font-size: 13px;
    padding: 8px 0;
}

.top-bar i {
    margin-right: 5px;
}

.top-links a {
    color: #ccc;
    margin-left: 15px;
}

.top-links a:hover {
    color: var(--white);
}

.top-links .divider {
    margin: 0 15px;
    color: #555;
}

.btn-login {
    font-weight: 500;
}

/* --- Main Header --- */
.main-header {
    background-color: var(--white);
    padding: 25px 0;
    border-bottom: 1px solid var(--border-color);
}

.logo a {
    display: inline-block;
}

.logo h1 {
    font-family: var(--font-en);
    font-size: 42px;
    color: var(--dark-text);
    letter-spacing: -1px;
}

.logo h1 span {
    color: var(--primary-color);
}

.logo .tagline {
    font-size: 14px;
    color: var(--light-text);
    margin-top: -5px;
    letter-spacing: 1px;
}

.header-ad .ad-placeholder {
    width: 728px;
    height: 90px;
    background-color: #EEE;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    border: 1px dashed #CCC;
    font-size: 14px;
}

/* --- Navigation --- */
.main-nav {
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-links li {
    position: relative;
}

.nav-links a {
    display: block;
    color: var(--white);
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle {
    display: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

.search-icon {
    color: var(--white);
    cursor: pointer;
    padding: 10px;
    font-size: 18px;
}

/* --- Search Overlay --- */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
}

.search-overlay.active {
    display: flex;
}

.search-wrapper {
    position: relative;
    max-width: 800px;
}

.search-wrapper input {
    width: 100%;
    padding: 20px 30px;
    font-size: 24px;
    border: none;
    border-bottom: 2px solid var(--primary-color);
    background: transparent;
    color: var(--white);
    outline: none;
    font-family: inherit;
}

.search-wrapper input::placeholder {
    color: #888;
}

.close-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 30px;
    cursor: pointer;
}

/* --- Breaking News --- */
.breaking-news {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    font-size: 15px;
}

.bn-title {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4px 15px;
    font-weight: 600;
    margin-right: 15px;
    position: relative;
    white-space: nowrap;
}

.bn-title::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 10px solid var(--primary-color);
}

.bn-content {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.bn-content marquee a {
    margin-right: 40px;
    color: var(--dark-text);
}

.bn-content marquee a:hover {
    color: var(--primary-color);
}

/* --- Main Content Layout --- */
.main-content {
    margin-top: 30px;
    margin-bottom: 40px;
}

/* --- Cards & UI Elements --- */
.card {
    background-color: var(--white);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.hover-effect {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-effect:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.img-wrapper {
    position: relative;
    overflow: hidden;
}

.img-wrapper img {
    transition: transform 0.8s ease;
    width: 100%;
}

.hover-effect:hover .img-wrapper img {
    transform: scale(1.05);
}

.category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 2px;
    z-index: 2;
    text-transform: uppercase;
}

.category-badge.tech {
    background-color: #009688;
}

.category-badge.sports {
    background-color: #FF9800;
}

.content {
    padding: 20px;
}

.title {
    margin-bottom: 10px;
    font-size: 22px;
}

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

.excerpt {
    color: var(--light-text);
    margin-bottom: 15px;
    font-size: 15px;
}

.meta {
    display: flex;
    font-size: 13px;
    color: #888;
}

.meta span {
    margin-right: 15px;
}

.meta i {
    margin-right: 5px;
}

/* Sub Hero News */
.sub-hero-news .card .content {
    padding: 15px;
}

.sub-hero-news .title {
    font-size: 18px;
}

/* Category Sections */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.section-title h2 {
    font-size: 24px;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 50%;
    height: 2px;
    background-color: var(--primary-color);
}

.view-all {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
}

.view-all:hover {
    color: var(--primary-color);
}

.flat-card {
    border: none;
    background: transparent;
}

.flat-card img {
    border-radius: 4px;
    margin-bottom: 12px;
}

.flat-card .title {
    font-size: 17px;
    line-height: 1.4;
}

/* --- Sidebar --- */
.widget {
    background-color: var(--white);
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
    border-radius: 4px;
}

.widget-header {
    border-bottom: 2px solid var(--dark-text);
    margin-bottom: 15px;
    padding-bottom: 8px;
}

.widget-header h3 {
    font-size: 18px;
    position: relative;
}

/* Latest News List */
.list-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}

.list-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.list-item .highlight {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 15px;
    opacity: 0.5;
    line-height: 1;
}

.list-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.list-info h4 a:hover {
    color: var(--primary-color);
}

.list-info .time {
    font-size: 12px;
    color: #888;
}

/* Ad Widget */
.ad-widget {
    padding: 0;
    background: transparent;
    border: none;
}

.ad-placeholder.square {
    width: 300px;
    height: 250px;
    background-color: #EEE;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    border: 1px dashed #CCC;
    margin: 0 auto;
}

/* Editor's Pick */
.editor-pick-card img {
    border-radius: 4px;
    margin-bottom: 10px;
}

.editor-pick-card h4 {
    font-size: 18px;
}

/* --- Photo Gallery --- */
.photo-gallery {
    margin-bottom: 50px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 200px);
    gap: 10px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px 15px 10px;
    color: var(--white);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-item .overlay p {
    font-weight: 500;
    font-size: 15px;
}

.gallery-item.large .overlay p {
    font-size: 20px;
}

/* --- Footer --- */
.main-footer {
    background-color: #1A1A1A;
    color: #CCC;
    padding-top: 60px;
}

.footer-top {
    margin-bottom: 40px;
}

.footer-widget h3 {
    color: var(--white);
    font-size: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    display: inline-block;
}

.footer-logo {
    font-family: var(--font-en);
    font-size: 32px;
    color: var(--white);
    margin-bottom: 15px;
}

.footer-logo span {
    color: var(--primary-color);
}

.about p {
    margin-bottom: 20px;
    font-size: 14px;
}

.social-icons a {
    display: inline-block;
    width: 36px;
    height: 36px;
    background-color: #333;
    color: var(--white);
    text-align: center;
    line-height: 36px;
    border-radius: 50%;
    margin-right: 10px;
}

.social-icons a:hover {
    background-color: var(--primary-color);
}

.links ul li,
.categories ul li {
    margin-bottom: 12px;
}

.links ul a,
.categories ul a {
    color: #AAA;
}

.links ul a:hover,
.categories ul a:hover {
    color: var(--white);
    padding-left: 5px;
}

.subscribe p {
    margin-bottom: 15px;
    font-size: 14px;
}

.subscribe-form {
    display: flex;
}

.subscribe-form input {
    flex-grow: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 2px 0 0 2px;
    outline: none;
    font-family: inherit;
}

.subscribe-form button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0 20px;
    border-radius: 0 2px 2px 0;
    cursor: pointer;
    transition: var(--transition);
}

.subscribe-form button:hover {
    background-color: #B71C1C;
}

.footer-bottom {
    background-color: #0F0F0F;
    padding: 20px 0;
    font-size: 14px;
}

/* --- Back to Top --- */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: var(--white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 99;
    transition: var(--transition);
}

#back-to-top:hover {
    background-color: #B71C1C;
    transform: translateY(-3px);
}

/* --- Responsive Layout --- */
@media (max-width: 1024px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }

    .right-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .ad-placeholder.square {
        margin: 0;
    }

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

    .gallery-item:nth-child(4),
    .gallery-item:nth-child(5) {
        display: none;
    }

    .header-ad {
        display: none;
    }
}

@media (max-width: 768px) {

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

    .right-section {
        grid-template-columns: 1fr;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        flex-direction: column;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .top-bar .date-time {
        display: none;
    }

    .top-links {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {

    .grid-2,
    .grid-3,
    .grid-4,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .sub-hero-news {
        grid-template-columns: 1fr;
    }

    .gallery-item:nth-child(4),
    .gallery-item:nth-child(5) {
        display: block;
    }

    .gallery-item.large {
        grid-column: span 1;
        grid-row: span 1;
    }

    .footer-bottom .d-flex {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .main-header .d-flex {
        justify-content: center;
    }

    .logo {
        text-align: center;
    }
}