/*
Theme Name: SehatManthan Premium
Theme URI: http://sehatmanthan.live
Author: Antigravity
Author URI: http://sehatmanthan.live
Description: An ultra-premium, modern Hindi health news theme designed for SehatManthan.
Version: 2.0.0
Text Domain: sehatmanthan
*/

:root {
    /* Ultra Premium Color Palette */
    --primary-color: #0d9488; /* Elegant Teal/Medical Green */
    --primary-gradient: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    --accent-color: #f43f5e; /* Rose accent for breaking/hot news */
    
    --text-main: #1e293b; /* Slate 800 */
    --text-light: #64748b; /* Slate 500 */
    --bg-main: #f8fafc; /* Slate 50 */
    --bg-white: #ffffff;
    --border-color: #e2e8f0; /* Slate 200 */
    
    /* Typography */
    --font-hindi: 'Mukta', sans-serif;
    --font-heading: 'Khand', sans-serif;
    
    /* Layout & Spacing */
    --container-width: 1200px;
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    
    /* Premium Shadows & Radii */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-hindi);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.7;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--text-main); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-color); }

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

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 var(--spacing-sm); }

/* 
 * Premium Header 
 */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-soft);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.site-logo h1 {
    font-size: 2.2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    letter-spacing: -0.5px;
}

.site-logo h1 span {
    color: var(--text-main);
    -webkit-text-fill-color: var(--text-main);
}

/* 
 * Sleek Navigation (No red bar)
 */
.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 15px;
}

.nav-menu > li > a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 10px 0;
    position: relative;
}

.nav-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: var(--transition);
}

.nav-menu > li > a:hover::after,
.nav-menu > li.current-menu-item > a::after {
    width: 100%;
}

/* Dropdown Sub-menu Styling */
.nav-menu li {
    position: relative;
}

.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-hover);
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
    list-style: none;
    border: 1px solid rgba(0,0,0,0.05);
}

.nav-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu li {
    padding: 0;
}

.nav-menu .sub-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: 1rem;
    color: var(--text-main);
    border-bottom: 1px solid rgba(0,0,0,0.03);
    transition: var(--transition);
}

.nav-menu .sub-menu li:last-child a {
    border-bottom: none;
}

.nav-menu .sub-menu li a:hover {
    background: rgba(13, 148, 136, 0.05); /* very light primary */
    color: var(--primary-color);
    padding-left: 25px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

.nav-menu a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    white-space: nowrap;
}

.social-icons {
    display: flex;
    gap: 15px; /* Reduced gap between icons */
    align-items: center;
}

.social-icons a {
    color: var(--text-light);
    font-size: 1.1rem;
    transition: var(--transition);
}
.social-icons a:hover { color: var(--primary-color); transform: scale(1.1); }

/* 
 * Premium Homepage Layout
 */
.site-main { padding: var(--spacing-xl) 0; }

/* 
 * Featured 3-Column Grid Layout
 */
.featured-3-col-grid {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 20px;
    margin-bottom: var(--spacing-xl);
}

.col-left, .col-center, .col-right {
    min-width: 0;
}

/* Sidebar Boxes (Left and Right) */
.trending-news-box, .routine-news-box {
    background: var(--bg-white);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--radius-lg);
    padding: 15px; /* Reduced from 20px to compress height */
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.box-header {
    border-bottom: 2px solid rgba(0,0,0,0.05);
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.box-header h3 {
    font-size: 1.2rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

/* Left Column: Trending List */
.trending-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trending-list li a {
    display: flex;
    gap: 12px;
    text-decoration: none;
    align-items: center;
    transition: transform 0.3s;
}

.trending-list li a:hover {
    transform: translateX(5px);
}

.trending-list .t-img {
    flex-shrink: 0;
    width: 65px;
    height: 45px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.trending-list .t-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trending-list .t-title {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.4;
    font-weight: 600;
}

.trending-list li a:hover .t-title {
    color: var(--primary-color);
}

/* Center Column: Swiper Slider */
.featured-swiper {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    min-height: 400px;
}

.slide-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.slide-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,0.95) 0%, rgba(15,23,42,0.6) 40%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
}

.slide-badge {
    align-self: flex-start;
    background: #ef4444; /* Red badge */
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.slide-overlay h2 {
    color: white;
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.slide-overlay .slide-meta {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.swiper-pagination-bullet {
    background: white !important;
    opacity: 0.5;
}
.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary-color) !important;
}

/* Right Column: Numbered List */
.numbered-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: custom-counter;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.numbered-list li {
    counter-increment: custom-counter;
    position: relative;
}

.numbered-list li a {
    display: flex;
    gap: 12px;
    text-decoration: none;
    align-items: center;
    padding-left: 25px; /* space for number */
    transition: transform 0.3s;
}

.numbered-list li::before {
    content: counter(custom-counter);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(14, 165, 233, 0.15); /* light blue faded */
    line-height: 1;
    z-index: 0;
}

.numbered-list li a:hover {
    transform: translateX(5px);
}

.numbered-list .num-img {
    flex-shrink: 0;
    width: 60px;
    height: 40px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    z-index: 1;
}

.numbered-list .num-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.numbered-list .num-title {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.4;
    font-weight: 600;
    z-index: 1;
}

.numbered-list li a:hover .num-title {
    color: var(--primary-color);
}

/* 
 * News Grid Categories 
 */
.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: var(--spacing-lg);
}

.section-title h2 {
    font-size: 1.8rem;
    color: var(--text-main);
    position: relative;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
    margin-top: 8px;
}

.premium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.premium-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.02);
}

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

.premium-card .card-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

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

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

.premium-card .card-content {
    padding: var(--spacing-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.premium-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-main);
}

.premium-card .card-meta {
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 
 * Layout & Sidebar
 */
.main-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.main-grid > .content-area {
    flex: 1 1 65%;
    min-width: 300px;
}

.main-grid > .sidebar-area {
    flex: 1 1 30%;
    min-width: 300px;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 25px;
    margin-bottom: var(--spacing-lg);
}

.widget_recent_entries ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.widget_recent_entries li {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    background: #f8fafc;
    position: relative;
    padding-left: 20px;
    border-left: 4px solid var(--primary-color);
}

.widget_recent_entries li:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    background: #fff;
    border-left-color: #f59e0b; /* Amber */
}

.widget_recent_entries li a {
    display: block;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.4;
    text-decoration: none;
}

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

/* Custom SehatManthan Recent Posts Widget */
.sm-recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sm-recent-posts-list li {
    display: flex;
    gap: 15px;
    align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sm-recent-posts-list li:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.sm-rp-thumb {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.sm-rp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sm-recent-posts-list li:hover .sm-rp-thumb img {
    transform: scale(1.1);
}

.sm-rp-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sm-rp-title {
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.sm-rp-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* 
 * Single Article Content Formatting
 */
.entry-content {
    font-size: 1.15rem;
    line-height: 1.8;
}

.entry-content a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s;
}

.entry-content a:hover {
    color: #f59e0b; /* Amber secondary color */
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5em;
    padding-left: 2em; /* Ensure bullets/numbers are inside */
}

.entry-content li {
    margin-bottom: 0.5em;
}

.entry-content h2,
.entry-content h3 {
    margin: 1.5em 0 0.8em;
}

.view-all-btn:hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: translateX(3px);
}

/* Pagination */
.pagination-area .nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pagination-area .nav-links a,
.pagination-area .nav-links span {
    padding: 10px 18px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 600;
    transition: var(--transition);
}

.pagination-area .nav-links a:hover,
.pagination-area .nav-links span.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 
 * WordPress Embeds & Ads Fixes
 */
.entry-content iframe,
.entry-content object,
.entry-content embed,
.wp-block-embed iframe {
    max-width: 100%;
    width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
}

.wp-block-embed-youtube iframe,
.wp-block-embed-vimeo iframe,
.wp-embed-responsive .wp-has-aspect-ratio iframe {
    aspect-ratio: 16 / 9;
    height: auto;
}

/* Fix for WordPress Post Embeds */
.wp-block-embed-wordpress iframe,
iframe.wp-embedded-content {
    aspect-ratio: auto !important;
    min-height: 400px;
    border: 1px solid var(--border-color) !important;
}

.wp-block-embed {
    margin-bottom: 25px;
}

.ad-slot {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    overflow: hidden;
}
.ad-slot img {
    max-width: 100%;
    height: auto;
}

/* 
 * Premium Footer 
 */
.site-footer {
    background: #0f172a; /* Slate 900 */
    color: #94a3b8; /* Slate 400 */
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-widgets .footer-widget:nth-child(1) {
    justify-self: start;
}

.footer-widgets .footer-widget:nth-child(2) {
    justify-self: center;
}

.footer-widgets .footer-widget:nth-child(3) {
    justify-self: end;
}

.footer-widget h3 {
    color: #f8fafc; /* Slate 50 */
    font-size: 1.3rem;
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.footer-widget p {
    font-size: 1.05rem;
    line-height: 1.7;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
}
.footer-widget ul li {
    margin-bottom: 12px;
}
.footer-widget ul.split-list {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    column-gap: 40px;
    row-gap: 0;
}
.footer-widget ul a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-widget ul a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.site-info {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    font-size: 0.95rem;
    color: #64748b;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* Responsive */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-main);
    cursor: pointer;
}

@media (max-width: 992px) {
    .featured-3-col-grid { 
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .col-center {
        grid-row: 1; /* Make carousel top on mobile */
    }
    .col-left {
        grid-row: 2;
    }
    .col-right {
        grid-row: 3;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle { display: block; }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-white);
        flex-direction: column;
        box-shadow: var(--shadow-hover);
        padding: var(--spacing-md);
        align-items: flex-start;
        text-align: left;
    }
    
    .main-navigation.active {
        display: flex;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        align-items: flex-start;
    }
    
    .nav-menu > li > a { border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
    
    /* Mobile Sub-menu Reset */
    .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        background: transparent;
        margin-top: 10px;
        display: none; /* Can be toggled with JS, or just shown by default */
    }
    
    .nav-menu li:hover > .sub-menu {
        display: block;
    }
    
    .header-actions {
        margin-left: 0;
        margin-top: 20px;
        justify-content: flex-start;
        width: 100%;
    }
    
    .premium-grid {
        grid-template-columns: 1fr 1fr; /* 2 cards per row on mobile */
        gap: 12px;
    }
    
    .premium-card .card-img {
        height: 120px;
    }
    
    .premium-card h3 {
        font-size: 0.95rem;
        line-height: 1.3;
        margin-bottom: 8px;
    }
    
    .premium-card .card-content {
        padding: 10px;
    }
    
    .premium-card .card-meta {
        font-size: 0.75rem;
        display: flex;
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
    
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-3-col-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .slide-overlay h2 {
        font-size: 1.4rem;
    }
    .featured-swiper {
        min-height: 250px;
    }
}
