/* Default (Light) */
:root {
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-main: #222222;
}

/* Dark Mode Variables */
html.dark-mode {
    --bg-color: #121212 !important;
    --card-bg: #1e1e1e !important;
    --text-main: #f5f5f5 !important;
}

/* Apply variables to the root elements */
html, body {
    background-color: var(--bg-color) !important;
    color: var(--text-main);
    transition: background-color 0.3s ease; /* Smooth transition when toggling manually */
}

/* Specific fix for W3.CSS background classes */
html.dark-mode body.w3-light-grey,
html.dark-mode .w3-white {
    background-color: var(--bg-color) !important;
    color: var(--text-main) !important;
}

/* Apply to the very top root */
html {
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Ensure all cards and sidebars also fade smoothly */
.news-card, .side-widget, .poll-container, body {
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease !important;
}

/* Moon Button Style tweaks */
.moon-style-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.icon-wrapper {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}



/* --- 2. Icon Rotation & Color --- */
.icon-wrapper {
    font-size: 20px;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    color: #f1c40f; /* Classic Moon Yellow */
}

/* --- 3. Dark Mode State Transformations --- */
html.dark-mode .moon-style-btn {
    background-color: #2c3e50;
    border-color: #34495e;
}

html.dark-mode .icon-wrapper {
    transform: rotate(360deg);
    color: #f39c12; /* Sun Orange-Gold */
}

/* --- 4. Global Smooth Switching --- */
/* This ensures the background and cards don't "snap" colors */
html, body, .news-card, .side-widget, .poll-box {
    transition: background-color 0.8s ease, color 0.8s ease, border-color 0.8s ease !important;
}

/* --- Desktop (Default) --- */
.news-container { display: flex; gap: 20px; }

/* --- Tablet View (IPads / Tablets) --- */
@media (max-width: 992px) {
    .w3-col.l8 { width: 100%; } /* Main content takes full width */
    .w3-col.l4 { width: 100%; margin-top: 20px; } /* Sidebar moves below */
    .news-headline { font-size: 20px; }
}

/* --- Mobile View (Phones) --- */
@media (max-width: 600px) {
    body { padding: 5px; }
    .news-card { margin-bottom: 10px; border-radius: 0; } /* Edge-to-edge on mobile */
    .news-headline { font-size: 20px; padding: 0 10px; }
    .news-featured-img { max-height: 250px; }
    .news-poll-btn { padding: 15px; font-size: 14px; } /* Larger touch targets for fingers */
    
    /* Hide non-essential meta on small screens */
    .news-meta .fa-user, .news-meta .fa-eye { display: none; }
}




/* --- 3. Poll Card Container --- */
.poll-container {
    max-width: 600px;
    margin: 0 auto 30px auto;
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

/* --- 4. Image Section --- */
.poll-header-img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    display: block;
    border-bottom:
	
}


/* Fix for Image fitting */
.poll-img {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover; /* This crops the image to fill the space perfectly */
    object-position: center;
    border-radius: 8px 8px 0 0; /* Rounds only top corners */
    display: block;
}

/* Container adjustment to ensure no overflow */
.poll-container {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Sidebar Styling for Popular/Recent */
.side-widget {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.side-post-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    text-decoration: none;
    color: inherit;
    align-items: center;
}

.side-post-img {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
}

/* Initial Hidden State */
.poll-body {
    display: none; /* Hidden by default */
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Thumbnail in Title Row */
.poll-header {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    padding: 15px;
}

.thumb-mini {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
}

.poll-title-text {
    flex: 1;
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

/* Full Image inside body */
.poll-full-img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Stacked Options One by One */
.option-btn {
    display: block;
    width: 100%;
    margin-bottom: 10px; /* One by one spacing */
    text-align: center;
    padding: 12px;
}

.side-post-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    text-decoration: none;
    color: var(--text-main);
    padding: 8px;
    border-radius: 8px;
    transition: 0.2s;
}

.side-post-item:hover {
    background-color: rgba(0,0,0,0.05);
    transform: translateX(5px);
}

body.dark-mode .side-post-item:hover {
    background-color: rgba(255,255,255,0.05);
}

.side-post-img {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}
/* News Card Styling */
.news-card {
    border-radius: 4px;
    overflow: hidden;
}

.news-img-container {
    width: 100%;
    overflow: hidden;
    background: #000;
}

.news-featured-img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Typography */
.news-headline {
    font-family: 'Georgia', serif; /* Classic news font */
    font-weight: 800;
    font-size: 22px;
    line-height: 1.2;
    margin-top: 5px;
}

.news-body {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-main);
    margin-top: 15px;
    text-align: justify;
}

/* News Poll Buttons */
.news-poll-btn {
    display: block;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    padding: 12px 15px;
    margin-bottom: 8px;
    text-align: left;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.3s;
}

.news-poll-btn:hover {
    background: #f44336;
    color: #fff;
    border-color: #f44336;
}

.news-poll-btn .dot {
    height: 10px;
    width: 10px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
}

/* Dark Mode Tweaks */
body.dark-mode .news-poll-btn {
    background: #2a2a2a;
    border-color: #444;
    color: #eee;
}


.w3-red {
    background-color: #d32f2f !important; /* Professional News Red */
}

.news-card {
    border-bottom: 3px solid #eee;
    padding-bottom: 20px;
}





body.dark-mode .news-card {
    border-bottom: 3px solid #333;
}

/* --- Force Theme Colors on All Sections --- */
.news-card, .side-widget, .poll-container {
    background-color: var(--card-bg) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

/* --- Sidebar Specifics --- */
.side-post-item {
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-color);
}

.side-post-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Ensure the poll section and buttons are always clickable */
.poll-box, .options-area, .news-poll-btn {
    position: relative;
    z-index: 10; /* Brings buttons to the front */
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Fix for Dark Mode button hover states */
html.dark-mode .news-poll-btn {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
    border: 1px solid #444 !important;
}

html.dark-mode .news-poll-btn:hover {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}

.related-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--card-bg) !important;
    color: var(--text-main) !important;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.related-card img {
    border-bottom: 1px solid var(--border-color);
}

/* Ensure font sizes look professional on mobile */
@media (max-width: 600px) {
    .related-posts h3 { font-size: 18px; }
    .related-card img { height: 180px !important; } /* Taller images for single column mobile */
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: bold;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, opacity 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Brand Colors */
.whatsapp { background-color: #25D366; }
.facebook { background-color: #1877F2; }
.x-twitter { background-color: #000000; }
.copy { background-color: #607d8b; border: none; cursor: pointer; }

/* Dark Mode adjustment for Copy button */
body.dark-mode .copy { background-color: #455a64; }

@media (max-width: 600px) {
    .share-btn { flex: 1; justify-content: center; padding: 12px; }
}
	
	
