﻿/* ============================================
   ARMENOPOLE CUSTOM FLICKITY CAROUSEL - ENHANCED V1.15
   - FIXED: Title in WHITE for maximum readability
   - HOVER: Glowing teal shadow effect
   - ADJUSTED: Slightly lighter backgrounds (better balance)
   - Date/Location: Light gray for better readability
   - MOBILE: Removed vertical accent bar (saves space)
   - Optimized for maximum contrast and readability
   ============================================ */

/* Carousel container settings */
.custom-flickity-carousel {
    width: 100vw;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 105, 92, 0.08);
}

/* Carousel cell styling */
.custom-flickity-cell {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 100px;
    box-sizing: border-box;
    gap: 50px;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
}

/* ENHANCED: Slightly lighter background blur for better balance */
.carousel-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(12px) brightness(0.5); /* Lighter: 0.4 → 0.5 */
    opacity: 0.75; /* Slightly less opaque: 0.8 → 0.75 */
    z-index: 1;
    transform: scale(1.1);
    transition: transform 8s ease-out, opacity 0.6s ease;
}

/* Hover effect for background */
.custom-flickity-cell:hover .carousel-background {
    transform: scale(1.15);
    opacity: 0.8; /* Was 0.85 */
}

/* ENHANCED: Adjusted gradient overlay for darker backgrounds */
.carousel-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient( to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.15) 25%, rgba(255, 255, 255, 0.55) 40%, rgba(255, 255, 255, 0.8) 55%, rgba(255, 255, 255, 0.92) 70%, rgba(255, 255, 255, 1) 85%, rgba(255, 255, 255, 1) 100% );
    z-index: 2;
}

/* Content container with enhanced styling */
.carousel-content {
    z-index: 3;
    color: #333;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    max-width: 50%;
    position: relative;
}

    /* Decorative accent bar */
    .carousel-content::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(to bottom, #2BBBAD, #00FFC6);
        border-radius: 2px;
        box-shadow: 0 0 10px rgba(43, 187, 173, 0.5);
    }

    /* Clickable title link styling */
    .carousel-content a.title-link {
        text-decoration: none;
        color: inherit;
        display: block;
    }

        .carousel-content a.title-link:hover h3 {
            color: #ffffff; /* White on hover */
            text-shadow: 0 0 20px rgba(43, 187, 173, 0.8), 0 0 40px rgba(43, 187, 173, 0.4); /* Glowing teal shadow */
        }

        .carousel-content a.title-link:focus {
            outline: 2px solid #2BBBAD;
            outline-offset: 4px;
            border-radius: 4px;
        }

    /* IMPROVED: Title - white for maximum readability */
    .carousel-content h3 {
        margin: 0 0 12px 0;
        font-size: 1.8em;
        font-weight: 700;
        color: #ffffff; /* White by default - maximum contrast */
        line-height: 1.3;
        letter-spacing: -0.5px;
        position: relative;
        padding-left: 15px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    /* IMPROVED: Date/location - light color for better readability on dark backgrounds */
    .carousel-content p {
        margin: 0;
        font-size: 1em;
        color: #E0E0E0; /* Light gray - excellent contrast on dark backgrounds */
        font-weight: 500;
        padding-left: 15px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        /* Calendar icon - bright teal to match */
        .carousel-content p i {
            color: #E0E0E0;
        }

        /* Flag icon styling within paragraph */
        .carousel-content p .flag-icon {
            margin: 0 4px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
            border-radius: 2px;
        }

    /* REMOVED: Button is completely hidden */
    .carousel-content .btn {
        display: none !important;
    }

/* ============================================
   CLICKABLE IMAGE LINK STYLING
   ============================================ */

/* Clickable image link wrapper */
.carousel-image-link {
    display: inline-block;
    z-index: 3;
    position: relative;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 12px;
    line-height: 0;
    max-width: fit-content;
}

    /* Ensure image inherits styling through the link */
    .carousel-image-link img {
        display: block;
        vertical-align: top;
    }

    /* Enhanced hover effect when image link is hovered */
    .carousel-image-link:hover img {
        transform: scale(1.06) translateY(-4px) rotate(1deg);
        opacity: 1;
        box-shadow: 0 12px 40px rgba(0, 105, 92, 0.25), 0 6px 16px rgba(0, 0, 0, 0.15);
        border-color: rgba(43, 187, 173, 0.6);
    }

    /* Focus state for accessibility */
    .carousel-image-link:focus {
        outline: 3px solid #2BBBAD;
        outline-offset: 4px;
        border-radius: 12px;
    }

        .carousel-image-link:focus img {
            transform: scale(1.03);
        }

/* Enhanced image styling */
.custom-flickity-cell img {
    max-height: 260px;
    width: auto;
    max-width: 50%;
    min-width: 280px;
    z-index: 3;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 105, 92, 0.12), 0 3px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.98;
    border: 2px solid rgba(255, 255, 255, 0.9);
    object-fit: cover;
}

/* REMOVED: Flickity navigation dots completely hidden */
.custom-flickity-carousel .flickity-page-dots {
    display: none !important;
}

/* ============================================
   ELEGANT HR STYLING - ALL IN CSS
   ============================================ */

/* Elegant HR with gradual color transition */
.elegant-hr {
    border: 0;
    height: 3px;
    left: 0;
    right: 0;
    background: linear-gradient( to right, rgba(0, 105, 92, 0) 0%, rgba(0, 105, 92, 0.3) 20%, #00695c 40%, #0f7d6e 45%, #1a8b7a 50%, #259987 55%, #2BBBAD 60%, rgba(43, 187, 173, 0.3) 80%, rgba(43, 187, 173, 0) 100% );
    box-shadow: 0 2px 8px rgba(0, 105, 92, 0.15);
    position: relative;
}

/* Event date/location styling */
.event-date-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

    .event-date-location i {
        color: #2BBBAD; /* Bright teal for calendar icon */
        margin-right: 4px;
    }

    .event-date-location .region-text {
        color: #E0E0E0; /* Light gray for region */
    }

/* ============================================
   RESPONSIVE ADJUSTMENTS WITH HR POSITIONING
   ============================================ */

/* Carousel spacer with correct heights */
.carousel-spacer {
    height: 360px;
    width: 100%;
    display: block;
}

/* Desktop (1024px and above) */
@media (min-width: 1024px) {
    .custom-flickity-carousel {
        height: 280px;
        margin-bottom: 0;
    }

    .carousel-spacer {
        height: 360px;
    }

    .elegant-hr {
        margin: 0 0 0 0;
        position: relative;
        top: 0;
    }
}

/* Laptop/Small Desktop (768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .custom-flickity-carousel {
        height: 260px;
        margin-bottom: 0;
    }

    .carousel-spacer {
        height: 340px;
    }

    .custom-flickity-cell {
        padding: 25px 60px;
        gap: 40px;
    }

    .carousel-content {
        max-width: 48%;
    }

        .carousel-content h3 {
            font-size: 1.6em;
        }

    .custom-flickity-cell img {
        max-height: 220px;
        max-width: 52%;
        min-width: 240px;
    }

    .elegant-hr {
        margin: 0 0 0 0;
        position: relative;
        top: 0;
    }

    /* Adjusted gradient for medium screens */
    .carousel-background::after {
        background: linear-gradient( to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 30%, rgba(255, 255, 255, 0.6) 45%, rgba(255, 255, 255, 0.85) 60%, rgba(255, 255, 255, 1) 80%, rgba(255, 255, 255, 1) 100% );
    }
}

/* Tablet (481px to 767px) */
@media (max-width: 767px) {
    .custom-flickity-carousel {
        height: 240px;
        margin-bottom: 0;
    }

    .carousel-spacer {
        height: 320px;
    }

    .custom-flickity-cell {
        flex-direction: row;
        padding: 20px 30px;
        gap: 20px;
    }

    .carousel-content {
        max-width: 52%;
        padding: 10px;
    }

        .carousel-content h3 {
            font-size: 1.3em;
            margin-bottom: 8px;
        }

        .carousel-content p {
            font-size: 0.9em;
        }

    .custom-flickity-cell img {
        max-height: 180px;
        max-width: 48%;
        min-width: 180px;
    }

    .elegant-hr {
        margin: 0 0 0 0;
        height: 2px;
        position: relative;
        top: 0;
    }

    /* Adjusted gradient for tablet */
    .carousel-background::after {
        background: linear-gradient( to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.25) 35%, rgba(255, 255, 255, 0.65) 50%, rgba(255, 255, 255, 0.88) 70%, rgba(255, 255, 255, 1) 90%, rgba(255, 255, 255, 1) 100% );
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .custom-flickity-carousel {
        height: 200px;
        margin-bottom: 0;
    }

    .carousel-spacer {
        height: 280px;
    }

    .custom-flickity-cell {
        padding: 15px 20px;
        gap: 15px;
    }

    .carousel-content {
        max-width: 55%;
    }

        /* REMOVED: Vertical accent bar takes too much space on mobile */
        .carousel-content::before {
            display: none;
        }

        .carousel-content h3 {
            font-size: 1.1em;
            margin-bottom: 6px;
            padding-left: 0; /* Remove left padding since no accent bar */
        }

        .carousel-content p {
            font-size: 0.8em;
            padding-left: 0; /* Remove left padding since no accent bar */
        }

    .custom-flickity-cell img {
        max-height: 140px;
        max-width: 45%;
        min-width: 140px;
        border-radius: 8px;
    }

    .elegant-hr {
        margin: 0 0 0 0;
        height: 2px;
        position: relative;
        top: 0;
    }

    /* Strong gradient for mobile readability */
    .carousel-background::after {
        background: linear-gradient( to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 30%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.92) 75%, rgba(255, 255, 255, 1) 90%, rgba(255, 255, 255, 1) 100% );
    }
}

/* Normal container spacing */
.container-fluid {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

    .container-fluid > .row {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

        .container-fluid > .row > div:first-child {
            margin-top: 0 !important;
        }

/* Loading state */
.custom-flickity-carousel.is-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Loading spinner */
.custom-flickity-carousel.is-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 105, 92, 0.2);
    border-top-color: #00695c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 10;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Accessibility improvements */
.custom-flickity-cell:focus-within {
    outline: 3px solid #2BBBAD;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .custom-flickity-carousel {
        height: auto;
        page-break-inside: avoid;
    }

    .carousel-background {
        display: none;
    }

    .custom-flickity-cell {
        padding: 20px;
    }
}
