/* ============================================
   Event Calendar — Main Stylesheet (Dark Mode)
   ============================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #d1d5db;
    background: #111827;
}

a { color: #60a5fa; text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Container */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---- Header ---- */
.site-header {
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-header h1 { font-size: 1.25rem; }
.site-header h1 a { color: #f3f4f6; text-decoration: none; }
.site-header nav { display: flex; gap: 15px; align-items: center; }
.site-header nav a { font-size: 0.95rem; color: #9ca3af; }
.site-header nav a:hover { color: #f3f4f6; text-decoration: none; }

/* ---- Slideshow Banner ---- */
.slideshow-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #0f172a;
}
.slideshow-wrapper .slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    object-fit: cover;
}
.slideshow-wrapper .slide.active {
    opacity: 1;
}
.slideshow-wrapper .branding-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(to right, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.55) 100%);
}
.slideshow-wrapper .branding-text {
    color: white;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.slideshow-wrapper .branding-text h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.slideshow-wrapper .branding-text p {
    font-size: 1rem;
    opacity: 0.9;
}
.slideshow-nav {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}
.slideshow-nav .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.3s;
}
.slideshow-nav .dot.active {
    background: white;
}

/* No-slides fallback branding */
.branding-banner {
    background: #0f172a;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f3f4f6;
    text-align: center;
}
.branding-banner h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.branding-banner p {
    font-size: 1rem;
    opacity: 0.7;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover { background: #2563eb; }
.btn-success { background: #10b981; color: white; }
.btn-success:hover { background: #059669; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-secondary { background: #4b5563; color: #d1d5db; }
.btn-secondary:hover { background: #374151; }
.btn-outline { background: transparent; border: 1px solid #374151; color: #d1d5db; }
.btn-outline:hover { background: #1f2937; }
.btn-large { padding: 12px 24px; font-size: 1rem; }
.btn-small { padding: 4px 10px; font-size: 0.8rem; }

/* ---- Alerts ---- */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}
.alert-success { background: #064e3b; color: #6ee7b7; border: 1px solid #065f46; }
.alert-error { background: #7f1d1d; color: #fca5a5; border: 1px solid #991b1b; }
.alert-info { background: #1e3a5f; color: #93c5fd; border: 1px solid #1e40af; }

/* ---- Calendar Page ---- */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 20px;
    flex-wrap: wrap;
    gap: 15px;
}
.calendar-header h2 { font-size: 1.5rem; color: #f3f4f6; }

.view-toggle {
    display: flex;
    border: 1px solid #374151;
    border-radius: 6px;
    overflow: hidden;
}
.view-toggle button {
    padding: 8px 16px;
    border: none;
    background: #1f2937;
    cursor: pointer;
    font-size: 0.9rem;
    color: #9ca3af;
}
.view-toggle button.active {
    background: #3b82f6;
    color: white;
}
.view-toggle button:hover:not(.active) { background: #374151; }

/* ---- Filters ---- */
.filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}
.filters-bar .search-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #374151;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #1f2937;
    color: #d1d5db;
}
.filters-bar .search-input::placeholder { color: #6b7280; }
.filters-bar select {
    padding: 8px 12px;
    border: 1px solid #374151;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #1f2937;
    color: #d1d5db;
}

/* ---- Category Badges ---- */
.category-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ---- Event List View ---- */
.event-list { list-style: none; }

.event-card {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
    transition: box-shadow 0.15s;
}
.event-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.3); }

.event-card-image {
    width: 150px;
    min-width: 150px;
    height: 100px;
    border-radius: 6px;
    object-fit: cover;
    background: #374151;
}

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

.event-card-date {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 4px;
}
.event-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #f3f4f6;
}
.event-card-location {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 8px;
}
.event-card-description {
    font-size: 0.9rem;
    color: #9ca3af;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 30px 0;
    list-style: none;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #374151;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #d1d5db;
}
.pagination a:hover { background: #1f2937; text-decoration: none; }
.pagination .active { background: #3b82f6; color: white; border-color: #3b82f6; }

/* ---- No Events ---- */
.no-events {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}
.no-events p { font-size: 1.1rem; margin-bottom: 15px; }

/* ---- Submission Form ---- */
.form-page { max-width: 700px; margin: 30px auto; }
.form-page h2 { margin-bottom: 8px; color: #f3f4f6; }
.form-intro { color: #9ca3af; margin-bottom: 25px; }

.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 0.95rem;
    color: #d1d5db;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #374151;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #1f2937;
    color: #d1d5db;
}
.form-group textarea { resize: vertical; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: #6b7280; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.form-row { display: flex; gap: 15px; }
.form-row .form-group { flex: 1; }

.form-fieldset {
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}
.form-fieldset legend {
    font-weight: 600;
    padding: 0 8px;
    font-size: 0.95rem;
    color: #d1d5db;
}

.form-actions { margin-top: 25px; }

.required { color: #f87171; }
.hint { font-weight: 400; color: #6b7280; font-size: 0.85rem; }
.current-image { font-size: 0.85rem; color: #9ca3af; margin-bottom: 8px; }

/* ---- Footer ---- */
.site-footer {
    margin-top: 50px;
    padding: 20px 0;
    border-top: 1px solid #1e293b;
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
}

/* ---- Event Detail Modal ---- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
    color: #d1d5db;
}
.modal-close {
    float: right;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
}

/* ---- FullCalendar Dark Overrides ---- */
.fc {
    --fc-border-color: #374151;
    --fc-button-bg-color: #374151;
    --fc-button-border-color: #4b5563;
    --fc-button-hover-bg-color: #4b5563;
    --fc-button-hover-border-color: #6b7280;
    --fc-button-active-bg-color: #3b82f6;
    --fc-button-active-border-color: #3b82f6;
    --fc-button-text-color: #d1d5db;
    --fc-today-bg-color: rgba(59,130,246,0.1);
    --fc-neutral-bg-color: #1f2937;
    --fc-page-bg-color: #111827;
    --fc-event-bg-color: #3b82f6;
    --fc-event-border-color: #2563eb;
    --fc-event-text-color: white;
}
.fc .fc-col-header-cell { background: #1f2937; }
.fc .fc-col-header-cell-cushion { color: #9ca3af; }
.fc .fc-daygrid-day-number { color: #d1d5db; }
.fc .fc-toolbar-title { color: #f3f4f6; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .event-card { flex-direction: column; }
    .event-card-image { width: 100%; height: 180px; }
    .form-row { flex-direction: column; gap: 0; }
    .calendar-header { flex-direction: column; align-items: flex-start; }
    .filters-bar { flex-direction: column; }
    .filters-bar .search-input { min-width: 100%; }
}
