/* =============================================================
   BLOG — Kiwi-stories-inspired magazine layout
   • Listing page: featured hero card + 3-col grid of stories
   • Article page: full-bleed image, single-column reading width
   • Light theme for readability; teal accents from brand
   ============================================================= */

/* ============================================================
   LISTING PAGE  (/blog/)
   ============================================================ */
body.blog-page-body {
    background-color: #f6fafa !important;
    background-image: url('/assets/images/blogass.png') !important;
    background-size: cover !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    color: #1a3a44 !important;
    min-height: 100vh !important;
}
@supports (-webkit-touch-callout: none) {
    body.blog-page-body { background-attachment: scroll !important; }
}
body.blog-page-body main {
    background: transparent !important;
    min-height: 100vh;
}

/* Hero — quiet text-only intro */
.blog-hero {
    padding: 90px 24px 36px;
    text-align: center;
    background: transparent;
    overflow: visible;
}
.blog-hero::after { display: none !important; }
.blog-hero-inner {
    max-width: 760px;
    margin: 0 auto;
}
.blog-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    color: #1a3a44;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-shadow: none;
}
.blog-hero p {
    font-size: 1.05rem;
    color: #5a7878;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 1;
    text-shadow: none;
}

/* Optional eyebrow badge */
.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(125, 211, 211, 0.18);
    border: 1px solid rgba(23, 163, 152, 0.30);
    color: #0e6e74;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.blog-hero-badge i { font-size: 0.7rem; color: #17a398; }

/* Grid section */
.blog-grid-section {
    padding: 16px 28px 96px;
    max-width: 1280px;
    margin: 0 auto;
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* Cards — clean white, soft shadow, big image on top */
.blog-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #eaf0f0;
    box-shadow: 0 2px 8px rgba(0, 25, 30, 0.04);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 25, 30, 0.10);
    border-color: #d9e6e6;
}

.blog-card-img-wrap {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #e8f2f3;
}
.blog-card-img-wrap::after { display: none; }
.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.blog-card:hover .blog-card-img { transform: scale(1.04); }

.blog-card-body {
    padding: 22px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.72rem;
    color: #7d9897;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    margin-bottom: 2px;
}
.blog-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.blog-card-meta i { color: #17a398; font-size: 0.78rem; }

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
    letter-spacing: -0.3px;
}
.blog-card-title a {
    color: #17a398;
    text-decoration: none;
    transition: color 0.2s ease;
}
.blog-card-title a:hover { color: #0e6e74; }

.blog-card-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #5a7878;
    margin: 0;
    flex: 1;
}

.blog-card-btn {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #17a398;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    align-self: flex-start;
    padding: 0;
    border: none;
    background: none;
    transition: gap 0.18s ease, color 0.18s ease;
}
.blog-card-btn:hover {
    color: #0e6e74;
    gap: 12px;
    text-decoration: none;
}
.blog-card-btn i { transition: transform 0.18s ease; }
.blog-card-btn:hover i { transform: translateX(2px); }

/* ── Featured card (first child of the grid) — spans full row ──
   Image left, content right. Title is bigger, excerpt longer. */
.blog-grid > .blog-card:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 0;
    min-height: 380px;
    border-radius: 18px;
}
.blog-grid > .blog-card:first-child .blog-card-img-wrap {
    height: 100%;
    min-height: 380px;
}
.blog-grid > .blog-card:first-child .blog-card-body {
    padding: 44px 48px;
    justify-content: center;
    gap: 14px;
}
.blog-grid > .blog-card:first-child .blog-card-title {
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    line-height: 1.2;
}
.blog-grid > .blog-card:first-child .blog-card-excerpt {
    font-size: 1.05rem;
    line-height: 1.65;
}

/* Responsive */
@media (max-width: 1024px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 26px; }
    .blog-grid > .blog-card:first-child {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .blog-grid > .blog-card:first-child .blog-card-img-wrap {
        min-height: 0;
        height: 280px;
    }
    .blog-grid > .blog-card:first-child .blog-card-body {
        padding: 28px 28px 30px;
    }
}
@media (max-width: 640px) {
    .blog-hero { padding: 60px 18px 24px; }
    .blog-grid-section { padding: 12px 18px 60px; }
    .blog-grid { grid-template-columns: 1fr; gap: 22px; }
    .blog-card-img-wrap { height: 200px; }
    .blog-card-body { padding: 20px 22px 22px; }
    .blog-grid > .blog-card:first-child .blog-card-img-wrap { height: 220px; }
}

/* ============================================================
   ARTICLE PAGES (/blog/<slug>)
   Kiwi /stories/ inspired: clean white, title BELOW the image,
   single-column reading, generous typography.
   ============================================================ */

/* Override the inline body gradient — articuless.png background */
body[style*="155959"],
body[style*="103939"],
body[style*="113c3c"],
body.blog-article-body {
    background-color: #ffffff !important;
    background-image: url('/assets/images/articuless1.png') !important;
    background-size: cover !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    color: #1a1a1a !important;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}
@supports (-webkit-touch-callout: none) {
    body[style*="155959"],
    body[style*="103939"],
    body[style*="113c3c"],
    body.blog-article-body {
        background-attachment: scroll !important;
    }
}

/* Article hero — image width matches text reading width (760px) */
.article-hero {
    position: relative;
    width: 100%;
    margin: 0 auto;
    max-width: 760px;
    padding: 18px 20px 0;
    background: transparent;
    overflow: visible;
}
/* Ryanair / Wizz / airBaltic article: keep wider cinematic hero */
.article-hero:has(.article-hero-img[src*="/9.png"]) {
    max-width: 1200px;
}
.article-hero-img {
    display: block;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 460px !important;
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    background: transparent;
}

/* Exception: airlines comparison article (Ryanair / Wizz Air / airBaltic) keeps
   the wide cinematic hero. Targets the article that uses 9.png. */
.article-hero:has(.article-hero-img[src*="/9.png"]) .article-hero-img,
.article-hero:has(.article-hero-img[src*="/9.png?"]) .article-hero-img {
    width: 100% !important;
    max-height: none !important;
}
.article-hero-overlay { display: none !important; }

/* Title and meta sit BELOW the image */
.article-hero-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 22px 20px 4px;
    text-align: left;
    position: static;
    inset: auto;
}
.article-hero-content h1 {
    font-size: clamp(1.7rem, 3.8vw, 2.4rem);
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 12px;
    letter-spacing: -0.025em;
    line-height: 1.18;
    text-shadow: none;
}
.article-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    font-size: 0.78rem;
    color: #6b7d83;
    font-weight: 500;
    text-shadow: none;
    padding-bottom: 14px;
    border-bottom: 1px solid #ebeff1;
    margin-bottom: 0;
}
.article-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    padding-right: 16px;
}
.article-hero-meta span:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #c5d0d2;
}
.article-hero-meta i { color: #17a398; font-size: 0.85rem; }

/* Article body — compact reading column on white */
.article-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto 56px;
    padding: 18px 20px 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    color: #1a1a1a;
    font-size: 1.02rem;
    line-height: 1.65;
}
.article-content > p,
.article-content > ul,
.article-content > ol,
.article-content > h2,
.article-content > h3,
.article-content > blockquote {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}
.article-content h2 {
    font-size: clamp(1.25rem, 2.2vw, 1.55rem);
    font-weight: 800;
    color: #1a1a1a;
    margin: 28px 0 10px;
    letter-spacing: -0.018em;
    line-height: 1.25;
}
.article-content h3 {
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    font-weight: 700;
    color: #1a1a1a;
    margin: 22px 0 8px;
    letter-spacing: -0.015em;
}
.article-content p {
    margin: 0 0 14px;
    color: #2a2a2a;
}
.article-content strong {
    color: #1a1a1a;
    font-weight: 700;
}
.article-content ul,
.article-content ol {
    margin: 0 0 16px;
    padding-left: 22px;
}
.article-content li {
    margin: 0 0 6px;
    color: #2a2a2a;
    line-height: 1.6;
}
.article-content li::marker { color: #17a398; font-weight: 700; }
.article-content a:not(.blog-back) {
    color: #17a398;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
    transition: color 0.15s ease;
}
.article-content a:not(.blog-back):hover {
    color: #0e6e74;
}
.article-content blockquote {
    margin: 22px 0;
    padding: 6px 0 6px 22px;
    background: transparent;
    border-left: 4px solid #17a398;
    border-radius: 0;
    color: #1a1a1a;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.5;
    font-weight: 500;
}
.article-content img:not(.article-hero-img) {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
    display: block;
}
.article-content figure {
    margin: 20px 0;
}
.article-content figure img { margin: 0; }
.article-content figcaption {
    margin-top: 8px;
    font-size: 0.82rem;
    color: #6b7d83;
    text-align: center;
    line-height: 1.45;
}
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 0.92rem;
}
.article-content table th,
.article-content table td {
    padding: 10px 14px;
    border-bottom: 1px solid #ebeff1;
    text-align: left;
}
.article-content table th {
    background: transparent;
    color: #1a1a1a;
    font-weight: 700;
    border-bottom: 2px solid #1a1a1a;
}

/* Back-to-blog link — minimalist text link, no pill */
.blog-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 0;
    background: none;
    border: none;
    color: #17a398;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.18s ease, color 0.18s ease;
}
.blog-back:hover {
    color: #0e6e74;
    gap: 12px;
    text-decoration: none;
}
.blog-back i { font-size: 0.72rem; transition: transform 0.18s ease; }
.blog-back:hover i { transform: translateX(-3px); }

/* Mobile tweaks for article pages */
@media (max-width: 720px) {
    .article-hero { padding: 12px 14px 0; }
    .article-hero-img { height: auto !important; max-height: 300px !important; border-radius: 0; }
    .article-hero-content { padding: 16px 14px 4px; }
    .article-hero-content h1 { margin-bottom: 10px; }
    .article-hero-meta { font-size: 0.75rem; gap: 6px 10px; padding-bottom: 12px; }
    .article-content {
        padding: 14px 14px 0;
        margin-bottom: 40px;
        font-size: 0.96rem;
    }
    .article-content h2 { margin: 22px 0 8px; }
    .article-content h3 { margin: 18px 0 6px; }
    .article-content blockquote { font-size: 1rem; padding-left: 18px; margin: 18px 0; }
}
