/* Maps Fullscreen Section */
.maps-fullscreen-section {
    position: fixed;
    top: 60px; /* Empezar después del header */
    left: 0;
    width: 100%;
    height: calc(100vh - 60px); /* Restar altura del header */
    z-index: 5;
    background: radial-gradient(1200px 400px at 30% -10%, rgba(255, 255, 255, .05), transparent 60%),
        radial-gradient(800px 400px at 80% 10%, rgba(255, 255, 255, .04), transparent 60%),
        linear-gradient(180deg, #0c1b57, #07103a 35%, #020826 100%);
    overflow: hidden;
}

.maps-fullscreen-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Japan Map Section (legacy - kept for compatibility) */
.japan-map-section {
    padding: 60px 0;
    min-height: 80vh;
}

.japan-map-section .section-heading {
    text-align: center;
    margin-bottom: 40px;
}

.japan-map-section .section-heading h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #f5f5f7;
}

.japan-map-section .page-content {
    max-width: 800px;
    margin: 0 auto 40px;
    color: rgba(245, 245, 247, 0.8);
}

.japan-map-container {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Legacy support for non-fullscreen mode */
.maps-fullscreen-section .japan-map-container {
    gap: 0;
}

@media (min-width: 1200px) {
    .maps-fullscreen-section .japan-map-container {
        padding: 0;
    }
}
.prefecture-count {
    display: none;
}
.japan-map-wrapper {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.japan-map-svg {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: block;
    pointer-events: bounding-box;
    /* Asegurar que el SVG mantenga su aspecto proporcional */
    object-fit: contain;
    /* Para navegadores que no soportan aspect-ratio, el viewBox hará el trabajo */
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.prefecture {
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.9;
    pointer-events: all;
    fill: #4a90e2;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 1;
}

/* Colores por regiones - Tohoku (Norte) */
.prefecture[data-prefecture="Hokkaido"] { fill: #5dade2; }
.prefecture[data-prefecture="Aomori"] { fill: #5dade2; }
.prefecture[data-prefecture="Iwate"] { fill: #5dade2; }
.prefecture[data-prefecture="Miyagi"] { fill: #5dade2; }
.prefecture[data-prefecture="Akita"] { fill: #5dade2; }
.prefecture[data-prefecture="Yamagata"] { fill: #5dade2; }
.prefecture[data-prefecture="Fukushima"] { fill: #5dade2; }

/* Kanto (Este) */
.prefecture[data-prefecture="Ibaraki"] { fill: #3498db; }
.prefecture[data-prefecture="Tochigi"] { fill: #3498db; }
.prefecture[data-prefecture="Gunma"] { fill: #3498db; }
.prefecture[data-prefecture="Saitama"] { fill: #3498db; }
.prefecture[data-prefecture="Chiba"] { fill: #3498db; }
.prefecture[data-prefecture="Tokyo"] { fill: #e74c3c; }
.prefecture[data-prefecture="Kanagawa"] { fill: #3498db; }

/* Chubu (Centro) */
.prefecture[data-prefecture="Niigata"] { fill: #52b3d9; }
.prefecture[data-prefecture="Toyama"] { fill: #52b3d9; }
.prefecture[data-prefecture="Ishikawa"] { fill: #52b3d9; }
.prefecture[data-prefecture="Fukui"] { fill: #52b3d9; }
.prefecture[data-prefecture="Yamanashi"] { fill: #52b3d9; }
.prefecture[data-prefecture="Nagano"] { fill: #52b3d9; }
.prefecture[data-prefecture="Gifu"] { fill: #52b3d9; }
.prefecture[data-prefecture="Shizuoka"] { fill: #52b3d9; }
.prefecture[data-prefecture="Aichi"] { fill: #52b3d9; }

/* Kansai (Oeste central) */
.prefecture[data-prefecture="Mie"] { fill: #1abc9c; }
.prefecture[data-prefecture="Shiga"] { fill: #1abc9c; }
.prefecture[data-prefecture="Kyoto"] { fill: #1abc9c; }
.prefecture[data-prefecture="Osaka"] { fill: #e74c3c; }
.prefecture[data-prefecture="Hyogo"] { fill: #1abc9c; }
.prefecture[data-prefecture="Nara"] { fill: #1abc9c; }
.prefecture[data-prefecture="Wakayama"] { fill: #1abc9c; }

/* Chugoku (Oeste) */
.prefecture[data-prefecture="Tottori"] { fill: #16a085; }
.prefecture[data-prefecture="Shimane"] { fill: #16a085; }
.prefecture[data-prefecture="Okayama"] { fill: #16a085; }
.prefecture[data-prefecture="Hiroshima"] { fill: #16a085; }
.prefecture[data-prefecture="Yamaguchi"] { fill: #16a085; }

/* Shikoku (Isla pequeña) */
.prefecture[data-prefecture="Tokushima"] { fill: #27ae60; }
.prefecture[data-prefecture="Kagawa"] { fill: #27ae60; }
.prefecture[data-prefecture="Ehime"] { fill: #27ae60; }
.prefecture[data-prefecture="Kochi"] { fill: #27ae60; }

/* Kyushu (Sur) */
.prefecture[data-prefecture="Fukuoka"] { fill: #2ecc71; }
.prefecture[data-prefecture="Saga"] { fill: #2ecc71; }
.prefecture[data-prefecture="Nagasaki"] { fill: #2ecc71; }
.prefecture[data-prefecture="Kumamoto"] { fill: #2ecc71; }
.prefecture[data-prefecture="Oita"] { fill: #2ecc71; }
.prefecture[data-prefecture="Miyazaki"] { fill: #2ecc71; }
.prefecture[data-prefecture="Kagoshima"] { fill: #2ecc71; }

/* Okinawa (Islas del sur) */
.prefecture[data-prefecture="Okinawa"] { fill: #f39c12; }

.prefecture:hover {
    opacity: 1;
    filter: brightness(1.3);
    stroke-width: 2;
    stroke: rgba(255, 255, 255, 0.6);
}

.prefecture.active {
    opacity: 1;
    filter: brightness(1.4);
    stroke-width: 3;
    stroke: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Números de artículos en las prefecturas */
.prefecture-count {
    font-size: 12px;
    font-weight: 700;
    fill: #ffffff;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 4px rgba(0, 0, 0, 0.5);
    font-family: 'Gantari', sans-serif;
}

@media (min-width: 768px) {
    .prefecture-count {
        font-size: 14px;
    }
}

@media (min-width: 1024px) {
    .prefecture-count {
        font-size: 16px;
    }
}

/* Tooltip personalizado */
.japan-map-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: #f5f5f7;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transform: translate(-50%, -100%) translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.japan-map-tooltip.show {
    opacity: 1;
    transform: translate(-50%, -100%) translateY(-5px);
}

.japan-map-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* Prefecture Info Panel */
.prefecture-info {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 400px;
    max-width: calc(100% - 40px);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: calc(100vh - 160px); /* Restar altura del header + padding */
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.prefecture-info h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #f5f5f7;
    padding-right: 40px;
}

.prefecture-clubs {
    margin-bottom: 24px;
}

.prefecture-clubs-placeholder {
    padding: 20px;
    text-align: center;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    color: rgba(245, 245, 247, 0.75);
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.prefecture-club-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.prefecture-club-card {
    position: relative;
    min-height: 180px;
    border-radius: 14px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.prefecture-club-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.85) 100%);
}

.prefecture-club-card__content {
    position: relative;
    width: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #f5f5f7;
}

.prefecture-club-card__logo img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.prefecture-club-card__name {
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.prefecture-club-card__link {
    align-self: flex-start;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.4);
    color: #f5f5f7;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.prefecture-club-card__link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-2px);
}

.prefecture-club-card__link:focus-visible {
    outline: 2px solid #ffd700;
    outline-offset: 3px;
}

.close-info {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #f5f5f7;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
}

.close-info:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.prefecture-articles {
    margin-top: 20px;
}

.prefecture-articles .loading {
    text-align: center;
    padding: 40px 20px;
    color: rgba(245, 245, 247, 0.6);
}

.prefecture-articles .no-articles {
    text-align: center;
    padding: 40px 20px;
    color: rgba(245, 245, 247, 0.6);
}

/* Prefecture Tags List */
.prefecture-tags-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.prefecture-tag-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.prefecture-tag-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.prefecture-tag-item__link {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.prefecture-tag-item__logo {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.prefecture-tag-item__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.prefecture-tag-item__logo--placeholder {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(245, 245, 247, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

.prefecture-tag-item__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.prefecture-tag-item__name {
    font-size: 1rem;
    font-weight: 600;
    color: #f5f5f7;
    line-height: 1.4;
}

.prefecture-tag-item__count {
    font-size: 0.85rem;
    color: rgba(245, 245, 247, 0.7);
    font-weight: 400;
}

.article-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.article-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.article-item h3 a {
    color: #f5f5f7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-item h3 a:hover {
    color: #4a90e2;
}

.article-item .article-tags {
    font-size: 0.85rem;
    color: rgba(245, 245, 247, 0.7);
    margin-bottom: 8px;
    line-height: 1.6;
}

.article-item .article-tags .tag-link {
    color: rgba(245, 245, 247, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-item .article-tags .tag-link:hover {
    color: #4a90e2;
}

.article-item .article-meta {
    font-size: 0.9rem;
    color: rgba(245, 245, 247, 0.6);
    margin-bottom: 8px;
}

.article-item .article-excerpt {
    font-size: 0.95rem;
    color: rgba(245, 245, 247, 0.8);
    line-height: 1.6;
}

.article-item .article-thumbnail {
    margin-top: 12px;
}

.article-item .article-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    max-width: 300px;
}

/* Botón de resetear zoom */
.reset-zoom-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: #f5f5f7;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-family: 'Gantari', sans-serif;
}

.reset-zoom-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.reset-zoom-btn:active {
    transform: scale(0.98);
}

/* Responsive */
@media (max-width: 968px) {
    .japan-map-container {
        flex-direction: column;
    }
    
    .prefecture-info {
        position: absolute;
        top: 10px;
        right: 10px;
        width: calc(100% - 20px);
        max-width: none;
        max-height: calc(100vh - 140px); /* Restar altura del header + padding */
    }
    
    .japan-map-section .section-heading h1 {
        font-size: 2rem;
    }
    
    .reset-zoom-btn {
        top: 10px;
        left: 10px;
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .japan-map-section {
        padding: 40px 0;
    }
    
    .japan-map-wrapper {
        padding: 10px;
        /* Mejorar experiencia táctil en móvil */
        touch-action: pan-x pan-y pinch-zoom;
        -webkit-overflow-scrolling: touch;
    }
    
    .japan-map-svg {
        /* Permitir interacciones táctiles */
        touch-action: pan-x pan-y pinch-zoom;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .prefecture-info {
        padding: 20px;
        top: 10px;
        right: 10px;
        width: calc(100% - 20px);
    }
    
    .prefecture-info h2 {
        font-size: 1.5rem;
    }

    .prefecture-club-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

/* Zoom Controls */
.map-zoom-controls {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1001;
}

.zoom-btn {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    color: #f5f5f7;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    padding: 0;
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

.zoom-btn:active {
    transform: scale(0.95);
}

.zoom-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

@media (max-width: 968px) {
    .map-zoom-controls {
        bottom: 20px;
        left: 20px;
        gap: 10px;
    }
    
    .zoom-btn {
        width: 45px;
        height: 45px;
    }
    
    .zoom-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 768px) {
    .map-zoom-controls {
        bottom: 15px;
        left: 15px;
        gap: 8px;
    }
    
    .zoom-btn {
        width: 40px;
        height: 40px;
    }
    
    .zoom-btn svg {
        width: 18px;
        height: 18px;
    }
}

