/* ====================
   Page: Home
   ==================== */
:root {
    --devir-blue-dark: #080D1FFC;
    /* Navbar bg */
    --devir-hero-bg: #16234A;
    --devir-pink: #CE466C;
    --devir-orange: #EB974A;
    --devir-orange-text: #16224A;
}

body {
    background-color: #16234A;
    /* Dark blue to match hero and sections */
    margin: 0;
    padding: 0;
}

/* ====================
   App Navbar (Desktop Sticky Subheader)
   ==================== */
.app-navbar {
    background-color: var(--devir-blue-dark);
    height: 58px;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.app-navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.app-nav-brand {
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-right: 2rem;
}

.app-nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    height: 100%;
}

.app-nav-btn {
    background: transparent;
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.app-nav-btn.special-pink {
    background-color: #CE466C !important;
    border-color: #CE466C !important;
    box-shadow: 0 2px 6px rgba(206, 70, 108, 0.4);
    color: white !important;
}

.app-nav-btn.special-pink:hover {
    background-color: #b03858 !important;
}

.app-nav-btn.special-orange {
    background-color: #EB974A !important;
    color: #16224A !important;
    border-color: #EB974A !important;
    box-shadow: 0 2px 6px rgba(235, 151, 74, 0.4);
    font-weight: 700;
}

.app-nav-btn.special-orange:hover {
    background-color: #d6853a !important;
}

/* Desktop Only - Hide on mobile */
.desktop-only {
    display: flex;
}

@media (max-width: 991px) {
    .desktop-only {
        display: none !important;
    }
}

/* ====================
   Example Home CSS
   ==================== */
.featured-section-bg {
    background-image: url('../../images/figma/bg2-op.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 4rem 0;
    margin: 0;
    position: relative;
    z-index: 2;
    width: 100%;
    overflow: hidden;
}

.content-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Featured Cards Grid - específico para anuncios destacados */
.featured-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

/* Mobile: Horizontal swipeable slider */
@media (max-width: 768px) {
    .featured-cards-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        padding: 0 1rem 1rem;
        scrollbar-width: none;
        flex-wrap: nowrap !important;
    }
    
    .featured-cards-grid::-webkit-scrollbar {
        display: none;
    }
    
    .featured-cards-grid .featured-card {
        scroll-snap-align: center;
        flex: 0 0 85% !important;
        min-width: 280px;
        max-width: 320px;
        flex-shrink: 0 !important;
    }
}

/* Loading dentro de featured section */
.featured-section-bg .loading {
    text-align: center;
    padding: 3rem 1rem;
}

.featured-section-bg .loading p {
    color: white;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.featured-section-bg .spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
}

@media (max-width: 768px) {
    /* .featured-cards-grid ya está definido arriba como slider horizontal */
    
    .section-title-new h2 {
        font-size: 2rem;
    }
    
    .featured-section-bg {
        padding: 3rem 0;
    }
}

/* Map Section Background */
#mapa {
    background-image: url('../../images/figma/bg-op.png') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    margin-top: -10px;
    /* Overlap with previous section */
    padding-bottom: 2rem;
    z-index: 3;
}

/* Eventos Section with Background */
#eventos {
    background-image: url('../../images/figma/bg-cards.png') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 3rem 0;
    position: relative;
    margin-top: -20px;
    /* Overlap with Store CTA */
    z-index: 4;
}

.events-header {
    text-align: center;
    margin-bottom: 2rem;
}

.events-header h2 {
    color: #CE466C;
    /* Pink/Red from image */
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-transform: none;
    /* Ensure natural case */
}

.events-header p {
    color: white;
    /* White text */
    font-size: 1.1rem;
    margin: 0.2rem 0;
    line-height: 1.4;
}

/* Store CTA Section */
.store-cta-section {
    background-image: url('../../images/figma/bg-medium.png');
    background-size: cover;
    /* Use cover to ensure it fills width. 100% 100% might distort. */
    background-position: center;
    background-repeat: no-repeat;
    padding: 6rem 1rem;
    /* Increased padding */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    margin-bottom: 0;
    /* Remove bottom margin */
    margin-top: -20px;
    /* Overlap with Map */
    position: relative;
    z-index: 3;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

/* Specific adjustments for Community CTA at bottom */
.store-cta-section.community-cta {
    margin-top: -20px;
    /* Overlap with Eventos */
    margin-bottom: 0;
    z-index: 4;
    padding-bottom: 6rem;
    /* Extra padding at bottom to visually connect with footer if needed, or overlap handles it */
}

.store-cta-section h2 {
    color: white;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.store-cta-section p {
    color: white;
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.btn-store-cta {
    background: white;
    color: #1F2548;
    /* Devir Blue */
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-store-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-store-cta strong {
    font-weight: 800;
}

/* Section Titles */
.section-title-new {
    text-align: center;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
    max-width: 1200px;
}

.section-title-new h2 {
    text-align: center;
    color: white;
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

/* If this title is actually below the torn paper (on white/light bg), it should be dark.
   User said "fondo de toda esa seccion es #16234A" for HERO. 
   "donde estan los box de evento participantes y paises lleva el fondo bg-op.png".
   Let's assume the body is #16234A around the hero, but transitions to image.
*/

/* Stats Section */
.stats-container {
    padding: 3rem 0;
    /* Use the bg-op.png if available, fallback to gradient */
    background: url('../../images/figma/bg-op.png') center/cover no-repeat, linear-gradient(135deg, #1a2a5c 0%, #16234a 100%);
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 5;
    margin-top: -50px;
    /* Overlap slightly or just sit nicely */
}

.stat-box {
    width: 200px;
    height: 120px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.stat-box:hover {
    transform: scale(1.05);
}

.stat-box.pink {
    background: linear-gradient(135deg, #EB7A9A 0%, #DD6083 50%, #F82D98 100%);
}

.stat-box.orange {
    background: var(--devir-orange);
    /* The box itself is orange? User said "color naranja: #EB974A" */
}

.stat-number-slot {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
    display: block;
}

.stat-label-slot {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.stat-box.orange .stat-label-slot,
.stat-box.orange .stat-number-slot {
    color: var(--devir-orange-text);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .stats-container {
        gap: 1rem;
        padding: 2rem 1rem;
        flex-direction: column;
        align-items: center;
    }

    .stat-box {
        width: 100%;
        max-width: 200px;
        height: 100px;
    }

    .stat-number-slot {
        font-size: 2rem;
    }

    .store-cta-section {
        padding: 3rem 1rem;
    }

    .store-cta-section h2 {
        font-size: 1.6rem;
    }

    .store-cta-section p {
        font-size: 1rem;
    }

    .btn-store-cta {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .events-header {
        padding: 0 1rem;
    }

    .events-header h2 {
        font-size: 1.8rem;
    }

    .events-header p {
        font-size: 1rem;
    }

    #eventos {
        padding: 2rem 0;
    }

    #mapa {
        padding: 1rem 0;
    }

    .map-container {
        margin: 1rem 0;
    }

    .map-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .map-header h3 {
        font-size: 1.2rem;
        text-align: center;
    }

    .map-filters {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .map-filters select,
    .custom-select-wrapper {
        width: 100%;
        min-width: 100%;
    }

    #eventos-map {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .section-title-new h2 {
        font-size: 1.6rem;
        padding: 0 0.5rem;
    }

    .featured-section-bg {
        padding: 2rem 0;
    }

    /* featured-cards-grid es slider horizontal - no sobrescribir aquí */

    .featured-card {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
        min-height: auto;
    }

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

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

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

    .stats-container {
        padding: 1.5rem 0.5rem;
    }

    .stat-box {
        max-width: 100%;
        height: 90px;
    }

    .stat-number-slot {
        font-size: 1.8rem;
    }

    .stat-label-slot {
        font-size: 0.7rem;
    }

    .store-cta-section {
        padding: 2rem 0.75rem;
    }

    .store-cta-section h2 {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    .store-cta-section p {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .store-cta-section.community-cta {
        padding: 2rem 0.75rem;
    }

    #mapa {
        padding: 1rem 0;
    }

    #eventos {
        padding: 1.5rem 0;
    }

    .events-header h2 {
        font-size: 1.5rem;
    }

    .map-header h3 {
        font-size: 1.1rem;
    }

    #eventos-map {
        height: 350px;
    }
}