/* BioWorld Events - Frontend Styles */

* {
    box-sizing: border-box;
}

.bioworld-events-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter Section */
.filter-section {
    background: #f8fffe;
    padding: 2rem 0;
    margin-bottom: 3rem;
}

.filter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-tab {
    background: transparent;
    border: 2px solid #e5f3f0;
    color: #666;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.filter-tab:hover,
.filter-tab.active {
    background: linear-gradient(135deg, #4a8b6f 0%, #2d5a4a 100%);
    border-color: #4a8b6f;
    color: white;
    transform: translateY(-2px);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Featured Event */
.featured-event {
    background: linear-gradient(135deg, #f8fffe 0%, #e5f3f0 100%);
    border-radius: 20px;
    padding: 0;
    margin-bottom: 4rem;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    border: 1px solid #d1e7dd;
    animation: fadeInUp 1s ease-out;
}

.featured-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: 300px;
}

.featured-image {
    background-size: cover;
    background-position: center;
    height: 300px;
    position: relative;
}

.featured-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.featured-info {
    padding: 2.5rem;
}

.featured-date {
    color: #4a8b6f;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.featured-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a4037;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-description {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.featured-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #666;
    flex-wrap: wrap;
}

.featured-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-meta i {
    color: #4a8b6f;
}

.btn-register {
    background: linear-gradient(135deg, #4a8b6f 0%, #2d5a4a 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-register:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    color: white;
}

/* Events Grid */
.events-section h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a4037;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out;
    text-align: center;
    position: relative;
}

.events-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #2d5a4a, #4a8b6f);
    border-radius: 2px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.event-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e5f3f0;
    position: relative;
    animation: fadeInUp 1s ease-out;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.event-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.event-date-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.8rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.event-day {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a4037;
    line-height: 1;
}

.event-month {
    font-size: 0.8rem;
    color: #4a8b6f;
    font-weight: 600;
    text-transform: uppercase;
}

.event-status {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-upcoming {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.status-ongoing {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.status-past {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.event-content {
    padding: 2rem;
}

.event-category {
    color: #4a8b6f;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.event-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a4037;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.event-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #666;
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.event-meta i {
    color: #4a8b6f;
}

.event-actions {
    display: flex;
    gap: 0.8rem;
}

.btn-event {
    padding: 0.7rem 1.2rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4a8b6f 0%, #2d5a4a 100%);
    color: white;
}

.btn-secondary {
    background: transparent;
    border: 2px solid #4a8b6f;
    color: #4a8b6f;
}

.btn-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.btn-secondary:hover {
    background: #4a8b6f;
    color: white;
}

/* Modal Styles */
.bioworld-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s ease;
}

.bioworld-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s ease;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(135deg, #4a8b6f 0%, #2d5a4a 100%);
    color: white;
    padding: 2rem;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a4037;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e5f3f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a8b6f;
    box-shadow: 0 0 0 3px rgba(74,139,111,0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions button {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit {
    background: linear-gradient(135deg, #4a8b6f 0%, #2d5a4a 100%);
    color: white;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.btn-cancel {
    background: #f8f9fa;
    color: #666;
}

.btn-cancel:hover {
    background: #e9ecef;
}

/* Event Details Modal */
.event-detail-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.event-detail-content {
    padding: 2rem;
}

.event-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fffe;
    border-radius: 10px;
}

.meta-item i {
    font-size: 1.5rem;
    color: #4a8b6f;
}

.meta-item-content h4 {
    margin: 0 0 0.3rem 0;
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
}

.meta-item-content p {
    margin: 0;
    font-weight: 600;
    color: #1a4037;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 3rem 1rem;
    }

    .featured-content {
        grid-template-columns: 1fr;
    }

    .featured-image {
        height: 200px;
    }

    .featured-title {
        font-size: 1.6rem;
    }

    .events-grid {
        grid-template-columns: 1fr;
    }

    .filter-tabs {
        gap: 0.5rem;
    }

    .filter-tab {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .event-meta {
        gap: 0.5rem;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header h2 {
        font-size: 1.4rem;
    }

    .event-detail-meta {
        grid-template-columns: 1fr;
    }
}