/* ===================================================
   CoasterWire v2.0 — Clean Magazine Theme
   =================================================== */

/* ── Reset & Base ──────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1a1a2e;
    background: #f8f9fa;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

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

ul, ol { list-style: none; }

/* ── Layout ────────────────────────────────────── */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 760px;
}

/* ── Header ────────────────────────────────────── */
.site-header {
    background: #fff;
    border-bottom: 3px solid #e63946;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 16px;
}

.site-branding {
    flex-shrink: 0;
}

/* Nav */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #2b2d42;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.nav-menu li a:hover {
    color: #e63946;
    background: #fdf2f2;
}

.nav-menu li.current-menu-item > a,
.nav-menu li.current_page_item > a {
    color: #e63946;
    background: #fdf2f2;
    border-bottom: 2px solid #e63946;
    border-radius: 4px 4px 0 0;
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #1a1a2e;
    border-radius: 2px;
    transition: 0.3s;
}

/* ── Hero Section ──────────────────────────────── */
.hero-section {
    position: relative;
    min-height: 460px;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    background-color: #1a1a2e;
}

.hero-placeholder {
    background: linear-gradient(135deg, #1a1a2e 0%, #e63946 100%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 60px 0;
    color: #fff;
}

.hero-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin: 12px 0 16px;
    max-width: 700px;
}

.hero-title a {
    color: #fff;
}

.hero-title a:hover {
    color: #fca311;
}

.hero-excerpt {
    font-size: 17px;
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    margin-bottom: 16px;
}

.hero-meta {
    display: flex;
    gap: 8px;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

/* ── Category Badge ────────────────────────────── */
.cat-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #e63946;
    color: #fff;
    border-radius: 4px;
}

.cat-badge:hover {
    background: #c1121f;
    color: #fff;
}

/* ── Section Title ─────────────────────────────── */
.section-title {
    font-size: 24px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 3px solid #e63946;
    display: inline-block;
}

.page-main-title {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 40px 0 30px;
}

.page-main-title span {
    color: #e63946;
}

/* ── Posts Grid ─────────────────────────────────── */
.posts-section {
    padding: 50px 0 60px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ── Post Card ─────────────────────────────────── */
.post-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.25s, box-shadow 0.25s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.post-card:hover .card-image img {
    transform: scale(1.05);
}

.card-body {
    padding: 20px;
}

.card-body .cat-badge {
    margin-bottom: 10px;
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 10px;
}

.card-title a:hover {
    color: #e63946;
}

.card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 14px;
}

.card-meta {
    display: flex;
    gap: 6px;
    font-size: 13px;
    color: #999;
}

.no-posts {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #888;
}

/* ── Single Post ───────────────────────────────── */
.single-hero {
    height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.single-hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.3) 100%);
}

.single-article {
    padding: 50px 0 60px;
}

.entry-header {
    margin-bottom: 36px;
}

.entry-header .cat-badge {
    margin-bottom: 14px;
}

.entry-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    color: #1a1a2e;
    margin-bottom: 16px;
}

.entry-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #777;
    flex-wrap: wrap;
}

.author-avatar img {
    border-radius: 50%;
}

.author-name {
    font-weight: 600;
    color: #333;
}

/* Entry Content */
.entry-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2em;
    margin-bottom: 0.8em;
    color: #1a1a2e;
}

.entry-content img {
    border-radius: 8px;
    margin: 1.5em 0;
}

.entry-content blockquote {
    border-left: 4px solid #e63946;
    padding: 16px 24px;
    margin: 2em 0;
    background: #fff5f5;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}

.entry-content a {
    color: #e63946;
    text-decoration: underline;
}

/* Tags */
.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.tag-link {
    display: inline-block;
    padding: 5px 14px;
    font-size: 13px;
    background: #f0f0f0;
    color: #555;
    border-radius: 20px;
    transition: background 0.2s;
}

.tag-link:hover {
    background: #e63946;
    color: #fff;
}

/* Post Navigation */
.post-navigation {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 4px;
}

.nav-title {
    font-weight: 600;
    color: #333;
}

/* Pagination */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    transition: 0.2s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: #e63946;
    color: #fff;
    border-color: #e63946;
}

/* ── Archive Header ────────────────────────────── */
.archive-header {
    margin: 40px 0 30px;
}

.archive-desc {
    font-size: 16px;
    color: #666;
    margin-top: 8px;
}

/* ── Button ────────────────────────────────────── */
.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: #e63946;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #c1121f;
    color: #fff;
}

/* ── Widget / Sidebar ──────────────────────────── */
.widget {
    background: #fff;
    padding: 24px;
    border-radius: 10px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e63946;
}

/* ── Footer ────────────────────────────────────── */
.site-footer {
    background: #1a1a2e;
    color: #ccc;
    margin-top: 60px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 50px 0;
}

.footer-logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.footer-logo-icon {
    display: block;
    width: 32px;
    height: 32px;
    background: #e63946;
    border-radius: 6px;
    position: relative;
    flex-shrink: 0;
}

.footer-logo-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 18px;
    background: #fff;
    border-radius: 2px;
}

.footer-logo-icon::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
}

.footer-logo span {
    color: #e63946;
}

.footer-brand p {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #999;
}

.footer-links h4 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 14px;
    color: #999;
}

.footer-links a:hover {
    color: #e63946;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: #666;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 900px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .hero-title {
        font-size: 28px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 1024px) {
    .header-inner {
        min-height: 60px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        padding: 16px 20px;
        border-bottom: 3px solid #e63946;
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        gap: 8px;
    }

    .nav-menu.is-open {
        display: flex;
    }

    .nav-menu li a {
        padding: 10px 14px;
        font-size: 14px;
        border-radius: 6px;
    }
}

@media (max-width: 640px) {
    .logo-main {
        font-size: 22px;
    }

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

    .hero-section {
        min-height: 340px;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-content {
        padding: 40px 0;
    }

    .entry-title {
        font-size: 26px;
    }

    .entry-content {
        font-size: 16px;
    }

    .single-hero {
        height: 260px;
    }
}

/* ── WordPress defaults ────────────────────────── */
.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: #888; margin-top: 6px; }
.screen-reader-text { clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; width: 1px; }
