/**
 * Facebook Events CSS: facebook_events.css (FIXED VERSION)
 *
 * File Location: /var/www/vhosts/freepeopleofthecosmos.org/fbe/facebook_events.css
 * Description: Modern dark theme styling for Facebook events display
 * Version: 2025.08.26.14.30
 * Author: Claude AI
 */

/* --- CSS Variables for Easy Theming --- */
:root {
    --bg-color: #121212;
    --card-bg-color: #1e1e1e;
    --text-color: #e0e0e0;
    --header-color: #ffffff;
    --accent-color: #1877f2; /* Facebook blue */
    --canceled-color: #dc3545;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Main Wrapper --- */
.facebook-events-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.facebook-events-wrapper h4 {
    color: var(--header-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.facebook-events-wrapper h4::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(45deg, var(--accent-color), #42a5f5);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* --- Events Container (Grid and List) --- */
.events-container {
    display: grid;
    gap: 2rem;
}

.events-container.grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.events-container.list {
    grid-template-columns: 1fr;
}

/* --- Individual Event Item --- */
.event-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.event-item {
    background: var(--card-bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.event-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--accent-color);
}

/* --- Event Image --- */
.event-cover {
    position: relative;
    overflow: hidden;
}

.event-cover img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.event-item:hover .event-cover img {
    transform: scale(1.05);
}

/* --- Event Content --- */
.event-details {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.event-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--header-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-date {
    font-size: 1rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.event-date::before {
    content: '📅';
    margin-right: 0.5rem;
}

.event-location {
    font-size: 0.95rem;
    color: #a0a0a0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.event-location::before {
    content: '📍';
    margin-right: 0.5rem;
}

.event-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #c0c0c0;
    margin-top: auto;
}

/* --- Canceled Notice --- */
.event-canceled-notice {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, var(--canceled-color), #ff6b6b);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
    z-index: 10;
}

/* --- Messages --- */
.events-error {
    background: linear-gradient(135deg, #2a1f1f, #3a2626);
    color: #ffcccb;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--canceled-color);
    text-align: center;
    font-weight: 500;
}

.events-empty {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #8fa8da;
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 1.1rem;
    border: 2px dashed rgba(143, 168, 218, 0.3);
}

.events-empty::before {
    content: '📅';
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* --- List View Specific Styles --- */
.events-container.list .event-item {
    flex-direction: row;
    align-items: stretch;
}

.events-container.list .event-cover {
    width: 300px;
    flex-shrink: 0;
}

.events-container.list .event-cover img {
    height: 100%;
    object-fit: cover;
}

.events-container.list .event-details {
    flex: 1;
    padding: 2rem;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .events-container.grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .facebook-events-wrapper {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 768px) {
    .events-container.grid {
        grid-template-columns: 1fr;
    }
    
    .events-container.list .event-item {
        flex-direction: column;
    }
    
    .events-container.list .event-cover {
        width: 100%;
    }
    
    .events-container.list .event-details {
        padding: 1.5rem;
    }

    .facebook-events-wrapper h4 {
        font-size: 1.75rem;
    }
    
    .facebook-events-wrapper {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .event-cover img {
        height: 180px;
    }
    
    .event-details {
        padding: 1rem;
    }
    
    .facebook-events-wrapper h4 {
        font-size: 1.5rem;
    }
}