/* ==========================================================================
   Goler Metropolitan AME Zion Church — Shared Stylesheet
   Palette: navy (#1a202c) + gold (#d4af37). Fonts: Playfair Display + Inter.
   Accessibility: text colors are chosen to meet WCAG AA contrast on their
   backgrounds. Do not put white/light text on white/cream/gold backgrounds,
   and do not put dark-on-dark. Cards are always white with dark text.
   ========================================================================== */

:root {
    --primary-dark: #1a202c;
    --primary-dark-2: #2d3748;
    --primary-gold: #b8912c;      /* darkened from #d4af37 for AA text contrast on white */
    --gold-bright: #d4af37;       /* decorative use only (borders, icons, large text) */
    --accent-gold: #f6d55c;       /* decorative use only (gradients, icons) */
    --cream: #fef7e7;
    --warm-white: #fafafa;
    --text-dark: #1a202c;
    --text-body: #2d3748;
    --text-light: #4a5568;        /* darkened from #718096 for AA contrast */
    --border-light: #e2e8f0;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 15px 35px rgba(0, 0, 0, 0.15);
    --focus-ring: 0 0 0 3px rgba(184, 145, 44, 0.55);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--text-body);
    background: var(--warm-white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

img {
    max-width: 100%;
}

a {
    color: var(--primary-gold);
}

/* Focus visibility (WCAG AA) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--primary-gold);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--primary-dark);
    color: #fff;
    padding: 12px 20px;
    z-index: 2000;
    border-radius: 0 0 8px 0;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    left: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-dark);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.75rem; }
h3 { font-size: 1.5rem; }

p { color: var(--text-body); }

/* Header */
header {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo img,
.site-logo {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    white-space: nowrap;
    display: inline-block;
}

.nav-links a:hover {
    color: var(--primary-dark);
    background: var(--cream);
}

.nav-links a[aria-current="page"] {
    color: var(--primary-dark);
    background: var(--cream);
    box-shadow: inset 0 -3px 0 var(--gold-bright);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    background: none;
    border: none;
    gap: 5px;
}

.mobile-menu-btn:hover {
    background: var(--cream);
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 1px;
    display: block;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-dark-2) 100%);
    color: #ffffff;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="cross" patternUnits="userSpaceOnUse" width="40" height="40"><path d="M 20,0 L 20,40 M 0,20 L 40,20" stroke="rgba(212,175,55,0.12)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23cross)"/></svg>');
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-site-logo,
.hero-main-logo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 2rem;
    display: block;
    border: 3px solid var(--gold-bright);
    box-shadow: var(--shadow-medium);
}

.hero h1 {
    font-size: 3.25rem;
    margin-bottom: 1.25rem;
    color: #ffffff;
}

.hero .eyebrow {
    display: inline-block;
    color: var(--primary-dark);
    background: var(--gold-bright);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: #f2f2f2;
    font-weight: 300;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-hero {
    padding: 4.5rem 0;
}

.page-hero h1 { font-size: 2.75rem; }

.cta-buttons {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.98rem;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    box-shadow: var(--shadow-soft);
}

.btn-primary {
    background: var(--gold-bright);
    color: #1a1500;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
    background: #e2c052;
}

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

.btn-secondary:hover {
    background: var(--cream);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

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

/* Main */
main { background: #ffffff; }

.section { padding: 5.5rem 0; }

.section.alt { background: var(--cream); }

.section h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.15rem;
    color: var(--text-body);
    margin-bottom: 3.5rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
}

/* Cards — always white background with dark text, on every section type */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.25rem;
    margin-top: 3rem;
}

.card {
    background: #ffffff;
    color: var(--text-dark);
    padding: 2.25rem;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    transition: all 0.25s ease;
    border: 1px solid var(--border-light);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-bright) 0%, var(--accent-gold) 100%);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-strong);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--gold-bright) 0%, var(--accent-gold) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-dark);
    font-size: 1.8rem;
    box-shadow: var(--shadow-soft);
}

.card h3 {
    margin-bottom: 0.85rem;
    color: var(--text-dark);
    font-size: 1.45rem;
}

.card p {
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    font-size: 1.02rem;
}

.card address,
.card .mail-block {
    font-style: normal;
    text-align: left;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--cream);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    color: var(--text-dark);
}

/* Dark section (navy bg, white body text, cards stay white/dark) */
.dark-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-dark-2) 100%);
    color: #ffffff;
}

.dark-section h2 { color: #ffffff; }

.dark-section .section-subtitle { color: #f2f2f2; }

.dark-section .card,
.dark-section .card * {
    color: var(--text-dark);
}

.dark-section .card h3 { color: var(--text-dark); }
.dark-section .card p { color: var(--text-body); }

.dark-section small {
    color: #cbd5e0;
}

/* Live indicator */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gold-bright);
    color: var(--primary-dark);
    padding: 10px 22px;
    border-radius: 30px;
    margin-bottom: 1.75rem;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: var(--shadow-medium);
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #ff5b5b;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Watch Live tabs */
.stream-tabs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stream-tab {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.35);
    padding: 12px 26px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
}

.stream-tab svg { width: 20px; height: 20px; fill: currentColor; }

.stream-tab[aria-selected="true"] {
    background: var(--gold-bright);
    color: var(--primary-dark);
    border-color: var(--gold-bright);
}

.stream-panel {
    display: none;
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-strong);
    max-width: 900px;
    margin: 0 auto;
}

.stream-panel.active { display: block; }

.video-frame {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: var(--primary-dark);
    border-radius: 10px;
    overflow: hidden;
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.stream-unavailable {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-dark);
}

.stream-unavailable h4 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

/* Social icons */
.social-icons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-icons a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transition: all 0.2s ease;
}

.social-icons a:hover {
    background: var(--gold-bright);
    border-color: var(--gold-bright);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.social-icons svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Light-background variant (Contact page) */
.social-icons.on-light a {
    background: var(--cream);
    border: 1px solid var(--border-light);
    color: var(--primary-dark);
}

.social-icons.on-light a:hover {
    background: var(--gold-bright);
    border-color: var(--gold-bright);
    color: var(--primary-dark);
}

/* Archive / Bulletin list */
.archive-container {
    max-width: 800px;
    margin: 0 auto;
}

.current-bulletin-box {
    background: var(--primary-dark);
    color: #ffffff;
    border-radius: 16px;
    padding: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-strong);
}

.current-bulletin-box .info h3 { color: #ffffff; margin-bottom: 0.5rem; }
.current-bulletin-box .info p { color: #e2e8f0; margin: 0; }

.qr-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.qr-box img {
    width: 160px;
    height: 160px;
    display: block;
}

.qr-box span {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-dark);
    font-size: 0.8rem;
    font-weight: 600;
}

.archive-item {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.4rem 1.6rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    transition: all 0.2s ease;
}

.archive-item:hover {
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.archive-info h4 {
    color: var(--text-dark);
    margin-bottom: 0.2rem;
    font-family: 'Playfair Display', serif;
}

.archive-date {
    color: var(--primary-gold);
    font-weight: 700;
    font-size: 0.9rem;
}

.archive-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.archive-actions .btn {
    padding: 10px 18px;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
    font-style: italic;
}

/* Events list (Calendar page) */
.events-list {
    max-width: 800px;
    margin: 3rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-item {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.event-date-badge {
    background: var(--primary-dark);
    color: #ffffff;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    text-align: center;
    min-width: 78px;
    flex-shrink: 0;
}

.event-date-badge .month {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--gold-bright);
    font-weight: 700;
}

.event-date-badge .day {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.event-info h4 {
    color: var(--text-dark);
    font-family: 'Playfair Display', serif;
    margin-bottom: 0.25rem;
    font-size: 1.2rem;
}

.event-info .event-time {
    color: var(--primary-gold);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    display: block;
}

.event-info p { margin: 0; color: var(--text-body); }

/* Giving mail card */
.giving-address {
    text-align: left;
    background: var(--cream);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 1.25rem;
    margin-top: 1rem;
    color: var(--text-dark);
}

.giving-address strong { color: var(--text-dark); }

/* Map */
.map-frame {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    margin-top: 3rem;
}

.map-frame iframe {
    width: 100%;
    height: 380px;
    border: 0;
    display: block;
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: #ffffff;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: var(--gold-bright);
    margin-bottom: 1.25rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
}

.footer-section p {
    line-height: 1.8;
    color: #e2e8f0;
}

.footer-section nav a {
    color: #e2e8f0;
    text-decoration: none;
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 500;
}

.footer-section nav a:hover { color: var(--gold-bright); }

.footer-main-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold-bright);
    margin-bottom: 1rem;
    display: block;
}

.footer-social {
    margin-top: 1.25rem;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    text-align: center;
}

.copyright p {
    color: #cbd5e0;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .nav-links { gap: 0; }
    .nav-links a { padding: 0.6rem 0.7rem; font-size: 0.85rem; }
}

@media (max-width: 860px) {
    .mobile-menu-btn { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.99);
        flex-direction: column;
        padding: 1.5rem;
        border-top: 1px solid var(--border-light);
        gap: 0;
        box-shadow: var(--shadow-medium);
    }

    .nav-links.active { display: flex; }

    .nav-links a {
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-light);
        width: 100%;
        text-align: center;
        border-radius: 0;
    }

    .nav-links a:last-child { border-bottom: none; }

    .hero { padding: 4.5rem 0; }
    .hero h1 { font-size: 2.4rem; }
    .hero p { font-size: 1.05rem; }

    .section { padding: 3.5rem 0; }
    h2 { font-size: 2.1rem; }
    .grid { grid-template-columns: 1fr; gap: 1.75rem; }
    .cta-buttons { flex-direction: column; align-items: center; }

    .archive-item { flex-direction: column; text-align: center; }
    .archive-actions { justify-content: center; }

    .current-bulletin-box { flex-direction: column; text-align: center; }

    .event-item { flex-direction: column; text-align: center; }

    .footer-content { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .footer-section nav a { margin-bottom: 0.5rem; }
    .social-icons { justify-content: center; }
    .footer-main-logo { margin-left: auto; margin-right: auto; }
}

@media (max-width: 480px) {
    .logo-text { font-size: 1.1rem; }
    .hero h1 { font-size: 2rem; }
    h2 { font-size: 1.85rem; }
    .card { padding: 1.75rem; }
    .btn { padding: 12px 22px; font-size: 0.9rem; }
}
