/* Events & Updates Styling */

/* Variables */
:root {
    --events-green: #2E7D32;
    --events-green-dark: #1B5E20;
    --events-green-light: #E8F5E9;
    --events-gold: #FFC107;
    --events-blue: #2196F3;
    --white: #FFFFFF;
    --light-gray: #F5F7FA;
    --dark-gray: #333333;
    --text-gray: #666666;
}

/* Events Header */
.events-header {
    background: linear-gradient(135deg, var(--events-green), var(--events-green-dark));
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.events-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" opacity="0.1"><path fill="white" d="M0,0H1000V1000H0ZM500,500A250,250,0,1,1,500,0,250,250,0,0,1,500,500Z"/></svg>');
    background-size: 300px;
    opacity: 0.1;
}

.events-header .container {
    position: relative;
    z-index: 1;
}

.events-header h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.events-header .subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.stat {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 180px;
    transition: all 0.3s ease;
}

.stat:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.stat i {
    font-size: 2.5rem;
    color: var(--events-gold);
}

.stat div {
    text-align: left;
}

.stat span {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
}

.stat small {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#noneed {
    display: none;
}

/* Events Container */
.events-container {
    padding: 60px 0;
    background: var(--light-gray);
    min-height: 60vh;
}

/* Filter Buttons */
.events-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 12px 24px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: var(--text-gray);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.filter-btn:hover {
    border-color: var(--events-green);
    color: var(--events-green);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--events-green);
    border-color: var(--events-green);
    color: white;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Event Card */
.event-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.event-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover .event-image img {
    transform: scale(1.05);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.placeholder-image i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.placeholder-image span {
    font-size: 1.2rem;
    font-weight: 500;
}

.event-date {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}

.event-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-upcoming {
    background: var(--events-green);
}

.badge-past {
    background: #666;
}

.badge-conference {
    background: #2196F3;
}

.badge-workshop {
    background: #9C27B0;
}

.badge-speaking {
    background: #FF9800;
}

.badge-webinar {
    background: #009688;
}

.badge-meeting {
    background: #795548;
}

.badge-other {
    background: #607D8B;
}

/* Event Content */
.event-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-title {
    font-size: 1.4rem;
    margin: 0 0 15px 0;
    color: var(--dark-gray);
    line-height: 1.3;
}

.event-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-gray);
    flex-wrap: wrap;
}

.event-meta i {
    margin-right: 5px;
    color: var(--events-green);
}

.event-description {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.event-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    flex-wrap: wrap;
}

.event-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.details-btn {
    background: var(--events-green-light);
    color: var(--events-green);
}

.details-btn:hover {
    background: var(--events-green);
    color: white;
}

.link-btn {
    background: var(--events-blue);
    color: white;
}

.link-btn:hover {
    background: #1976D2;
    transform: translateY(-2px);
}

/* Loading State */
.loading-events {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--text-gray);
}

.loading-events i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--events-green);
}

/* No Events Message */
.no-events {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    border: 2px dashed #e0e0e0;
    grid-column: 1 / -1;
}

.no-events i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.no-events h3 {
    color: #666;
    margin-bottom: 15px;
}

.no-events p {
    color: #888;
    max-width: 500px;
    margin: 0 auto 25px;
    line-height: 1.6;
}

.admin-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--events-green);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin-btn:hover {
    background: var(--events-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Events Footer */
.events-footer {
    background: var(--dark-gray);
    color: white;
    padding: 60px 0 30px;
}

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

.footer-section h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--events-green);
}

.footer-section p {
    color: #aaa;
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-section a {
    display: block;
    color: #ccc;
    text-decoration: none;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: white;
    transform: translateX(5px);
}

.admin-link {
    color: var(--events-gold) !important;
    font-weight: 500;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    color: #888;
    font-size: 0.9rem;
}

.update-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.update-note i {
    color: var(--events-green);
    animation: spin 10s linear infinite;
}

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

/* Admin Navigation */
.admin-nav {
    background: var(--events-gold);
    color: #333 !important;
    padding: 5px 15px !important;
    border-radius: 20px;
    font-weight: 600 !important;
}

.admin-nav:hover {
    background: #ffb300;
}

/* Responsive Design */
@media (max-width: 992px) {
    .events-header h1 {
        font-size: 2.8rem;
    }
    
    .header-stats {
        gap: 20px;
    }
    
    .stat {
        min-width: 150px;
        padding: 15px;
    }
    
    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .events-header {
        padding: 60px 0 40px;
    }
    
    .events-header h1 {
        font-size: 2.2rem;
    }
    
    .events-header .subtitle {
        font-size: 1.1rem;
    }
    
    .stat {
        min-width: 120px;
    }
    
    .stat span {
        font-size: 1.8rem;
    }
    
    .events-filter {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .filter-btn {
        white-space: nowrap;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .events-header {
        margin-top: 60px;
    }
    .container{
        padding: 0 10px;
    }
    
    .header-stats {
        /* flex-direction: column; */
        width: 100%;
        align-items: center;
    }
    
    .stat {
        /* width: 100%; */
        padding: 10px;
        font-size: 1rem;
        max-width: 250px;
        gap: 10px;
    }
    
    .stat i {
        font-size: 1.5rem;
        color: var(--events-gold);
    }

    .stat div {
        text-align: left;
    }

    .stat span {
        font-size: 1.2rem;
        font-weight: 700;
        line-height: 1;
    }

    .stat small {
        font-size: 0.7rem;
        opacity: 0.8;
        text-transform: uppercase;
        /* letter-spacing: 1px; */
    }
    .event-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .event-actions {
        flex-direction: column;
    }
    
    .event-btn {
        width: 100%;
        justify-content: center;
    }
}



/* Google Sheets Specific Styles */

/* Connection Status */
.sheets-status-btn {
    background: #34A853 !important;
    color: white !important;
}

.sheets-status-btn:hover {
    background: #2E8B46 !important;
}

/* Continue from previous CSS */

/* Google Drive Export Button */
.export-btn {
    background: #4285F4 !important;
    color: white !important;
}

.export-btn:hover {
    background: #3367D6 !important;
}

/* Connection Status */
.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: 15px;
}

.connection-status.connected {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

.connection-status.disconnected {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #FFCDD2;
}

/* Loading States */
.loading-events {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-gray);
}

.loading-events i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--events-green);
    animation: spin 1s linear infinite;
}

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

/* Error Message */
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: #FFEBEE;
    border-radius: 10px;
    border: 2px solid #FFCDD2;
}

.error-message i {
    font-size: 3rem;
    color: #C62828;
    margin-bottom: 20px;
}

.error-message h3 {
    color: #C62828;
    margin-bottom: 15px;
}

.error-message p {
    color: #666;
    margin-bottom: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.retry-btn, .cache-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 5px;
    transition: all 0.3s ease;
}

.retry-btn {
    background: var(--events-green);
    color: white;
}

.retry-btn:hover {
    background: var(--events-green-dark);
}

.cache-btn {
    background: #666;
    color: white;
}

.cache-btn:hover {
    background: #555;
}

/* User Messages */
.user-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid var(--events-green);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.user-message.success {
    border-left-color: #4CAF50;
}

.user-message.error {
    border-left-color: #F44336;
}

.user-message.warning {
    border-left-color: #FF9800;
}

.user-message.info {
    border-left-color: #2196F3;
}

.user-message i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user-message.success i {
    color: #4CAF50;
}

.user-message.error i {
    color: #F44336;
}

.user-message.warning i {
    color: #FF9800;
}

.user-message.info i {
    color: #2196F3;
}

.close-message {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
}

.close-message:hover {
    color: #666;
}

/* Update Button */
.update-btn {
    background: #FF9800 !important;
}

.update-btn:hover {
    background: #F57C00 !important;
}

/* Image Preview */
.image-preview-container {
    margin-top: 10px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

.preview-image {
    max-width: 200px;
    max-height: 150px;
    border-radius: 5px;
    margin-bottom: 10px;
    display: block;
}

/* Google Sheets Instructions */
.sheets-instructions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid #4285F4;
}

.sheets-instructions h4 {
    color: #4285F4;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sheets-instructions ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.sheets-instructions li {
    margin-bottom: 8px;
    color: #555;
}

.sheets-instructions code {
    background: #e8eaed;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .user-message {
        left: 20px;
        right: 20px;
        max-width: none;
    }
    
    .connection-status {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .error-message .retry-btn,
    .error-message .cache-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Retry Filter Button */
.retry-filter-btn {
    background: #4285F4 !important;
    color: white !important;
    border-color: #4285F4 !important;
}

.retry-filter-btn:hover {
    background: #3367D6 !important;
    border-color: #3367D6 !important;
}

/* Base64 Image Note */
.base64-note {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    display: block;
}

.base64-note i {
    color: #FF9800;
    margin-right: 5px;
}


/* Add these to the end of your events-style.css file */

/* Event Card Carousel Styles */
.card-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.card-carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.card-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.card-carousel-slide.active {
    opacity: 1;
}

.card-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
}

.event-card:hover .card-carousel-btn {
    opacity: 1;
}

.card-carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.card-carousel .prev-btn {
    left: 10px;
}

.card-carousel .next-btn {
    right: 10px;
}

.card-carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 10;
}

.card-carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.card-carousel-indicator.active {
    background: white;
    transform: scale(1.2);
}

.card-carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Image counter */
.image-counter {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
}

.image-counter i {
    font-size: 0.8rem;
}

/* Event card adjustments for carousel */
.event-card .event-date {
    z-index: 11;
}

.event-card .event-badge {
    z-index: 11;
}

@media (max-width: 768px) {
    .card-carousel-btn {
        opacity: 1;
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .card-carousel {
        height: 180px;
    }
}

/* Remove description from event cards */
.event-description {
    display: none;
}

/* Adjust event content for removed description */
.event-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.event-actions {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}