﻿/* CSS Variables for consistent theming */
:root {
    color-scheme: light;
    font-family: 'Sora', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f5f5f7;
    color: #111827;
    line-height: 1.65;
}

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

body {
    min-height: 100vh;
    background-color: #f5f5f7;
}

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

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

button,
input,
textarea {
    font: inherit;
}

.hero {
    height: 92vh;
    min-height: 680px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: visible;
    background-image: linear-gradient(180deg, rgba(30, 24, 14, 0.7), rgba(30, 24, 14, 0.92)), url('https://images.unsplash.com/photo-1494526585095-c41746248156?auto=format&fit=crop&w=1800&q=80');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(199, 143, 37, 0.16), transparent 32%), radial-gradient(circle at bottom left, rgba(242, 237, 229, 0.16), transparent 28%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"><circle cx="80" cy="80" r="40" fill="none" stroke="rgba(255,255,255,0.06)" stroke-width="2"/><circle cx="80" cy="80" r="72" fill="none" stroke="rgba(255,255,255,0.04)" stroke-width="1"/></svg>') center/160px 160px repeat;
    opacity: 0.35;
}

.hero-content {
    z-index: 1;
    max-width: 820px;
    padding: 4rem 1.5rem 2rem;
}

.site-header {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.brand-logo {
    width: 180px;
    max-width: 30vw;
    height: auto;
    filter: drop-shadow(0 16px 25px rgba(0, 0, 0, 0.24));
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    padding: 10px;
}

h1, h2, h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
}

h1 {
    font-size: clamp(3rem, 4.5vw, 4.8rem);
    margin-bottom: 1rem;
    letter-spacing: -0.04em;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    color: #2c2a28;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, #c78f25, #e2b84d);
}

h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

.hero-label {
    display: inline-flex;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 0.85rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    margin-top: 0.75rem;
}

.hero p {
    max-width: 780px;
    margin: 0 auto 2rem;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.ghost-button,
.cta-button,
button.primary,
button.secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 1rem 1.8rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.28s ease;
}

.ghost-button {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: transparent;
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cta-button,
button.primary {
    background: #c78f25;
    color: white;
    box-shadow: 0 18px 28px rgba(199, 143, 37, 0.25);
}

.cta-button:hover,
button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 32px rgba(199, 143, 37, 0.32);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.75rem;
}

.about,
.services,
.video,
.projects,
.portal,
.contact {
    padding: 3rem 0;
}

.service-item,
.project-item,
.event-card,
.portal-card,
.create-event-card,
.form-group {
    margin-bottom: 1rem;
}

.service-item {
    padding: 1.5rem;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.project-grid {
    display: grid;
    gap: 1.5rem;
}

.project-item {
    background: #ffffff;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.project-placeholder {
    min-height: 180px;
    display: grid;
    place-items: center;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 18px;
    border: 1px dashed #d1d5db;
}

.contact-form,
.auth-form,
.issue-card,
.event-card,
.create-event-card {
    display: grid;
    gap: 1rem;
}

input,
textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 0.95rem 1rem;
    background: #fafafa;
    color: #111827;
}

textarea {
    resize: vertical;
}

label {
    font-size: 0.95rem;
    color: #374151;
    font-weight: 600;
}

.auth-actions,
.issue-actions,
.portal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

button.secondary {
    background: #ffffff;
    color: #c78f25;
    border: 2px solid #c78f25;
}

button.secondary:hover {
    background: #fef3e2;
    transform: translateY(-2px);
}

button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.hint {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.alert {
    min-height: 1.4rem;
    color: #111827;
    font-size: 0.95rem;
}

.alert.error {
    color: #b91c1c;
}

.alert.success {
    color: #047857;
}

.hidden {
    display: none !important;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.cards-grid,
.portal-grid {
    display: grid;
    gap: 1.75rem;
}

.events-list {
    display: grid;
    gap: 1rem;
}

.event-card {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 1.25rem;
    background: #f9fafb;
}

.event-card h4 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.event-meta {
    margin: 0.25rem 0;
    color: #4b5563;
    font-size: 0.95rem;
}

.event-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Dashboard page layout */
.dashboard-header {
    background: #1c2434;
    color: white;
    padding: 1rem 1.75rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 700;
}

.dashboard-logo {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
}

.dashboard-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.dashboard-user span {
    font-weight: 600;
}

.dashboard-email {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    font-weight: 400 !important;
}

.dashboard-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.75rem;
}

.dashboard-grid {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: 1fr 1fr;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 1.75rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.dashboard-card h3 {
    margin-bottom: 1.25rem;
    font-size: 1.4rem;
    color: #2c2a28;
}

.dashboard-section {
    margin-bottom: 1.5rem;
}

.dashboard-section h3 {
    margin-bottom: 1rem;
}

.my-rsvp-list {
    display: grid;
    gap: 0.75rem;
}

.empty-state {
    color: #6b7280;
    font-size: 0.95rem;
}

.rsvp-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 1rem 1.25rem;
    background: #f9fafb;
    flex-wrap: wrap;
}

.rsvp-card-info h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.rsvp-card-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.rsvp-status-badge {
    display: inline-flex;
    padding: 0.3rem 0.8rem;
    background: #d1fae5;
    color: #065f46;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.un-rsvp-btn {
    min-width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background: #fee2e2;
    color: #991b1b;
    border: none;
    cursor: pointer;
}

.un-rsvp-btn:hover:not(:disabled) {
    background: #fecaca;
}

.contact-intro {
    text-align: center;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.contact-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    color: #4b5563;
    font-size: 0.95rem;
}

.contact-form {
    max-width: 580px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.contact-form button[type="submit"] {
    width: 100%;
}

/* ── Blog public ─────────────────────────────────────────── */
.blog { padding: 3rem 0; }

.blog-intro {
    text-align: center;
    color: #4b5563;
    margin-bottom: 2rem;
}

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

.blog-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 1.75rem;
    box-shadow: 0 4px 16px rgba(15,23,42,0.06);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-card-body { flex: 1; }

.blog-card-meta {
    font-size: 0.82rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #2c2a28;
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: #4b5563;
    margin: 0;
}

.blog-read-btn {
    min-width: auto;
    width: 100%;
    padding: 0.75rem 1rem;
}

/* Blog reader */
.blog-reader-header {
    background: #1c2434;
    color: white;
    padding: 1rem 1.75rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.blog-reader-header-inner {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.blog-back-btn {
    min-width: auto;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.blog-reader-body {
    max-width: 860px;
    margin: 0 auto;
    padding: 3rem 1.75rem 5rem;
}

.blog-article-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    margin: 0.75rem 0 2rem;
    color: #2c2a28;
    line-height: 1.25;
}

.blog-article-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #374151;
}

/* ── Admin console ─────────────────────────────────────────── */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}

.admin-tab {
    padding: 0.6rem 1.4rem;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 0.95rem;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    min-width: auto;
    border-radius: 0;
    box-shadow: none;
    transition: color 0.2s, border-color 0.2s;
}

.admin-tab:hover { color: #c78f25; }
.admin-tab.active { color: #c78f25; border-bottom-color: #c78f25; }

.admin-tab-content { }

.admin-post-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.admin-post-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}

.admin-post-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.post-status-badge {
    display: inline-flex;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.post-status-badge.published { background: #d1fae5; color: #065f46; }
.post-status-badge.draft { background: #f3f4f6; color: #6b7280; }

.admin-btn {
    min-width: auto;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

button.danger, .admin-btn.danger {
    background: #fee2e2;
    color: #991b1b;
    border: none;
}

button.danger:hover, .admin-btn.danger:hover {
    background: #fecaca;
}

.editor-form {
    display: grid;
    gap: 1rem;
}

.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.publish-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
}

.publish-toggle input { width: auto; }

.editor-actions {
    display: flex;
    gap: 0.75rem;
}

.site-footer,
.footer {
    text-align: center;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem 1.75rem;
}

@media (min-width: 900px) {
    .project-grid,
    .portal-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .portal-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}

@media (max-width: 720px) {
    .site-header,
    .site-footer,
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

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

    .dashboard-main {
        padding: 1.25rem 1rem;
    }
}
