/*
Theme Name: Fullwidth Blog System
Description: A complete blog system with list view, grid view, and details page
Version: 1.0
Author: Your Name
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Full Width Container */
.container {
    width: 100%;
    padding: 0 30px;
}

/* Header Styles - New Structure */
.site-header {
    display: flex;
    flex-direction: column;
}

/* Top Header Bar - Now inside header */
.top-header-bar {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.top-header-bar .header-inner-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-header-left,
.top-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.default-top-info span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.default-top-info i {
    color: #0073aa;
}

.default-top-social {
    display: flex;
    gap: 15px;
}

.default-top-social a {
    color: #ccc;
    font-size: 16px;
    transition: color 0.3s ease;
}

.default-top-social a:hover {
    color: #0073aa;
}

/* Main Header Bar */
.main-header-bar {
    padding: 20px 0;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.main-header-bar .header-inner-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo img {
    display: block;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation ul li {
    position: relative;
}

.main-navigation ul li a {
    display: block;
    padding: 10px 20px;
    font-weight: 600;
}

/* Dropdown Menu - Single Column */
.main-navigation .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 250px; /* Fixed width for consistent single column */
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    display: block !important; /* Force block display */
    column-count: 1 !important; /* Ensure single column */
    column-gap: 0 !important; /* Remove column gap */
}

.main-navigation ul li:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .dropdown-menu li {
    width: 100%; /* Full width for single column */
    border-bottom: 1px solid #eee;
    display: block;
    float: none;
    clear: both;
}

.main-navigation .dropdown-menu li:last-child {
    border-bottom: none;
}

.main-navigation .dropdown-menu a {
    display: block;
    padding: 12px 20px; /* Consistent padding */
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sub-sub-menu (3rd level) - Also single column */
.main-navigation .sub-sub-menu {
    position: absolute;
    top: 0;
    left: 100%;
    width: 250px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
    display: block !important;
    column-count: 1 !important;
    column-gap: 0 !important;
}

.main-navigation .dropdown-menu li:hover > .sub-sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.main-navigation .sub-sub-menu li {
    width: 100%;
    border-bottom: 1px solid #eee;
    display: block;
    float: none;
    clear: both;
}

.main-navigation .sub-sub-menu a {
    padding: 12px 20px;
    width: 100%;
}

.main-navigation .dropdown-arrow {
    margin-left: 8px;
    font-size: 12px;
}

/* Dropdown arrows positioning */
.main-navigation .dropdown-main > a .dropdown-arrow {
    float: right;
}

.main-navigation .dropdown-sub > a .dropdown-arrow {
    float: right;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Sticky Header - Both top bar and main header stick together */
.sticky-header-enabled .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.sticky-header-enabled .site-content {
    padding-top: 200px; /* Increased to accommodate both bars */
}

/* Ensure top bar widgets are styled properly */
.top-header-bar .widget {
    display: inline-block;
    margin: 0;
}

.top-header-bar .widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.top-header-bar .widget ul li {
    display: inline-block;
    margin-right: 15px;
}

.top-header-bar .widget a {
    color: #ccc;
    transition: color 0.3s ease;
}

.top-header-bar .widget a:hover {
    color: #0073aa;
}

.top-header-bar .widget_text {
    font-size: 14px;
}

.top-header-bar .widget_search form {
    display: flex;
    align-items: center;
}

.top-header-bar .widget_search input {
    padding: 5px 10px;
    border: 1px solid #333;
    background: #333;
    color: #ccc;
    border-radius: 3px;
    margin-right: 5px;
}

.top-header-bar .widget_search input:focus {
    outline: none;
    border-color: #0073aa;
}

.top-header-bar .widget_search button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.top-header-bar .widget_search button:hover {
    background: #005a87;
}

/* Blog Layout - Full Width */
.site-content {
    padding: 40px 0;
    background: #f9f9f9;
}

.blog-container {
    width: 100%;
    max-width: 100%;
}

.blog-header {
    width: 100%;
    margin-bottom: 40px;
    padding: 0 30px;
}

.blog-title {
    font-size: 42px;
    margin-bottom: 15px;
    font-weight: 700;
}

.blog-description {
    font-size: 18px;
    color: #666;
    margin-bottom: 25px;
}

.view-toggle {
    display: flex;
    gap: 15px;
}

.view-toggle button {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.view-toggle button.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* List View - Full Width */
.blog-list {
    width: 100%;
    padding: 0 30px;
}

.blog-list .post {
    display: flex;
    margin-bottom: 40px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-list .post:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.blog-list .post-thumbnail {
    flex: 0 0 400px;
    max-width: 400px;
}

.blog-list .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-list .post-content {
    flex: 1;
    padding: 35px;
}

.blog-list .post-title {
    font-size: 28px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.blog-list .post-title a {
    color: #333;
}

.blog-list .post-title a:hover {
    color: #0073aa;
}

.blog-list .post-meta {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.blog-list .post-meta span {
    margin-right: 20px;
}

.blog-list .post-meta i {
    margin-right: 5px;
}

.blog-list .post-excerpt {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.7;
    color: #555;
}

.blog-list .read-more {
    display: inline-block;
    padding: 10px 25px;
    background: #0073aa;
    color: white;
    border-radius: 5px;
    transition: background 0.3s ease;
    font-weight: 500;
}

.blog-list .read-more:hover {
    background: #005a87;
}

/* Grid View - Full Width */
.blog-grid {
    width: 100%;
    padding: 0 30px;
}

.blog-grid .post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 35px;
}

.blog-grid .post {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-grid .post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.blog-grid .post-thumbnail {
    height: 250px;
    overflow: hidden;
}

.blog-grid .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-grid .post:hover .post-thumbnail img {
    transform: scale(1.05);
}

.blog-grid .post-content {
    padding: 30px;
}

.blog-grid .post-title {
    font-size: 22px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.blog-grid .post-title a {
    color: #333;
}

.blog-grid .post-title a:hover {
    color: #0073aa;
}

.blog-grid .post-meta {
    margin-bottom: 18px;
    color: #666;
    font-size: 14px;
}

.blog-grid .post-meta span {
    margin-right: 15px;
}

.blog-grid .post-meta i {
    margin-right: 5px;
}

.blog-grid .post-excerpt {
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

.blog-grid .read-more {
    display: inline-block;
    padding: 10px 25px;
    background: #0073aa;
    color: white;
    border-radius: 5px;
    transition: background 0.3s ease;
    font-weight: 500;
}

.blog-grid .read-more:hover {
    background: #005a87;
}

/* Single Post - Full Width */
.single-post {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 30px;
}

.single-post .post-header {
    margin-bottom: 40px;
}

.single-post .post-thumbnail {
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
}

.single-post .post-thumbnail img {
    width: 100%;
    height: auto;
}

.single-post .post-title {
    font-size: 42px;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
}

.single-post .post-meta {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
    font-size: 15px;
}

.single-post .post-meta span {
    margin-right: 25px;
}

.single-post .post-meta i {
    margin-right: 8px;
}

.single-post .post-content {
    margin-bottom: 40px;
    font-size: 17px;
    line-height: 1.8;
}

.single-post .post-content h2 {
    font-size: 32px;
    margin: 40px 0 20px;
    font-weight: 600;
}

.single-post .post-content h3 {
    font-size: 26px;
    margin: 35px 0 15px;
    font-weight: 600;
}

.single-post .post-content p {
    margin-bottom: 25px;
}

.single-post .post-content img {
    margin: 30px 0;
    border-radius: 8px;
}

.single-post .post-tags {
    margin-bottom: 40px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
}

.single-post .post-tags h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.single-post .post-tags a {
    display: inline-block;
    padding: 8px 15px;
    background: #0073aa;
    color: white;
    margin-right: 10px;
    margin-bottom: 10px;
    border-radius: 20px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.single-post .post-tags a:hover {
    background: #005a87;
}

/* Author Box */
.author-box {
    background: #fff;
    padding: 35px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
}

.author-avatar {
    flex: 0 0 100px;
    margin-right: 30px;
}

.author-avatar img {
    border-radius: 50%;
    width: 100px;
    height: 100px;
}

.author-info h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.author-info p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

/* Related Posts */
.related-posts {
    margin-bottom: 40px;
}

.related-posts h3 {
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: 600;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.related-post {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.related-post:hover {
    transform: translateY(-3px);
}

.related-post-thumbnail {
    height: 180px;
    overflow: hidden;
}

.related-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-content {
    padding: 25px;
}

.related-post-title {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.related-post-title a {
    color: #333;
}

.related-post-title a:hover {
    color: #0073aa;
}

.related-post-meta {
    font-size: 13px;
    color: #666;
}

/* Comments Section */
.comments-section {
    margin-bottom: 40px;
}

.comments-section h3 {
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: 600;
}

.comment-list {
    margin-bottom: 40px;
}

.comment {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.comment:last-child {
    border-bottom: none;
}

.comment-avatar {
    float: left;
    margin-right: 20px;
}

.comment-avatar img {
    border-radius: 50%;
    width: 60px;
    height: 60px;
}

.comment-content {
    overflow: hidden;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 16px;
}

.comment-date {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.comment-text {
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.6;
}

.comment-reply {
    font-size: 14px;
}

.comment-reply a {
    color: #0073aa;
    font-weight: 500;
}

.comment-reply a:hover {
    color: #005a87;
}

/* Comment Form */
.comment-form {
    background: #fff;
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

.comment-form h3 {
    font-size: 22px;
    margin-bottom: 25px;
    font-weight: 600;
}

.comment-form p {
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 15px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #0073aa;
}

.comment-form textarea {
    height: 160px;
    resize: vertical;
}

.comment-form .submit {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 16px;
    font-weight: 500;
}

.comment-form .submit:hover {
    background: #005a87;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin: 50px 0;
}

.pagination .page-numbers {
    display: flex;
    list-style: none;
    gap: 8px;
}

.pagination .page-numbers a,
.pagination .page-numbers span {
    display: block;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination .page-numbers a:hover {
    background: #f5f5f5;
    border-color: #0073aa;
}

.pagination .page-numbers .current {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Footer */
.site-footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 60px 0 25px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widgets .widget {
    margin-bottom: 25px;
}

.footer-widgets .widget-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #333;
    color: #fff;
    font-weight: 600;
}

.footer-widgets ul {
    list-style: none;
}

.footer-widgets ul li {
    margin-bottom: 12px;
}

.footer-widgets ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-widgets ul li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid #333;
    font-size: 14px;
    color: #999;
}

/* Mobile Responsive */
@media screen and (max-width: 1200px) {
    .blog-list .post-thumbnail {
        flex: 0 0 350px;
        max-width: 350px;
    }
    
    .blog-grid .post-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media screen and (max-width: 992px) {
    .blog-list .post {
        flex-direction: column;
    }
    
    .blog-list .post-thumbnail {
        flex: 0 0 auto;
        max-width: 100%;
        height: 300px;
    }
    
    .blog-list .post-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .blog-grid .post-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .blog-header,
    .blog-list,
    .blog-grid,
    .single-post {
        padding: 0 20px;
    }
    
    .blog-title {
        font-size: 32px;
    }
    
    .single-post .post-title {
        font-size: 32px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        position: fixed;
        top: 0;
        right: -320px;
        width: 320px;
        height: 100vh;
        background: #fff;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        z-index: 1001;
        transition: right 0.3s ease;
        overflow-y: auto;
    }
    
    .main-navigation.toggled {
        right: 0;
    }
    
    .main-navigation ul {
        flex-direction: column;
    }
    
    .main-navigation ul li a {
        padding: 18px 25px;
        border-bottom: 1px solid #eee;
    }
    
    .main-navigation .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f5f5f5;
        width: 100%;
        column-count: 1 !important;
    }
    
    .main-navigation .dropdown-menu li {
        border-bottom: none;
        width: 100%;
    }
    
    .main-navigation .dropdown-menu a {
        padding-left: 45px;
        width: 100%;
    }
    
    .main-navigation .sub-sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        width: 100%;
        column-count: 1 !important;
    }
    
    .main-navigation .sub-sub-menu a {
        padding-left: 65px;
    }
    
    .blog-grid .post-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .sticky-header-enabled .site-content {
        padding-top: 140px; /* Adjusted for mobile */
    }
}

@media screen and (max-width: 480px) {
    .blog-grid .post-grid {
        grid-template-columns: 1fr;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-title {
        font-size: 28px;
    }
    
    .single-post .post-title {
        font-size: 28px;
    }
    
    .blog-list .post-content,
    .blog-grid .post-content {
        padding: 25px;
    }
    
    .single-post .post-content {
        font-size: 16px;
    }
    
    .comment-form {
        padding: 25px;
    }
    
    .author-box {
        padding: 25px;
    }
    
    .top-header-left,
    .top-header-right {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .default-top-info span {
        font-size: 12px;
    }
    
    .sticky-header-enabled .site-content {
        padding-top: 200px; /* Adjusted for smaller screens */
    }
    
    .main-navigation .dropdown-menu {
        width: 100%;
    }
    
    .main-navigation .sub-sub-menu {
        width: 100%;
    }
}