/*
Theme Name: MyNews Theme
Theme URI: https://example.com/mynews-theme
Author: MyNews Developer
Author URI: https://example.com
Description: A WordPress news theme with a menu style inspired by News Portal. Features top bar with date & social links, logo section, and a full-featured navigation bar with dropdowns, home icon, and search.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mynews-theme
Tags: news, blog, custom-menu, featured-images, two-columns, right-sidebar, translation-ready
*/

/*--------------------------------------------------------------
# Normalize & Reset
--------------------------------------------------------------*/
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-family: sans-serif;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

a {
    color: #029fb2;
    text-decoration: none;
}

a:hover {
    color: #028a9a;
    text-decoration: underline;
}

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

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

/*--------------------------------------------------------------
# Layout — Full-Width Global (v1.1.0)
--------------------------------------------------------------*/

/* Remove old boxed constraint — site spans full viewport */
#page {
    background: #fff;
    max-width: 100% !important;
    margin: 0;
    box-shadow: none !important;
}

/* Centered content container */
.mn-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

.mn-clearfix::before,
.mn-clearfix::after {
    content: '';
    display: table;
}
.mn-clearfix::after {
    clear: both;
}

#content {
    padding: 20px 0;
}

.site-content-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Full-width section backgrounds */
.mn-top-header-wrap,
.mn-logo-section-wrapper,
.mn-header-menu-wrapper,
.mn-ticker-wrapper,
.site-footer {
    width: 100%;
}

/*--------------------------------------------------------------
# Top Header Bar
--------------------------------------------------------------*/
.mn-top-header-wrap {
    background: #029fb2;
    color: #fff;
    padding: 8px 0;
}

.mn-top-left-section-wrapper {
    float: left;
    font-size: 12px;
}

.mn-top-left-section-wrapper .date-section {
    float: left;
    margin-right: 15px;
    line-height: 20px;
}

.mn-top-left-section-wrapper .date-section::before {
    content: "\f017";
    font-family: "Font Awesome 6 Free", FontAwesome;
    font-weight: 400;
    display: inline-block;
    margin-right: 5px;
}

/* Top Navigation */
.top-navigation {
    float: left;
}

.top-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.top-navigation ul li {
    border-left: 1px solid rgba(255,255,255,0.5);
    display: inline-block;
    line-height: 20px;
    padding: 0 10px;
}

.top-navigation ul li:first-child {
    border-left: none;
}

.top-navigation ul li a {
    color: #fff;
    font-size: 12px;
}

.top-navigation ul li a:hover {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

/* Hide sub-menus in top nav */
.top-navigation ul.sub-menu {
    display: none;
}

/* Top Right - Social Icons */
.mn-top-right-section-wrapper {
    float: right;
    display: none;
}

.mn-social-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mn-social-links li {
    display: inline-block;
}

.mn-social-links li a {
    color: #fff;
    display: inline-block;
    font-size: 14px;
    line-height: 20px;
    margin-left: 14px;
    transition: color 0.2s;
}

.mn-social-links li a:hover {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

/*--------------------------------------------------------------
# Logo / Branding Section
--------------------------------------------------------------*/
.mn-logo-section-wrapper {
    padding: 20px 0;
    background: #fff;
}

.mn-logo-section-wrapper .mn-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo img {
    max-height: 80px;
    width: auto;
}

.site-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.site-title a {
    color: #029fb2;
    text-decoration: none;
}

.site-description {
    margin: 0;
    font-size: 13px;
    color: #f37021;
}

.mn-header-ads-area {
    /* Banner/ads area - right side of logo section */
}

/*--------------------------------------------------------------
# Primary Navigation Menu
--------------------------------------------------------------*/
.mn-header-menu-wrapper {
    background: #029fb2;
    position: relative;
    margin-bottom: 20px;
}

/* Decorative shadow below menu */
.mn-header-menu-wrapper::after {
    content: "";
    display: block;
    height: 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15), transparent);
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    pointer-events: none;
}

.mn-header-menu-block-wrap {
    position: relative;
}

.mn-header-menu-block-wrap .mn-container {
    display: flex;
    align-items: stretch;
}

/* Home Icon */
.mn-home-icon {
    flex-shrink: 0;
}

.mn-home-icon a {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45px;
    width: 45px;
    font-size: 16px;
    position: relative;
    transition: background 0.2s;
    text-decoration: none;
}

.mn-home-icon a:hover,
body.home .mn-home-icon a {
    background: #028a9a;
}

.mn-home-icon a:hover::after,
body.home .mn-home-icon a::after {
    border-bottom: 5px solid #fff;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    bottom: 0;
    content: "";
    height: 0;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    width: 0;
}

/* Main Navigation */
.mn-header-menu-center {
    flex: 1;
}

#site-navigation {
    float: left;
}

#site-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#site-navigation ul li {
    display: inline-block;
    line-height: 45px;
    position: relative;
}

#site-navigation ul li a {
    border-left: 1px solid rgba(255,255,255,0.2);
    border-right: 1px solid rgba(0,0,0,0.08);
    color: #fff;
    display: block;
    padding: 0 16px;
    position: relative;
    text-transform: capitalize;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    text-decoration: none;
}

/* Active indicator triangle */
#site-navigation ul#primary-menu > li:hover > a::after,
#site-navigation ul#primary-menu > li.current-menu-item > a::after,
#site-navigation ul#primary-menu > li.current-menu-ancestor > a::after,
#site-navigation ul#primary-menu > li.focus > a::after {
    border-bottom: 5px solid #fff;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    bottom: 0;
    content: "";
    height: 0;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    width: 0;
}

/* Hover / Active States */
#site-navigation ul li:hover > a,
#site-navigation ul li.current-menu-item > a,
#site-navigation ul li.current_page_item > a,
#site-navigation ul li.current-menu-ancestor > a,
#site-navigation ul li.focus > a {
    background: #028a9a;
}

/* Dropdown arrow for parent items */
@media ( min-width: 992px ) {
    #site-navigation ul li.menu-item-has-children > a::before,
    #site-navigation ul li.page_item_has_children > a::before {
        content: "\f107";
        font-family: "Font Awesome 6 Free", FontAwesome;
        font-weight: 900;
        position: absolute;
        right: 6px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 11px;
    }
}

#site-navigation ul li.menu-item-has-children > a,
#site-navigation ul li.page_item_has_children > a {
    padding-right: 28px;
}

/* Dropdown Sub-menu */
#site-navigation ul.sub-menu,
#site-navigation ul.children {
    background: #029fb2;
    width: 210px;
    position: absolute;
    z-index: 9999;
    top: 100%;
    left: -9999rem;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.15s linear, transform 0.15s ease, left 0s 0.15s;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.2);
}

#site-navigation ul li:hover > ul.sub-menu,
#site-navigation ul li:hover > ul.children,
#site-navigation ul li.focus > ul.sub-menu,
#site-navigation ul li.focus > ul.children {
    left: 0;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.15s linear, transform 0.15s ease, left 0s;
}

#site-navigation ul.sub-menu li,
#site-navigation ul.children li {
    display: block;
    float: none;
    line-height: 1;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    margin: 0;
}

#site-navigation ul.sub-menu li:last-child,
#site-navigation ul.children li:last-child {
    border-bottom: none;
}

#site-navigation ul.sub-menu li a,
#site-navigation ul.children li a {
    line-height: 1.4;
    padding: 10px 15px;
    border-left: none;
    border-right: none;
    font-size: 13px;
    font-weight: 400;
}

/* Third-level dropdown (right side) */
#site-navigation ul.sub-menu li.menu-item-has-children > a::before,
#site-navigation ul.children li.page_item_has_children > a::before {
    content: "\f105";
}

#site-navigation ul.sub-menu li ul.sub-menu,
#site-navigation ul.children li ul.children {
    top: 0;
    left: auto !important;
    right: 9999em;
    transition: opacity 0.15s linear, transform 0.15s ease, right 0s 0.15s;
}

#site-navigation ul.sub-menu li:hover > ul.sub-menu,
#site-navigation ul.children li:hover > ul.children,
#site-navigation ul.sub-menu li.focus > ul.sub-menu {
    right: -100%;
    left: auto !important;
    transition: opacity 0.15s linear, transform 0.15s ease, right 0s;
}

/* Mobile toggle button */
.menu-toggle {
    color: #fff;
    display: none;
    float: left;
    font-size: 20px;
    padding: 0 15px;
    line-height: 45px;
    cursor: pointer;
    background: none;
    border: none;
}

/*--------------------------------------------------------------
# Right Icons (Search, Dark Mode)
--------------------------------------------------------------*/
.mn-icon-elements-wrapper {
    float: right;
    display: flex;
    align-items: center;
    height: 45px;
}

/* Search */
.mn-header-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    height: 45px;
    padding: 0 15px;
    cursor: pointer;
}

.mn-header-search-wrapper .search-icon {
    color: #fff;
    font-size: 15px;
    line-height: 45px;
}

.mn-header-search-wrapper .search-icon:hover {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.search-form-dropdown {
    background: #fff;
    box-shadow: 1px 1px 7px rgba(0,0,0,0.15);
    border-top: 2px solid #029fb2;
    padding: 15px;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    width: 300px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.search-form-dropdown::before {
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #029fb2;
    content: "";
    position: absolute;
    right: 15px;
    top: -10px;
}

.search-form-dropdown.active {
    opacity: 1;
    visibility: visible;
}

.search-form-dropdown .search-form {
    display: flex;
}

.search-form-dropdown .search-field {
    border: 1px solid #ddd;
    padding: 8px 10px;
    flex: 1;
    font-size: 13px;
    outline: none;
}

.search-form-dropdown .search-submit {
    background: #029fb2;
    border: none;
    color: #fff;
    padding: 0 15px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.search-form-dropdown .search-submit:hover {
    background: #028a9a;
}

/*--------------------------------------------------------------
# News Ticker
--------------------------------------------------------------*/
.mn-ticker-wrapper {
    background: #f5f5f5;
    border-bottom: 1px solid #e1e1e1;
    padding: 8px 0;
    margin-bottom: 0;
}

.mn-ticker-block {
    display: flex;
    align-items: center;
}

.ticker-caption {
    background: #029fb2;
    color: #fff;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 15px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ticker-content-wrapper {
    overflow: hidden;
    flex: 1;
}

.ticker-content-wrapper ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ticker-content-wrapper ul li a {
    color: #333;
    font-size: 13px;
}

/*--------------------------------------------------------------
# Main Content Area
--------------------------------------------------------------*/
.content-area {
    float: left;
    width: 70%;
    padding-right: 25px;
}

.widget-area {
    float: right;
    width: 30%;
}

.site-main article {
    background: #fff;
    margin-bottom: 25px;
    border: 1px solid #e8e8e8;
}

.entry-header {
    padding: 15px 20px 0;
}

.entry-title {
    font-size: 20px;
    margin: 0 0 10px;
    line-height: 1.3;
}

.entry-title a {
    color: #222;
    text-decoration: none;
}

.entry-title a:hover {
    color: #029fb2;
}

.post-thumbnail {
    display: block;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.post-thumbnail:hover img {
    transform: scale(1.03);
}

.entry-meta {
    font-size: 12px;
    color: #888;
    padding: 8px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.entry-meta a {
    color: #029fb2;
}

.entry-summary {
    padding: 10px 20px 15px;
    font-size: 14px;
    color: #555;
}

.more-link {
    display: inline-block;
    background: #029fb2;
    color: #fff;
    padding: 6px 16px;
    font-size: 12px;
    border-radius: 2px;
    text-decoration: none;
    transition: background 0.2s;
}

.more-link:hover {
    background: #028a9a;
    color: #fff;
    text-decoration: none;
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.site-footer {
    background: #222;
    color: #ccc;
    padding: 40px 0 20px;
    margin-top: 30px;
}

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

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #888;
}

.footer-bottom a {
    color: #029fb2;
}

/*--------------------------------------------------------------
# Widgets
--------------------------------------------------------------*/
.widget {
    margin-bottom: 25px;
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    border-bottom: 2px solid #029fb2;
    padding-bottom: 8px;
    margin: 0 0 15px;
    color: #222;
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media (max-width: 979px) {
    .mn-top-left-section-wrapper .date-section {
        display: none;
    }

    .content-area {
        float: none;
        width: 100%;
        padding-right: 0;
    }

    .widget-area {
        float: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* Show hamburger, hide desktop nav */
    .menu-toggle {
        display: block;
    }

    #site-navigation {
        display: none;
        float: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: #029fb2;
        z-index: 9999;
    }

    #site-navigation.toggled {
        display: block;
    }

    #site-navigation ul li {
        display: block;
        line-height: 1;
        position: relative;
    }

    #site-navigation ul li a {
        border-left: none;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        padding: 12px 15px;
        line-height: 1.4;
    }

    #site-navigation ul.sub-menu,
    #site-navigation ul.children {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        left: 0 !important;
        display: none;
        box-shadow: none;
    }

    #site-navigation ul li.focus > ul.sub-menu,
    #site-navigation ul li.open > ul.sub-menu {
        display: block;
        left: 0 !important;
    }

    #site-navigation ul.sub-menu li a,
    #site-navigation ul.children li a {
        padding-left: 30px;
    }

    .mn-header-menu-block-wrap .mn-container {
        flex-wrap: wrap;
        position: relative;
    }

    .mn-home-icon {
        order: 1;
    }

    .mn-header-menu-center {
        order: 2;
        flex: none;
    }

    .mn-icon-elements-wrapper {
        order: 3;
        margin-left: auto;
    }

    /* Logo section */
    .mn-logo-section-wrapper .mn-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .site-branding {
        flex-direction: column;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 22px;
    }

    .mn-top-right-section-wrapper {
        display: none;
    }
}
