/* NDTV Clone Specific Styles */
:root {
    --primary-green: #014e45;
    --primary-green-dark: #003830;
    --primary-red: #e31212;
    --text-dark: #222222;
    --text-light: #666666;
    --bg-light: #f5f5f5;
    --border-color: #e0e0e0;
}

.text-red { color: var(--primary-red); }

/* Header override */
.main-header {
    background-color: var(--primary-green) !important;
    color: #fff;
    padding: 0;
    position: sticky;
    top: 17px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
}
.search-icon-btn { font-size: 18px; }

.logo {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-start; 
    z-index: 1001;
}

.logo img {
    height: 89px;
    width: auto;
    object-fit: contain;
    display: block;
    position: relative;
    top: -12px; /* Shift up to balance the 89px height and align perfectly */
    margin-bottom: -17px; /* Prevent header stretching downwards */
}

.main-nav { flex: 1; display: flex; justify-content: center; }
.main-nav ul { display: flex; align-items: center; gap: 20px; margin: 0; padding: 0; }
.main-nav a {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.main-nav a:hover { color: #e0e0e0; }
.red-dot {
    display: inline-block;
    width: 8px; height: 8px;
    background-color: var(--primary-red);
    border-radius: 50%;
}

.header-right { display: flex; align-items: center; gap: 20px; }
.gold-price { text-align: right; font-size: 12px; line-height: 1.2; }
.gold-price .commodity { color: #ffd700; font-weight: bold; }
.gold-price .price { font-weight: bold; }
.date-time { font-size: 11px; text-align: right; border-left: 1px solid rgba(255,255,255,0.2); padding-left: 15px; line-height: 1.3; }

/* Special Links Bar */
.special-links-bar {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    margin-bottom: 20px;
    margin-top: 19px;
}
.special-links-bar .container { display: flex; align-items: center; gap: 15px; }
.special-label { color: var(--primary-red); font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.special-links { display: flex; align-items: center; gap: 20px; overflow-x: auto; margin:0; padding:0; }
.special-links a { color: var(--text-dark); font-size: 15px; white-space: nowrap; }
.special-links a:hover { color: var(--primary-red); }

/* Main Content Grid */
.main-content { padding-bottom: 40px; padding-top: 20px; }
.content-grid { display: grid; grid-template-columns: 2.2fr 1.3fr 300px; gap: 20px; }

/* Article Cards */
.image-wrapper { position: relative; width: 100%; overflow: hidden; margin-bottom: 12px; border-radius: 4px; }
.image-wrapper img { width: 100%; aspect-ratio: 16/9; display: block; object-fit: cover; transition: transform 0.3s ease; }
.image-wrapper:hover img { transform: scale(1.05); }
.ndtv-badge { position: absolute; bottom: 10px; left: 10px; z-index: 2; }

.hero-title { font-size: 28px; font-weight: 700; line-height: 1.3; margin-top: 10px; }
.hero-title:hover, .article-title:hover { color: var(--primary-red); cursor: pointer; }
.article-title { font-size: 18px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; }
.article-title.small-title { font-size: 16px; }

.divider { border: 0; height: 1px; background-color: var(--border-color); margin: 20px 0; }
.divider.dashed { background: none; border-top: 1px dashed #ccc; }
.text-news-list li { padding: 8px 0; }

/* Right Sidebar */
.ad-box-sidebar { background: #f9f9f9; padding: 10px; text-align: center; border: 1px solid var(--border-color); }
.ad-label-small { display: block; font-size: 10px; color: #999; margin-bottom: 5px; text-align: center; }
.sidebar-ad { max-width: 100%; height: auto; }

.section-heading { font-size: 20px; font-weight: 700; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
.video-player-placeholder { background: #000; width: 100%; aspect-ratio: 16/9; position: relative; color: #fff; }
.top-left-icon { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,0.8); color: #000; padding: 5px; border-radius: 3px; font-size: 12px; }
.bottom-controls { position: absolute; bottom: 10px; left: 10px; right: 10px; display: flex; align-items: center; gap: 15px; font-size: 14px; }
.fullscreen-icon { margin-left: auto; }

.trending-list { padding:0; margin:0; }
.trending-list li { display: flex; gap: 15px; align-items: flex-start; margin-bottom: 15px; }
.trending-list .rank { font-size: 24px; font-weight: 700; color: var(--text-light); line-height: 1; }
.trending-list .trend-text { font-size: 16px; font-weight: 600; }

/* Categories Grid Section */
.categories-grid-section { background-color: var(--bg-light); padding: 40px 0; border-top: 1px solid var(--border-color); }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-column { background: #f8f8f8; padding: 20px; border-radius: 4px; }
.cat-heading { font-size: 22px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; }
.cat-news-list { padding:0; margin:0; }
.cat-news-list li { display: flex; gap: 12px; margin-bottom: 20px; }
.cat-news-list img { width: 80px; height: 50px; object-fit: cover; border-radius: 3px; }
.cat-news-list p { font-size: 14px; font-weight: 600; line-height: 1.4; margin: 0; }

/* Footer Section */
.shopping-section { padding: 40px 15px; }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1024px) {
    .content-grid { grid-template-columns: 2fr 1fr 1fr; }
    .right-sidebar { display: none; /* Hide sidebar on tablet */ }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .shop-grid { grid-template-columns: repeat(2, 1fr); }
    .main-nav ul { gap: 15px; }
}

@media (max-width: 768px) {
    .content-grid { grid-template-columns: 1fr; gap: 30px; }
    .middle-column { border-top: 2px solid var(--border-color); padding-top: 20px; }
    .cat-grid { grid-template-columns: 1fr; }
    .shop-grid { grid-template-columns: 1fr; }
    .main-nav ul { display: none; /* Mobile menu handles this */ }
    .header-right { display: none; }
}

@media (max-width: 480px) {
    .header-left { gap: 10px; }
    .logo img { height: 35px; width: auto; }
    .hero-title { font-size: 24px; }
}

/* =========================================
   INNER PAGES (Category, Article, Search)
   ========================================= */

/* Category Page Overrides */
.category-hero { 
    background: transparent; 
    padding: 0 0 15px 0; 
    margin-bottom: 25px; 
    border-radius: 0; 
    box-shadow: none; 
    border-bottom: 2px solid var(--border-color); 
    border-left: none !important;
}
.category-page-title { 
    font-size: 32px; 
    font-weight: 800; 
    color: var(--text-dark) !important; 
}
.category-count { 
    font-size: 14px; 
    color: var(--text-light); 
}

/* Article Page Overrides */
.article-header { 
    background: transparent; 
    padding: 0; 
    margin-bottom: 20px; 
    box-shadow: none; 
}
.article-title { 
    font-size: 36px; 
    font-weight: 800; 
    line-height: 1.3; 
    color: var(--text-dark); 
}
.article-summary { 
    font-size: 18px; 
    color: var(--text-light); 
    line-height: 1.6; 
    margin-bottom: 20px; 
    padding-bottom: 20px; 
    border-bottom: 1px solid var(--border-color); 
}
.article-body { 
    background: transparent; 
    padding: 0; 
    box-shadow: none; 
    font-size: 18px; 
    line-height: 1.8; 
    color: #333; 
}
.article-body p { 
    margin-bottom: 20px; 
}
.breadcrumbs { 
    font-size: 13px; 
    color: var(--text-light); 
    margin-bottom: 20px; 
}
.breadcrumbs a { 
    color: var(--text-light); 
}
.breadcrumbs a:hover { 
    color: var(--primary-red); 
}
.bc-current { 
    font-weight: 600; 
    background: none; 
    color: var(--text-dark) !important; 
    padding: 0; 
}
.article-tags, .share-row { 
    background: #f9f9f9; 
    box-shadow: none; 
    border: 1px solid var(--border-color); 
}

/* Article Body Typography & Spacing */
.article-body {
    font-size: 20px;
    line-height: 1.8;
    color: #222;
    padding: 0; /* Removing extra padding to align with container */
    margin-bottom: 30px;
}
.article-body p {
    margin-top: 0;
    margin-bottom: 25px;
}
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
}
@media (min-width: 768px) {
    .article-body {
        padding: 0; 
        font-size: 19px;
    }
}
.article-layout, .category-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}

/* Inner pages layout responsivness */
@media (max-width: 900px) {
    .article-layout, .category-layout {
        grid-template-columns: 1fr;
    }
    .article-main {
        padding: 0 15px; /* Adds left and right margin for mobile view */
    }
    .article-title {
        font-size: 28px;
    }
}
.shop-item img { width: 100%; height: 300px; object-fit: cover; margin-bottom: 15px; }
.shop-item h3 { font-size: 18px; margin-bottom: 5px; }
.shop-item p { font-size: 14px; color: var(--text-light); }

.dark-footer { background-color: var(--primary-green); color: #fff; padding: 40px 0 20px; }
.footer-content { display: flex; gap: 40px; }
.footer-logo-col { width: 150px; flex-shrink: 0; }
.follow-text { font-weight: 700; margin-bottom: 10px; font-size: 14px; }
.social-icons { display: flex; gap: 12px; font-size: 18px; }
.footer-links-col { flex-grow: 1; }
.top-links { display: flex; flex-wrap: wrap; gap: 15px 20px; margin-bottom: 20px; }
.top-links a { font-size: 14px; color:#fff !important; }
.group-sites { background: #003830; padding: 10px 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 15px; border-radius: 4px; margin-bottom: 30px; }
.group-label { background: #00221c; padding: 5px 10px; font-size: 12px; border-radius: 3px; }
.group-sites a { font-size: 13px; color: #ccc !important; }
.footer-bottom { display: flex; justify-content: space-between; font-size: 12px; color: #ccc; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }

/* Responsive Media Queries */
@media (max-width: 1100px) {
    .content-grid { grid-template-columns: 2fr 1fr 300px; }
    .middle-column:nth-child(3) { display: none; } /* Hide the second middle column */
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .main-nav { display: none; }
}
@media (max-width: 768px) {
    .content-grid { grid-template-columns: 1fr; }
    .middle-column:nth-child(3) { display: block; }
    .cat-grid { grid-template-columns: 1fr; }
    .shop-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; gap: 20px; }
    .header-right { display: none; }
    .special-links-bar { overflow-x: auto; }
    .d-mobile-only { display: block; }
}

/* Mobile App Button Styles */
.d-mobile-only {
    display: none;
}
.get-app-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 3px 10px 3px 3px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s;
}
.get-app-btn:hover { background-color: rgba(255,255,255,0.1); }
.get-app-btn .icon-circle {
    background-color: var(--primary-red);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

@media (max-width: 480px) {
    .logo img {
        height: 87px;
        width: auto;
    }
}
