/**
 * JPVoy Portal Modern Magazine Stylesheet
 * Tokyo Modern Editorial Aesthetic
 */

:root {
    --jp-red: #e11d48;
    --jp-red-hover: #be123c;
    --jp-dark: #0f172a;
    --jp-navy: #1e293b;
    --jp-slate: #334155;
    --jp-muted: #64748b;
    --jp-light: #f8fafc;
    --jp-border: #e2e8f0;
    --jp-card-bg: #ffffff;
    --jp-radius-sm: 8px;
    --jp-radius-md: 14px;
    --jp-radius-lg: 20px;
    --jp-shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
    --jp-shadow-md: 0 6px 16px rgba(0,0,0,0.06);
    --jp-shadow-lg: 0 12px 28px rgba(0,0,0,0.1);
}

.jpvoy-portal-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    color: var(--jp-dark);
}

/* 1. News Ticker */
.jpvoy-news-ticker-bar {
    background: #0f172a;
    color: #fff;
    border-radius: var(--jp-radius-sm);
    margin: 16px 0 24px;
    padding: 10px 18px;
    font-size: 14px;
}
.ticker-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}
.ticker-badge {
    background: var(--jp-red);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 4px;
    white-space: nowrap;
}
.ticker-content {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ticker-content a {
    color: #f1f5f9;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.ticker-content a:hover {
    color: #fda4af;
}
.ticker-tag {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: none;
}
@media (min-width: 768px) {
    .ticker-tag { display: inline-block; }
}

/* 2. Portal Header */
.jpvoy-portal-header {
    margin-bottom: 30px;
    padding: 10px 0 20px;
    border-bottom: 2px solid var(--jp-border);
}
.portal-eyebrow {
    font-size: 13px;
    font-weight: 800;
    color: var(--jp-red);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
}
.portal-main-title {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--jp-dark);
    margin: 0 0 8px 0;
    line-height: 1.2;
}
.portal-desc {
    font-size: 16px;
    color: var(--jp-muted);
    margin: 0 0 18px 0;
    line-height: 1.5;
}
.portal-topic-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.pill-item {
    background: #f1f5f9;
    color: var(--jp-slate);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}
.pill-item:hover {
    background: #e2e8f0;
    color: var(--jp-dark);
    transform: translateY(-1px);
}
.pill-item.pill-highlight {
    background: #fff1f2;
    color: var(--jp-red);
    border-color: #fecdd3;
}
.pill-item.pill-highlight:hover {
    background: #ffe4e6;
}

/* 3. Hero Bento Grid */
.jpvoy-hero-bento {
    margin-bottom: 48px;
}
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 992px) {
    .bento-grid {
        grid-template-columns: 7fr 5fr;
        min-height: 480px;
    }
}
.bento-card {
    position: relative;
    border-radius: var(--jp-radius-md);
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--jp-shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--jp-shadow-lg);
}
.bento-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}
.bento-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.bento-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
    background: #1e293b;
}
.bento-card:hover .bento-media img {
    transform: scale(1.05);
}
.bento-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15,23,42,0.1) 0%, rgba(15,23,42,0.85) 75%, rgba(15,23,42,0.95) 100%);
}

.bento-hero-main {
    min-height: 380px;
}
@media (min-width: 992px) {
    .bento-hero-main { min-height: 100%; }
}
.bento-hero-main .bento-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 30px;
    width: 100%;
    box-sizing: border-box;
    z-index: 2;
    color: #fff;
}
.bento-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.bento-cat-tag {
    background: var(--jp-red);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}
.bento-read-time {
    font-size: 12px;
    color: #cbd5e1;
}
.bento-title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
@media (min-width: 768px) {
    .bento-title { font-size: 28px; }
}
.bento-excerpt {
    font-size: 15px;
    color: #e2e8f0;
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bento-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #94a3b8;
}
.bento-cta {
    color: #fda4af;
    font-weight: 700;
}

.bento-sub-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.bento-hero-sub {
    min-height: 220px;
    flex: 1;
}
.bento-hero-sub .bento-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    z-index: 2;
    color: #fff;
}
.bento-sub-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    margin: 8px 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 4. Category Sections */
.jpvoy-category-section {
    margin-bottom: 48px;
    padding-top: 20px;
}
.section-bg-light {
    background: #f8fafc;
    border-radius: var(--jp-radius-md);
    padding: 30px 24px;
    margin-left: -24px;
    margin-right: -24px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--jp-border);
    padding-bottom: 12px;
}
.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-icon {
    font-size: 24px;
}
.section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--jp-dark);
    margin: 0;
}
.section-more {
    font-size: 14px;
    font-weight: 700;
    color: var(--jp-red);
    text-decoration: none;
    transition: color 0.2s;
}
.section-more:hover {
    color: var(--jp-red-hover);
    text-decoration: underline;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    gap: 20px;
}
.cards-grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.cards-grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* Portal Article Card */
.portal-article-card {
    background: var(--jp-card-bg);
    border-radius: var(--jp-radius-sm);
    border: 1px solid var(--jp-border);
    overflow: hidden;
    box-shadow: var(--jp-shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}
.portal-article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--jp-shadow-md);
    border-color: #cbd5e1;
}
.card-link-block {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
.article-thumb-wrap {
    position: relative;
    width: 100%;
    height: 180px;
    background: #e2e8f0;
    overflow: hidden;
}
.article-thumb-wrap.aspect-16-9 {
    height: 200px;
}
.article-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #cbd5e1;
    transition: transform 0.4s ease;
}
.portal-article-card:hover .article-thumb-wrap img {
    transform: scale(1.06);
}
.card-cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    z-index: 2;
}
.badge-blue { background: rgba(30, 64, 175, 0.9); }
.badge-emerald { background: rgba(6, 95, 70, 0.9); }
.badge-purple { background: rgba(107, 33, 168, 0.9); }
.badge-pink { background: rgba(190, 24, 93, 0.9); }

.article-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.article-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--jp-navy);
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-title.title-lg {
    font-size: 18px;
}
.article-excerpt {
    font-size: 13px;
    color: var(--jp-muted);
    line-height: 1.5;
    margin: 0 0 14px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #94a3b8;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
}
.read-more-text {
    color: var(--jp-red);
    font-weight: 700;
}

/* 5. Toolkit Section */
.jpvoy-toolkit-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    border-radius: var(--jp-radius-lg);
    color: #fff;
    padding: 40px 30px;
    margin-top: 20px;
    margin-bottom: 40px;
}
.toolkit-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 36px;
}
.toolkit-pill {
    display: inline-block;
    background: rgba(244, 63, 94, 0.2);
    color: #fda4af;
    border: 1px solid rgba(244, 63, 94, 0.4);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.toolkit-heading {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 10px 0;
}
.toolkit-desc {
    font-size: 15px;
    color: #cbd5e1;
    line-height: 1.5;
    margin: 0;
}
.toolkit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.toolkit-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--jp-radius-md);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, background 0.2s ease;
}
.toolkit-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}
.tool-icon {
    font-size: 32px;
    margin-bottom: 12px;
}
.toolkit-item h4 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
}
.toolkit-item p {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0 0 16px 0;
    flex: 1;
}
.tool-btn {
    display: inline-block;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s ease;
}
.tool-btn:hover {
    background: var(--jp-red);
    color: #fff;
}

/* Mobile Viewport LCP & Layout Optimization 2026 */
@media (max-width: 768px) {
    .jpvoy-portal-header {
        padding: 20px 0 16px !important;
    }
    .portal-main-title {
        font-size: 24px !important;
        margin-bottom: 8px !important;
    }
    .portal-desc {
        font-size: 13.5px !important;
        line-height: 1.65 !important;
    }
    .bento-hero-main {
        min-height: 180px !important;
    }
    .bento-hero-main .bento-content {
        padding: 16px 14px !important;
    }
    .bento-title {
        font-size: 17px !important;
        line-height: 1.35 !important;
        margin: 0 0 8px 0 !important;
    }
    .bento-excerpt {
        display: none !important;
    }
    .bento-meta {
        font-size: 11px !important;
    }
}

/* Mobile 90+ LCP Optimization 2026: Lock Bento Cards to 140px & 110px on Mobile */
@media (max-width: 768px) {
    .bento-hero-main {
        min-height: 140px !important;
        max-height: 140px !important;
    }
    .bento-hero-sub {
        min-height: 110px !important;
        max-height: 110px !important;
    }
    .bento-sub-stack {
        gap: 12px !important;
    }
    .bento-card .bento-content {
        padding: 10px 12px !important;
    }
    .bento-title, .bento-sub-title {
        font-size: 14px !important;
        line-height: 1.3 !important;
        margin: 0 !important;
    }
    .bento-badge-row, .bento-read-time, .bento-meta, .bento-excerpt {
        display: none !important;
    }
}
