/* ====================
   Event Card Component
   ==================== */

/* ====================
   MOBILE SWIPEABLE SLIDER
   ==================== */
.swipe-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding: 0.5rem 1rem 1.5rem;
    margin: 0 -1rem;
    scrollbar-width: none; /* Firefox */
}

.swipe-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.swipe-slider .slide-item {
    scroll-snap-align: center;
    flex: 0 0 85%;
    max-width: 320px;
}

/* Slider dots/indicators */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0 1rem;
}

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

.slider-dot.active {
    background: #CE466C;
    width: 24px;
    border-radius: 4px;
}

/* Desktop: disable slider, show grid */
@media (min-width: 769px) {
    .swipe-slider {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        overflow: visible;
        scroll-snap-type: none;
        padding: 0;
        margin: 0;
    }
    
    .swipe-slider .slide-item {
        flex: none;
        max-width: none;
    }
    
    .slider-dots {
        display: none;
    }
}

/* ====================
   Event Card Component (Redesign)
   ==================== */
.evento-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid #ffffff; /* Figma: border blanco 3px */
    display: flex;
    flex-direction: column;
}

.evento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 1. Header Image with Torn Paper */
.card-image-header {
    height: 180px;
    background-color: #1F2548;
    /* Fallback */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    width: 100%;
    display: block;
    margin: 0;
    padding: 0;
}

/* Torn paper effect at the bottom of the image */
.card-image-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background-color: #1F2548;
    /* Should match the Title Bar color */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 60' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,0 V60 H1200 V0 C1150,15 1100,5 1050,10 C1000,15 950,5 900,10 C850,15 800,5 750,10 C700,15 650,5 600,10 C550,15 500,5 450,10 C400,15 350,5 300,10 C250,15 200,5 150,10 C100,15 50,5 0,0' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 60' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,0 V60 H1200 V0 C1150,15 1100,5 1050,10 C1000,15 950,5 900,10 C850,15 800,5 750,10 C700,15 650,5 600,10 C550,15 500,5 450,10 C400,15 350,5 300,10 C250,15 200,5 150,10 C100,15 50,5 0,0' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    pointer-events: none;
    z-index: 1;
}

/* 2. Title Bar */
.card-title-bar {
    background-color: #1F2548;
    /* Dark Blue */
    color: white;
    text-align: center;
    padding: 0.75rem 0.5rem;
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: capitalize;
}

/* 3. Country Bar */
.card-country-bar {
    background-color: #d1d5db;
    /* Gray */
    color: #1F2548;
    text-align: center;
    padding: 0.4rem 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 4. Body Info */
.card-body {
    padding: 1.25rem 1.5rem;
    flex-grow: 1;
    /* Pushes footer down */
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    line-height: 1.4;
}

.card-info-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    font-size: 0.95rem;
    color: #4b5563;
}

.card-info-icon {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.card-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    row-gap: 0.5rem;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.cupos-badge-pill {
    background-color: #E6F4FF; /* Azul claro Figma */
    color: #0091FF; /* Azul Figma */
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* 5. Footer (Tags + Buttons) */
.card-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.25rem;
}

.card-tags {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag-pill {
    background-color: #F5F5F5; /* Gris claro */
    border: 1px solid #E0E0E0;
    color: #666666;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
}

/* Tag variants según tipo */
.tag-pill.casual {
    background-color: #FFF4E6;
    color: #FF9800;
    border-color: #FFE0B2;
}

.tag-pill.competitivo,
.tag-pill.clasificatorio,
.tag-pill.torneo {
    background-color: #FFE6F0;
    color: #E91E63;
    border-color: #F8BBD0;
}

.tag-pill.oficial {
    background-color: #E3F2FD;
    color: #2196F3;
    border-color: #BBDEFB;
}

.card-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: stretch;
    width: 100%;
}

.btn-card {
    flex: 1;
    text-align: center;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.86rem;
    line-height: 1.15;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    min-height: 46px;
    white-space: nowrap;
}

.btn-card:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-view-more {
    background-color: #CE466C; /* Pink Figma */
    color: white;
}

.btn-register {
    background: linear-gradient(135deg, #E91E63 0%, #D81B60 100%); /* Degradado rosa/rojo */
    color: white;
}

.btn-register strong {
    font-weight: 800;
    text-transform: none;
}

/* Featured Card Style (Horizontal) - Keep existing if needed or adjust */
.featured-card {
    background: linear-gradient(180deg, #4A69BD 0%, #16234A 100%);
    border-radius: 12px;
    padding: 1.75rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 180px;
    width: 100%;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.featured-icon {
    font-size: 3.5rem;
    margin: 0;
    flex-shrink: 0;
    width: 80px;
    text-align: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.featured-card-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    flex: 1;
}

.featured-card .evento-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: white;
    line-height: 1.3;
}

.featured-card .evento-desc {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.5;
}

.featured-card .evento-link {
    color: #EB974A;
    /* Orange/Yellow */
    font-size: 1rem;
    text-transform: none;
    /* Keep natural case if needed */
}

/* ====================
   RESPONSIVE STYLES
   ==================== */

@media (max-width: 768px) {
    .evento-card {
        padding: 1rem;
    }

    .card-image-header {
        height: 150px;
    }

    .card-title-bar {
        font-size: 1rem;
        padding: 0.6rem 0.5rem;
    }

    .card-country-bar {
        font-size: 0.8rem;
        padding: 0.35rem 0.5rem;
    }

    .card-body {
        padding: 1rem;
    }

    .card-info-row {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .card-info-icon {
        width: 18px;
        font-size: 0.9rem;
    }

    .card-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .card-footer {
        padding: 1rem;
    }

    .card-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-card {
        width: 100%;
        padding: 0.7rem;
    }

    .eventos-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .featured-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .featured-icon {
        font-size: 3rem;
        width: 70px;
    }

    .featured-card-content {
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .evento-card {
        padding: 0.75rem;
        border-radius: 8px;
    }

    .card-image-header {
        height: 120px;
    }

    .card-title-bar {
        font-size: 0.9rem;
        padding: 0.5rem 0.4rem;
    }

    .card-country-bar {
        font-size: 0.75rem;
        padding: 0.3rem 0.4rem;
    }

    .card-body {
        padding: 0.75rem;
    }

    .card-info-row {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    .card-info-icon {
        width: 16px;
        font-size: 0.85rem;
    }

    .card-stats {
        font-size: 0.85rem;
    }

    .cupos-badge-pill {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }

    .card-footer {
        padding: 0.75rem;
    }

    .card-tags {
        gap: 0.4rem;
    }

    .tag-pill {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .btn-card {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .featured-card {
        padding: 1.25rem;
    }

    .featured-icon {
        font-size: 2.5rem;
        width: 60px;
    }

    .featured-card .evento-title {
        font-size: 1.2rem;
    }

    .featured-card .evento-desc {
        font-size: 0.9rem;
    }
}