/*
Theme Name: Astra Child - Nordic Startup News (Japandi Edition)
Theme URI: https://nordicstartupnews.com
Template: astra
Description: Direct copy of Japandi design concept - warm, earthy, contemplative
Author: Nordic Startup News
Version: 2.0.0
*/

/* ========================================
   JAPANDI PALETTES (Copied from concept-2-japandi)
   Warm, earthy, contemplative
   ======================================== */

/* PALETTE 1: Wabi (Terracotta & Moss) - DEFAULT */
:root, [data-palette="wabi"] {
    --accent-primary: #a3785d;
    --accent-secondary: #5d7a5f;
    --accent-warm: #c4a68a;
    --accent-cool: #7a9a7c;
}

/* PALETTE 2: Shibui (Indigo & Sand) */
[data-palette="shibui"] {
    --accent-primary: #3d5a80;
    --accent-secondary: #98c1d9;
    --accent-warm: #d4c5b9;
    --accent-cool: #5c7a99;
}

/* PALETTE 3: Mono (Charcoal Ink) */
[data-palette="mono"] {
    --accent-primary: #2d2d2d;
    --accent-secondary: #5a5a5a;
    --accent-warm: #8a8a8a;
    --accent-cool: #4a4a4a;
}

/* PALETTE 4: Matcha (Green Tea) */
[data-palette="matcha"] {
    --accent-primary: #6b7f5e;
    --accent-secondary: #8fa67a;
    --accent-warm: #c9d4b7;
    --accent-cool: #7d9168;
}

/* PALETTE 5: Sakura (Blush & Slate) */
[data-palette="sakura"] {
    --accent-primary: #c9a9a6;
    --accent-secondary: #6b7280;
    --accent-warm: #e8d5d3;
    --accent-cool: #9ca3af;
}

/* ========================================
   LIGHT THEME (Warm Paper) - DEFAULT
   ======================================== */
:root, [data-theme="light"] {
    --bg-primary: #faf8f5;
    --bg-secondary: #f5f2ed;
    --bg-card: #ffffff;
    --bg-accent: #f0ebe4;

    --text-primary: #2c2825;
    --text-secondary: #5c5651;
    --text-muted: #9c9690;

    --border-subtle: rgba(44, 40, 37, 0.08);
    --border-medium: rgba(44, 40, 37, 0.12);
}

/* ========================================
   DARK THEME (Warm Night)
   ======================================== */
[data-theme="dark"] {
    --bg-primary: #1a1816;
    --bg-secondary: #242120;
    --bg-card: #2e2a28;
    --bg-accent: #3a3533;

    --text-primary: #f5f2ed;
    --text-secondary: #b5b0a8;
    --text-muted: #7a756d;

    --border-subtle: rgba(245, 242, 237, 0.08);
    --border-medium: rgba(245, 242, 237, 0.12);
}

/* ========================================
   BASE STYLES (Exact copy from Japandi)
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    line-height: 1.7;
    min-height: 100vh;
    transition: background 0.5s ease, color 0.5s ease;
}

/* Subtle paper texture (Japandi signature) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.015;
    pointer-events: none;
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none;
}

.container, .ast-container {
    max-width: 1300px !important;
    margin: 0 auto;
    padding: 0 3rem;
}

/* Import Google Fonts: Newsreader (serif headings) + Inter (UI) */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&family=Inter:wght@400;500;600&display=swap');

/* ========================================
   HEADER - Zen Minimal (Exact copy)
   ======================================== */
.site-header,
.ast-primary-header,
.main-header-bar {
    padding: 2rem 0 !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    background: var(--bg-primary) !important;
}

.header-inner,
.site-header .ast-container,
.ast-primary-header .ast-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo styling - Ensō-inspired */
.site-branding,
.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Ensō circle logo mark */
.logo-mark,
.custom-logo-link {
    width: 44px;
    height: 44px;
    position: relative;
}

.logo-mark svg {
    width: 100%;
    height: 100%;
}

.logo-mark circle {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 120;
    stroke-dashoffset: 15;
}

/* Logo text - Newsreader serif */
.site-title,
.logo-text {
    font-family: 'Newsreader', Georgia, serif !important;
    font-size: 1.35rem !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em;
    color: var(--text-primary) !important;
}

/* Navigation */
.main-header-menu,
.nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.main-header-menu a,
.nav-link {
    font-size: 0.9rem !important;
    color: var(--text-secondary) !important;
    transition: color 0.3s ease;
}

.main-header-menu a:hover,
.nav-link:hover {
    color: var(--accent-primary) !important;
}

/* ========================================
   HERO - Asymmetric Editorial (Exact copy)
   ======================================== */
.hero,
.ast-archive-description {
    padding: 5rem 0 4rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    padding-right: 2rem;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

.hero-label::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent-primary);
}

.hero-title,
h1.entry-title {
    font-family: 'Newsreader', Georgia, serif !important;
    font-size: 2.75rem !important;
    font-weight: 500 !important;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: var(--text-primary) !important;
}

.hero-excerpt,
.entry-summary {
    font-size: 1.1rem !important;
    color: var(--text-secondary) !important;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.hero-meta,
.entry-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
}

.hero-image,
.ast-blog-featured-section {
    position: relative;
}

.hero-image img,
.ast-blog-featured-section img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 2px;
}

/* Decorative frame (Japandi signature) */
.hero-image::before,
.ast-blog-featured-section::before {
    content: '';
    position: absolute;
    top: -12px;
    right: -12px;
    width: 100%;
    height: 100%;
    border: 1px solid var(--accent-primary);
    border-radius: 2px;
    z-index: -1;
    opacity: 0.5;
}

/* ========================================
   SECTION DIVIDER (Japandi signature)
   ======================================== */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.divider-icon {
    padding: 0 2rem;
    color: var(--accent-primary);
    font-size: 1.5rem;
}

/* ========================================
   FEATURED STORIES - Vertical Stack (Exact copy)
   ======================================== */
.featured {
    padding: 2rem 0 4rem;
}

.featured-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-title,
h2 {
    font-family: 'Newsreader', Georgia, serif !important;
    font-size: 1.5rem !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
}

.section-link {
    font-size: 0.85rem;
    color: var(--accent-primary);
}

.featured-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-subtle);
}

.featured-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 2rem;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.3s ease;
}

.featured-item:hover {
    background: var(--bg-accent);
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.featured-number {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--accent-primary);
    opacity: 0.5;
}

.featured-content h3 {
    font-family: 'Newsreader', Georgia, serif !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    margin-bottom: 0.25rem;
}

.featured-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.featured-category,
.cat-links a {
    font-size: 0.7rem !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-secondary) !important;
    background: var(--bg-accent) !important;
    padding: 0.35rem 0.75rem;
    border-radius: 2px;
}

/* ========================================
   NEWS GRID - Masonry-ish (Exact copy)
   ======================================== */
.news-section,
.ast-archive-posts {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.news-grid,
.ast-row,
.ast-blog-layout-4-grid .ast-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Override Astra's ast-full-width and blog-layout-4 width forcing */
.ast-row .ast-full-width,
.ast-row .ast-grid-common-col,
.ast-blog-layout-4-grid .ast-article-post {
    width: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.news-card,
.ast-article-single,
.ast-article-post,
article.post {
    background: var(--bg-card) !important;
    border-radius: 4px !important;
    overflow: hidden;
    transition: all 0.4s ease;
    border: none !important;
}

/* Remove inner padding so images go edge-to-edge */
.ast-article-inner {
    padding: 0 !important;
}

/* Add padding to all text content below images */
.ast-article-inner .post-content {
    padding: 1rem 1.25rem 1.25rem !important;
}

/* But remove padding from the image section itself */
.ast-article-inner .ast-blog-featured-section {
    margin: 0 !important;
    padding: 0 !important;
}

/* Tighter spacing between elements inside cards */
.ast-article-inner .entry-header {
    margin-bottom: 0.25rem;
}

.ast-article-inner h2.entry-title {
    margin-bottom: 0.5rem;
}

/* Limit excerpt to 3 lines */
.ast-article-inner .entry-content {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary) !important;
}

.news-card:hover,
.ast-article-single:hover,
.ast-article-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08) !important;
}

/* Uniform card grid (no asymmetry) */
.news-image,
.ast-blog-featured-section,
.post-thumb-img-content {
    width: 100% !important;
    height: 200px;
    overflow: hidden;
}

.news-image img,
.ast-blog-featured-section img,
.post-thumb-img-content img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-card:hover .news-image img,
.ast-article-single:hover .ast-blog-featured-section img,
.ast-article-post:hover .ast-blog-featured-section img {
    transform: scale(1.05);
}

.news-content,
.ast-post-content {
    padding: 1.5rem;
}

.news-category,
.cat-links {
    font-size: 0.65rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-primary) !important;
    margin-bottom: 0.5rem;
}

.news-title,
.entry-title {
    font-family: 'Newsreader', Georgia, serif !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: var(--text-primary) !important;
}

/* Consistent title sizing across all cards */

.news-meta,
.entry-meta {
    font-size: 0.8rem;
    color: var(--text-muted) !important;
}

/* ========================================
   COUNTRY TABS - Minimal Underline
   ======================================== */
.country-section {
    padding: 4rem 0;
}

.country-tabs {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.country-tab {
    padding: 0.5rem 0;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

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

.country-tab.active {
    color: var(--accent-primary);
}

.country-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
}

/* ========================================
   FOOTER - Quiet (Exact copy)
   ======================================== */
.footer,
.site-footer,
.ast-footer-overlay {
    padding: 4rem 0 2rem !important;
    border-top: 1px solid var(--border-subtle) !important;
    margin-top: 4rem;
    background: var(--bg-primary) !important;
}

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

.footer-brand {
    max-width: 300px;
}

.footer-brand p {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.footer-title,
.widget-title {
    font-size: 0.7rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted) !important;
    margin-bottom: 1rem !important;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-secondary) !important;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-primary) !important;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* ========================================
   RESPONSIVE (Exact copy from Japandi)
   ======================================== */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content {
        padding-right: 0;
    }

    .hero-image {
        max-width: 400px;
    }

    .news-grid,
    .ast-row {
        grid-template-columns: repeat(2, 1fr);
    }



    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .container, .ast-container {
        padding: 0 1.5rem;
    }

    .main-header-menu a,
    .nav-link {
        display: none;
    }

    .hero-title,
    h1.entry-title {
        font-size: 2rem !important;
    }

    .news-grid,
    .ast-row {
        grid-template-columns: 1fr;
    }

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

    .featured-category {
        display: none;
    }

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

/* ========================================
   BUTTONS & CONTROLS (Japandi style)
   ======================================== */
.btn-submit,
.ast-button,
button[type="submit"] {
    padding: 0.7rem 1.5rem !important;
    background: var(--accent-primary) !important;
    border: none;
    border-radius: 4px !important;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.85rem;
    color: white !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover,
.ast-button:hover,
button[type="submit"]:hover {
    opacity: 0.9;
}

/* Theme toggle (Japandi palette switcher) */
.theme-toggle {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border-medium);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--bg-accent);
}

/* ========================================
   END OF JAPANDI FULL COPY
   This CSS directly copies the Japandi HTML design
   Version: 2.0.0 (Full Japandi implementation)
   ======================================== */
