/*
Theme Name: Days Theme
Theme URI: https://days.uk.net
Author: Days Team
Description: Clean, modern, high-speed, SEO-focused event and countdown theme.
Version: 1.0.0
Text Domain: days-theme
*/

:root {
    --primary: #e5484d;
    --primary-hover: #dc2626;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

/* Header */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.brand-badge {
    background: #fee2e2;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.15s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

/* Search Bar */
.search-wrapper {
    flex: 1;
    max-width: 380px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 38px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.15);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

/* Hero Section */
.hero-section {
    padding: 48px 0 32px 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    margin-bottom: 12px;
}

.hero-title span {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 28px auto;
}

/* Categories Pills */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.cat-pill {
    padding: 8px 18px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

.cat-pill:hover, .cat-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Event Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.event-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: #cbd5e1;
}

.card-top {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-title-group h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-hindi-name {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.card-days-badge {
    background: #fee2e2;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-align: center;
    white-space: nowrap;
}

.card-days-badge small {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
}

.card-body {
    padding: 0 20px 20px 20px;
    flex: 1;
}

.card-date-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.card-summary {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.card-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
}

/* Event Detail Page */
.detail-hero {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 48px 0;
    margin-bottom: 40px;
    text-align: center;
}

.detail-title {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.detail-date-badge {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 999px;
    margin-bottom: 24px;
}

.table-wrapper {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 32px 0;
}

.year-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.year-table th {
    background: #f8fafc;
    padding: 14px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
}

.year-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
}

.year-table tr:last-child td {
    border-bottom: none;
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.status-confirmed { background: #dcfce7; color: #166534; }
.status-tentative { background: #fef3c7; color: #92400e; }
.status-estimated { background: #e0f2fe; color: #075985; }
.status-not_announced { background: #f1f5f9; color: #475569; }

/* FAQ Accordion */
.faq-section {
    margin: 40px 0;
}

.faq-item {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    padding: 20px;
}

.faq-q {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.faq-a {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.6;
}

/* Footer */
.site-footer {
    background: #ffffff;
    border-top: 1px solid var(--border);
    padding: 48px 0 24px 0;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.15s;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

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

/* ---------- Accessibility helpers ---------- */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1000;
    width: auto;
    height: auto;
    margin: 0;
    padding: 10px 16px;
    clip: auto;
    clip-path: none;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    color: var(--text-main);
    font-weight: 700;
}

/* ---------- Mobile navigation toggle ---------- */

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-toggle-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 20px;
}

.nav-toggle-bar {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-main);
    border-radius: 2px;
}

.nav-toggle[aria-expanded="true"] {
    border-color: var(--primary);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
    background: var(--primary);
}

/* ---------- Detail page layout ---------- */

.detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* ---------- Pagination ---------- */

.days-pagination {
    margin: 40px 0 8px;
}

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

.days-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 600;
    text-decoration: none;
}

.days-pagination .page-numbers:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.days-pagination .page-numbers.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.days-pagination .page-numbers.dots {
    border-color: transparent;
    background: transparent;
}

/* ---------- Empty state ---------- */

.days-empty {
    max-width: 600px;
    margin: 40px auto;
    padding: 40px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
}

/* ---------- Shared bits ---------- */

.eyebrow {
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

/* ---------- Event imagery ---------- */

.event-card-media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--border-light);
    border-bottom: 1px solid var(--border);
}

.event-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-featured {
    margin: 0 0 32px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.event-featured img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---------- Blog listing ---------- */

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.post-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.post-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.post-card-media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--border-light);
}

.post-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-card-body { padding: 20px; }

.post-card-cat {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
}

.post-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 10px;
}

.post-card-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.post-card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ---------- Single post ---------- */

.post-single {
    max-width: 760px;
    padding: 48px 20px;
}

.post-breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.post-breadcrumb a { color: var(--primary); }
.post-breadcrumb span { margin: 0 6px; }

.post-title {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}

.post-meta {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.post-meta span { margin: 0 4px; }

.post-featured {
    margin: 0 0 32px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.post-featured img {
    width: 100%;
    height: auto;
    display: block;
}

.post-featured figcaption {
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--border-light);
}

.post-content {
    font-size: 1.08rem;
    line-height: 1.8;
    color: #334155;
}

.post-content > * + * { margin-top: 1.1em; }

.post-content h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-top: 1.8em;
    color: var(--text-main);
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5em;
    color: var(--text-main);
}

.post-content a { color: var(--primary); text-decoration: underline; }

.post-content ul,
.post-content ol { padding-left: 1.4em; }

.post-content li + li { margin-top: 0.4em; }

.post-content img,
.post-content iframe {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.post-content blockquote {
    padding-left: 18px;
    border-left: 3px solid var(--primary);
    color: var(--text-muted);
    font-style: italic;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
}

.post-content th,
.post-content td {
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: left;
}

.post-tags {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 40px;
}

.post-nav-link {
    display: block;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: inherit;
    text-decoration: none;
}

.post-nav-link:hover { border-color: var(--primary); }

.post-nav-next { text-align: right; }

.post-nav-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 6px;
}

.post-nav-title {
    display: block;
    font-weight: 700;
    line-height: 1.35;
}

@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }

    /* Stack the detail page. It used to keep a 2fr/1fr grid at every width, which
       squeezed the highest traffic template into two unreadable columns on a phone. */
    .detail-layout { grid-template-columns: 1fr; gap: 24px; }
    .detail-layout aside > div { position: static; }

    .nav-toggle { display: inline-flex; }

    /* The nav is a panel under the header, opened by the toggle. It was previously
       display:none here with no way to reopen it, so phones had no navigation at all. */
    .header-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        margin-top: 12px;
        padding-top: 8px;
        border-top: 1px solid var(--border);
    }

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

    .header-nav .nav-link {
        display: block;
        padding: 14px 4px;
        border-bottom: 1px solid var(--border-light);
    }

    .header-nav .nav-link:last-child { border-bottom: 0; }

    .header-inner { flex-wrap: wrap; }
    .search-wrapper { order: 3; width: 100%; }

    .post-title { font-size: 1.75rem; }
    .post-grid { grid-template-columns: 1fr; }
    .post-nav { grid-template-columns: 1fr; }
    .post-nav-next { text-align: left; }
}
