/**
 * STYLE.CSS - Custom Styling
 * Complete styling for Bocholt Events Hub
 */

/* ============================================
   BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* HEADER */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

/* PWA INSTALL BUTTON */
.pwa-install-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pwa-install-button:hover {
    background: white;
    color: #667eea;
}

/* DEMO BANNER */
.demo-banner {
    background: #fbbf24;
    color: #78350f;
    padding: 20px;
    text-align: center;
    font-weight: 600;
    border-bottom: 3px solid #f59e0b;
}

.demo-banner h2 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.demo-banner p {
    font-size: 0.95rem;
    font-weight: normal;
}

/* HERO SECTION */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero .cta-button {
    background: white;
    color: #667eea;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-block;
    transition: transform 0.2s;
}

.hero .cta-button:hover {
    transform: scale(1.05);
}

/* SECTIONS */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

section h2 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    color: #1f2937;
    text-align: center;
}

/* ============================================
   LOADING INDICATOR
   ============================================ */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 400px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message,
.info-message {
    text-align: center;
    padding: 40px;
    background: #fff3cd;
    border-radius: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
}

.error-message code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* ============================================
   CALENDAR SECTION
   ============================================ */
.calendar-section {
    background: #f9fafb;
    padding: 60px 20px;
}

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

.calendar-wrapper {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* FullCalendar Custom Styling */
.fc {
    font-family: inherit;
}

.fc-toolbar-title {
    font-size: 1.5rem !important;
    font-weight: 600;
}

.fc-button {
    background: #667eea !important;
    border-color: #667eea !important;
    text-transform: capitalize !important;
}

.fc-button:hover {
    background: #5568d3 !important;
}

.fc-event {
    cursor: pointer;
    background: #667eea !important;
    border: none !important;
}

.fc-event:hover {
    background: #5568d3 !important;
}

/* ============================================
   EVENT CARDS SECTION
   ============================================ */
.events-section {
    background: white;
}

.event-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.event-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.event-card-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f3f4f6;
}

.event-card-content {
    padding: 20px;
}

.event-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #1f2937;
}

.event-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.event-date,
.event-time {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #6b7280;
    font-size: 0.9rem;
}

.event-location-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.event-description {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.event-eintritt {
    font-weight: 600;
    color: #667eea;
}

.event-details-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.event-details-btn:hover {
    background: #5568d3;
}

/* ============================================
   DETAIL PANEL (Side Slide-in)
   ============================================ */
.detail-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    pointer-events: none;
}

.detail-panel.hidden {
    display: none;
}

.detail-panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
}

.detail-panel.active .detail-panel-overlay {
    opacity: 1;
}

.detail-panel-content {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 500px;
    background: white;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    pointer-events: auto;
}

.detail-panel.active .detail-panel-content {
    transform: translateX(0);
}

.detail-panel-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    font-size: 2rem;
    line-height: 1;
    padding: 5px 15px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    z-index: 10;
}

.detail-panel-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.detail-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#detail-content {
    padding: 30px;
}

.detail-header {
    margin-bottom: 25px;
}

.detail-header h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #1f2937;
    text-align: left;
}

.detail-location-badge {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.detail-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.detail-info-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.detail-icon {
    font-size: 1.5rem;
}

.detail-info-item strong {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-info-item p {
    margin: 0;
    color: #1f2937;
    font-size: 1.1rem;
}

.detail-description {
    margin-bottom: 25px;
}

.detail-description h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #1f2937;
}

.detail-description p {
    color: #6b7280;
    line-height: 1.6;
}

.detail-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.detail-link-btn {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.detail-link-btn:hover {
    background: #5568d3;
}

/* ============================================
   FEATURES
   ============================================ */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h3 {
    color: #667eea;
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.feature-card p {
    color: #6b7280;
    font-size: 1rem;
}

/* HOW IT WORKS */
.how-it-works {
    background: #f9fafb;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.step {
    text-align: center;
}

.step-number {
    background: #667eea;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #1f2937;
}

.step p {
    color: #6b7280;
}

/* CONTACT */
.contact {
    text-align: center;
}

.contact-info {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 40px auto 0;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #6b7280;
}

.contact-email {
    color: #667eea;
    font-weight: 600;
    font-size: 1.3rem;
    text-decoration: none;
}

.contact-email:hover {
    text-decoration: underline;
}

/* FOOTER */
footer {
    background: #1f2937;
    color: white;
    padding: 40px 20px;
    text-align: center;
}

footer a {
    color: #667eea;
    text-decoration: none;
    margin: 0 15px;
}

footer a:hover {
    text-decoration: underline;
}

/* ============================================
   FILTER SECTION
   ============================================ */
.filter-section {
    background: #f9fafb;
    padding: 40px 20px;
    border-bottom: 1px solid #e5e7eb;
}

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

.filter-container h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #1f2937;
    text-align: center;
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-item label {
    font-weight: 600;
    color: #4b5563;
    font-size: 0.9rem;
}

.filter-input,
.filter-select {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

.filter-input::placeholder {
    color: #9ca3af;
}

.filter-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.filter-counter {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 600;
}

.reset-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.reset-btn:hover {
    background: #5568d3;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    section h2 {
        font-size: 1.8rem;
    }

    .header-content {
        flex-direction: column;
        gap: 10px;
    }

    .event-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .detail-panel-content {
        max-width: 100%;
        width: 100%;
    }

    .fc-toolbar {
        font-size: 0.9rem;
    }

    .fc-toolbar-title {
        font-size: 1.2rem !important;
    }

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

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

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

    .filter-search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .event-card-content {
        padding: 15px;
    }

    .event-title {
        font-size: 1.1rem;
    }

    #detail-content {
        padding: 20px;
    }

    .detail-header h2 {
        font-size: 1.5rem;
    }

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

    .filter-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .reset-btn {
        width: 100%;
    }
}
