/*
Theme Name: philippine-consumer-daily-theme
Author: Donnie
Description: Custom theme for philippine-consumer-daily-theme.
Version: 0.3.1
*/

:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --ink: #172033;
    --muted: #667085;
    --accent: #2457c5;
    --accent-dark: #102a67;
    --accent-2: #d92735;
    --border: #d9e1f0;
    --shadow: 0 22px 60px rgba(23, 32, 51, 0.1);
    --font-heading: Georgia, "Times New Roman", serif;
    --font-body: Verdana, Geneva, sans-serif;
}

:root {
    --font-heading: "Playfair Display", Georgia, serif;
    --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
}

.topbar {
    background: color-mix(in srgb, var(--accent-dark) 94%, #000);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.topbar-inner {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding-block: 0.5rem;
}

.site-header {
    padding: 0;
}

.masthead {
    flex-direction: column;
    gap: 1rem;
    padding: clamp(1.6rem, 4vw, 2.6rem) 0 1.25rem;
    text-align: center;
}

.site-title {
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    font-weight: 800;
    letter-spacing: -0.055em;
}

.site-description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-inline: auto;
    max-width: 760px;
}

.site-nav {
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border);
    padding: 0.8rem 0;
    width: 100%;
}

.menu {
    justify-content: center;
}

.menu a {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-grid {
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
}

.hero-copy,
.post-card,
.category-tile,
.category-badge {
    border-radius: 0;
}

.hero-copy {
    min-height: 420px;
}

.post-card-featured {
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    min-height: 420px;
}

.post-card-featured h2 {
    font-size: clamp(2.25rem, 4.2vw, 4rem);
    line-height: 1.02;
}

.category-strip {
    background: color-mix(in srgb, var(--accent) 7%, transparent);
    border-block: 1px solid var(--border);
    padding-block: clamp(2rem, 5vw, 3.25rem);
}

.category-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.category-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    min-height: 7rem;
    padding: 1rem;
    text-decoration: none;
}

.category-tile span {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
}

.category-tile small {
    color: var(--muted);
    font-weight: 700;
}

.category-badge {
    color: var(--accent);
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
    text-decoration: none;
    text-transform: uppercase;
}

.post-grid {
    gap: 2rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-grid .post-card h2 {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
}

@media (max-width: 900px) {
    .hero-grid,
    .post-card-featured,
    .category-grid,
    .post-grid {
        grid-template-columns: 1fr;
    }

    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 48%, #ffffff 100%);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.65;
}

img {
    height: auto;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration-color: var(--accent-2);
    text-decoration-thickness: 0.12em;
}

.container {
    margin: 0 auto;
    max-width: 1180px;
    padding: 0 1.25rem;
}

.section {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.skip-link {
    background: var(--ink);
    color: #fff;
    left: 1rem;
    padding: 0.75rem 1rem;
    position: absolute;
    top: -10rem;
    z-index: 10;
}

.skip-link:focus {
    top: 1rem;
}

.site-header {
    background: #fff;
    border-bottom: 4px solid var(--accent);
    box-shadow: 0 10px 28px rgba(23, 32, 51, 0.06);
    padding: 1.15rem 0;
    position: sticky;
    top: 0;
    z-index: 5;
}

.masthead {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    justify-content: center;
    text-align: center;
}

.footer-grid {
    align-items: center;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
}

.brand {
    max-width: 860px;
}

.site-title {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 3.05rem);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1;
    text-decoration: none;
}

.site-description {
    color: var(--muted);
    font-size: clamp(0.95rem, 1.5vw, 1.08rem);
    margin: 0.4rem auto 0;
    max-width: 760px;
}

.menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.1rem;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu a {
    color: var(--accent-dark);
    font-weight: 900;
    text-decoration: none;
}

.hero-grid {
    align-items: stretch;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(290px, 0.72fr) minmax(0, 1.28fr);
}

.hero-copy {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 0.7rem solid var(--accent-2);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 390px;
    padding: clamp(1.7rem, 4vw, 2.6rem);
}

.hero-copy p {
    color: var(--muted);
    font-size: clamp(1rem, 1.7vw, 1.15rem);
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    line-height: 1.06;
    margin: 0 0 0.8rem;
}

h1 {
    font-size: clamp(2rem, 4.1vw, 3.6rem);
    letter-spacing: -0.045em;
}

h2 {
    font-size: clamp(1.3rem, 3vw, 2rem);
}

.eyebrow {
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    margin: 0 0 0.7rem;
    text-transform: uppercase;
}

.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 14px 40px rgba(23, 32, 51, 0.07);
    overflow: hidden;
}

.post-card-featured {
    border-top: 0.7rem solid var(--accent);
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
    min-height: 390px;
}

.post-card-featured .post-thumb {
    aspect-ratio: auto;
    min-height: 100%;
}

.post-card-featured .post-card-body {
    align-self: center;
    padding: clamp(1.7rem, 4vw, 3rem);
}

.post-card-featured h2 {
    font-size: clamp(1.75rem, 3.1vw, 2.75rem);
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.post-thumb {
    align-items: center;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--accent), #75a3ff);
    color: #fff;
    display: flex;
    font-weight: 900;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    text-decoration: none;
}

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

.post-card-body {
    padding: 1.2rem;
}

.entry-meta {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.84rem;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.post-card p,
.archive-header p,
.footer-meta {
    color: var(--muted);
}

.section-heading {
    align-items: end;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.9rem;
}

.section-heading a {
    color: var(--accent);
    font-weight: 900;
}

.post-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.post-grid .post-card {
    border-top: 0.35rem solid var(--accent);
}

.post-grid .post-card h2 {
    font-size: clamp(1.05rem, 1.45vw, 1.35rem);
}

.content-narrow {
    max-width: 780px;
}

.single-article {
    background: #fff;
    border: 1px solid var(--border);
    border-top: 0.7rem solid var(--accent);
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

.featured-image {
    margin: 1.5rem 0;
}

.featured-image img {
    border-radius: 0.65rem;
}

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

.archive-header {
    margin-bottom: 2rem;
    max-width: 780px;
}

.navigation.pagination {
    margin-top: 2rem;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
}

@media (max-width: 980px) {
    .hero-grid,
    .post-card-featured,
    .post-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .masthead,
    .footer-grid,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        text-align: left;
    }

    .menu {
        justify-content: flex-start;
    }

    .site-header {
        position: static;
    }
}

/* Shared magazine baseline inspired by the reference layout. */
.topbar { background: color-mix(in srgb, var(--accent-dark) 94%, #000); color: #fff; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.topbar-inner { align-items: center; display: flex; gap: 1rem; justify-content: space-between; padding-block: 0.5rem; }
.site-header { padding: 0; }
.masthead { align-items: center; flex-direction: column; gap: 1rem; justify-content: center; padding: clamp(1.6rem, 4vw, 2.6rem) 0 1.25rem; text-align: center; }
.site-title { font-family: var(--font-heading); font-size: clamp(2.4rem, 6vw, 4.8rem); font-weight: 800; letter-spacing: -0.055em; }
.site-description { font-size: clamp(1rem, 2vw, 1.2rem); margin-inline: auto; max-width: 760px; }
.site-nav { border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); padding: 0.8rem 0; width: 100%; }
.menu { justify-content: center; }
.menu a { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-grid { grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr); }
.hero-copy, .post-card, .category-tile, .category-badge { border-radius: 0; }
.hero-copy { min-height: 420px; }
.post-card-featured { grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr); min-height: 420px; }
.post-card-featured h2 { font-size: clamp(2.25rem, 4.2vw, 4rem); line-height: 1.02; }
.category-strip { background: color-mix(in srgb, var(--accent) 7%, transparent); border-block: 1px solid var(--border); padding-block: clamp(2rem, 5vw, 3.25rem); }
.category-grid { display: grid; gap: 1rem; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.category-tile { background: var(--surface); border: 1px solid var(--border); min-height: 7rem; padding: 1rem; text-decoration: none; }
.category-tile span { display: block; font-family: var(--font-heading); font-size: 1.25rem; font-weight: 800; }
.category-tile small { color: var(--muted); font-weight: 700; }
.category-badge { color: var(--accent); display: inline-flex; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.1em; margin-bottom: 0.8rem; text-decoration: none; text-transform: uppercase; }
.post-grid { gap: 2rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-grid .post-card h2 { font-size: clamp(1.35rem, 2vw, 1.8rem); }
@media (max-width: 900px) {
    .hero-grid, .post-card-featured, .category-grid, .post-grid { grid-template-columns: 1fr; }
    .topbar-inner { align-items: flex-start; flex-direction: column; }
}

/* Overflow-safe baseline refinements. */
body { overflow-x: hidden; }
.container { max-width: min(1180px, calc(100vw - 2rem)); }
.brand,
.site-nav,
.hero-copy,
.post-card,
.post-card-body,
.post-thumb,
.category-tile {
    min-width: 0;
}
.site-title,
.hero-copy h1,
.post-card-featured h2,
.post-grid .post-card h2 {
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}
.site-title {
    font-size: clamp(1.9rem, 4.4vw, 3.5rem);
    line-height: 0.98;
}
.hero-grid,
.post-card-featured {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.hero-copy {
    min-height: 360px;
    overflow: hidden;
    padding: clamp(1.5rem, 4vw, 2.6rem);
}
.hero-copy h1 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.02;
}
.post-card-featured {
    min-height: 360px;
    overflow: hidden;
}
.post-card-featured h2 {
    font-size: clamp(1.75rem, 3vw, 2.8rem);
    line-height: 1.04;
}
.post-card-featured .post-card-body {
    overflow: hidden;
    padding: clamp(1.5rem, 3.5vw, 2.4rem);
}
.post-card-featured .post-thumb {
    min-width: 0;
}
.category-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
}
.post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1100px) {
    .site-title { font-size: clamp(2rem, 5vw, 3.2rem); }
    .hero-grid,
    .post-card-featured {
        grid-template-columns: 1fr;
    }
    .post-card-featured .post-thumb {
        aspect-ratio: 16 / 9;
    }
}
@media (max-width: 760px) {
    .site-title { font-size: clamp(1.8rem, 9vw, 2.7rem); }
    .hero-copy h1,
    .post-card-featured h2 {
        font-size: clamp(1.75rem, 8vw, 2.45rem);
    }
    .post-grid {
        grid-template-columns: 1fr;
    }
}

/* Editorial layout refinement */
.masthead {
    align-items: center;
    flex-direction: row;
    gap: 1.25rem;
    justify-content: space-between;
    padding: 1rem 0 1.1rem;
    text-align: left;
}

.brand {
    max-width: 42rem;
    text-align: left;
}

.site-title {
    font-size: clamp(1.7rem, 3.8vw, 2.9rem);
}

.site-description {
    font-size: 0.95rem;
    margin: 0.2rem 0 0;
    max-width: 34rem;
}

.site-nav {
    border: 0;
    padding: 0;
    width: auto;
}

.menu {
    justify-content: flex-end;
}

.hero {
    padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.hero-grid {
    gap: 1.25rem;
    grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.32fr);
}

.hero-copy,
.post-card,
.category-tile,
.category-badge {
    border-radius: 0;
}

.hero-copy,
.post-card {
    box-shadow: none;
}

.post-card-featured {
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    min-height: 380px;
}

.post-card-featured h2 {
    font-size: clamp(2rem, 3.6vw, 3.5rem);
}

.category-strip {
    background: color-mix(in srgb, var(--accent) 7%, transparent);
    padding-block: clamp(1.6rem, 4vw, 2.6rem);
}

.category-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.category-tile {
    box-shadow: none;
    min-height: 6rem;
    padding: 0.95rem 1rem;
}

.post-grid {
    gap: 1.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-grid .post-card h2 {
    font-size: clamp(1.15rem, 1.7vw, 1.45rem);
}

.post-grid .post-card p {
    font-size: 0.95rem;
}

@media (max-width: 1080px) {
    .masthead {
        flex-direction: column;
        padding-block: 1rem;
    }

    .brand,
    .site-nav {
        max-width: 100%;
        width: 100%;
    }

    .site-nav {
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        padding: 0.75rem 0;
    }

    .menu {
        justify-content: center;
    }
}
