/* ===========================================
   SPONSORS SECTION STYLES
   =========================================== */

/* Sponsor cards */
.sponsor-card {
    transition: all 0.2s ease;
    height: 200px;
    display: flex;
    flex-direction: column;
}

.sponsor-card .flex.items-center.justify-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .sponsor-card {
        height: 240px;
    }

    .sponsor-card .flex.items-center.justify-between {
        flex-direction: row;
        align-items: center;
        gap: 0;
    }
}

.sponsor-card>div {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sponsor-card img {
    flex-shrink: 0;
}

.sponsor-card .bg-gray-900 {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sponsor-card:hover {
    background-color: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Category styles */
.category-restaurante {
    background-color: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #d8b4fe;
}

.category-cerveceria {
    background-color: #ede9fe;
    color: #5b21b6;
    border: 1px solid #c4b5fd;
}

.category-actividad {
    background-color: #f3e8ff;
    color: #7c2d92;
    border: 1px solid #d8b4fe;
}

.category-otro {
    background-color: #faf5ff;
    color: #4B2883;
    border: 1px solid #e9d5ff;
}

/* Carousel styles */
.carousel-slide {
    transition: opacity 0.3s ease;
}

#sponsors-carousel {
    position: relative;
}

#carousel-container {
    display: flex;
    width: 100%;
}

/* Responsive carousel */
@media (max-width: 768px) {
    .carousel-slide {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #prev-btn,
    #next-btn {
        display: none;
        /* Hide buttons on mobile */
    }

    /* Show 1 column on mobile */
    .carousel-slide .grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

@media (min-width: 769px) {
    .carousel-slide {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Carousel hover effects */
.carousel-slide img {
    transition: all 0.3s ease;
}

.carousel-slide:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Map indicator */
.map-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(75, 40, 131, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-slide:hover .map-indicator {
    opacity: 1;
}

/* Text clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Touch scroll for sponsors grid on mobile */
@media (max-width: 640px) {
    .sponsor-card {
        height: auto;
        min-height: 180px;
    }
    .sponsor-card > div {
        height: auto;
    }
    .sponsor-card img {
        height: 9.5rem;
    }
    #sponsors-grid {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: auto;
        padding-bottom: 50px;
        /* Extra space for complete scroll to last flyer */
    }
    .sponsor-card .bg-gray-900 {
        flex: 0 0 auto;
        justify-content: flex-start;
        padding: 0.5rem 0.75rem;
    }
    .sponsor-card h3 {
        font-size: 0.85rem;
        line-height: 1.1;
        height: 1.2em;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap !important;
        margin: 0;
    }
}


/* Custom scrollbar styles */
#sponsors-grid::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#sponsors-grid::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

#sponsors-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    transition: background 0.2s ease;
}

#sponsors-grid::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Carousel container improvements in fullscreen */
#sponsors-carousel-container.fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100vh;
    max-height: none !important;
}

/* Ensure grid takes full space in fullscreen */
#sponsors-carousel-container.fixed #sponsors-carousel {
    height: calc(100vh - 240px);
    max-height: none !important;
    overflow-y: auto;
}

/* Consolidated scroll styles for sponsors grid */
#sponsors-grid {
    scroll-behavior: smooth;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
    align-items: start;
}

/* Collapsed mode - grid scrolls within 400px height */
#sponsors-carousel-container:not(.fixed) #sponsors-grid {
    height: 400px;
    overflow-y: auto;
}

/* Fullscreen mode - carousel handles scrolling */
#sponsors-carousel-container.fixed #sponsors-grid {
    height: 100%;
    overflow-y: visible;
    padding-bottom: 3rem;
    /* Extra space for last item */
}

/* Modal animations */
.modal-enter {
    animation: modalFadeIn 0.3s ease-out;
}

.modal-exit {
    animation: modalFadeOut 0.3s ease-in;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    to {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
}

/* Ensure modal is above map */
#sponsorModal {
    z-index: 10000 !important;
    background: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
}

#sponsorModal.modal-visible {
    background: rgba(0, 0, 0, 0.6);
    display: flex;
}

/* Additional modal styles */
#sponsorModal .relative {
    z-index: 10001;
}

/* Professional modal design improvements */
.modal-professional {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Scaled typography for better hierarchy */
.modal-professional h3 {
    font-size: 1.875rem;
    /* 30px */
    font-weight: 700;
    line-height: 1.2;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.modal-professional h4 {
    font-size: 1.25rem;
    /* 20px */
    font-weight: 600;
    line-height: 1.3;
    color: #374151;
    margin-bottom: 0.75rem;
}

.modal-professional h5 {
    font-size: 0.875rem;
    /* 14px */
    font-weight: 600;
    line-height: 1.4;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* Improved body text */
.modal-professional p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4b5563;
    font-weight: 400;
}

/* Improved color palette with gradients */
.modal-professional .gradient-brand {
    background: linear-gradient(135deg, #4B2883 0%, #6B46C1 50%, #8B5CF6 100%);
}

.modal-professional .gradient-ocean {
    background: linear-gradient(135deg, #0075BF 0%, #0284C7 50%, #0EA5E9 100%);
}

/* Sophisticated shadows with multiple layers */
.modal-professional .shadow-professional {
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 8px 32px rgba(75, 40, 131, 0.06);
}

.modal-professional .shadow-card {
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.06),
        0 8px 24px rgba(0, 0, 0, 0.04),
        0 16px 48px rgba(75, 40, 131, 0.08);
}

.modal-professional .shadow-button {
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(75, 40, 131, 0.15);
}

/* Elegant hover states */
.modal-professional .btn-primary {
    background: linear-gradient(135deg, #4B2883 0%, #6B46C1 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.modal-professional .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.modal-professional .btn-primary:hover::before {
    left: 100%;
}

.modal-professional .btn-primary:hover {
    transform: translateY(-1px);
}

.modal-professional .social-icon::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: inherit;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.modal-professional .social-icon:hover::after {
    opacity: 0.3;
    filter: blur(4px);
}

/* Improved spacing and visual rhythm */
.modal-professional .section-spacing {
    margin-bottom: 2rem;
}

.modal-professional .content-spacing {
    margin-bottom: 1.5rem;
}

.modal-professional .element-spacing {
    margin-bottom: 1rem;
}

/* Elegant borders and separators */
.modal-professional .divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e5e7eb 20%, #e5e7eb 80%, transparent 100%);
    margin: 1.5rem 0;
}

/* Carousel styles */
.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.carousel-slides {
    display: flex;
    transition: transform 0.3s ease-in-out;
}

.carousel-slide {
    flex: 0 0 100%;
    min-width: 0;
}

.carousel-btn {
    z-index: 10;
    transition: all 0.2s ease;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8) !important;
    transform: scale(1.1);
}

.carousel-dots {
    z-index: 10;
}

.carousel-dot {
    transition: all 0.2s ease;
}

.carousel-dot.active {
    background-color: rgba(255, 255, 255, 0.9) !important;
    transform: scale(1.2);
}

.carousel-dot:hover {
    background-color: rgba(255, 255, 255, 0.8) !important;
}

/* Social button styles */
.btn-ig {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}

.btn-fb {
    background-color: #1877f2;
}

.btn-wa {
    background-color: #25d366;
}

.btn-tel {
    background-color: #6b7280;
}

.btn-mail {
    background-color: #ea4335;
}

.btn-web {
    background-color: #4B2883;
}

/* Better text readability */
.modal-professional .text-primary {
    color: #111827;
    font-weight: 500;
}

.modal-professional .text-secondary {
    color: #6b7280;
    font-weight: 400;
}

.modal-professional .text-accent {
    color: #4B2883;
    font-weight: 600;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    width: 100%;
    height: 384px;
    /* h-96 - Increased for better prominence */
    overflow: hidden;
    border-radius: 0.5rem;
}

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

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
}

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

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

.carousel-prev {
    left: 0.5rem;
}

.carousel-next {
    right: 0.5rem;
}

.carousel-dots {
    display: flex;
    gap: 0.5rem;
}

.carousel-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.75);
}

.carousel-dot.active {
    background: rgba(255, 255, 255, 0.9) !important;
    transform: scale(1.2);
}

#sponsors-carousel-container {
    border-top: none !important;
}

#sponsors-carousel-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #4B2883 50%, transparent 100%);
    border-radius: 1px;
    z-index: 1;
}
