/*
Theme Name: TechShift
Theme URI: https://techshift.jp
Author: TechShift Team
Author URI: https://techshift.jp
Description: A custom theme for TechShift.
Version: 1.0.0
Text Domain: techshift
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
    /* Financial Terminal LIGHT MODE Palette */
    --color-bg-primary: #F8FAFC;
    /* Slate 50 - Very Light Gray */
    --color-bg-secondary: #F1F5F9;
    /* Slate 100 */
    --color-bg-tertiary: #E2E8F0;
    /* Slate 200 - Borders/Separators */

    --color-bg-card: #FFFFFF;
    /* Pure White Card */

    --color-text-primary: #0F172A;
    /* Slate 900 - Deep Navy (Almost Black) */
    --color-text-secondary: #475569;
    /* Slate 600 - Readable Gray */
    --color-text-muted: #94A3B8;
    /* Slate 400 */

    /* Accents */
    /* Accents */
    --color-accent: #2563EB;
    /* Electric Indigo - Vibrant Blue */
    --color-accent-hover: #1D4ED8;
    /* Darker Indigo */
    --color-glass-surface: rgba(255, 255, 255, 0.7);
    /* Glassmorphism Surface */
    --color-glass-border: rgba(255, 255, 255, 0.5);

    /* Market Data Colors */
    --color-bull: #059669;
    /* Emerald 600 - Readable Green */
    --color-bear: #DC2626;
    /* Red 600 - Readable Red */
    --color-neutral: #64748B;

    /* Compat Mappings */
    --color-navy: #0F172A;
    /* Keep Navy available for specific elements */
    --color-navy-light: #1E293B;
    --color-tech-blue: var(--color-accent);
    --color-light-gray: var(--color-bg-secondary);
    --color-white: #FFFFFF;
    --color-text: var(--color-text-primary);
    --color-border-gray: #E2E8F0;
    /* Slate 200 */

    /* Typography */
    --font-base: 'Noto Sans JP', sans-serif;
    --font-heading: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-section: 64px;

    /* Effects */
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    /* Softer shadow for light mode */
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-base);
    line-height: 1.7;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global Media Reset */
img,
iframe,
video,
object {
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.3;
    color: var(--color-navy);
    margin-top: 0;
    font-weight: 700;
    letter-spacing: -0.01em;
    /* Slightly tighter for modern feel */
}

a {
    color: var(--color-tech-blue);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    text-decoration: underline;
    color: var(--color-accent);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
}

/* Header */
.site-header {
    background-color: rgba(255, 255, 255, 0.95);
    padding: var(--spacing-sm) 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.site-branding {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

.site-title {
    margin: 0;
    line-height: 1;
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--color-navy);
}

.site-title a {
    color: var(--color-navy);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
}

/* Accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Navigation */
.main-navigation .menu-toggle {
    display: none;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: var(--spacing-sm);
    /* Reduced gap to fit more items */
    align-items: center;
}

.main-navigation a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: inline-block;
    white-space: nowrap;
}

.main-navigation a:hover {
    background-color: var(--color-tech-blue);
    color: var(--color-white);
    text-decoration: none;
    transform: translateY(-2px);
}

@media (max-width: 1100px) {

    /* Breakpoint for when menu items wrap */
    .main-navigation .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 22px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 101;
    }

    .main-navigation .menu-toggle span.icon-bar {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--color-navy);
        transition: all 0.3s ease;
        border-radius: 2px;
    }

    /* Hamburger Animation */
    .main-navigation.toggled .menu-toggle span.icon-bar:nth-child(2) {
        transform: translateY(10px) rotate(45deg);
    }

    .main-navigation.toggled .menu-toggle span.icon-bar:nth-child(3) {
        opacity: 0;
    }

    .main-navigation.toggled .menu-toggle span.icon-bar:nth-child(4) {
        transform: translateY(-10px) rotate(-45deg);
    }

    .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-white);
        padding: var(--spacing-md);
        box-shadow: var(--shadow-md);
        gap: 0;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        border-top: 1px solid var(--color-border-gray);
    }

    .main-navigation ul li {
        border-bottom: 1px solid var(--color-light-gray);
        margin: 0;
    }

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

    .main-navigation ul li a {
        display: block;
        padding: var(--spacing-md) var(--spacing-sm);
        font-size: 1rem;
        border-radius: 0;
        width: 100%;
    }

    .main-navigation ul li a:hover {
        background-color: var(--color-light-gray);
        color: var(--color-tech-blue);
        transform: none;
    }

    .main-navigation.toggled ul {
        display: flex;
    }
}

/* Search in Menu */
.main-navigation .menu-item-search {
    padding: var(--spacing-sm) 0;
}

.main-navigation .search-form {
    display: flex;
    gap: var(--spacing-sm);
    width: 100%;
}

.main-navigation .search-form label {
    flex: 1;
    margin-bottom: 0;
    display: flex;
    /* Ensure label behaves as a container */
}

.main-navigation .search-field {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--color-border-gray);
    border-radius: 50px;
    /* Pill shape */
    font-size: 0.95rem;
    background-color: var(--color-light-gray);
    transition: all 0.3s ease;
}

.main-navigation .search-field:focus {
    outline: none;
    border-color: var(--color-tech-blue);
    background-color: var(--color-white);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.main-navigation .search-submit {
    padding: 10px 24px;
    font-size: 0.9rem;
    flex-shrink: 0;
    border-radius: 50px;
    /* Pill shape */
}

@media (max-width: 768px) {
    .main-navigation .menu-item-search {
        padding: var(--spacing-lg) var(--spacing-md);
        border-bottom: 1px solid var(--color-light-gray);
        background-color: rgba(248, 249, 250, 0.5);
        /* Slight contrast */
        margin-top: var(--spacing-sm);
    }

    .main-navigation .search-form {
        width: 100%;
    }

    .main-navigation .search-field {
        background-color: var(--color-white);
    }
}

/* Components: Buttons */
/* Components: Buttons */
.button {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 32px;
    /* Flat Design: 4px */
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    letter-spacing: 0.02em;
    font-size: 1rem;
}

.button:hover {
    text-decoration: none;
    /* No lift, no shadow for flat design */
    opacity: 0.9;
}

.button.primary,
.hero-cta {
    background-color: var(--color-tech-blue);
    /* Solid Color */
    background-image: none;
    /* Ensure no gradient */
    color: var(--color-white);
    box-shadow: none;
    /* No shadow */
}

.button.primary:hover,
.hero-cta:hover {
    background-color: var(--color-tech-blue-dark);
    box-shadow: none;
}

.button.outline {
    background-color: transparent;
    border: 2px solid var(--color-tech-blue);
    color: var(--color-tech-blue);
}

.button.outline:hover {
    background-color: var(--color-tech-blue);
    color: var(--color-white);
}

/* Text Link with Arrow */
.text-link-arrow {
    display: inline-flex;
    align-items: center;
    color: var(--color-tech-blue);
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.text-link-arrow:hover {
    color: var(--color-navy);
    transform: translateX(4px);
    /* Subtle horizontal movement */
    text-decoration: none;
}

.button.text-link {
    background: none;
    padding: 0;
    color: var(--color-tech-blue);
    border-radius: 0;
}

.button.text-link:hover {
    text-decoration: underline;
    transform: none;
    box-shadow: none;
}

/* Components: Cards */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-xl);
}

.article-card {
    background-color: var(--color-bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border-gray);
    position: relative;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    border-color: var(--color-tech-blue);
    z-index: 10;
}

.article-thumbnail {
    aspect-ratio: 16 / 9;
    background-color: var(--color-light-gray);
    overflow: hidden;
    position: relative;
}

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

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

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('assets/images/no-image.png');
    background-size: cover;
    background-position: center;
    color: var(--color-white);
    font-weight: 700;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 1;
    transition: all 0.5s ease;
    position: relative;
}

.no-image::after {
    content: 'No Image';
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.no-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 25, 47, 0.3);
    transition: background 0.3s ease;
}

.article-card:hover .no-image::before {
    background: rgba(10, 25, 47, 0.1);
}

.article-card:hover .no-image {
    opacity: 1;
    transform: scale(1.05);
}

.article-content {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-meta {
    font-size: 0.8rem;
    color: var(--color-medium-gray);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 500;
}

.cat-label {
    background-color: var(--color-navy);
    color: var(--color-white);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.article-title {
    font-size: 1.0rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    line-height: 1.5;
}

.article-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s;
}

.article-title a:hover {
    color: var(--color-tech-blue);
}

/* article-card deleted */

/* Hero Section */
/* Hero Section (Slider) */
.hero-slider-section {
    position: relative;
    width: 100%;
    height: 480px;
    /* or 80vh depending on preference */
    background-color: var(--color-navy);
    overflow: hidden;
    padding: 0;
    /* Override global section padding */
}

.hero-slider-container {
    width: 100%;
    height: 100%;
}

.hero-full-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    /* Above overlay (1) and content (2)? No, content needs to be clickable? Actually full link covers everything. If content has links, z-index needs care. But here content is just text. */
    cursor: pointer;
}

/* Ensure hover effect works via the link hover */
.hero-full-link:hover~.hero-slide-overlay {
    background: linear-gradient(to bottom, transparent 0%, rgba(10, 25, 47, 0) 60%, rgba(10, 25, 47, 1) 100%);
}

.hero-slider-container .swiper-slide:has(.hero-full-link:hover) {
    transform: scale(1.02);
    /* Use :has if supported, or just rely on JS scale? Simple CSS hover on parent might trigger transform but swiper transition works best on slide */
}

/* Better approach for hover scale: separate bg element? 
   For now, remove complex scale to ensure stability first. 
   Or just scale the background-size? No, transition background-size is jerky.
   Let's just keep the overlay darkening/lightening.
*/

.hero-slider-container .swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-size: cover;
    background-position: center;

    /* Strict Visibility Control */
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 1s ease, visibility 1s ease;
    /* Match JS speed */
}

.hero-slider-container .swiper-slide-active {
    opacity: 1 !important;
    visibility: visible;
    pointer-events: auto;
    z-index: 10;
}

/* Gradient Overlay for Text Readability */
.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Only darken bottom 33% */
    background: linear-gradient(to bottom, transparent 0%, transparent 67%, rgba(10, 25, 47, 0.8) 100%);
    z-index: 1;
}

/* Content Positioning */
.hero-slide-content {
    position: absolute;
    bottom: 60px;
    left: 0;
    z-index: 2;
    text-align: left;
    width: 100%;
    padding: 0 var(--spacing-image-side, 5%);
    max-width: 1200px;
    margin: 0 auto;
    right: 0;
}

/* Meta Line (Cat + Date) */
.hero-meta-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--spacing-sm);
}

.hero-cat-label {
    background-color: var(--color-tech-blue);
    color: var(--color-white);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    /* More sophisticated than full pill */
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-slide-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-family: var(--font-base);
}

/* Slide Typography */
.hero-slide-title,
.hero-slider-section h2.hero-slide-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    color: #FFFFFF !important;
}

/* Swiper Controls Customization */
.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: var(--color-white);
    opacity: 0.4;
    transition: all 0.3s;
    margin: 0 6px !important;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--color-white);
    transform: scale(1.5);
}

/* Custom Arrows */
.swiper-button-next,
.swiper-button-prev {
    color: var(--color-white) !important;
    /* Force white color over default blue */
    background: rgba(255, 255, 255, 0.1);
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    /* Prevent squashing */
    box-sizing: border-box;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Flex centering might fight with Swiper defaults, use carefully or rely on line-height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 12px !important;
    /* Smaller icon */
    font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--color-tech-blue);
    border-color: var(--color-tech-blue);
    color: var(--color-white) !important;
    transform: scale(1.1);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-slider-section {
        height: 360px;
    }

    .hero-slide-title {
        font-size: 1.2rem;
    }

    .hero-slide-content {
        bottom: 40px;
        /* Make room for pagination which might overlap */
        padding: 0 24px;
    }

    /* Hide arrows on mobile */
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
}

/* Sections */
section {
    padding: var(--spacing-section) 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    padding: 0 var(--spacing-lg);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2.0rem;
    position: relative;
    padding-left: var(--spacing-md);
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--color-tech-blue);
}

/* Footer */
/* Dark Footer Background */
.site-footer {
    background-color: #0F172A !important;
    /* Navy */
    color: #CBD5E1;
    padding: 36px 0 !important;
    /* Increased vertical space */
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.footer-columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-3xl);
    margin-bottom: var(--spacing-3xl);
    padding-bottom: var(--spacing-3xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .footer-columns {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--color-white);
}

.footer-description {
    font-size: 0.9rem;
    line-height: 1.8;
    opacity: 0.8;
    margin: 0;
}

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

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--color-white);
    text-decoration: none;
    opacity: 0.8;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--color-tech-blue);
    transform: translateX(4px);
}

.footer-bottom {
    text-align: center;
}

.copyright {
    font-size: 0.875rem;
    opacity: 0.6;
    margin: 0;
}

/* Archive Pages */
.archive-hero {
    background: var(--gradient-hero);
    padding: var(--spacing-3xl) 0;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    margin-top: var(--spacing-2xl);

}

.archive-title {
    font-size: 2.0rem;
    margin-bottom: var(--spacing-md);
    margin-top: var(--spacing-md);
    font-weight: 800;
}

.archive-description {
    font-size: 1.0rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

.archive-articles-section {
    padding-bottom: var(--spacing-section);
}

.no-posts {
    text-align: center;
    font-size: 1.125rem;
    color: var(--color-medium-gray);
    padding: var(--spacing-3xl) 0;
}

.content-sidebar-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

@media (max-width: 768px) {
    .content-sidebar-wrap {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Sidebar Widgets */
.widget {
    margin-bottom: var(--spacing-xl);
    background-color: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    border-left: 4px solid var(--color-navy);
    padding-left: var(--spacing-sm);
    border-bottom: none;
    display: block;
    font-weight: 700;
    line-height: 1.2;
}

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

.widget ul li {
    margin-bottom: 0;
    border-bottom: 1px solid var(--color-border-gray);
    padding: var(--spacing-sm) 0;
    transition: all 0.2s ease;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--color-text);
    display: block;
    text-decoration: none;
    font-size: 0.95rem;
}

.widget ul li a:hover {
    color: var(--color-tech-blue);
    padding-left: 4px;
}

/* Search Widget & Content Search Form Specifics */
.widget .search-form,
.content-area .search-form,
.widget_search .search-form,
.widget_block .search-form,
#secondary .search-form {
    display: flex;
    gap: var(--spacing-sm);
    max-width: 100%;
}

/* WordPress Block Search - target the inner wrapper */
.wp-block-search__inside-wrapper {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: nowrap;
    width: 100%;
}

/* Hide the search label */
.wp-block-search__label {
    display: none;
}

.widget .search-field,
.content-area .search-field,
.widget_search .search-field,
.widget_block .search-field,
.wp-block-search__input,
#secondary .search-field {
    flex: 1;
    min-width: 0;
    padding: 10px 20px;
    border: 1px solid var(--color-border-gray);
    border-radius: 32px;
    /* Flat Design */
    font-size: 0.9rem;
    background-color: var(--color-light-gray);
}

.widget .search-submit,
.content-area .search-submit,
.widget_search .search-submit,
.widget_block .search-submit,
.wp-block-search__button,
#secondary .search-submit {
    flex-shrink: 0;
    padding: 10px 24px;
    border-radius: 32px;
    /* Flat Design */
    font-size: 0.9rem;
    background-color: var(--color-tech-blue);
    /* Solid Color */
    background-image: none;
    color: var(--color-white);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.widget .search-submit:hover,
.content-area .search-submit:hover,
.widget_search .search-submit:hover,
.widget_block .search-submit:hover,
.wp-block-search__button:hover,
#secondary .search-submit:hover {
    opacity: 0.9;
}

/* 404 Page Search Form */
.error-404 .search-form {
    display: flex;
    gap: var(--spacing-sm);
    max-width: 100%;
}

.error-404 .search-form label {
    flex: 1;
    margin-bottom: 0;
    display: flex;
}

.error-404 .search-field {
    width: 100%;
    padding: 14px 24px;
    border: 1px solid var(--color-border-gray);
    border-radius: 32px;
    /* Flat Design */
    font-size: 1rem;
    background-color: var(--color-light-gray);
    transition: all 0.3s ease;
}

.error-404 .search-field:focus {
    outline: none;
    border-color: var(--color-tech-blue);
    background-color: var(--color-white);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.error-404 .search-submit {
    flex-shrink: 0;
    padding: 14px 36px;
    border-radius: 32px;
    /* Flat Design */
    font-size: 1rem;
    font-weight: 700;
    background-color: var(--color-tech-blue);
    /* Solid Color */
    background-image: none;
    color: var(--color-white);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.error-404 .search-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 180, 216, 0.4);
}





/* Pagination */
.pagination {
    margin-top: var(--spacing-xl);
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--color-white);
    border: 1px solid var(--color-border-gray);
    color: var(--color-text);
    text-decoration: none;
    border-radius: 32px;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background-color: var(--color-tech-blue);
    color: var(--color-white);
    border-color: var(--color-tech-blue);
}

/* =========================================
   Market Dashboard Template
   ========================================= */

/* Layout & Grid System */
.market-dashboard-page .site-content .container {
    max-width: 1200px;
    /* Limit width for better readability */
}

/* Header Section */
.market-dashboard-page .market-header {
    background-color: #fff;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--color-bg-tertiary);
    margin-bottom: var(--spacing-md);
}

.market-dashboard-page .market-title-box {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-md);
}

.market-dashboard-page .market-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    color: var(--color-text-primary);
}

.market-dashboard-page .market-subtitle {
    font-size: 1rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Main Layout Grid */
/* Main Layout Grid */
.market-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

/* Charts & Metrics Section (Main Column) */
.market-pulse-section {
    background: transparent;
    /* Remove wrapper background */
    padding: 0;
}

.market-hero-chart {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-bg-tertiary);
}


/* Single Page Styles */
.breadcrumb {
    padding: var(--spacing-md) 0;
    color: var(--color-medium-gray);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-lg);
}

.breadcrumb a {
    color: var(--color-medium-gray);
}

.breadcrumb .sep {
    margin: 0 var(--spacing-xs);
}

.single-article {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: var(--spacing-2xl);
    border: none;
}

.entry-header {
    margin-bottom: var(--spacing-lg);
}

.entry-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.entry-title {
    font-size: 2.0rem;
    margin-bottom: var(--spacing-md);
}

.entry-thumbnail {
    margin-bottom: var(--spacing-xl);
}

.entry-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.entry-content {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-xl);
}

.entry-content h2 {
    font-size: 1.5rem;
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-lg);
    border-left: 6px solid var(--color-tech-blue);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--color-light-gray);
    border-radius: 0 4px 4px 0;
}

.entry-content h3 {
    font-size: 1.2rem;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--color-border-gray);
    padding-bottom: var(--spacing-xs);
}

.entry-content h4 {
    font-size: 1.1rem;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    border-left: 4px solid var(--color-tech-blue);
    padding-left: var(--spacing-sm);
    font-weight: 700;
}

.entry-content p {
    margin-bottom: var(--spacing-lg);
    line-height: 1.9;
    color: var(--color-text-primary);
}

.entry-content blockquote {
    border-left: 4px solid var(--color-accent);
    margin: 1.5em 0;
    padding: 0.5em 1em;
    background-color: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    font-style: italic;
}

.entry-content pre,
.entry-content code {
    background-color: #0F172A;
    /* Dark Navy for code */
    color: #34D399;
    /* Matrix Green */
    font-family: monospace;
    padding: 2px 4px;
    border-radius: 4px;
}

.entry-content pre {
    padding: 1em;
    overflow-x: auto;
    border: 1px solid var(--color-bg-tertiary);
    display: block;
}

/* Share Buttons */
.share-buttons {
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--color-border-gray);
}

.share-buttons p {
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--color-medium-gray);
}

.share-buttons-container {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.button.share-twitter {
    background-color: #000000;
    color: #ffffff;
    border: none;
    border-radius: 32px;
}

.button.share-facebook {
    background-color: #1877F2;
    color: #ffffff;
    border: none;
    border-radius: 32px;
}

.button.share-twitter:hover,
.button.share-facebook:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.related-posts {
    margin-top: var(--spacing-3xl);
}

.related-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    border-left: 6px solid var(--color-navy);
    padding-left: var(--spacing-md);
    border-bottom: none;
    /* Remove old border */
    line-height: 1.2;
}

/* Page Template Styles */
.page-content-area {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--color-white);
    padding: var(--spacing-xl);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: var(--spacing-2xl);
}

.page-content-area .entry-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--color-border-gray);
    padding-bottom: var(--spacing-lg);
}

/* Table Styles */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-lg) 0;
    background-color: transparent;
    border-radius: 8px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--color-bg-tertiary);
    color: var(--color-text-primary);
}

.entry-content table thead {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
}

.entry-content table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--color-border-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: normal;
    min-width: 180px;
    /* Standard width for content columns to prevent excessive wrapping */
}

/* First column is usually a label/key, so it can be narrower */
.entry-content table td:first-child,
.entry-content table th:first-child {
    min-width: 100px;
}

.entry-content table th {
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    /* Keep headers on one line to set natural column width */
}

.entry-content table tbody tr:last-child td {
    border-bottom: none;
}

.entry-content table tbody tr:hover {
    background-color: rgba(0, 180, 216, 0.05);
    transition: background-color 0.2s ease;
}

/* Alternate row colors for better readability */
.entry-content table tbody tr:nth-child(even) {
    background-color: var(--color-light-gray);
}

.entry-content table tbody tr:nth-child(even):hover {
    background-color: rgba(0, 180, 216, 0.08);
}

/* Responsive Tables: Default style now handles scrolling, but we can adjust padding if needed */
@media (max-width: 768px) {

    .entry-content table th,
    .entry-content table td {
        padding: var(--spacing-sm);
        font-size: 0.85rem;
    }
}

/* ========================================
   FRONT PAGE SPECIFIC STYLES
   ======================================== */

/* Featured Articles Section */
.featured-articles-section {
    background-color: var(--color-white);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-2xl);
}

.featured-card {
    background-color: var(--color-white);
    border-radius: 16px;
    overflow: hidden;
    /* No shadow, Flat border */
    box-shadow: none;
    transition: all 0.2s ease;
    border: 1px solid var(--color-border-gray);
    display: flex;
    flex-direction: column;
}

.featured-card:hover {
    border-color: var(--color-tech-blue);
    transform: none;
    box-shadow: none;
}

.featured-thumbnail {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
}

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

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

/* Rank Badge for Popular Articles */
.rank-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    background: #333;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-bottom-right-radius: 8px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.rank-badge.rank-1 {
    background: #E6B422;
    width: 40px;
    height: 40px;
    font-size: 16px;
}

/* Gold */
.rank-badge.rank-2 {
    background: #8e9eab;
}

/* Silver */
.rank-badge.rank-3 {
    background: #B87333;
}

/* Bronze */

.featured-content {
    padding: var(--spacing-xl);
}

.featured-title {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.4;
}

.featured-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s;
}

.featured-title a:hover {
    color: var(--color-tech-blue);
}

/* Mobile Horizontal List Styling (<768px) */
/* Mobile Horizontal List Styling (<768px) */
@media (max-width: 768px) {

    .article-grid,
    .featured-grid,
    .global-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        /* Increased gap for premium feel */
    }

    /* Horizontal Card Layout for Mobile */
    /* Horizontal Card Layout for Mobile */
    .article-card,
    .featured-card {
        flex-direction: row;
        align-items: flex-start;
        height: auto;
        min-height: auto;
        border: none;
        border-bottom: 1px solid var(--color-border-gray);
        border-radius: 4px;
        padding-bottom: var(--spacing-md);
        /* Add spacing below content before border */
        margin-bottom: var(--spacing-xs);
        /* Slight margin after border */
        background-color: transparent;
        /* Transparent to blend with section bg */
        box-shadow: none;
        /* Force no shadow */
    }

    /* Remove sidebar border if desired, but bottom border acts as separator */

    .article-thumbnail,
    .featured-thumbnail {
        width: 120px;
        /* Increased width to match height of 3-line text */
        height: auto;
        flex: 0 0 120px;
        aspect-ratio: 4 / 3;
        /* Keeps 4:3, resulting in ~90px height */
        border-radius: 4px;
        background-color: var(--color-light-gray);
    }



    .article-content,
    .featured-content {
        padding: 0 0 4px 16px;
        /* Top padding 0 for alignment */
        width: auto;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .article-title,
    .featured-title {
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 0;
        line-height: 1.5;
        /* Standard readable line height */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        /* Revert to 3 lines as requested */
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .article-meta,
    .featured-content .article-meta {
        margin-bottom: 6px;
        font-size: 11px;
        line-height: 1.2;
        flex-wrap: wrap;
        gap: 8px;
        align-content: flex-start;
        margin-top: 0px;
    }

    /* Mobile Pagination */
    .pagination {
        margin-top: var(--spacing-lg);
    }

    .pagination .page-numbers {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Category Sections */
.category-section {
    background-color: var(--color-light-gray);
}

.category-section:nth-child(even) {
    background-color: var(--color-white);
}

.section-header-content {
    flex: 1;
}

.section-description {
    color: var(--color-medium-gray);
    font-size: 0.95rem;
    margin-top: var(--spacing-xs);
    max-width: 600px;
}

.section-link {
    color: var(--color-tech-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.section-link:hover {
    color: var(--color-navy);
    transform: translateX(4px);
}

.no-posts {
    color: var(--color-medium-gray);
    text-align: center;
    padding: var(--spacing-2xl);
    font-style: italic;
}


/* Theme Tags Section */
.theme-tags-section {
    background-color: var(--color-white);
}

.theme-tag-block {
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-xl);
    background-color: var(--color-light-gray);
    border-radius: 12px;
}

.theme-tag-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.theme-icon {
    font-size: 1.8rem;
}





/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

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

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .section-title {
        font-size: 1.5rem;
    }

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

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

    .region-filter-tabs {
        justify-content: flex-start;
        display: flex;
        flex-wrap: nowrap;
        /* Restore scrolling */
        overflow-x: auto;
        padding-bottom: 0;
        gap: var(--spacing-sm);
        -webkit-overflow-scrolling: touch;
        /* Hide Scrollbar but allow scroll */
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE 10+ */
    }

    .region-filter-tabs::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .region-tab {
        flex-shrink: 0;
    }

    .theme-tag-title {
        font-size: 1.25rem;
    }

    .cta-content h2 {
        font-size: 1.75rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-buttons .button {
        width: 100%;
    }

    /* Single Page Mobile Adjustments */
    .single-article {
        padding: 0;
        background-color: transparent;
        border-radius: 0;
        box-shadow: none;
        margin-bottom: var(--spacing-lg);
    }

    .entry-title {
        font-size: 1.4rem;
    }

    .entry-content {
        font-size: 1rem;
    }

    .entry-content h2 {
        font-size: 1.2rem;
        padding: var(--spacing-sm);
    }

    .entry-content h3 {
        font-size: 1.1rem;
    }
}

/* Mobile Optimization Updates */
@media (max-width: 768px) {

    /* Fix Section Header Spacing */
    .section-header {
        padding-left: 0;
        padding-right: 0;
    }

    /* Reduce container padding on single post pages for better readability */
    .single .container {
        padding: 0 var(--spacing-md);
    }

    /* Fix Tag List "Card in Card" Look */
    .theme-tag-block {
        background-color: transparent;
        padding: 0;
        margin-bottom: var(--spacing-xl);
        box-shadow: none;
    }

    .theme-tag-block .theme-tag-title {
        padding-left: var(--spacing-sm);
        margin-bottom: var(--spacing-md);
    }

    /* Improve Horizontal Scrolling Cards */
    .theme-articles-scroll {
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
        gap: var(--spacing-md);
    }

    .theme-article-card {
        flex: 0 0 85vw;
        /* 85% of viewport width */
        max-width: 300px;
        background-color: var(--color-white);
        border: 1px solid var(--color-border-gray);
        box-shadow: var(--shadow-sm);
    }
}

/* SVG Icon Styling */
.theme-icon-svg {
    width: 1.5em;
    height: 1.5em;
    stroke: var(--color-tech-blue);
    /* Default color */
    stroke-width: 2;
    vertical-align: middle;
    margin-right: var(--spacing-xs);
    display: inline-block;
}

.theme-tag-title {
    display: flex;
    align-items: center;
}

/* Hide Recent Comments Widget */
#block-4.widget_block,
.wp-block-latest-comments {
    display: none !important;
}

/* ------------------------------------------------------------------------- *
 *  Popular Posts Widget
 * ------------------------------------------------------------------------- */
.widget_popular_posts .popular-post-item {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.widget_popular_posts .popular-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.popular-post-link {
    display: flex;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    gap: 12px;
}

.popular-post-rank {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: #eee;
    color: #555;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-top: 2px;
}

.popular-post-rank.rank-1 {
    background: #E6B422;
    color: #fff;
}

/* Gold */
.popular-post-rank.rank-2 {
    background: #8e9eab;
    color: #fff;
}

/* Silver */
.popular-post-rank.rank-3 {
    background: #B87333;
    color: #fff;
}

/* Bronze */

.popular-post-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
    background: #f0f0f0;
}

.popular-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
}

.popular-post-content {
    flex-grow: 1;
}

.popular-title {
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 4px;
    font-weight: bold;
    color: #2c3e50;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-post-link:hover .popular-title {
    color: #3498db;
}

.popular-views {
    font-size: 11px;
    color: #888;
    display: block;
}

/* FinShift Market Meta (Single Page) */
.finshift-market-meta {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}

.market-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--color-bg-tertiary);
    /* Default */
    color: var(--color-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.market-chip.regime-label {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.market-chip.sentiment-label.greed {
    background-color: rgba(52, 211, 153, 0.2);
    color: var(--color-bull);
    border-color: var(--color-bull);
}

.market-chip.sentiment-label.fear {
    background-color: rgba(248, 113, 113, 0.2);
    color: var(--color-bear);
    border-color: var(--color-bear);
}

.market-chip.sentiment-label.neutral {
    color: var(--color-text-secondary);
}


/* Front Page Tab Overrides (Dark Mode) */
.region-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--color-bg-secondary);
    padding-bottom: var(--spacing-sm);
}

.region-tab {
    background: transparent;
    border: 1px solid var(--color-bg-tertiary);
    color: var(--color-text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.region-tab:hover {
    color: var(--color-text-primary);
    border-color: var(--color-text-primary);
}

.region-tab.active {
    background-color: var(--color-accent);
    color: var(--color-bg-primary);
    /* Contrast text */
    border-color: var(--color-accent);
    font-weight: 700;
}

/* Ranking Badge */
.featured-thumbnail {
    position: relative;
}

.rank-badge {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--color-accent);
    color: var(--color-bg-primary);
    font-weight: 800;
    padding: 4px 10px;
    z-index: 10;
    border-bottom-right-radius: 8px;
    font-size: 1.1rem;
    box-shadow: var(--shadow-soft);
}

.rank-1 {
    background-color: #FFD700;
    color: #000;
}

/* Gold */
.rank-2 {
    background-color: #C0C0C0;
    color: #000;
}

/* Silver */
.rank-3 {
    background-color: #CD7F32;
    color: #000;
}

/* Bronze */

/* Global Ticker */
.finshift-global-ticker {
    background: #000;
    padding: 0;
    margin-bottom: var(--spacing-xl);
}

/* Dashboard / Market Pulse Styles */
.market-pulse-section {
    padding: var(--spacing-2xl) 0;
    background-color: var(--color-bg-primary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.dashboard-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-bg-tertiary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    margin-bottom: var(--spacing-lg);
    /* For overlay link */
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.dashboard-card:last-child {
    margin-bottom: 0;
}

.card-overlay-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    font-size: 0.85rem;
}

.region-badge {
    background-color: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Equal width for all 3 metrics */
    /* Region, Regime, Sentiment */
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    background-color: var(--color-bg-secondary);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    width: 100%;
}

.metric-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Center content vertically */
    text-align: center;
    width: 100%;
}

/* Add separators between columns */
.dashboard-metrics .metric-box:not(:last-child) {
    border-right: 1px solid var(--color-bg-tertiary);
}

.metric-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.metric-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.metric-value.regime-inflation {
    color: var(--color-bear);
}

.metric-value.regime-deflation {
    color: var(--color-bear);
}

.metric-value.regime-goldilocks {
    color: var(--color-bull);
}

.metric-value.regime-reflation {
    color: var(--color-bull);
}

.metric-value.regime-stagflation {
    color: var(--color-bear);
}

.metric-value.sentiment-greed {
    color: var(--color-bull);
}

.metric-value.sentiment-fear {
    color: var(--color-bear);
}

.metric-value.sentiment-neutral {
    color: var(--color-text-gray);
}

/* Scenario Teaser */
.dashboard-scenario-teaser {
    margin-bottom: 12px;
    padding: 0;
    background: none;
    border: none;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    /* Muted color for sub-text */
    line-height: 1.5;

    /* Line Clamp (3 lines) */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.scenario-icon {
    font-size: 1.1em;
}

.scenario-text {
    font-weight: 500;
    color: var(--color-text-primary);
}

.dashboard-title {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
    /* Reduce gap between title and teaser */
    flex-grow: 1;
}

.dashboard-title a {
    color: var(--color-text-primary);
    text-decoration: none;
}

.dashboard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    /* Force full width */
    margin-top: auto;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-bg-tertiary);
    gap: 16px;
    /* Fallback check */
}

.date-badge {
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    white-space: nowrap;
}

.read-briefing-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-tech-blue);
    transition: color 0.2s;
    white-space: nowrap;
}

.dashboard-card:hover .read-briefing-text {
    color: var(--color-accent);
}

/* =========================================
   Mobile Overrides: Scenario Panel Widen (No Card)
   ========================================= */
/* todays-scenarios-panel media query deleted */

/* TechShift Impact Styles */
/* Impact Colors */
.accelerated,
.impact-accelerated {
    color: var(--color-bull);
}

.delayed,
.impact-delayed {
    color: var(--color-bear);
}

.neutral,
.impact-neutral {
    color: var(--color-neutral);
}

/* Chips (Single Page) */
.market-chip {
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-block;
    background-color: var(--color-bg-secondary);
}

.impact-label.accelerated {
    background-color: #ecfdf5;
    /* emerald-50 */
    color: var(--color-bull);
}

.impact-label.delayed {
    background-color: #fef2f2;
    /* red-50 */
    color: var(--color-bear);
}

/* Dashboard Metrics (Front Page) */
.metric-value.impact-accelerated {
    color: var(--color-bull);
    font-weight: 700;
}

.metric-value.impact-delayed {
    color: var(--color-bear);
    font-weight: 700;
}

.metric-value.impact-neutral {
    color: var(--color-neutral);
    font-weight: 700;
}

.techshift-impact-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--color-glass-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-glass-border);
}

/* Vertical timeline styles deleted */

/* Modern Badges */
.modern-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    /* Pill shape */
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
}

.hero-cat-label {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border-radius: 9999px;
    padding: 6px 14px;
}

/* --- REDESIGN: Intelligent Navigation Card --- */

/* Timeline Visibility Fix */
/* Timeline styles deleted */

/* New Card UI */
.dashboard-card {
    background: #FFFFFF;
    border: 1px solid var(--color-border-gray);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--color-tech-blue);
}

/* Card Header: Sector & Date */
.card-header-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--color-bg-tertiary);
    padding-bottom: 12px;
}

/* Mobile Horizontal Layout Modifier */
@media (max-width: 768px) {
    .dashboard-card.mobile-horizontal {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 16px;
        gap: 12px;
        align-items: flex-start;
    }

    .dashboard-card.mobile-horizontal .card-header-line {
        width: 100%;
        margin-bottom: 8px;
        padding-bottom: 8px;
        order: 1;
    }

    .dashboard-card.mobile-horizontal .card-body-flex {
        display: flex;
        flex-direction: row-reverse;
        /* Thumbnail right, content left */
        width: 100%;
        gap: 12px;
        order: 2;
        justify-content: space-between;
    }

    .dashboard-card.mobile-horizontal .card-thumbnail-side {
        width: 80px;
        height: 60px;
        flex-shrink: 0;
    }

    .dashboard-card.mobile-horizontal .card-thumbnail-side img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 4px;
    }

    .dashboard-card.mobile-horizontal .card-content-side {
        flex: 1;
    }

    .dashboard-card.mobile-horizontal .dashboard-title {
        font-size: 0.95rem;
        margin-bottom: 4px;
        line-height: 1.4;
    }

    .dashboard-card.mobile-horizontal .card-summary {
        display: none;
        /* Hide summary on mobile list to save space */
    }

    .dashboard-card.mobile-horizontal .phase-status-line,
    .dashboard-card.mobile-horizontal .impact-section,
    .dashboard-card.mobile-horizontal .card-footer-link {
        display: none;
        /* Hide footer elements in simple list view */
    }

    /* If we want to show footer, we can adjust order to 3 */
}


.sector-badge {
    color: var(--color-tech-blue);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Signal Section: Impact Score */
.card-signal-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: -4px;
}

.signal-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    font-family: var(--font-heading);
    letter-spacing: -0.05em;
}

.signal-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

/* Coloring */
.signal-accelerated .signal-value {
    color: var(--color-bull);
}

.signal-delayed .signal-value {
    color: var(--color-bear);
}

.signal-neutral .signal-value {
    color: var(--color-neutral);
}

/* Content */
.dashboard-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
    color: var(--color-text-primary);
}

.dashboard-title a:hover {
    color: var(--color-tech-blue);
}

/* Phase Status */
.phase-status-line {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background-color: var(--color-bg-secondary);
    border-radius: 8px;
    font-size: 0.85rem;
    border-left: 3px solid var(--color-tech-blue);
}

.phase-label-mini {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.phase-value-text {
    font-weight: 600;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

/* Footer Link */
.card-footer-link {
    margin-top: auto;
    text-align: right;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-tech-blue);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    transition: gap 0.2s;
}

.card-footer-link:hover {
    gap: 8px;
}

.card-overlay-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Ensure links inside are clickable */
.dashboard-title a,
.card-footer-link {
    position: relative;
    z-index: 2;
}

/* Timeline positioning overrides deleted */

/* Timeline media queries deleted */

/* --- ENRICHMENT: Card Content Upgrade --- */

.dashboard-card {
    gap: 12px;
    /* Tighter gap for denser feeling */
}

/* 1. Thumbnail Integration */
.card-body-flex {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.card-content-side {
    flex: 1;
}

.card-thumbnail-side {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-bg-secondary);
}

.card-thumbnail-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 2. Summary Text */
.card-summary {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 3. Impact Meter (Replaces raw score) */
.impact-meter-container {
    background: var(--color-bg-secondary);
    height: 6px;
    border-radius: 3px;
    width: 100%;
    position: relative;
    margin-top: 4px;
    overflow: hidden;
}

.impact-meter-bar {
    height: 100%;
    border-radius: 3px;
    background: var(--color-neutral);
    /* Default */
    width: 0%;
    /* Set via inline style */
    transition: width 1s ease-out;
}

.impact-meter-bar.accelerated {
    background: var(--color-bull);
}

.impact-meter-bar.delayed {
    background: var(--color-bear);
}

.impact-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    margin-top: 4px;
}

.impact-score-display {
    color: var(--color-text-primary);
}

/* Duplicate timeline styles deleted */

/* Move impact styles outside of media query */


/* --- FINAL FIX: Diverging Impact Meter --- */

.impact-section {
    margin-top: 16px;
}

.impact-header-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.impact-title {
    color: var(--color-text-secondary);
}

.impact-score-display {
    color: var(--color-text-primary);
    font-family: monospace;
}

.diverging-meter-container {
    position: relative;
    width: 100%;
    height: 10px;
    /* Thicker for visibility */
    background: var(--color-bg-tertiary);
    /* Subtle track */
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 6px;
}

.meter-center-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-text-secondary);
    opacity: 0.3;
    z-index: 1;
    transform: translateX(-50%);
}

.diverging-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    height: 100%;
    /* Ensure height */
    z-index: 2;
    border-radius: 2px;
    transition: width 0.5s ease-out, left 0.5s ease-out;
}

.diverging-bar.accelerated {
    background-color: var(--color-bull);
}

.diverging-bar.delayed {
    background-color: var(--color-bear);
}

.diverging-bar.neutral {
    background-color: var(--color-neutral);
}

.meter-axis-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Orphaned styles deleted */

/* Duplicates removed */

.meter-axis-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--color-text-secondary);
    opacity: 0.8;
}

.meter-axis-labels span:nth-child(2) {
    /* Center "Neutral" */
    text-align: center;
}

/* Force specificity override for safety */
/* Timeline override loop deleted */

/* Mobile Optimization: Hide Thumbnail for cleaner look */
@media (max-width: 767px) {
    .card-thumbnail-side {
        display: none !important;
    }
}