/*
Theme Name: Thời Báo Việt - Newspaper Theme
Theme URI: http://example.com/wp-theme-newspaper
Description: Giao diện đọc báo cao cấp "Thời Báo Việt" được thiết kế dựa trên phong cách chuyên nghiệp, hiện đại, tối ưu hóa tốc độ tải và responsive.
Author: AcmaTvirus
Version: 1.0.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, news, two-columns, custom-menu, featured-images, translation-ready
Text Domain: wp-theme-newspaper
*/

/* --- Import Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- Design Tokens / CSS Variables --- */
:root {
    --primary-color: #0D5CA6;
    /* Màu xanh Thời Báo Việt */
    --primary-hover: #074783;
    --accent-color: #E67E22;
    /* Màu cam nổi bật */
    --accent-yellow: #F1C40F;
    /* Màu vàng của ngôi sao */
    --text-dark: #1A1A1A;
    --text-gray: #555555;
    --text-light: #888888;
    --bg-light: #F8F9FA;
    --bg-dark: #1E293B;
    --bg-hero-overlay: rgba(0, 0, 0, 0.7);
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --container-max-width: 1200px;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base Resets --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

ul,
ol {
    list-style: none;
}

input,
button {
    font-family: inherit;
    font-size: inherit;
}

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER SECTION --- */
.site-header {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Logo */
.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.site-brand-link {
    align-items: center;
    color: #ffffff;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.site-brand .custom-logo-link {
    display: inline-block;
    align-self: center;
    flex-shrink: 0;
}

.site-brand .custom-logo {
    max-height: 46px;
    max-width: min(220px, 50vw);
    width: auto;
    display: block;
}

.site-title-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-description {
    color: rgba(255, 255, 255, 0.75);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0;
    margin-top: -2px;
    text-transform: uppercase;
}

.site-logo-icon {
    width: 38px;
    height: 38px;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Logo SVG emblem: red circle background, yellow star/lightning */
.site-logo-icon svg {
    width: 38px;
    height: 38px;
}

.site-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

/* Primary Navigation */
.mobile-menu-panel {
    align-items: center;
    display: flex;
    gap: 16px;
    height: 100%;
    min-width: 0;
}

.main-navigation {
    display: flex;
    align-items: center;
    height: 100%;
    min-width: 0;
}

.menu-primary-container {
    height: 100%;
}

.nav-menu {
    display: flex;
    height: 100%;
    align-items: center;
    min-width: 0;
}

.nav-menu li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.85);
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    height: 100%;
    display: flex;
    align-items: center;
    border-bottom: 3px solid transparent;
    transition: all var(--transition-fast);
}

.nav-menu a:hover,
.nav-menu .current-menu-item>a {
    color: #ffffff;
    border-bottom-color: var(--accent-yellow);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Dropdown Menu Support */
.nav-menu li ul {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    color: var(--text-dark);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 6px 6px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    padding: 8px 0;
}

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

.nav-menu li ul a {
    color: var(--text-dark);
    height: auto;
    padding: 10px 20px;
    font-size: 14px;
    text-transform: none;
    font-weight: 500;
    border-bottom: none;
    display: block;
}

.nav-menu li ul a:hover {
    color: var(--primary-color);
    background-color: var(--bg-light);
}

/* Search bar */
.header-search {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.search-form-header {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 4px 8px;
    transition: background-color var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-form-header:focus-within {
    background-color: #ffffff;
    border-color: #ffffff;
}

.search-form-header input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    padding: 4px 8px;
    font-size: 13px;
    width: 140px;
    transition: width var(--transition-smooth);
}

.search-form-header:focus-within input {
    color: var(--text-dark);
    width: 180px;
}

.search-form-header input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-form-header:focus-within input::placeholder {
    color: var(--text-light);
}

.search-submit-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 2px;
}

.search-form-header:focus-within .search-submit-btn {
    color: var(--text-gray);
}

/* Login section */
.header-auth {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.login-btn {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 14px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.login-btn:hover {
    background-color: #ffffff;
    color: var(--primary-color);
}

.account-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-name {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Mobile Toggle */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 6px;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    height: 40px;
    width: 42px;
    align-items: center;
    justify-content: center;
}

/* --- MAIN LAYOUT --- */
.main-wrapper {
    padding: 30px 0;
}

.layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 12fr) minmax(0, 4fr);
    gap: 30px;
}

/* --- HERO SECTION --- */
.featured-hero {
    position: relative;
    background-color: var(--bg-dark);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

/* Main Display */
.hero-slider-display {
    position: relative;
    aspect-ratio: 16 / 9;
    min-height: 380px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    display: flex;
    justify-content: flex-end;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.hero-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-slide-image-empty,
.post-thumbnail-empty {
    align-items: center;
    background: #e2e8f0;
    color: var(--text-light);
    display: flex;
    font-size: 12px;
    font-weight: 800;
    justify-content: center;
    text-transform: uppercase;
}

.post-thumbnail-empty {
    height: 100%;
    width: 100%;
}

.hero-slide-content-overlay {
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.85) 60%, rgba(0, 0, 0, 0) 100%);
    position: absolute;
    top: 0;
    left: 0;
    padding: 30px 40px 30px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
    z-index: 2;
}

/* Special styling for matching the user screenshot */
.hero-slide-content-overlay .category-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-yellow);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.hero-slide-content-overlay h2 {
    font-size: 22px;
    line-height: 1.35;
    font-weight: 800;
    margin-bottom: 14px;
    letter-spacing: -0.3px;
    color: #ffffff;
}

.hero-slide-content-overlay h2 a:hover {
    color: var(--accent-yellow);
}

.hero-slide-content-overlay p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

/* Tabs under Hero */
.hero-tabs-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background-color: #121212;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-tab {
    padding: 16px 20px;
    cursor: pointer;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition-fast);
    text-align: left;
}

.hero-tab:last-child {
    border-right: none;
}

.hero-tab-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.hero-tab-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.hero-tab:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.hero-tab.active {
    background-color: #000000;
    border-top: 3px solid var(--accent-color);
    padding-top: 13px;
    /* Offset the 3px border to maintain height */
}

.hero-tab.active .hero-tab-title {
    color: var(--accent-yellow);
}

/* --- POST CARDS (3 COLUMNS GRID) --- */
.news-grid-three-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.post-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.post-thumbnail-wrapper {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #eaeaea;
}

.post-thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.post-card:hover .post-thumbnail-wrapper img {
    transform: scale(1.05);
}

.post-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    letter-spacing: 0.3px;
}

.post-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.post-card-excerpt {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.post-card-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-light);
}

.post-card-meta svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* --- SIDEBAR WIDGETS --- */
.sidebar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.sidebar-empty-widget p {
    color: var(--text-gray);
    font-size: 13px;
}

.sidebar-empty-widget a {
    color: var(--primary-color);
    font-weight: 700;
}

.widget-title-container {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 16px;
    position: relative;
}

.widget-title-container::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--primary-color);
}

.widget-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Trending widget (Xu hướng) */
.trending-searches-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trending-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    padding: 6px 0;
    transition: transform var(--transition-fast);
}

.trending-item a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.trending-item svg {
    width: 14px;
    height: 14px;
    color: var(--text-light);
}

/* Video widget */
.video-thumbnail-container {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.video-thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
}

.video-thumbnail-container:hover .video-play-overlay {
    background-color: rgba(0, 0, 0, 0.4);
}

.play-button-icon {
    width: 46px;
    height: 46px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-smooth);
}

.video-thumbnail-container:hover .play-button-icon {
    transform: scale(1.15);
}

.play-button-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    margin-left: 3px;
    /* Center the triangle visually */
}

.video-widget-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 6px;
}

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

.video-widget-meta {
    font-size: 11px;
    color: var(--text-light);
}

/* Ads widget */
.ads-widget-flex {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ad-banner {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.ad-banner:hover {
    transform: scale(1.02);
}

.ad-banner img {
    width: 100%;
    height: auto;
}

/* CSS-styled fallback banner ad if no images */
.custom-ad-fallback {
    background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
    color: #ffffff;
    padding: 24px 20px;
    text-align: center;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-ad-tag {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
}

.custom-ad-fallback h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-yellow);
}

.custom-ad-fallback p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
}

.custom-ad-btn {
    background-color: var(--accent-color);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-ad-btn:hover {
    background-color: #d35400;
}

/* --- FOOTER SECTION --- */
.site-footer {
    background-color: #121A26;
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 0 30px;
    border-top: 4px solid var(--primary-color);
    font-size: 13px;
}

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

.footer-col h3 {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.footer-about p {
    line-height: 1.6;
    margin-bottom: 14px;
}

.footer-links-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links-list a:hover {
    color: #ffffff;
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    font-size: 12px;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-social-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: background-color var(--transition-fast);
}

.footer-social-link:hover {
    background-color: var(--primary-color);
}

/* --- SINGLE POST & PAGE CONTENT --- */
.content-area {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.post-header {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.post-meta-top {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.post-meta-cat {
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
}

.single-post-title {
    font-size: 28px;
    line-height: 1.3;
    font-weight: 800;
    color: var(--text-dark);
}

.post-featured-image {
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 24px;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
}

.post-entry-content {
    font-size: 16px;
    line-height: 1.7;
    color: #2D3748;
    overflow-wrap: anywhere;
}

.post-entry-content img,
.post-entry-content iframe,
.post-entry-content video,
.post-entry-content embed,
.post-entry-content object {
    max-width: 100%;
}

.post-entry-content iframe,
.post-entry-content video {
    aspect-ratio: 16 / 9;
    height: auto;
}

.post-entry-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
}

.post-entry-content p {
    margin-bottom: 20px;
}

.post-entry-content h2,
.post-entry-content h3 {
    color: var(--text-dark);
    margin: 30px 0 15px;
    font-weight: 700;
}

.post-entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-gray);
}

.post-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 4px;
    color: var(--text-gray);
}

.tag-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* --- THEOTOWN PLUGIN DIRECTORY --- */
.theotown-plugin-page .container {
    display: block;
}

.theotown-plugin-hero {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    margin-bottom: 18px;
}

.theotown-eyebrow {
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.theotown-plugin-hero h1 {
    font-size: 34px;
    line-height: 1.15;
    margin-bottom: 8px;
}

.theotown-plugin-hero p {
    color: var(--text-gray);
    max-width: 680px;
}

.theotown-plugin-actions {
    align-items: flex-start;
    display: flex;
    flex-shrink: 0;
}

.theotown-button,
.theotown-link-button {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
}

.theotown-button-primary {
    background: var(--primary-color);
    color: #ffffff;
}

.theotown-button-primary:hover {
    background: var(--primary-hover);
    color: #ffffff;
}

.theotown-button-secondary {
    background: #2ecc71;
    color: #ffffff;
}

.theotown-button-secondary:hover {
    background: #24a65b;
    color: #ffffff;
}

.theotown-link-button {
    border: 1px solid var(--border-color);
    color: var(--primary-color);
}

.theotown-link-button:hover {
    border-color: var(--primary-color);
}

.theotown-notice {
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.theotown-notice-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.theotown-notice-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.theotown-plugin-toolbar {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 12px;
}

.theotown-plugin-tabs {
    display: flex;
    gap: 8px;
}

.theotown-plugin-tabs a {
    border-radius: 6px;
    color: var(--text-gray);
    font-size: 13px;
    font-weight: 800;
    padding: 8px 12px;
}

.theotown-plugin-tabs a.active,
.theotown-plugin-tabs a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.theotown-plugin-search {
    display: flex;
    gap: 8px;
    min-width: min(100%, 390px);
}

.theotown-plugin-search input,
.theotown-upload-form input,
.theotown-upload-form select,
.theotown-upload-form textarea {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-dark);
    min-height: 38px;
    padding: 8px 10px;
    width: 100%;
}

.theotown-plugin-search button {
    background: var(--text-dark);
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
    padding: 8px 14px;
}

.theotown-plugin-layout {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) 340px;
}

.theotown-plugin-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.theotown-plugin-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 16px;
    grid-template-columns: 180px minmax(0, 1fr);
    padding: 14px;
}

.theotown-plugin-thumb {
    align-items: center;
    aspect-ratio: 4 / 3;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-light);
    display: flex;
    font-size: 12px;
    font-weight: 800;
    justify-content: center;
    overflow: hidden;
    text-transform: uppercase;
}

.theotown-plugin-thumb img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.theotown-plugin-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.theotown-plugin-card-top {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.theotown-plugin-card h2 {
    font-size: 20px;
    line-height: 1.25;
}

.theotown-plugin-card h2 a:hover {
    color: var(--primary-color);
}

.theotown-plugin-byline,
.theotown-plugin-excerpt {
    color: var(--text-gray);
    font-size: 13px;
}

.theotown-plugin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.theotown-plugin-meta span,
.theotown-status-pill {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-gray);
    font-size: 12px;
    font-weight: 800;
    padding: 4px 9px;
}

.theotown-plugin-card-footer {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.theotown-upload-panel {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 20px;
    position: sticky;
    top: 18px;
}

.theotown-upload-panel h2 {
    font-size: 20px;
    line-height: 1.25;
    margin-bottom: 8px;
}

.theotown-upload-panel p {
    color: var(--text-gray);
    font-size: 13px;
    margin-bottom: 14px;
}

.theotown-upload-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.theotown-upload-form label {
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 800;
}

.theotown-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.theotown-empty-state {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 42px 24px;
    text-align: center;
}

.theotown-empty-state h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.theotown-empty-state p {
    color: var(--text-gray);
}

.theotown-pagination {
    margin-top: 18px;
}

.theotown-single-download {
    align-items: center;
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    margin-top: 30px;
    padding: 20px;
}

.theotown-single-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

.theotown-single-meta span {
    color: var(--text-gray);
    font-weight: 700;
}

.theotown-download-button {
    align-items: center;
    background: #2ecc71;
    border-radius: 6px;
    color: #ffffff;
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
    padding: 10px 18px;
}

.theotown-download-button:hover {
    background: #24a65b;
    color: #ffffff;
}

/* --- RESPONSIVE STYLES --- */
@media (max-width: 1024px) {
    .header-container {
        gap: 12px;
    }

    .site-title {
        font-size: 18px;
    }

    .nav-menu a {
        padding: 0 8px;
        font-size: 12px;
    }

    .search-form-header input,
    .search-form-header:focus-within input {
        width: 120px;
    }

    .layout-grid {
        grid-template-columns: 1fr;
    }

    .news-grid-three-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theotown-plugin-layout {
        grid-template-columns: 1fr;
    }

    .theotown-upload-panel {
        position: static;
    }

    .hero-slide-content-overlay {
        width: 60%;
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .header-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        height: auto;
        padding: 14px 16px;
        gap: 0 12px;
    }

    .site-brand {
        grid-column: 1;
        max-width: 100%;
    }

    .site-brand-link {
        min-width: 0;
    }

    .site-title-wrap {
        min-width: 0;
    }

    .site-title {
        font-size: 18px;
        line-height: 1.15;
    }

    .site-description {
        display: none;
    }

    .mobile-menu-panel {
        grid-column: 1 / -1;
        align-items: stretch;
        background: rgba(0, 0, 0, 0.08);
        border-top: 1px solid rgba(255, 255, 255, 0.16);
        display: none;
        flex-direction: column;
        gap: 14px;
        height: auto;
        margin: 14px -16px -14px;
        padding: 0 16px 16px;
        width: calc(100% + 32px);
    }

    .mobile-menu-panel.active {
        display: flex;
    }

    .main-navigation {
        width: 100%;
        display: block;
        height: auto;
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        height: auto;
        padding: 10px 0;
    }

    .menu-primary-container {
        height: auto;
        width: 100%;
    }

    .nav-menu li {
        width: 100%;
        height: auto;
        display: block;
    }

    .nav-menu a {
        padding: 12px 4px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        height: auto;
        justify-content: flex-start;
    }

    .nav-menu a:hover,
    .nav-menu .current-menu-item>a {
        border-bottom-color: transparent;
        color: var(--accent-yellow);
        background-color: transparent;
    }

    .nav-menu li ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background-color: rgba(255, 255, 255, 0.05);
        color: #ffffff;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        margin-left: 15px;
    }

    .nav-menu li ul a {
        color: rgba(255, 255, 255, 0.8);
        padding: 8px 10px;
    }

    .header-search {
        width: 100%;
    }

    .header-auth {
        width: 100%;
    }

    .search-form-header {
        width: 100%;
    }

    .search-form-header input,
    .search-form-header:focus-within input {
        width: 100%;
    }

    .account-menu {
        flex-wrap: wrap;
        justify-content: flex-start;
        width: 100%;
    }

    .login-btn {
        min-height: 36px;
        text-align: center;
    }

    .theotown-plugin-hero,
    .theotown-plugin-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .theotown-plugin-search {
        min-width: 0;
        width: 100%;
    }

    .theotown-plugin-card {
        grid-template-columns: 1fr;
    }

    .theotown-plugin-card-top,
    .theotown-plugin-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .theotown-plugin-thumb {
        width: 100%;
    }

    .mobile-nav-toggle {
        display: block;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        order: initial;
    }

    .hero-slide-content-overlay {
        width: 100%;
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 100%);
        justify-content: flex-end;
        padding: 20px;
    }

    .hero-slider-display {
        aspect-ratio: 4 / 3;
        min-height: 0;
    }

    .hero-tabs-bar {
        grid-template-columns: 1fr;
    }

    .hero-tab {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .hero-tab.active {
        border-top: none;
        border-left: 3px solid var(--accent-color);
        padding-top: 16px;
        padding-left: 17px;
    }

    .news-grid-three-col {
        grid-template-columns: 1fr;
    }

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

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .content-area {
        padding: 22px;
    }

    .single-post-title {
        font-size: 24px;
    }

    .post-meta-top {
        flex-wrap: wrap;
        gap: 8px 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .main-wrapper {
        padding: 20px 0;
    }

    .site-title {
        font-size: 16px;
    }

    .site-logo-icon,
    .site-logo-icon svg {
        height: 34px;
        width: 34px;
    }

    .login-btn {
        flex: 1 1 auto;
        padding: 7px 10px;
    }

    .hero-slide-content-overlay {
        padding: 16px;
    }

    .hero-slide-content-overlay h2 {
        font-size: 18px;
        line-height: 1.3;
    }

    .hero-slide-content-overlay p {
        -webkit-line-clamp: 3;
        font-size: 12px;
    }

    .hero-tab {
        padding: 13px 14px;
    }

    .news-grid-three-col {
        gap: 14px;
    }

    .content-area {
        border-radius: 6px;
        padding: 18px;
    }

    .single-post-title {
        font-size: 21px;
    }

    .post-entry-content {
        font-size: 15px;
    }

    .theotown-plugin-hero,
    .theotown-plugin-toolbar,
    .theotown-upload-panel,
    .theotown-plugin-card {
        border-radius: 6px;
    }

    .theotown-plugin-hero {
        padding: 20px;
    }

    .theotown-plugin-hero h1 {
        font-size: 28px;
    }

    .theotown-plugin-tabs,
    .theotown-plugin-search,
    .theotown-form-actions,
    .theotown-single-download {
        flex-direction: column;
    }

    .theotown-plugin-tabs a,
    .theotown-button,
    .theotown-link-button,
    .theotown-plugin-search button {
        width: 100%;
    }

    .theotown-plugin-card h2 {
        font-size: 18px;
    }
}
