/* ===========================================
   Custom Properties
   =========================================== */
:root {
    --color-charcoal:              #2C3539;
    --color-charcoal-soft:         #3A444A;
    --color-red:                   #CC2936;
    --color-red-dark:              #A8222D;
    --color-white:                 #FFFFFF;
    --color-bg:                    #FAFAFA;
    --color-border:                #E5E5E5;
    --color-text:                  #1A1A1A;
    --color-text-muted:            #6B7075;

    --color-status-approved:       #D4E8D4;
    --color-status-approved-text:  #2D5F2D;
    --color-status-pending:        #FCE8C8;
    --color-status-pending-text:   #8A5A1A;
    --color-status-full:           #F4D0D5;
    --color-status-full-text:      #8A2A35;
    --color-status-cancelled:      #DDDDDD;
    --color-status-cancelled-text: #555555;

    --font-headline: 'industry', 'Arial Narrow', sans-serif;
    --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.5;
}

h1, h2, h3, .headline {
    font-family: var(--font-headline);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 700;
}

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

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

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

/* ===========================================
   Hero
   =========================================== */
.hero {
    position: relative;
    background-image:
        linear-gradient(rgba(44, 53, 57, 0.55), rgba(44, 53, 57, 0.55)),
        url('../img/hero-default.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 280px;
}

.hero-content {
    padding: 0 24px;
    max-width: 1200px;
    width: 100%;
}

.hero-headline {
    font-family: var(--font-headline);
    font-weight: 700;
    color: var(--color-white);
    text-transform: uppercase;
    font-size: 48px;
    letter-spacing: 0.15em;
    line-height: 1.1;
}

.hero-subtitle {
    font-family: var(--font-headline);
    color: var(--color-white);
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 16px;
}

/* Detail page hero additions */
.hero-detail {
    height: 300px;
}

.hero-eyebrow {
    font-family: var(--font-body);
    color: var(--color-white);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 12px;
}

.hero-detail .hero-headline {
    font-size: 32px;
    letter-spacing: 0.02em;
}

.hero-detail .hero-subtitle {
    font-size: 18px;
    margin-top: 12px;
}

/* ===========================================
   View Controls
   =========================================== */
.view-controls {
    display: flex;
    justify-content: flex-end;
    padding: 24px 0 20px;
}

.view-toggle {
    display: flex;
    gap: 8px;
}

.view-toggle button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: 1.5px solid var(--color-text);
    color: var(--color-text);
    border-radius: 4px;
    padding: 10px 20px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    min-height: 44px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.view-toggle button svg {
    display: block;
}

.view-toggle button:hover,
.view-toggle button.active {
    background: var(--color-charcoal);
    color: var(--color-white);
    border-color: var(--color-charcoal);
}

/* ===========================================
   Pill Tags
   =========================================== */
.pill {
    display: inline-block;
    background: #EEEEEE;
    color: var(--color-text);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 6px 12px;
}

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

/* ===========================================
   Status Badges
   =========================================== */
.status-badge {
    display: inline-block;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 6px 12px;
    white-space: nowrap;
}

.status-approved {
    background: var(--color-status-approved);
    color: var(--color-status-approved-text);
}

.status-pending {
    background: var(--color-status-pending);
    color: var(--color-status-pending-text);
}

.status-full {
    background: var(--color-status-full);
    color: var(--color-status-full-text);
}

.status-cancelled {
    background: var(--color-status-cancelled);
    color: var(--color-status-cancelled-text);
}

/* ===========================================
   Buttons
   =========================================== */
.btn {
    display: inline-block;
    border-radius: 4px;
    padding: 10px 20px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    min-height: 44px;
    line-height: 1.6;
    border: 1.5px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-outline {
    background: transparent;
    border-color: var(--color-text);
    color: var(--color-text);
}

.btn-outline:hover {
    background: var(--color-text);
    color: var(--color-white);
}

.btn-primary {
    background: var(--color-red);
    border-color: var(--color-red);
    color: var(--color-white);
}

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

/* ===========================================
   List View — Table
   =========================================== */
.events-list {
    margin-bottom: 48px;
    overflow-x: auto;
}

.events-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    font-size: 14px;
}

.events-table thead {
    background: var(--color-charcoal);
    color: var(--color-white);
}

.events-table th {
    padding: 12px 16px;
    text-align: left;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.events-table th:first-child {
    text-align: center;
}

.events-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

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

.events-table tbody tr:hover {
    background: #F5F7F8;
}

.events-table .td-name {
    font-weight: 600;
}

.events-table .td-dates {
    white-space: nowrap;
    color: var(--color-text-muted);
    text-align: center;
}

.events-table .td-status {
    text-align: center;
}

.events-table .td-action {
    text-align: right;
    white-space: nowrap;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    min-height: 32px;
    line-height: 1.4;
}

/* ===========================================
   Card View
   =========================================== */
.events-cards {
    display: none;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 48px;
}

.card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.2s;
}

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

.card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.card .event-name {
    font-size: 26px;
    line-height: 1.15;
}

.card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
}

.card-dates {
    font-size: 14px;
    color: var(--color-text-muted);
}

.card-location {
    font-size: 14px;
    color: var(--color-text-muted);
}

.card-owner {
    font-size: 14px;
    color: var(--color-text-muted);
    flex-grow: 1;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    justify-content: flex-end;
}

/* ===========================================
   Calendar View
   =========================================== */
.events-calendar {
    display: none;
    margin-bottom: 48px;
}

/* Match FullCalendar toolbar buttons to site style */
.fc .fc-button-primary {
    background-color: var(--color-charcoal);
    border-color: var(--color-charcoal);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fc .fc-button-primary:hover,
.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: var(--color-charcoal-soft);
    border-color: var(--color-charcoal-soft);
}

.fc .fc-toolbar-title {
    font-family: var(--font-headline);
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-charcoal);
}

.fc .fc-col-header-cell-cushion,
.fc .fc-daygrid-day-number {
    color: var(--color-text);
    text-decoration: none;
}

.fc .fc-daygrid-day.fc-day-today {
    background-color: rgba(204, 41, 54, 0.06);
}

/* ===========================================
   Empty State
   =========================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
    font-size: 16px;
}

/* ===========================================
   Event Detail Page
   =========================================== */
.event-detail {
    max-width: 880px;
    margin: 0 auto;
    padding: 64px 20px 80px;
}

.detail-status-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.detail-section-header {
    margin-bottom: 32px;
}

.detail-section-title {
    font-family: var(--font-body);
    font-size: 30px;
    font-weight: 400;
    color: var(--color-text);
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.2;
}

.detail-accent-line {
    width: 50px;
    height: 3px;
    background: var(--color-red);
    margin-top: 12px;
}

.info-blocks {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.info-block {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #F5F5F5;
    border-radius: 8px;
    padding: 16px 20px;
    flex: 1;
}

.info-block-icon {
    width: 40px;
    height: 40px;
    background: var(--color-white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.info-block-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.info-block-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.description-body {
    max-width: 700px;
    margin-bottom: 32px;
}

.description-body p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 16px;
}

.description-body p:last-child {
    margin-bottom: 0;
}

.event-hosted-by {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 32px;
}

.signup-unavailable {
    font-size: 15px;
    color: var(--color-text-muted);
    font-style: italic;
}

/* ===========================================
   404 / Error Page
   =========================================== */
.error-page {
    text-align: center;
    padding: 80px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.error-page .error-code {
    font-family: var(--font-headline);
    font-size: 80px;
    color: var(--color-charcoal);
    letter-spacing: 0.05em;
}

.error-page .error-message {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--color-text-muted);
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
    margin: 16px 0 32px;
}

/* ===========================================
   Admin
   =========================================== */
.admin-header {
    background: var(--color-charcoal-soft);
    padding: 20px 0;
    border-bottom: 3px solid var(--color-red);
}

.admin-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-site-title {
    font-family: var(--font-headline);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-view-site {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.15s;
}

.admin-view-site:hover {
    color: var(--color-white);
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-user {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.admin-user strong {
    color: var(--color-white);
    font-weight: 600;
}

.admin-logout-form {
    display: inline;
    margin: 0;
}

.admin-logout-btn {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.admin-logout-btn:hover {
    color: var(--color-white);
    border-color: var(--color-white);
}

.event-audit-meta {
    margin: 32px 0 0;
    font-size: 12px;
    color: var(--color-text-muted);
}

.event-audit-meta strong {
    color: var(--color-text-muted);
    font-weight: 500;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 36px 0 20px;
}

.admin-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-filter-select {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-white);
    border: 1.5px solid var(--color-border);
    border-radius: 4px;
    padding: 8px 32px 8px 12px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7075' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.15s;
}

.admin-filter-select:focus {
    outline: none;
    border-color: var(--color-charcoal);
}

.admin-page-title {
    font-family: var(--font-headline);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-charcoal);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1.5px solid var(--color-border);
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    vertical-align: middle;
    margin-left: 4px;
}

.icon-btn:hover {
    background: var(--color-charcoal);
    border-color: var(--color-charcoal);
    color: var(--color-white);
}

.icon-btn-danger:hover {
    background: var(--color-red);
    border-color: var(--color-red);
    color: var(--color-white);
}

/* ===========================================
   Admin Form
   =========================================== */
.admin-form {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 32px;
    margin-bottom: 48px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group-grow {
    flex: 1;
    min-width: 160px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.form-required {
    color: var(--color-red);
    margin-left: 2px;
}

.form-hint {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-text-muted);
    text-transform: none;
    letter-spacing: 0;
    margin-left: 4px;
}

.form-hint-block {
    display: block;
    margin-left: 0;
    margin-top: -2px;
    margin-bottom: 4px;
}

.form-input,
.form-select,
.form-textarea {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-white);
    border: 1.5px solid var(--color-border);
    border-radius: 4px;
    padding: 10px 12px;
    transition: border-color 0.15s;
    width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-charcoal);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7075' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-textarea {
    resize: vertical;
    line-height: 1.6;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-top: 8px;
}

.form-notice {
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.5;
}

.form-notice ul {
    margin: 8px 0 0 18px;
}

.form-notice-success {
    background: var(--color-status-approved);
    color: var(--color-status-approved-text);
    border: 1px solid #b2d4b2;
}

.form-notice-error {
    background: var(--color-status-full);
    color: var(--color-status-full-text);
    border: 1px solid #e0b0b8;
}

/* ===========================================
   Site Footer
   =========================================== */
.site-footer {
    background: var(--color-charcoal);
    padding: 32px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
}

.footer-tagline {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
}

.footer-updated {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}

.footer-admin {
    font-size: 12px;
    margin-top: 16px;
}

.footer-admin a {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-admin a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* ===========================================
   Responsive — Tablet 640px+
   =========================================== */
@media (min-width: 640px) {
    .hero {
        height: 380px;
    }

    .hero-headline {
        font-size: 72px;
    }

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

    .hero-detail {
        height: 400px;
    }

    .hero-detail .hero-headline {
        font-size: 42px;
    }

    .hero-detail .hero-subtitle {
        font-size: 20px;
    }

    .info-blocks {
        flex-direction: row;
    }

    .detail-section-title {
        font-size: 36px;
    }
}

/* ===========================================
   Responsive — Desktop 1024px+
   =========================================== */
@media (min-width: 1024px) {
    .hero-headline {
        font-size: 84px;
    }

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

    .hero-detail .hero-headline {
        font-size: 52px;
    }

    .hero-detail .hero-subtitle {
        font-size: 22px;
    }
}
