/*
Theme Name: LogiShift
Theme URI: https://logishift.jp
Author: LogiShift Team
Author URI: https://logishift.jp
Description: A custom theme for LogiShift, a logistics SEO media.
Version: 1.0.0
Text Domain: logishift
*/

:root {
    /* Color Palette */
    --color-navy: #0A192F;
    --color-navy-light: #112240;
    --color-tech-blue: #00B4D8;
    --color-tech-blue-dark: #0096B4;
    --color-light-gray: #F8F9FA;
    --color-text: #333333;
    --color-medium-gray: #666666;
    --color-border-gray: #E0E0E0;
    --color-white: #FFFFFF;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
    --gradient-primary: linear-gradient(135deg, var(--color-tech-blue) 0%, var(--color-tech-blue-dark) 100%);

    /* 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: 24px;
    --spacing-2xl: 32px;
    --spacing-3xl: 48px;
    --spacing-section: 48px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-card-hover: 0 20px 25px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: var(--font-base);
    line-height: 1.8;
    color: var(--color-text);
    background-color: var(--color-light-gray);
    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.02em;
}

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

a:hover {
    text-decoration: underline;
}

/* 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-md) 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;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    margin: 0;
    line-height: 1;
}

.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-white);
    border-radius: 16px;
    overflow: hidden;
    /* Base Flat Style: No shadow, solid border */
    box-shadow: none;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border-gray);
}

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

.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);
}

/* Add overlay to no-image for text readability */
.no-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 25, 47, 0.3);
    /* Reduced opacity for better visibility */
    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);
}

/* 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%);
}

.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.
*/

.swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

/* 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 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    color: var(--color-white);
}

/* 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 */
.site-footer {
    background-color: var(--color-navy);
    color: var(--color-white);
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
    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);
    color: var(--color-white);
    padding: var(--spacing-3xl) 0;
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

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

.archive-description {
    font-size: 1.125rem;
    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);
}

/* 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: 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);
}

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

.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.75rem;
    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.5rem;
    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.25rem;
    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: #444;
}

/* 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: var(--color-white);
    box-shadow: var(--shadow-sm);
    border-radius: 8px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.entry-content table thead {
    background: var(--gradient-primary);
    color: var(--color-white);
}

.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 */
    .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;
}

/* Global Trends Section */
.global-trends-section {
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.05) 0%, rgba(10, 25, 47, 0.05) 100%);
}

.region-filter-tabs {
    display: flex;
    gap: var(--spacing-sm);
    /* Gap for pills */
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
    justify-content: flex-start;
}

.region-tab {
    padding: 8px 16px;
    background-color: var(--color-white);
    /* Default inactive bg */
    border: 1px solid var(--color-border-gray);
    /* Default inactive border */
    border-radius: 32px;
    /* Pill shape */
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--color-medium-gray);
    margin-bottom: var(--spacing-sm);
}

.region-tab:hover {
    background-color: var(--color-light-gray);
    color: var(--color-navy);
    border-color: var(--color-navy);
}

.region-tab.active {
    background-color: var(--color-tech-blue);
    /* Active Blue */
    color: var(--color-white);
    /* Active White */
    border-color: var(--color-tech-blue);
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(0, 180, 216, 0.2);
    /* Subtle shadow for active pill */
}

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

.global-article {
    transition: all 0.3s ease;
}

.global-article[style*="display: none"] {
    display: none !important;
}

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

/* 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;
}




/* CTA Section */
.cta-section {
    background: var(--gradient-primary);
    color: var(--color-white);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-white);
}

.cta-content p {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .button.outline {
    background-color: transparent;
    border-color: var(--color-white);
    color: var(--color-white);
}

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

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

.cta-buttons .button:not(.outline):hover {
    background-color: var(--color-navy);
    color: var(--color-white);
}

/* 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.4rem;
        padding: var(--spacing-sm);
    }

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

/* 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;
}

/* Weekly Summary Specific Styles */
.weekly-summary-section {
    background-color: #f0f4f8;
    padding: 40px 0;
}

.weekly-hero-card {
    display: flex;
    gap: 30px;
    align-items: center;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.weekly-thumbnail {
    flex: 1;
    max-width: 50%;
}

.weekly-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.weekly-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.weekly-meta {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9em;
}

.weekly-label {
    background: #2c3e50;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    margin-right: 10px;
    display: inline-block;
}

.weekly-title {
    font-size: 1.8em;
    margin-bottom: 15px;
    line-height: 1.4;
}

.weekly-title a {
    text-decoration: none;
    color: #333;
}

.weekly-excerpt {
    font-size: 1em;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.weekly-button {
    background: #e67e22;
    color: #fff;
    padding: 12px 0;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    transition: background 0.3s;
    width: 100%;
    text-align: center;
}

.weekly-button:hover {
    background: #d35400;
}

@media (max-width: 768px) {
    .weekly-hero-card {
        flex-direction: column;
        padding: 20px;
        gap: 10px;
    }

    .weekly-thumbnail {
        display: none;
    }

    .weekly-title {
        font-size: 1.2em;
    }

    .weekly-excerpt {
        font-size: 0.95em;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 25px;
    }

    .weekly-button {
        width: 100%;
        text-align: center;
    }
}