/* CSS Variables */
:root {
    scroll-behavior: smooth;
    --primary-red: #BC002D;
    /* Japanese Flag Red */
    --primary-red-light: #eba1ad;
    --text-black: #1a1a1a;
    --text-grey: #666;
    --bg-white: #ffffff;
    --bg-paper: #f8f6f2;
    /* Slight off-white like Japanese paper */
    --accent-gold: #c5a059;

    --font-serif: 'Shippori Mincho', serif;
    --font-sans: 'Zen Maru Gothic', sans-serif;

    --container-width: 1200px;
    --header-height: 80px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--text-black);
    background-color: var(--bg-paper);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Header */
.site-header {
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(188, 0, 45, 0.05);
}

.header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo-link {
    display: block;
    height: 100%;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    /* Display height */
    width: auto;
    object-fit: contain;
}

.logo-text {
    margin-left: 15px;
}

.logo-text h1 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--primary-red);
    line-height: 1;
}

.logo-text p {
    font-size: 0.7rem;
    color: var(--text-grey);
    letter-spacing: 0.1em;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-weight: 700;
    font-size: 0.95rem;
    position: relative;
    color: var(--text-black);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-red);
    transition: 0.3s;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--primary-red);
}

/* Hero Section */
.hero {
    height: 90vh;
    padding-top: var(--header-height);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(circle at 70% 50%, var(--bg-white) 0%, var(--bg-paper) 100%);
}

.hero-content {
    flex: 1;
    max-width: var(--container-width);
    padding: 0 20px;
    z-index: 2;
    position: relative;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 5rem;
    line-height: 1.2;
    color: var(--primary-red);
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 1);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--text-grey);
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    transition: 0.3s;
    letter-spacing: 0.1em;
}

.btn-primary {
    background-color: var(--primary-red);
    color: white;
    box-shadow: 0 4px 15px rgba(188, 0, 45, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(188, 0, 45, 0.4);
    background-color: #a00026;
}

.hero-image {
    position: absolute;
    left: 50%;
    margin-left: 150px;
    /* Anchor to center + offset */
    bottom: 0;
    width: 350px;
    /* Smaller size as requested */
    max-width: 40vw;
    /* Ensure it doesn't dominate on small screens */
    height: auto;
    z-index: 1;
    pointer-events: none;
}

.character-img {
    width: 100%;
    height: auto;
    /* Allow natural scaling */
    display: block;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero-pattern {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vh;
    height: 80vh;
    border: 1px solid var(--primary-red-light);
    border-radius: 50%;
    opacity: 0.2;
    z-index: 0;
}

.hero-pattern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vh;
    height: 60vh;
    border: 20px solid var(--bg-white);
    border-radius: 50%;
}

/* Articles Section */
.articles-section {
    max-width: var(--container-width);
    margin: 80px auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-header h3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.section-header .jp {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--text-black);
    position: relative;
    z-index: 1;
}

.section-header .jp::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: var(--primary-red);
    border-radius: 50%;
    opacity: 0.1;
    z-index: -1;
}

.section-header .en {
    font-size: 0.9rem;
    color: var(--primary-red);
    letter-spacing: 0.2em;
    font-weight: 700;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.article-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(188, 0, 45, 0.15);
}

.card-image {
    position: relative;
    height: 250px;
    /* Unified Height */
    width: 100%;
    background-color: #333;
    /* Dark background for letterboxing */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image img,
.card-image video {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* Redundant but safe */
    display: block;
    margin: auto;
    /* Absolute center fallback */
    background: #000;
    transition: 0.5s;
}

.article-card:hover .card-image img {
    transform: scale(1.05);
    /* Zoom effect on hover */
}

.article-card:hover .card-image img.main-content {
    transform: scale(1.05);
}

.category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-red);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    /* More rectangular/unified */
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-grey);
    margin-bottom: 10px;
}

.card-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.card-title a:hover {
    color: var(--primary-red);
}

.card-excerpt {
    font-size: 0.9rem;
    color: var(--text-grey);
    margin-bottom: 20px;
    white-space: pre-wrap;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 12;
    /* Allow more lines */
    line-clamp: 12;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 14rem;
    /* Approx 10 lines */
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: auto;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 20px;
}

.card-tags span {
    font-size: 0.75rem;
    color: var(--primary-red);
    background-color: #fff0f5;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    transition: 0.3s;
    border: 1px solid rgba(188, 0, 45, 0.05);
}

.card-tags span:hover {
    background-color: var(--primary-red);
    color: white;
    transform: scale(1.05);
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    /* More gap */
}

.share-article-btn {
    margin-left: auto;
    /* Align to right */
    background: #fff;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    color: var(--text-grey);
    padding: 0;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.share-article-btn:hover {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
    transform: translateY(-3px) rotate(10deg);
    box-shadow: 0 8px 20px rgba(188, 0, 45, 0.25);
}

.share-article-btn:hover .share-text {
    color: rgba(255, 255, 255, 0.9);
}

.share-article-btn:hover {
    background: #e0e0e0;
    color: var(--text-black);
    transform: translateY(-2px);
}

.share-icon-emoji {
    font-size: 1.2rem;
    line-height: 1;
}

.share-text {
    font-size: 0.6rem;
    font-weight: 700;
}

/* Like button removed */

/* Footer */
.site-footer {
    background-color: var(--bg-white);
    padding: 80px 20px 20px;
    border-top: 5px solid var(--primary-red);
    margin-top: 50px;
}

.footer-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo h2 {
    font-family: var(--font-serif);
    color: var(--primary-red);
    font-size: 1.8rem;
}

.footer-logo p {
    font-size: 0.8rem;
    color: var(--text-grey);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-grey);
}

.footer-links a:hover {
    color: var(--primary-red);
}

.copyright {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
}

/* Responsive */
/* Filter UI Styles */
.goods-hero {
    text-align: center;
    padding: 120px 20px 40px;
    background: radial-gradient(circle at 50% 0%, #fff 0%, var(--bg-paper) 100%);
}

.hero-desc {
    color: var(--text-grey);
    margin-top: 10px;
}

.goods-container {
    max-width: var(--container-width);
    margin: 0 auto 100px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.filter-section {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-header h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reset-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
}

.reset-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.search-bar-container {
    position: relative;
    margin-bottom: 30px;
}

#goods-search {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #eee;
    border-radius: 50px;
    font-size: 1rem;
    transition: 0.3s;
    font-family: inherit;
    appearance: none;
    /* iOS reset */
}

#goods-search:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(188, 0, 45, 0.1);
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h4 {
    font-size: 0.9rem;
    color: var(--text-grey);
    margin-bottom: 10px;
    font-weight: 700;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    background: white;
    border: 1px solid #ddd;
    color: var(--text-black);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    /* Mobile optimization */
}

.filter-tag:hover {
    border-color: var(--primary-red-light);
}

.filter-tag.active {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
    box-shadow: 0 4px 10px rgba(188, 0, 45, 0.2);
}

.result-count {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-grey);
    margin-top: 10px;
}

/* Goods Grid Refined */
.goods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.goods-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.goods-image-area {
    position: relative;
    width: 100%;
    height: 250px;
    /* Unified Height */
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.goods-image-area img,
.goods-image-area video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fill the frame */
    display: block;
    cursor: pointer;
    /* Indicate clickable */
}

.goods-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-red);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    /* Unified with Articles */
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.goods-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.goods-title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.goods-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
    flex: 1;
    /* Push tags/button down */
    min-height: 14rem;
    /* Approx 10 lines */
}

.goods-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.goods-tags span {
    font-size: 0.75rem;
    color: #666;
    background: #f7f9fc;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid #edf2f7;
    transition: 0.2s;
}

.goods-tags span:hover {
    background: #e2e8f0;
    color: #333;
}

.buy-btn {
    width: fit-content;
    min-width: 200px;
    margin: 10px auto 0;
    /* Center it */
    background: linear-gradient(135deg, var(--primary-red) 0%, #ce0030 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(188, 0, 45, 0.2);
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.buy-btn::after {
    content: '→';
    font-weight: 900;
    transition: 0.3s;
}

.buy-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(188, 0, 45, 0.4);
}

.buy-btn:hover::after {
    transform: translateX(4px);
}

/* Cute Share Button (Theme Red) */
.cute-share-btn {
    width: 100%;
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(188, 0, 45, 0.3);
}

.cute-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(188, 0, 45, 0.4);
    background-color: #a00026;
}

/* YouTube Page Specific Styles */
.channel-header {
    text-align: center;
    /* Header (80px) + Spacing (40px) + Extra for Dynamic Island/Notch safely */
    padding: 130px 20px 40px;
    background: linear-gradient(135deg, #FFEBEE 0%, #FFFFFF 100%);
    margin-bottom: 40px;
    /* Ensure background goes to top */
    margin-top: 0;
}

/* Mobile Optimization for Header padding */
@media (max-width: 480px) {
    .channel-header {
        padding-top: 110px;
        /* Slightly less on mobile if header shrinks, but usually safe to keep large */
    }
}

.channel-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.channel-icon-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: #ddd;
    object-fit: cover;
}

/* Mixed Grid Shorts Badge */
.shorts-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-red);
    color: white;
    padding: 2px 8px;
    font-size: 0.7rem;
    border-radius: 4px;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.video-thumb img.is-short {
    object-fit: cover;
    /* Change to cover for full bleed */
    background: #000;
    aspect-ratio: 9 / 16;
}

/* YouTube Shorts Vertical Container */
.shorts-grid .video-thumbnail,
.video-card:has(.is-short) .video-thumbnail {
    aspect-ratio: 9 / 16;
    height: auto;
}

.shorts-grid .video-card {
    height: auto;
}

.channel-stats {
    margin-bottom: 10px;
}

/* YouTube Message Section */
.youtube-message {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-grey);
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.subscribe-btn {
    background-color: #cc0000;
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.subscribe-btn:hover {
    transform: scale(1.05);
    background-color: #bb0000;
}

.video-section {
    max-width: var(--container-width);
    margin: 0 auto 60px;
    padding: 0 20px;
}

.section-title {
    font-family: 'Zen Maru Gothic', sans-serif;
    font-size: 1.5rem;
    color: var(--text-black);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title span {
    color: #cc0000;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* fix: was missing */
}

.video-thumbnail {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #000;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    font-size: 0.85rem;
    color: #666;
}

/* Shorts Section */
.shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.shorts-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
}

.shorts-card:hover {
    transform: scale(1.03);
    z-index: 10;
}

.shorts-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: #000;
    overflow: hidden;
}

.shorts-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shorts-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 10px 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.shorts-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.shorts-views {
    font-size: 0.8rem;
    opacity: 0.9;
}

@media (max-width: 480px) {
    :root {
        --container-width: 100%;
        --header-height: 70px;
    }

    body {
        font-size: 16px;
        /* Base size for readability */
    }

    /* Stack filter and grid properly */
    .goods-container {
        gap: 30px;
    }

    .filter-section {
        padding: 20px;
        margin: 0 -10px;
        /* Bleed slightly */
        border-radius: 30px;
        /* Modern rounded look */
    }

    #goods-search {
        padding: 12px 15px;
        font-size: 16px;
        /* Prevent zoom on focus in iOS */
    }

    .tag-cloud {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
        /* iOS scroll momentum */
    }

    .filter-tag {
        white-space: nowrap;
    }

    /* Goods Card Mobile */
    .goods-grid {
        grid-template-columns: 1fr;
        /* Single column on mobile is often better for "App-like" feel */
        gap: 25px;
    }

    .goods-image-area {
        height: 250px;
    }

    .shorts-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .shorts-grid .video-card {
        min-width: unset;
    }

    .shorts-grid .shorts-thumbnail {
        aspect-ratio: 9/16;
    }
}

/* ---------------------------------------------------- */
/* ARTICLES FILTER SPECIFIC STYLES (Restored) */
/* ---------------------------------------------------- */
.articles-filter-section {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    margin: 0 auto 50px;
    max-width: var(--container-width);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.filter-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Search Bar */
.search-bar-wrapper {
    position: relative;
    width: 100%;
}

#article-search-input {
    width: 100%;
    padding: 12px 40px 12px 20px;
    border-radius: 50px;
    border: 2px solid #eee;
    font-size: 1rem;
    transition: 0.3s;
    background: #f9f9f9;
}

#article-search-input:focus {
    border-color: var(--primary-red);
    background: white;
    outline: none;
}

#search-clear-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: #ccc;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: none;
    /* JS toggles this */
    line-height: 1;
    font-size: 14px;
}

/* Category Filter Row */
.filter-row {
    display: flex;
    align-items: center;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
    /* For scrollbar space */
}

.filter-label {
    font-weight: 700;
    white-space: nowrap;
    color: var(--text-black);
}

.scroll-filter-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.category-chip {
    padding: 6px 16px;
    border-radius: 20px;
    background: #f0f0f0;
    color: var(--text-grey);
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.category-chip:hover,
.category-chip.active {
    background: var(--primary-red);
    color: white;
}

/* Advanced Filters (Date & Tags) */
.advanced-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px dashed #eee;
}

.filter-group-date,
.filter-group-tags {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

#article-date-filter {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-family: inherit;
    cursor: pointer;
}

.mini-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 600px;
}

.filter-tag-chip {
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
    transition: 0.2s;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f5f5f5;
}

.filter-tag-chip:hover,
.filter-tag-chip.active {
    color: var(--primary-red);
    background: #ffebee;
    font-weight: bold;
}

/* Status Bar */
.filter-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-grey);
}

#article-reset-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
}

#article-reset-btn:hover {
    background: #f5f5f5;
    color: #333;
}

/* Mobile Tweaks for Filters */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .advanced-filters {
        flex-direction: column;
        gap: 20px;
    }

    .filter-group-date,
    .filter-group-tags {
        flex-direction: column;
        gap: 8px;
    }
}

/* ---------------------------------------------------- */
/* MOBILE NAVIGATION (Start) */
/* ---------------------------------------------------- */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        /* Show hamburger */
        z-index: 1001;
        /* Above nav */
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden by default */
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 1000;
        display: flex;
    }

    .main-nav.active {
        right: 0;
        /* Slide in */
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .main-nav a {
        font-size: 1.5rem;
        color: var(--text-black);
    }

    .logo-text h1 {
        font-size: 1.2rem;
        /* Smaller logo on mobile */
    }

    /* Mobile Hero Section */
    .hero {
        height: auto;
        min-height: 100vh;
        flex-direction: column;
        padding-top: calc(var(--header-height) + 20px);
        padding-bottom: 0;
    }

    .hero-content {
        text-align: center;
        padding: 20px;
    }

    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-image {
        position: relative;
        left: auto;
        margin-left: 0;
        width: 60%;
        max-width: 280px;
        margin: 20px auto 0;
    }

    .hero-pattern {
        display: none;
    }
}