/* =============================================
   ESTILOS GENERALES
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #DC143C;
    --color-dark: #1a1a1a;
    --color-light: #f5f5f5;
    --color-text: #333;
    --color-border: #ddd;
    --color-hover: #B71C1C;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--color-text);
    background-color: var(--color-light);
}

/* =============================================
   HEADER Y NAVEGACIÓN
   ============================================= */
header {
    background: transparent;
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 10000px;
    width: auto;
    margin-right: 1rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    display: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex: 1;
    margin-left: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

nav a:hover {
    color: var(--color-primary);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

.header-buttons {
    display: flex;
    gap: 1rem;
}

.header-buttons button {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.5rem;
}

.header-buttons button:hover {
    color: var(--color-primary);
}

/* =============================================
   CARRUSEL DE PELÍCULAS
   ============================================= */
.carrusel-section {
    background: transparent;
    color: white;
    padding: 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.carrusel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    width: 100%;
    padding: 0;
    position: relative;
    height: 100vh;
    min-height: 100vh;
}

.carrusel-button {
    background: rgba(220, 20, 60, 0.8);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    z-index: 10;
}

.carrusel-button:hover {
    background: var(--color-primary);
    transform: scale(1.1);
}

.carrusel-button.prev {
    left: 2rem;
}

.carrusel-button.next {
    right: 2rem;
}

.carrusel-content {
    width: 100%;
    height: 100%;
}

.pelicula-destacada {
    display: flex;
    gap: 0;
    align-items: flex-end;
    position: relative;
    width: 100%;
    height: 100%;
}

.pelicula-destacada .pelicula-poster {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.pelicula-destacada .pelicula-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pelicula-destacada .pelicula-poster:hover {
    transform: none;
}

.pelicula-info {
    flex: 1;
    padding: 0;
    position: absolute;
    z-index: 5;
    background: transparent;
    width: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    bottom: auto;
    left: 17.5rem;
    top: 65%;
    transform: translateY(-50%);
}

.pelicula-info h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: none;
    font-weight: 700;
    display: block;
    width: fit-content;
    line-height: 1.1;
}

.titulo-destacado {
    background: var(--color-primary);
    padding: 0.8rem 0.4rem;
    display: inline;
    margin-right: 0;
    line-height: 1;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    padding-top: 0.8rem;
    padding-bottom: 0rem;
}

.pelicula-info p {
    font-size: 1.3rem;
    line-height: 1.6;
    max-width: 500px;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* =============================================
   FILTROS
   ============================================= */
.filtros-section {
    background: #f5f5f5;
    padding: 3rem 4rem;
    margin-bottom: 1rem;
    box-shadow: none;
}

.filtros-container {
    max-width: 850px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 0;
    align-items: center;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filtro-grupo {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0.8rem;
    border-right: 1px solid #e0e0e0;
}

.filtro-grupo:last-of-type {
    border-right: none;
}

.filtro-grupo label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #0a3a6b;
    font-size: 1rem;
}

.filtro-grupo select {
    width: 100%;
    padding: 0.2rem 0.2rem;
    border: none;
    border-radius: 0;
    font-size: 0.9rem;
    background: white;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.2em;
    padding-right: 1.5rem;
}

.filtro-grupo select:hover {
    border: none;
    background-color: transparent;
}

.filtro-grupo select:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.btn-filtrar,
.btn-limpiar {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
    height: fit-content;
}

.btn-filtrar {
    background: #c0c0c0;
    color: white;
    padding: 0.50rem 1.5rem;
    margin: 0.50rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.btn-filtrar:hover {
    background: #a8a8a8;
    transform: none;
    box-shadow: none;
}

.btn-filtrar.active {
    background: #0052CC;
}

.btn-limpiar {
    background: transparent;
    color: #666;
    border: none;
    display: none;
}

/* =============================================
   PELÍCULAS CARTELERA
   ============================================= */
.peliculas-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.peliculas-header {
    margin-bottom: 2rem;
}

.peliculas-header h2 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: #d6d7da;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: capitalize;
}

.tabs {
    display: flex;
    gap: 2rem;
    border-bottom: 2px solid #ddd;
    padding-bottom: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn.active {
    color: #333;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-primary);
}

.peliculas-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.peliculas-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.9rem;
    row-gap: 0.5rem;
    padding: 2rem;
}

.pelicula-card:first-child {
    grid-row: 1 / 3;
    grid-column: 1;
}

.pelicula-card:first-child .pelicula-card-poster {
    height: 100%;
    min-height: 580px;
}

.pelicula-card:first-child .pelicula-card-poster img {
    object-fit: contain;
}

.pelicula-card:nth-child(2) {
    grid-row: 1;
    grid-column: 2;
}

.pelicula-card:nth-child(3) {
    grid-row: 2;
    grid-column: 2;
}

.pelicula-card:nth-child(4) {
    grid-row: 1;
    grid-column: 3;
}

.pelicula-card:nth-child(5) {
    grid-row: 2;
    grid-column: 3;
    height: auto;
    flex: 1;
}

.pelicula-card:nth-child(n+6) {
    display: none;
}

.pelicula-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.pelicula-card:not(:first-child) {
    height: 300px;
    aspect-ratio: 2 / 3;
}

.pelicula-card:not(:first-child) .pelicula-card-poster {
    height: 100%;
}

.pelicula-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.pelicula-card-poster {
    width: 100%;
    height: 100%;
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

.pelicula-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pelicula-card:hover .pelicula-card-poster img {
    transform: scale(1.08);
}

.pelicula-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    flex-wrap: wrap;
}

.pelicula-card:hover .pelicula-card-overlay {
    opacity: 1;
}

.pelicula-btn-comprar {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-hover) 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.4);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.5px;
}

.pelicula-btn-comprar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.6);
}

.pelicula-card-info {
    padding: 1.5rem;
    flex: 1;
    display: none;
    flex-direction: column;
}

.pelicula-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: var(--color-dark);
    line-height: 1.4;
    font-weight: 600;
}

.pelicula-card-details {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.pelicula-card-details strong {
    color: var(--color-dark);
    font-weight: 600;
}

.pelicula-card-rating {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.ver-mas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    grid-column: 3;
    grid-row: 1.33 / 2.33;
}

.btn-ver-mas {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 2rem 1rem;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    font-weight: 700;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    flex-direction: column;
    min-height: 280px;
    gap: 1rem;
}

.btn-ver-mas:hover {
    background: var(--color-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.4);
}

.ver-mas-container-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    width: 100%;
}

.btn-ver-mas-bottom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 3rem;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    font-weight: 700;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.btn-ver-mas-bottom:hover {
    background: var(--color-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.4);
}

/* =============================================
   FOOTER
   ============================================= */
footer {
    background: var(--color-dark);
    color: white;
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.7rem;
}

.footer-section a {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: #888;
    font-size: 0.9rem;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1200px) {
    .carrusel-container {
        flex-direction: column;
        gap: 2rem;
    }

    .carrusel-button {
        order: unset !important;
    }

    .carrusel-content {
        order: unset !important;
        width: 100%;
    }

    .pelicula-destacada {
        flex-direction: column;
    }

    .pelicula-info h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
    }

    nav ul {
        gap: 1rem;
        font-size: 0.85rem;
        margin-left: 1rem;
    }

    .filtros-container {
        flex-direction: column;
    }

    .filtro-grupo {
        min-width: unset;
    }

    .peliculas-container {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        gap: 1.5rem;
        padding: 0;
    }

    .pelicula-card:first-child {
        grid-row: 1 / 3;
        grid-column: 1;
    }

    .pelicula-card:first-child .pelicula-card-poster {
        min-height: 380px;
    }

    .pelicula-card:not(:first-child) .pelicula-card-poster {
        height: 190px;
    }

    .pelicula-info h2 {
        font-size: 1.5rem;
    }

    .peliculas-header h2 {
        font-size: 2rem;
    }

    .carrusel-button {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    nav ul {
        display: none;
    }

    .peliculas-section h2 {
        font-size: 1.5rem;
    }

    .peliculas-container {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 1rem;
    }

    .filtros-section {
        padding: 1rem;
    }

    .pelicula-info h2 {
        font-size: 1.2rem;
    }

    .pelicula-info p {
        display: none;
    }
}
