/* Enhanced Events Container */
.enhanced-events-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0px;
    position: relative;
}

.events-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.events-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    transition: all 0.3s ease;
}

/* Event Card Styles */
.event-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

/* Event Gallery Slider */
.event-gallery {
    position: relative;
    width: calc(100% - 20px);
    height: auto;
    overflow: hidden;
    background: #f5f5f5;
    margin: 0 auto;
    padding-top: 10px;
}

.event-gallery-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.gallery-slide {
    flex: 0 0 33.333%;
    height: 100%;
    padding: 5px;
    box-sizing: border-box;
}

.gallery-slide.active {
    opacity: 1;
}

.gallery-slide img {
    height: 100% !important;
    max-width: 100%;
    object-fit: cover;
}

.gallery-slide .no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
	background: none;
    color: white;
    font-size: 24px;
    border-radius: 8px;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

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

.gallery-slide.empty {
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.gallery-dots {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot.active {
    background: white;
    width: 20px;
    border-radius: 4px;
}

.gallery-dot:hover {
    background: white;
}

/* Event Info */
.event-info {
    padding: 20px;
}

.event-title {
    font-family: 'Canela', serif;
    font-size: 22px;
    margin: 0 0 10px 0;
    color: #4C1A0F;
	display: none;
}

.event-short-desc {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #4C1A0F;
    margin-bottom: 15px;
	display: none;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #999;
}

.event-location, .event-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Navigation Buttons */
.events-nav {
    background: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4C1A0F;
    z-index: 10;
}

.events-nav:hover {
    background: #007cba;
    color: #fff;
    transform: scale(1.05);
}

.events-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Carousel Dots */
.events-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.events-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.events-dot.active {
    background: #FFF6E9;
    width: 30px;
    border-radius: 5px;
}

.events-dot:hover {
    background: #FFF6E9;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 50px;
    grid-column: 1 / -1;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* ============================================
   INSTAGRAM-STYLE MODAL LAYOUT
   ============================================ */

/* Event Modal Container */
.event-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.event-modal-content {
    background-color: #fff;
    margin: 3% auto;
    padding: 0;
    width: 90%;
    max-width: 1100px;
    border-radius: 20px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    max-height: 90vh;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-event-modal {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    z-index: 100;
    transition: color 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    backdrop-filter: blur(5px);
	color: #4C1A0F !important;
	background: none !important;
}

.close-event-modal:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
}

/* Instagram-style modal container */
.modal-event-container.instagram-style {
    display: flex;
    flex-direction: row;
    padding: 0;
    overflow: hidden;
    max-height: 85vh;
}

/* Left side - Gallery (60% width) */
.modal-event-left {
    flex: 0 0 60%;
    max-width: 60%;
    background: #000;
    position: relative;
    min-height: 500px;
}

/* Right side - Content (40% width) */
.modal-event-right {
    flex: 0 0 40%;
    max-width: 40%;
    padding: 25px;
    overflow-y: auto;
    max-height: 85vh;
    background: #fff;
}

/* Instagram-style gallery */
.modal-gallery-instagram {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-gallery-slides-instagram {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
}

.modal-gallery-slide-instagram {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-gallery-slide-instagram.active {
    opacity: 1;
}

.modal-gallery-slide-instagram img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 85vh;
}

/* Navigation buttons for Instagram gallery */
.modal-gallery-prev-instagram,
.modal-gallery-next-instagram {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    color: #333;
}

.modal-gallery-prev-instagram {
    left: 10px;
}

.modal-gallery-next-instagram {
    right: 10px;
}

.modal-gallery-prev-instagram:hover,
.modal-gallery-next-instagram:hover {
    background: white;
    transform: translateY(-50%) scale(1.05);
    color: #000;
}

/* Gallery dots for Instagram gallery */
.modal-gallery-dots-instagram {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.modal-gallery-dot-instagram {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-gallery-dot-instagram.active {
    background: white;
    width: 18px;
    border-radius: 3px;
}

.modal-gallery-dot-instagram:hover {
    background: white;
}

/* Right side content styling */
.modal-event-title-instagram {
    font-family: 'Canela', serif;
    font-size: 24px;
    margin: 0 0 15px 0;
    color: #4C1A0F;
    line-height: 1.3;
}

.modal-event-meta-instagram {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.meta-item-instagram {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    color: #4C1A0F;
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-icon {
    font-size: 16px;
}

.modal-event-description-instagram {
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #4C1A0F;
    margin-bottom: 25px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.modal-event-description-instagram p {
    margin-bottom: 15px;
}

.modal-event-description-instagram a {
    color: #4C1A12;
    font-weight: bold;
    text-decoration: underline;
}

.modal-event-link-instagram {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.event-register-btn-instagram {
    display: inline-block;
    padding: 10px 25px;
    background: #4C1A0F;
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s ease;
}

.event-register-btn-instagram:hover {
    background: #6a2a18;
    color: #fff;
}

/* Placeholder for no images */
.modal-gallery-placeholder-instagram {
    width: 100%;
    height: 100%;
    min-height: 500px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-gallery-placeholder-instagram .no-image-placeholder {
    font-size: 24px;
    color: white;
    text-align: center;
}

/* Scrollbar styling for the content area */
.modal-event-right::-webkit-scrollbar {
    width: 4px;
}

.modal-event-right::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-event-right::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.modal-event-right::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* No Events Message */
.no-events {
    text-align: center;
    padding: 50px;
    grid-column: 1 / -1;
    font-family: 'Nunito', sans-serif;
    color: #4C1A0F;
}

button.events-nav.prev-btn {
    position: absolute;
    right: 80px;
    top: -90px;
    background: none;
    box-shadow: none;
}

button.events-nav.next-btn {
    position: absolute;
    right: 0px;
    top: -90px;
    background: none;
    box-shadow: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .events-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .event-gallery {
        height: 200px;
    }
    
    /* Instagram modal responsive */
    .modal-event-container.instagram-style {
        flex-direction: column;
        max-height: 90vh;
    }
    
    .modal-event-left {
        flex: 0 0 auto;
        max-width: 100%;
        min-height: 300px;
    }
    
    .modal-event-right {
        flex: 0 0 auto;
        max-width: 100%;
        padding: 20px;
        max-height: 50vh;
    }
    
    .modal-gallery-instagram {
        min-height: 300px;
    }
    
    .modal-gallery-slides-instagram {
        min-height: 300px;
    }
    
    .modal-event-title-instagram {
        font-size: 20px;
        margin-top: 0;
    }
    
    .modal-event-description-instagram {
        max-height: 200px;
        font-size: 14px;
    }
    
    .event-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .close-event-modal {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .enhanced-events-container {
        padding: 20px 10px;
    }
    
    .events-nav {
        display: none;
    }
    
    .event-gallery {
        height: 180px;
    }
}

/* ============================================
   DRAG/SWIPE CURSOR STYLES
   ============================================ */

/* Drag cursor for desktop */
#events-grid {
    cursor: grab;
    user-select: none;
}

#events-grid:active {
    cursor: grabbing;
}

/* Disable text selection while dragging */
#events-grid.dragging {
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

/* Touch devices - show swipe hint */
@media (max-width: 768px) {
    .events-grid {
        cursor: pointer;
        touch-action: pan-y pinch-zoom;
    }
}

/* ============================================
   STAGGERED ANIMATION FOR EVENT CARDS
   ============================================ */

/* Initial state - hidden */
.event-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease;
}

/* When visible, animate in */
.event-card.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays */
.event-card:nth-child(1) { transition-delay: 0.05s; }
.event-card:nth-child(2) { transition-delay: 0.15s; }
.event-card:nth-child(3) { transition-delay: 0.25s; }
.event-card:nth-child(4) { transition-delay: 0.35s; }
.event-card:nth-child(5) { transition-delay: 0.45s; }
.event-card:nth-child(6) { transition-delay: 0.55s; }
.event-card:nth-child(7) { transition-delay: 0.65s; }
.event-card:nth-child(8) { transition-delay: 0.75s; }
.event-card:nth-child(9) { transition-delay: 0.85s; }
.event-card:nth-child(10) { transition-delay: 0.95s; }

/* ============================================
   DRAG INDICATOR (optional)
   ============================================ */

.drag-indicator {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    color: #999;
    display: none;
}

.drag-indicator span {
    display: inline-block;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* Show drag indicator on mobile */
@media (max-width: 768px) {
    .drag-indicator {
        display: block;
    }
}

/* ============================================
   LOADING ANIMATION IMPROVEMENTS
   ============================================ */

.loading-spinner {
    text-align: center;
    padding: 50px;
    grid-column: 1 / -1;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4C1A0F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

/* ============================================
   HOVER ANIMATIONS
   ============================================ */

.event-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Gallery dot hover */
.gallery-dot:hover {
    background: white;
    transform: scale(1.2);
}

/* ============================================
   SMOOTH SCROLL BEHAVIOR
   ============================================ */

html {
    scroll-behavior: smooth;
}

/* ============================================
   BUTTON VISIBILITY FIX
   ============================================ */

button.events-nav.prev-btn,
button.events-nav.next-btn {
    position: absolute;
    right: 80px;
    top: -90px;
    background: none;
    box-shadow: none;
    cursor: pointer;
    z-index: 100;
}

button.events-nav.prev-btn {
    right: 80px;
}

button.events-nav.next-btn {
    right: 0px;
}

button.events-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile adjustments for nav buttons */
@media (max-width: 768px) {
    button.events-nav.prev-btn,
    button.events-nav.next-btn {
        top: -60px;
    }
    
    button.events-nav.prev-btn {
        right: 50px;
    }
}