/* =========================================================
   THEME NAME: Multiplatforms News
   DESCRIPTION: Complete Style Sheet with Active Menu & Submenu Arrows
   AUTHOR: Multiplatforms
   VERSION: 1.3
=========================================================== */

/* ==========================
   GLOBAL VARIABLES
========================== */
:root {
    --primary-color: #8B0000;       /* Blood red menu */
    --secondary-color: #ffcccc;     /* Hover highlight */
    --header-bg: #990000;           /* Header background */
    --heading-color: #222222;
    --text-color: #444444;
    --body-bg: #f6f6f6;
}

/* Dark Mode Variables */
body.dark-mode {
    --body-bg: #111111;
    --heading-color: #ffffff;
    --text-color: #dddddd;
}

/* ==========================
   BASE
========================== */
body {
    background: var(--body-bg);
    color: var(--text-color);
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    transition: background 0.3s, color 0.3s;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    margin: 0 0 16px 0;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
}
a:hover {
    color: var(--secondary-color);
}

/* ==========================
   HEADER
========================== */
.news-header {
    width: 100%;
    background: var(--header-bg);
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    position: relative;
    z-index: 999;
}

/* Sticky Header */
.news-header.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    animation: slideDown 0.35s ease;
}
@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Header Top (Logo + Ads) */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
}
.header-logo img,
.header-logo .site-title {
    max-height: 60px;
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
}
.header-ads {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* Header Bottom (Menu + Search + Dark Mode Toggle) */
.header-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-color);
    padding: 10px 0;
}

/* ==========================
   NAVIGATION
========================== */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.primary-menu {
    list-style: none;
    display: flex;
    gap: 34px;
    margin: 0;
    padding: 0;
}

.primary-menu li {
    position: relative;
}

.primary-menu li a {
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    padding: 12px 0;
    display: block;
}
.primary-menu li a:hover {
    color: var(--secondary-color);
}

/* ==========================
   ACTIVE MENU ITEM
========================== */
.primary-menu li.current-menu-item > a,
.primary-menu li.current_page_item > a,
.primary-menu li.active > a {
    color: var(--primary-color); /* Red active menu */
    font-weight: 800;
}

/* ==========================
   SUBMENU ARROW ICON
========================== */
.primary-menu li.menu-item-has-children > a::after {
    content: " ▼"; /* Down arrow */
    font-size: 12px;
    margin-left: 6px;
    transition: transform 0.3s ease;
}

/* Rotate arrow when submenu is open */
.primary-menu li.menu-item-has-children.active > a::after,
.primary-menu li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* Mega Menu */
.primary-menu li.mega-menu > ul,
.primary-menu li.menu-item-has-children > ul {
    position: absolute;
    left: 0;
    top: 100%;
    background: #ffffff;
    display: none;
    grid-template-columns: repeat(4, 1fr);
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 999;
}
.primary-menu li.mega-menu:hover > ul,
.primary-menu li.menu-item-has-children.active > ul {
    display: grid;
}
.primary-menu li.mega-menu ul li a,
.primary-menu li.menu-item-has-children ul li a {
    color: #222;
    font-weight: 600;
}
.primary-menu li.menu-item-has-children ul li a:hover {
    background: var(--secondary-color);
    color: #000;
}

/* ==========================
   SEARCH
========================== */
.header-search input[type="search"] {
    padding: 7px 12px;
    border-radius: 6px;
    border: none;
}

/* ==========================
   DARK MODE TOGGLE
========================== */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-left: 20px;
}
.dark-mode-toggle .switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.dark-mode-toggle .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.dark-mode-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}
.dark-mode-toggle .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}
.dark-mode-toggle input:checked + .slider {
    background-color: #222;
}
.dark-mode-toggle input:checked + .slider:before {
    transform: translateX(26px);
}

/* ==========================
   CONTENT & SIDEBAR
========================== */
.mp-single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
}

.mp-sidebar-right {
    position: sticky;
    top: 120px;
}

/* Post Core */
.mp-post-title {
    color: var(--heading-color);
}
.mp-post-content {
    line-height: 1.9;
}

/* Dark Mode Content */
body.dark-mode .mp-sidebar .widget,
body.dark-mode .mp-post-meta span {
    background: #1c1c1c;
    color: #ffffff;
}

/* ==========================
   WEATHER BAR
========================== */
.weather-bar {
    background: #990000;
    color: #ffffff;
    text-align: center;
    font-size: 14px;
    padding: 12px 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.weather-bar a {
    color: #ffcccc;
    text-decoration: none;
}
.weather-bar a:hover {
    color: #ffffff;
    text-decoration: underline;
}

body.dark-mode .weather-bar {
    background: #1c1c1c;
    color: #ffffff;
}
body.dark-mode .weather-bar a {
    color: #dddddd;
}
body.dark-mode .weather-bar a:hover {
    color: #ffffff;
}

/* ==========================
   FOOTER
========================== */
.site-footer {
    background: #222222;
    color: #dddddd;
    padding: 24px 0 12px 0;
    font-size: 14px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-left p,
.footer-right .footer-nav {
    margin: 0;
}

.footer-right .footer-menu {
    list-style: none;
    display: flex;
    gap: 18px;
    padding: 0;
    margin: 0;
}

.footer-right .footer-menu li a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
}

.footer-right .footer-menu li a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    background: #111111;
    padding: 12px 0;
    text-align: center;
    font-size: 13px;
}

body.dark-mode .site-footer,
body.dark-mode .footer-bottom {
    background: #1c1c1c;
    color: #ffffff;
}

/* ==========================
   MOBILE MENU
========================== */
.menu-toggle {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    color: #ffffff;
}
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .primary-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        flex-direction: column;
        display: none;
    }
    .primary-menu.active {
        display: flex;
    }
    .primary-menu li.mega-menu > ul,
    .primary-menu li.menu-item-has-children > ul {
        position: static;
        display: none;
        grid-template-columns: 1fr;
        box-shadow: none;
        padding-left: 12px;
    }
}

/* ==========================
   FRONT PAGE LAYOUTS
========================== */
.front-layout-1 .mp-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.front-layout-2 .mp-featured-posts {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
.front-layout-2 .mp-featured-posts .mp-post {
    flex: 1 1 calc(50% - 12px);
}
.front-layout-2 .mp-latest-posts {
    margin-top: 32px;
}
.front-layout-2 .mp-latest-posts .mp-post {
    border-bottom: 1px solid #eee;
    padding: 16px 0;
}
.front-layout-3 .mp-category-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}
.front-layout-3 .mp-category-block {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, background 0.3s, color 0.3s;
}
.front-layout-3 .mp-category-block:hover {
    transform: translateY(-4px);
}

body.dark-mode .front-layout-1 .mp-posts-grid .mp-post,
body.dark-mode .front-layout-2 .mp-featured-posts .mp-post,
body.dark-mode .front-layout-3 .mp-category-block {
    background: #1c1c1c;
    color: #ffffff;
}

/* ==========================
   INFINITE SCROLL
========================== */
.infinite-scroll-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.infinite-scroll-loader {
    text-align: center;
    padding: 32px 0;
    font-weight: 700;
    color: var(--primary-color);
    animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================
   AJAX BREAKING NEWS TICKER
========================== */
.breaking-news {
    background: #660000;
    color: #ffffff;
    padding: 8px 0;
    overflow: hidden;
    position: relative;
}
.breaking-news .ticker {
    display: inline-block;
    white-space: nowrap;
    animation: scrollTicker 15s linear infinite;
}
.breaking-news.paused .ticker {
    animation-play-state: paused;
}
.breaking-news .ticker-item {
    display: inline-block;
    margin-right: 36px;
    font-weight: 600;
}
@keyframes scrollTicker {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
}

/* ==========================
   RESPONSIVE / AMP
========================== */
@media (max-width: 1024px) {
    .front-layout-1 .mp-posts-grid,
    .infinite-scroll-container {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    .front-layout-2 .mp-featured-posts .mp-post {
        flex: 1 1 100%;
    }
    .front-layout-3 .mp-category-blocks {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .front-layout-1 .mp-posts-grid,
    .infinite-scroll-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .breaking-news .ticker-item {
        margin-right: 24px;
    }
}
