/* ---------- VARIABLES ---------- */
:root {
  --color-primario: #007bff;
  --color-fondo: #f4f4f4;
  --color-texto: #333;
  --color-footer: #4D5BF9;
  --color-blanco: #fff;
  --sombra: 0 2px 6px rgba(0,0,0,0.2);
}

/* --------------------------------- */
/* Estilos Globales y Componentes */
/* --------------------------------- */
body {
    font-family: Arial, sans-serif;
    background: var(--color-fondo);
    color: var(--color-texto);
    margin: 0;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}


/* --------------------------------- */
/* Estilos de Encabezado (index.php) */
/* --------------------------------- */
header {
    position: relative;
    width: 100%;
    margin-top: 5px;
    margin-bottom: 1px;
    display: flex;
    justify-content: flex-end;
    gap: 10px; /* espacio entre botones */
}
.menu {
    background-color: #1877f2;
    border-radius: 6px;
}
.menu button {
    background: none;
    border: none;
    color: white;
    font: inherit;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
}
.menu button:hover {
    background-color: #145dbf;
    border-radius: 6px;
}


/* --------------------------------- */
/* LIGHTBOX (index.php) */
/* --------------------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.lightbox.activo {
    display: flex;
}
.lightbox-container {
    position: relative;
    background: #fff;
    max-width: 240px;
    width: 90%;
    padding: 10px;
    border-radius: 16px;
    text-align: center;
    margin-inline: 20px;
    animation: aparecer .3s ease;
}
.lightbox-logo img {
    width: 100%;
    max-width: 100px;
    border-radius: 50px;
}
.lightbox-enlace img {
    width: 100%;
    max-width: 140px;
    border-radius: 10px;
}
/* ANIMACIÓN */
@keyframes aparecer {
    from { transform: scale(.9); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}


/* --------------------------------- */
/* Foto Presentacion (index.php) */
/* --------------------------------- */
.foto-presentacion {
    position: relative;
    width: 100%;
    height: 250px;
    margin-top: 5px;
    margin-bottom: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('img/moteros_bercianos.webp') center/cover no-repeat;
    color: var(--color-blanco);
    text-align: center;
    border-radius: 15px;
    overflow: hidden;
}
.foto-presentacion img {
    position: absolute;
    object-fit: contain;
    z-index: 2;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 35%;
    max-width: 300px;
}


/* -------------------------------------- */
/* Escudos Video Presentacion (index.php) */
/* -------------------------------------- */
.video-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 6vw;
    flex-direction: row;
}

.video-presentacion {
    width: 100%;
    max-width: 100%;
}
.escudo img {
    width: 14vw;
    max-width: 240px;
    min-width: 160px;
}

.video-presentacion video {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 14px;
    display: block;
    object-fit: cover;
}
.textos-credit {
    font-size: 1.2rem;
    color: #111;
    font-style: italic;
    text-align: center;
}


/* --------------------------------- */
/* Separador Imagenes (index.php) */
/* --------------------------------- */
.separador {
    max-width: 1200px;
    margin: 50px auto 20px auto;
    background: var(--color-footer);
    color: var(--color-blanco);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 15px;
    text-align: center;
    transition: box-shadow 0.3s ease, border 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.separador h2 {
    font-size: 24px;
    font-weight: 400;
    margin: 0;
}


/* --------------------------------- */
/* Imagenes Eventos (index.php) */
/* --------------------------------- */
/* Cards */
.eventos-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    padding: 20px;
    justify-content: center;
    align-items: center;
}

.evento {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 4px 10px rgba(0,0,0,.3);
    transition: transform .3s ease;
}

.evento:hover {
    transform: translateY(-6px);
}

.evento img {
    width: 100%;
    display: block;
}

.evento h3 {
    text-align: center;
    color: #fff;
    margin: 0;
    padding: 8px;
    font-size: 1rem;
}
.lightbox_eventos {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox_eventos.activo {
    display: flex;
}

.lightbox_eventos img {
    max-width: 95%;
    max-height: 95%;
}
/* Flechas */
.lb-prev, .lb-next {
    position: absolute;
    top: 50%;
    font-size: 60px;
    color: #fff;
    cursor: pointer;
    user-select: none;
    transform: translateY(-50%);
    z-index: 10;
    padding: 10px;
}
.lb-prev:hover, .lb-next:hover {
    color: #ddd;
}

/* --------------------------------- */
/* Estilos de Pestañas (index.php) */
/* --------------------------------- */
.tabs {
    margin-top: 30px;
}
.tab-buttons {
    display: flex;
    flex-wrap: wrap; 
    gap: 5px; 
    margin-bottom: 20px;
    border-bottom: 3px solid #ccc; 
}
.tab-button {
    background: #e9ecef; 
    color: var(--color-texto);
    padding: 10px 18px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600; 
    border-radius: 6px 6px 0 0; 
    transition: background-color 0.3s ease, color 0.3s ease;
    outline: none;
    position: relative;
    margin-bottom: -3px; 
}
.tab-button:hover {
    background: #dee2e6; 
}
.tab-button.active {
    background: var(--color-primario); 
    color: var(--color-blanco); 
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); 
    z-index: 2; 
    border-bottom: 3px solid var(--color-primario); 
}
.tab-content {
    display: none; 
    padding: 20px 0;
    animation: fadeIn 0.5s ease-out; 
}
.tab-content.active {
    display: block; 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* --------------------------------- */
/* FOOTER (index.php) */
/* --------------------------------- */
footer {
    max-width: 1200px;
    margin: 50px auto 20px auto;
    background: var(--color-footer);
    color: var(--color-blanco);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 15px;
    text-align: center;
    transition: box-shadow 0.3s ease, border 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
footer:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
footer div {
    display: flex;
    justify-content: center;
    align-items: center;
}
footer h2 {
    font-size: 18px;
    font-weight: 400;
    margin: 0;
}
footer a {
    color: var(--color-blanco);
    text-decoration: none;
    font-weight: 400;
    margin-left: 5px;
    transition: color 0.3s, text-decoration 0.3s;
}
footer a:hover {
    color: #ffc107;
    text-decoration: underline;
}


/* --------------------------------- */
/* Estilos de Listado de Álbumes (index.php) */
/* --------------------------------- */
.album-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.album {
    background: var(--color-blanco);
    border-radius: 10px;
    box-shadow: var(--sombra);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.album:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.album img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.album-title {
    padding: 15px;
    text-align: center;
    font-size: 30px;
    font-weight: bold;
    color: var(--color-texto);
}
.album a {
    text-decoration: none;
    color: inherit;
    display: block;
}


/* --------------------------------- */
/* Estilos de Listado de Álbumes (index.php) */
/* --------------------------------- */
.album-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.album {
    background: var(--color-blanco);
    border-radius: 10px;
    box-shadow: var(--sombra);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.album:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.album img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.album-title {
    padding: 15px;
    text-align: center;
    font-size: 30px;
    font-weight: bold;
    color: var(--color-texto);
}
.album a {
    text-decoration: none;
    color: inherit;
    display: block;
}


/* --------------------------------- */
/* Estilos Específicos de Álbum (album.php) */
/* --------------------------------- */
/* H1 ya definido, solo ajustamos margen y texto-alineación */
h1 {
    font-size: clamp(30px, 5vw, 40px);
    margin-bottom: 20px;
    text-align: center;
}
.album-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 20px;
}
.back-btn,
.slideshow-btn {
    display: inline-flex;
    align-items: center;
    background: #007bff;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    gap: 2px;
    font-size: 24px;
}
.back-btn:hover,
.slideshow-btn:hover {
    background: #0056b3;
}
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: left;
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: var(--sombra);
    transition: transform 0.2s;
}
.gallery-item:hover {
    transform: scale(1.03);
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.35);
}
.gallery-card, .video-wrapper {
    border-radius: 12px;
    box-shadow: var(--sombra);
}
.video-wrapper {
    position: relative;
    display: inline-block;
}
.video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
}
.play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.play-icon svg {
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.8));
}
.like-container {
    display: flex;
    align-items: center;
}
.like-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding-right: 10px;
}
.heart {
    width: 26px;
    height: 30px;
    fill: red;
    stroke: none;
    transition: transform .2s ease, fill .2s ease;
}
.like-btn:hover .heart {
    transform: scale(1.15);
}
.like-btn.liked .heart {
    fill: white;
    stroke: red;
    stroke-width: 2;
    transform: scale(1.15);
}
.like-count {
    font-size: 26px;
    font-weight: bold;
}


/* --------------------------------- */
/* Lightbox (album.php) */
/* --------------------------------- */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    flex-direction: column;
}
#lightbox img,
#lightbox video {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
}
.lb-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background-color: #dc3545; /* Rojo más estándar */
    border: none;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.lb-close:hover {
    background-color: #c82333; 
    transform: scale(1.1);
}
.close-svg {
    width: 70%;
    height: 70%;
    stroke: var(--color-blanco);
    stroke-width: 3;
    stroke-linecap: round;
    fill: none;
}
.lb-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background-color: var(--color-blanco);
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
    transition: transform 0.2s ease;
}
.lb-btn:hover {
    background-color: var(--color-primario);
}
.lb-prev { left: 50px; }
.lb-next { right: 50px; }
#counter {
    position: relative;
    margin-top: 15px;
    color: var(--color-blanco);
    font-size: 32px;
    text-align: center;
}
.download-btn, .play-pause-btn {
    position: absolute;
    width: 60px;
    height: 60px;
    background-color: var(--color-primario); 
    border: none;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    z-index: 1100;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.download-btn {
    right: 10px;
    bottom: 10px;
}
.play-pause-btn {
    left: 10px;
    bottom: 10px;
}
.download-btn:hover, .play-pause-btn:hover {
    background-color: #0056b3; 
    transform: scale(1.1);
}
.download-svg, .play-pause-svg {
    width: 70%;
    height: 70%;
    stroke: var(--color-blanco);
    fill: var(--color-blanco);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ------------------------- */
/* Galería Favoritos Top 10  */
/* ------------------------- */
.fav_top10-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    justify-items: center;
}
.fav_gallery-card {
    position: relative;
    width: 100%;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fav_gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.35);
}
.fav_gallery-card img,
.fav_gallery-card video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
}
.fav_gallery-card p {
    text-align: center;
    font-weight: bold;
    color: #333;
}
.fav_btn-album {
    display: inline-block;
    padding: 8px 16px;
    background-color: #1877f2; /* azul Facebook */
    color: white;
    font-weight: bold;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
    margin-bottom: 5px;
    font-size: 0.95rem;
}
.fav_btn-album:hover {
    background-color: #145db2;
    transform: translateY(-2px);
}


/* --------------------------------- */
/* Responsive Adicional */
/* --------------------------------- */
@media (orientation: landscape) {
    /* Ajustes para Lightbox en móvil index.php */
    .video-layout {
        flex-direction: row;
        gap: 3vw;
    }
    .escudo img {
        width: 14vw;
        max-width: 240px;
        min-width: 160px;
    }
    .video-presentacion {
        width: 60vw;
        max-width: none;
    }
}


@media (max-width: 768px) {
    /* Ajustes para Lightbox en móvil index.php */
    header {
        justify-content: center;
    }
    .foto-presentacion img {
        width: 100%;
    }
    .video-layout {
        padding-top: 50px;
        flex-direction: column;
        gap: 6px;
    }
    .video-presentacion {
        max-width: 100%;
    }
    .album img { height: 160px; }
    .album-title { font-size: 20px; }
    .tab-button {
        font-size: 18px;
         padding: 8px 12px;
    }
    footer {
        margin: 30px 10px 10px 10px;
    }
    footer h2 {
        font-size: 18px;
    }
    footer a {
        font-size: 18px;
    }
    
    /* Ajustes para Lightbox en móvil favoritos.php */
    .top10-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
        padding: 15px;
    }
    .fav_gallery-card img,
    .fav_gallery-card video {
        height: 180px;
    }
    
    /* Ajustes para Lightbox en móvil album.php */
    .lb-btn { 
        width: 40px; 
        height: 40px; 
        left: 10px;
    }
    .lb-next {
        right: 10px;
        left: auto;
    }
    .lb-prev {
        left: 10px;
    }
    .lb-close, .download-btn, .play-pause-btn {
        width: 40px;
        height: 40px;
    }
    #counter {
        font-size: 24px;
        margin-top: 10px;
    }
}