/* ============================================
   Island Theatre — Custom Ghost Theme CSS
   Community theater on Bainbridge Island
   Colors: Deep curtain red, warm cream, charcoal
   Fonts: Playfair Display (headings) + Source Sans 3 (body)
   ============================================ */

:root {
    --color-primary: #8B1A2B;
    --color-primary-dark: #6B1420;
    --color-primary-light: #A52238;
    --color-bg: #FEFCF9;
    --color-bg-alt: #F5F0EB;
    --color-bg-dark: #1A1A1A;
    --color-text: #2C2C2C;
    --color-text-light: #666;
    --color-text-muted: #999;
    --color-accent: #C9A96E;
    --color-border: #E8E2DA;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 1200px;
    --content-width: 720px;
    --gap: 2rem;
    --transition: 0.25s ease;
}

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

html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.25;
    color: var(--color-text);
}

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

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo a {
    display: flex;
    align-items: center;
}

.site-logo img {
    height: 48px;
    width: auto;
}

.site-title-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.site-nav a {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0;
    position: relative;
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition);
}

.site-nav a:hover::after,
.site-nav .nav-current a::after {
    width: 100%;
}

.site-nav a:hover {
    color: var(--color-primary);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
    z-index: 101;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition);
}

/* ============================================
   Hero
   ============================================ */
.hero {
    background: var(--color-bg-dark);
    color: #fff;
    text-align: center;
    padding: 6rem 1.5rem 5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-bg-dark) 60%);
    opacity: 0.85;
}

.hero-inner {
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-tagline {
    font-size: 1.35rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: 5rem 1.5rem;
}

.section:nth-child(even) {
    background: var(--color-bg-alt);
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    margin: 0.75rem auto 0;
}

/* ============================================
   Events Grid
   ============================================ */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--gap);
}

.event-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.event-image img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
}

.event-content {
    padding: 1.5rem;
}

.event-content h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.event-content h3 a {
    color: var(--color-text);
}

.event-content h3 a:hover {
    color: var(--color-primary);
}

.event-content p {
    color: var(--color-text-light);
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

/* ============================================
   Programs Grid
   ============================================ */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--gap);
}

.program-card {
    display: block;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    text-decoration: none;
}

.program-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: var(--color-primary);
}

.program-card h3 {
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.program-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.program-link {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   Post Feed
   ============================================ */
.post-feed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--gap);
}

.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.post-card-image img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
}

.post-card-content {
    padding: 1.5rem;
}

.post-card-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.post-card-content h3 a {
    color: var(--color-text);
}

.post-card-content h3 a:hover {
    color: var(--color-primary);
}

.post-card-content p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

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

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    background: var(--color-bg-dark) !important;
    color: #fff;
    text-align: center;
}

.cta-section h2 {
    color: #fff;
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.8);
    max-width: 550px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    border: 2px solid var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

/* ============================================
   Post / Page Full
   ============================================ */
.post-full, .page-full {
    max-width: var(--max-width);
    margin: 0 auto;
}

.post-hero img, .page-hero img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.post-content-wrap, .page-content-wrap {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.post-header, .page-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.post-header h1, .page-header h1 {
    font-size: 2.75rem;
    margin-bottom: 1rem;
}

.post-meta {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.post-tag a {
    color: var(--color-primary);
    font-weight: 500;
}

/* Ghost content styles */
.post-body, .page-body {
    font-size: 1.125rem;
    line-height: 1.8;
}

.post-body h2, .page-body h2 {
    font-size: 1.75rem;
    margin: 2.5rem 0 1rem;
}

.post-body h3, .page-body h3 {
    font-size: 1.35rem;
    margin: 2rem 0 0.75rem;
}

.post-body p, .page-body p {
    margin-bottom: 1.5rem;
}

.post-body blockquote, .page-body blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--color-text-light);
}

.post-body img, .page-body img {
    border-radius: 8px;
    margin: 2rem 0;
}

.post-body ul, .post-body ol,
.page-body ul, .page-body ol {
    margin: 0 0 1.5rem 1.5rem;
}

.post-body li, .page-body li {
    margin-bottom: 0.5rem;
}

.post-body a, .page-body a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Ghost card overrides */
.kg-image-card img,
.kg-gallery-image img {
    border-radius: 8px;
}

.kg-bookmark-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}

/* ============================================
   Related Posts
   ============================================ */
.related-posts {
    border-top: 1px solid var(--color-border);
}

/* ============================================
   Tag & Author pages
   ============================================ */
.tag-header, .author-header {
    text-align: center;
    padding: 4rem 1.5rem 2rem;
    background: var(--color-bg-alt);
}

.tag-header h1, .author-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.tag-description, .author-bio {
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

.author-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    object-fit: cover;
}

/* ============================================
   Error Page
   ============================================ */
.error-page {
    text-align: center;
    padding: 8rem 1.5rem;
}

.error-code {
    font-size: 6rem;
    color: var(--color-primary);
    font-weight: 700;
}

.error-message {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin: 1rem 0 2rem;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.pagination a {
    font-weight: 600;
    color: var(--color-primary);
}

/* ============================================
   Sponsors
   ============================================ */
.footer-sponsors {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sponsors-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sponsors-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem 2.5rem;
}

.sponsors-grid img {
    height: 50px;
    width: auto;
    opacity: 0.7;
    filter: brightness(1.2);
    transition: opacity var(--transition);
}

.sponsors-grid img:hover {
    opacity: 1;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--color-bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 1.5rem 2rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-info {
    text-align: center;
    margin-bottom: 2rem;
}

.footer-tagline {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.footer-contact a {
    color: var(--color-accent);
}

.footer-contact a:hover {
    color: #fff;
}

.footer-social {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    align-items: center;
}

.footer-social a {
    color: var(--color-accent);
    font-size: 0.9rem;
}

.footer-social a:hover {
    color: #fff;
}

.footer-social span {
    color: rgba(255, 255, 255, 0.3);
}

.footer-nav {
    text-align: center;
    margin-bottom: 2rem;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}

.footer-credit {
    margin-top: 0.5rem;
}

.footer-credit a {
    color: var(--color-accent);
}

.footer-credit a:hover {
    color: #fff;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .hero { padding: 4rem 1.5rem 3rem; }
    .hero h1 { font-size: 2.25rem; }
    .hero-tagline { font-size: 1.1rem; }
    .section { padding: 3rem 1rem; }
    .section-title { font-size: 1.75rem; margin-bottom: 2rem; }
    .post-header h1, .page-header h1 { font-size: 2rem; }
    .post-content-wrap, .page-content-wrap { padding: 2rem 1rem 3rem; }

    .menu-toggle { display: flex; }

    .site-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-bg);
        border-left: 1px solid var(--color-border);
        padding: 5rem 2rem 2rem;
        transition: right var(--transition);
        z-index: 100;
    }

    .site-nav.is-open {
        right: 0;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 1.25rem;
    }

    .site-nav a {
        font-size: 1.1rem;
    }

    .events-grid { grid-template-columns: 1fr; }
    .programs-grid { grid-template-columns: 1fr; }
    .post-feed { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.75rem; }
    .post-header h1, .page-header h1 { font-size: 1.6rem; }
    .footer-nav ul { flex-direction: column; align-items: center; }
}

/* ============================================
   Ghost-specific overrides
   ============================================ */
.gh-portal-triggerbtn-iframe { display: none !important; }
