/* Estilos globales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    color: white;
    background-color: black;
    position: relative;
    overflow-x: hidden;
}

/* Degradado en el encabezado */
header {
    background: linear-gradient(to bottom, rgba(255, 0, 0, 1), rgba(255, 0, 0, 0));
    padding: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Texto del encabezado */
.header-texto {
    flex: 1;
    text-align: center;
    font-size: 1rem;
    color: white;
    padding: 0 12px;
    font-style: italic;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
    line-height: 1.3;
}

/* Carrusel */
#carrusel-wrapper {
    width: 100%;
    overflow: hidden;
    background: #000;
}

#carrusel {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: 420px;
}

#carrusel-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s ease-in-out;
    will-change: transform;
}

.carrusel-slide {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.carrusel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 1.6rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.carrusel-btn:hover { background: rgba(200, 0, 0, 0.8); }
#carrusel-prev { left: 14px; }
#carrusel-next { right: 14px; }

.carrusel-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carrusel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.25s;
    border: none;
    padding: 0;
}

.carrusel-dot.active { background: red; }

/* ===== "Ver más" en tarjetas ===== */
.card-bio {
    margin: 0 0 6px;
}

.btn-ver-mas {
    display: none; /* solo visible en móvil vía media query */
    background: none;
    border: 1px solid rgba(255,255,255,0.25);
    color: #e0e0e0;
    font-size: 0.78rem;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: border-color 0.2s, color 0.2s;
}
.btn-ver-mas:hover { border-color: red; color: #fff; }

/* ===== Botón flotante WhatsApp ===== */
.whatsapp-fab {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 9999;
    transition: transform 0.2s;
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
}
.whatsapp-fab:hover { transform: scale(1.1); }
.whatsapp-fab img { width: 60px; height: 60px; object-fit: cover; display: block; border-radius: 50%; }

header h1 {
    margin: 0;
    font-size: 2rem;
    color: white;
    text-align: left;
    padding-left: 20px;
}

/* Logo imagen en el header */
.header-logo-link {
    display: flex;
    align-items: center;
    padding-left: 16px;
    text-decoration: none;
}

.header-logo {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

/* Botón admin */
.btn-admin {
    background-color: red;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 5px;
    margin-right: 16px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-admin:hover { background-color: darkred; }

#admin-login-btn {
    background-color: red;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    margin-right: 20px;
}
#admin-login-btn:hover { background-color: darkred; }

/* Barra de navegación */
nav {
    background-color: red;
    padding: 8px 0;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 16px;
    margin: 0;
    padding: 4px 8px;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 0.95rem;
    padding: 4px 2px;
    display: block;
    white-space: nowrap;
}

nav ul li a:hover {
    text-decoration: underline;
}

/* Contenido principal */
main {
    padding: 20px;
    text-align: center;
}

main section {
    margin-bottom: 40px;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

main h2 {
    margin-bottom: 20px;
    font-size: 2rem;
    color: white;
}

/* Reproductor de música */
#reproductor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#caratula-cancion {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

#info-reproductor {
    text-align: center;
    margin-bottom: 10px;
}

#info-reproductor p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #ccc;
}

#controles-reproductor {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

#controles-reproductor button {
    background-color: red;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1rem;
}

#controles-reproductor button:hover {
    background-color: darkred;
}

#lista-canciones-select {
    width: 100%;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    border-radius: 5px;
    margin-bottom: 10px;
}

#lista-canciones-select:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Feed de artistas, eventos y merch */
#feed-artistas, #feed-eventos, #productos-merch, #feed-personal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.artista-item, .evento-item, .merch-item {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    position: relative;
}

.artista-item img, .evento-item img, .merch-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.merch-item img, .evento-item img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin: 0 auto;
}

.artista-item img:hover, .evento-item img:hover, .merch-item img:hover {
    transform: scale(1.1);
    cursor: pointer;
}

.artista-item h3, .evento-item h3, .merch-item h3 {
    margin-top: 10px;
    font-size: 1.2rem;
    color: white;
}

.artista-item p, .evento-item p, .merch-item p {
    font-size: 0.9rem;
    color: #ccc;
}

.artista-item a {
    color: red;
    text-decoration: none;
    font-weight: bold;
}

.artista-item a:hover {
    text-decoration: underline;
}

/* Sección Contacto */
#contacto {
    padding: 20px;
}

#datos-contacto p {
    font-size: 1rem;
    color: #ccc;
    margin: 10px 0;
}

#contacto-admin input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    border-radius: 5px;
}

#contacto-admin button {
    background-color: red;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1rem;
}

#contacto-admin button:hover {
    background-color: darkred;
}

/* Ventana modal para ampliar imágenes */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: red;
}

/* Degradado en el pie de página */
footer {
    background: linear-gradient(to top, rgba(255, 0, 0, 1), rgba(255, 0, 0, 0));
    padding: 20px 0;
    text-align: center;
    color: white;
}

footer p {
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE MÓVIL
   ============================================ */
@media (max-width: 600px) {

    /* Header: logo más pequeño, botón compacto */
    header {
        padding: 10px 0;
    }

    header h1 {
        font-size: 1.3rem;
        padding-left: 12px;
    }

    .header-logo {
        max-height: 42px;
    }

    .header-logo-link {
        padding-left: 12px;
    }

    .header-texto {
        font-size: 0.82rem;
        padding: 0 6px;
    }

    .btn-admin {
        padding: 6px 10px;
        font-size: 0.72rem;
        margin-right: 10px;
        border-radius: 4px;
    }

    /* Carrusel móvil — imagen completa visible */
    #carrusel { height: 200px; }
    #carrusel-track { height: 100%; }
    .carrusel-slide { height: 200px; min-width: 100%; flex-shrink: 0; }
    .carrusel-slide img { width: 100%; height: 200px; object-fit: cover; }
    .carrusel-btn { width: 34px; height: 34px; font-size: 1.1rem; }
    #carrusel-prev { left: 8px; }
    #carrusel-next { right: 8px; }

    /* "Ver más" — activo solo en móvil */
    .card-bio {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .card-bio.card-bio-expanded {
        display: block;
        -webkit-line-clamp: unset;
        overflow: visible;
    }
    .btn-ver-mas { display: inline-block; }

    /* Botón WhatsApp más pequeño en móvil */
    .whatsapp-fab { width: 50px; height: 50px; bottom: 16px; right: 16px; left: auto; }
    .whatsapp-fab img { width: 50px; height: 50px; }

    /* Nav: los ítems se distribuyen en varias líneas si no caben */
    nav {
        padding: 6px 0;
    }

    nav ul {
        gap: 0;
        padding: 2px 4px;
    }

    nav ul li {
        flex: 0 0 auto;
    }

    nav ul li a {
        font-size: 0.78rem;
        padding: 6px 8px;
    }

    /* Títulos de sección más pequeños */
    main h2 {
        font-size: 1.4rem;
    }

    main {
        padding: 12px;
    }

    main section {
        padding: 14px;
        margin-bottom: 24px;
    }

    /* Grids en columna única */
    #feed-artistas, #feed-eventos, #productos-merch, #feed-personal {
        grid-template-columns: 1fr;
    }

    /* Reproductor */
    #caratula-cancion {
        width: 120px;
        height: 120px;
    }

    #controles-reproductor button {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    nav ul li a {
        font-size: 0.72rem;
        padding: 5px 6px;
    }

    .btn-admin {
        font-size: 0.68rem;
        padding: 5px 8px;
    }

    header h1 {
        font-size: 1.15rem;
    }

    .header-logo {
        max-height: 36px;
    }
}
