/*
Theme Name: News Theme 2025
Description: A modern, responsive news theme with Bootstrap integration
Author: Your Name
Version: 1.0
Text Domain: news-theme
*/

/* Custom Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --border-color: #dee2e6;
}

/* Header Styles */
.site-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-banner {
    background: var(--primary-color);
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

a {
    color: royalblue;
    text-decoration: none;
}

.main-header {
    padding: 2px 0;
    border-top: 1px solid #eee;
}
.navbar {
    --bs-navbar-padding-x: 0;
    --bs-navbar-padding-y: 0.3rem;
}

/* Logo Styles */
.logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--dark-color);
    text-decoration: none;
}

.logo:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Custom Logo Styling */
.custom-logo-wrapper {
    max-width: 200px;
}

.custom-logo-wrapper .custom-logo {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

.custom-logo-wrapper .custom-logo-link {
    display: inline-block;
}

/* Manual Logo Image Styling */
.logo-image {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

/* Navigation */
.main-nav {
    background: var(--dark-color);
}
.navbar-nav .nav-link {
    color: white !important;
    padding: 5px 15px !important;
    transition: background 0.3s;
    font-size: 105%; 
}

.navbar-nav .nav-link:hover {
    background: var(--primary-color);
}

/* Dropdown Menu Styles */
.navbar-nav .nav-item.dropdown {
    position: relative;
}

.navbar-nav .dropdown-menu {
    background: var(--dark-color);
    border: none;
    border-radius: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-width: 200px;
    margin-top: 0;
}

.navbar-nav .dropdown-menu .dropdown-item {
    color: white;
    padding: 8px 15px;
    transition: background 0.3s;
}

.navbar-nav .dropdown-menu .dropdown-item:hover {
    background: var(--primary-color);
    color: white;
}

.navbar-nav .dropdown-menu .dropdown-item:focus {
    background: var(--primary-color);
    color: white;
}

/* Dropdown arrow indicator */
.navbar-nav .nav-item.dropdown > .nav-link::after {
  content: '\2BC6';
    font-size: 0.8rem;
    margin-left: 5px;
    opacity: 0.8;
    vertical-align: baseline;
    line-height: 1;
    display: inline-block;
}

/* Override Bootstrap dropdown toggle arrow */
.navbar-nav .dropdown-toggle::after {
    border-top: .0em solid;

}

/* Hero Section - New Grid Layout */
.hero-section {
    padding: 20px 0;
    background: white;
}

/* Main Featured Article - Left Side */
.news-hero-featured {
    position: relative;
    height: 400px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.news-hero-featured:hover {
    transform: translateY(-5px);
}

.news-hero-featured-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.news-hero-featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 30px;
    z-index: 2;
}

.news-hero-featured-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.news-hero-featured-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}

.news-hero-featured-title a {
    color: white;
    text-decoration: none;
}

.news-hero-featured-excerpt {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.9;
    margin-bottom: 10px;
}

.news-hero-featured-meta {
    font-size: 13px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 15px;
}

.news-hero-featured-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-hero-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ddd;
}

/* Grid Articles - Right Side */
.news-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    height: 400px;
}

.news-hero-grid-item {
    position: relative;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.news-hero-grid-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.news-hero-grid-image {
    width: 100%;
    height: 60%;
    background-size: cover;
    background-position: center;
}

.news-hero-grid-content {
    padding: 10px 12px;
    height: 40%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-hero-grid-category {
    font-size: 9px;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.news-hero-grid-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 3px;
    color: var(--dark-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.news-hero-grid-title a {
    color: inherit;
    text-decoration: none;
}

.news-hero-grid-title a:hover {
    color: var(--primary-color);
}

.news-hero-grid-meta {
    display: none  ;;
    font-size: 10px;
    color: var(--secondary-color);
}

/* Hero Section Responsive */
@media (max-width: 768px) { 
    .navbar-toggler {
        background-color: #eee;
    }
    .search_form {
        margin-bottom: 10px!important;
    }

    .hero-section {
        padding: 20px 0;
    }
    #navbarNav{
        margin-top: 10px

    }
    .navbar-nav .nav-link{
        padding-left: 5px!important;
        
    }
    .news-hero-featured {
        height: 300px;
        margin-bottom: 30px;
    }
    
    .news-hero-featured-title {
        font-size: 20px;
    }
    
    .news-hero-grid {
        grid-template-columns: 1fr 1fr;
        height: auto;
        gap: 10px;
    }
    
    .news-hero-grid-item {
        height: 180px;
    }
    
    .news-hero-grid-image {
        height: 60%;
    }
    
    .news-hero-grid-content {
        height: 40%;
        padding: 8px 10px;
    }
    
    .news-hero-grid-title {
        font-size: 11px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

@media (max-width: 576px) {
    .news-hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .news-hero-grid-item {
        height: 160px;
    }
    
    .news-hero-grid-title {
        font-size: 10px;
    }
    
    .news-hero-grid-category {
        font-size: 8px;
    }
    
    .news-hero-grid-meta {
        display: none  ;;
        font-size: 9px;
    }
}

/* Category Sections */
.category-section {
    padding: 10px 0;
}

.category-section.position_0 {
    padding-top: 5px;
}

.category-header {
    border-left: 3px solid orange;
    padding-left: 15px;
    margin-bottom: 20px;
}

.category-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--dark-color);
    margin: 0;
}

.post-card {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

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

.post-thumbnail {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--light-color);
}

.post-content {
    padding: 5px;
}

.post-single .post-content img {
    width: 100%;
}

.post-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-title a {
    color: var(--dark-color);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--secondary-color);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.post-meta {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

/* Footer */
.site-footer {
    background: var(--dark-color);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

#back-to-top{
    background-color: orange;
    border: 1px solid orange;
    bottom: 20px; right: 20px; z-index: 999; display: none;
}

.footer-section h5 {
    color: orange;
    margin-bottom: 20px;
}
.white1 {
    background-color: royalblue!important;
}
.white1 a{
    color: white;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 10px;
    margin-top: 10px;
    text-align: center;
    color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 15px 0;
    }
    
    .hero-section .row {
        display: block;
    }
    
    .hero-section .row > div {
        margin-bottom: 30px;
        padding: 0 10px;
        display: block;
    }
    
    .hero-section .row > div:last-child {
        margin-bottom: 0;
    }
    
    .widget-left,
    .widget-center,
    .widget-right {
        display: block;
    }
    
    .widget-featured-image {
        height: 150px;
    }
    
    .widget-image {
        height: 120px;
    }
    
    .widget-small-image {
        height: 60px;
    }
    
    .post-card {
        margin-bottom: 20px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .widget-featured-title {
        font-size: 1rem;
    }
    
    .widget-title {
        font-size: 0.85rem;
    }
    
    .widget-small-title {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .widget-featured-title {
        font-size: 0.95rem;
    }
    
    .widget-title {
        font-size: 0.8rem;
    }
    
    .widget-small-title {
        font-size: 0.7rem;
    }
    
    .widget-small-image {
        height: 50px;
    }
}

/* Loading Animation - Only for manual loading states */
.loading-spinner {
    text-align: center;
    padding: 20px;
}

.loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Comments Section Styling */
.comments-area {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 30px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

/* Comment Form Styling */
.comment-respond {
    margin-top: 30px;
}

.comment-reply-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.comment-form {
    max-width: 100%;
}

.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url {
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-size: 14px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    background: #fff;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

/* Form Layout Improvements */
.comment-form-author,
.comment-form-email {
    width: 48%;
    display: inline-block;
    vertical-align: top;
}

.comment-form-email {
    /* margin-left: 4%; */
}

.comment-form-url {
    width: 100%;
}

/* Checkbox Styling */
.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    margin: 20px 0;
}

.comment-form-cookies-consent input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    margin-top: 3px;
    accent-color: var(--primary-color);
}

.comment-form-cookies-consent label {
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.4;
    cursor: pointer;
}

/* Submit Button */
.form-submit {
    margin-top: 20px;
}

.submit {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.submit:active {
    transform: translateY(0);
}

/* Required Field Indicators */
.required {
    color: #dc3545;
    font-weight: 700;
}

/* Comments List */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.comment-author {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.comment-meta {
    font-size: 12px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.comment-content {
    line-height: 1.6;
    color: var(--dark-color);
}

/* Responsive Comments */
@media (max-width: 768px) {
    .comments-area {
        padding: 20px 15px;
        margin-top: 30px;
    }
    
    .comment-form-author,
    .comment-form-email {
        width: 100%;
        display: block;
        margin-left: 0;
        margin-bottom: 15px;
    }
    
    .comment-form textarea {
        min-height: 100px;
    }
    
    .submit {
        width: 100%;
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .comments-title {
        font-size: 1.2rem;
    }
    
    .comment-reply-title {
        font-size: 1.1rem;
    }
    
    .comments-area {
        padding: 15px 10px;
    }
}

/* Mobile Search Toggle */
.mobile-search-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #007bff;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.mobile-search-toggle:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

/* Mobile responsive behavior */
@media (max-width: 767.98px) {
    /* Ẩn search area trên mobile by default */
    .search-area {
        display: none !important;
        margin-top: 5px;
    }
    
    /* Khi có class 'show', hiện search area */
    .search-area.show {
        display: block !important;
    }
    
    /* Logo area căn chỉnh */
    .logo-area .logo {
        font-size: 1.5rem;
    }
    
    /* Search form mobile full width */
    .search_form {
        width: 100% !important;
        margin: 0 0 10px 0 !important;
    }
    
    .search_form input[type="search"] {
        flex: 1 !important;
        width: auto !important;
        margin-right: 10px !important;
    }
    
    .search_form button {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        min-width: 60px !important;
    }
    
    /* Container cho search area trên mobile */
    .search-area .d-flex {
        width: 100% !important;
        justify-content: stretch !important;
    }
}

/* Pagination Styles */
.page-numbers {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.page-numbers ul {
    display: flex !important;
    flex-wrap: nowrap !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0.25rem;
}

.page-numbers li {
    display: inline-block !important;
    margin: 0 !important;
}

.page-numbers a, 
.page-numbers span {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem !important;
    text-decoration: none !important;
    background: #fff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.375rem !important;
    color: #007bff !important;
    font-size: 0.875rem !important;
    line-height: 1.25 !important;
    min-width: 2.5rem !important;
    transition: all 0.15s ease-in-out !important;
}

.page-numbers a:hover {
    background: #e9ecef !important;
    border-color: #adb5bd !important;
    color: #0056b3 !important;
    transform: translateY(-1px) !important;
}

.page-numbers .current {
    background: #007bff !important;
    border-color: #007bff !important;
    color: #fff !important;
    font-weight: 600 !important;
}

.page-numbers .dots {
    background: transparent !important;
    border: none !important;
    color: #6c757d !important;
    cursor: default !important;
}

/* Responsive pagination */
@media (max-width: 576px) {
    .page-numbers a, 
    .page-numbers span {
        padding: 0.375rem 0.5rem !important;
        min-width: 2rem !important;
        font-size: 0.8rem !important;
    }
    
    .page-numbers ul {
        gap: 0.125rem;
    }
}
