/* RESET BÀSIC */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* BODY */
body {
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

/* HEADER */
header {
    background-color: #2CA0A8;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

header .logo img {
    height: 50px;
}

header nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-weight: bold;
    transition: color 0.3s;
}

header nav a:hover {
    color: #ffcc00;
}

/* FOOTER */
footer {
    background-color: #1c1c1c;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    font-size: 0.9em;
}

footer p {
    margin: 5px 0;
}

/* CONTAINERS */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
}

/* TARJETES DE PELICULES */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.movie-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.movie-card img {
    width: 100%;
    height: 300px;       /* Alçada fixa per totes les imatges */
    object-fit: cover;    /* Manté proporcions, recortant si cal */
    display: block;
}

.movie-card a {
    display: block;
    padding: 10px;
    color: #1c1c1c;
    font-weight: bold;
    text-decoration: none;
}

.movie-card a:hover {
    color: #ff6600;
}


/* LLISTES D'ACTORS I DIRECTORS */
.profile-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.profile-card {
    background-color: white;
    border-radius: 8px;
    text-align: center;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.profile-card img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    margin-bottom: 10px;
}

.profile-card h3 {
    font-size: 1.1em;
    margin-bottom: 5px;
}

.profile-card p {
    font-size: 0.9em;
    color: #666;
}

/* FILTRES I CERCA PELICULES (pelicules.php) */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.filters input[type="text"],
.filters select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.filters button {
    padding: 8px 15px;
    border: none;
    background-color: #1c1c1c;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.filters button:hover {
    background-color: #ff6600;
}

/* RESPONSIU */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    header nav {
        margin-top: 10px;
    }

    .movies-grid,
    .profile-list {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

/* CONTENIDOR DE LLISTA (actors i directors) */
.llista {
    width: 90%;
    max-width: 800px;
    margin: 20px auto;
    padding: 10px;
}

/* ELEMENT INDIVIDUAL DE LLISTA */
.element-llista {
    background-color: white;
    margin-bottom: 10px;
    padding: 12px 15px;
    border-radius: 6px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* HOVER SUAU */
.element-llista:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

/* ENLLAÇOS DE LA LLISTA */
.element-llista a {
    color: #1c1c1c;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
}

.element-llista a:hover {
    color: #ff6600;
}


/* PÀGINA DE DETALL DE PEL·LÍCULA */
.movie-detail-container {
    max-width: 1000px;
    margin: 30px auto;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.movie-detail-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.movie-detail-header img {
    width: 260px;
    border-radius: 10px;
}

.movie-info {
    flex: 1;
}

.movie-info h1 {
    margin-bottom: 10px;
}

.movie-info p {
    margin: 5px 0;
}

/* ACTORS & DIRECTOR LISTA */
.detail-section {
    margin-top: 25px;
}

.detail-section h2 {
    margin-bottom: 10px;
    color: #222;
}

.actor-list, .director-list {
    list-style: none;
    padding-left: 0;
}

.actor-list li,
.director-list li {
    margin-bottom: 5px;
}

/* SESSIONS */
.sessions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.sessions-table th,
.sessions-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.sessions-table th {
    background: #eee;
}

/* BOTÓ COMPRAR */
.buy-btn {
    display: inline-block;
    padding: 12px 20px;
    background-color: #1c1c1c;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 15px;
    transition: background 0.3s;
}

.buy-btn:hover {
    background-color: #ff6600;
}


/* LLISTA VERTICAL ACTORS I DIRECTORS */
.llista-vertical {
    max-width: 800px;
    margin: 20px auto;
    padding: 10px;
}

.llista-vertical .fila {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.llista-vertical .fila:last-child {
    border-bottom: none;
}

.llista-vertical .nom {
    font-weight: 600;
    color: #222;
}

.llista-vertical .pelicula {
    font-weight: bold;
    font-style: italic;
    color: #0066cc;
    text-decoration: none;
}

.llista-vertical .pelicula:hover {
    text-decoration: underline;
}


/* ----------- CONTENIDOR GENERAL DEL FORMULARI ----------- */
.formulari {
    max-width: 450px;
    margin: 60px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-family: Arial, sans-serif;
}

.formulari h1 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 26px;
    color: #333;
}

/* ----------- LLISTAT D'ERRORS I MISSATGES ----------- */
.error {
    background: #ffdddd;
    color: #b00000;
    border: 1px solid #cc0000;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.success {
    background: #ddffdd;
    color: #006600;
    border: 1px solid #00aa00;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* ----------- FORMULARI I LABELS ----------- */
.formulari form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.formulari label {
    font-weight: bold;
    margin-bottom: 3px;
}

/* ----------- INPUTS ----------- */
.formulari input[type="text"],
.formulari input[type="email"],
.formulari input[type="password"] {
    padding: 10px;
    border: 1px solid #bbb;
    border-radius: 6px;
    font-size: 16px;
    transition: 0.2s;
}

.formulari input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 4px rgba(0,123,255,0.4);
}

/* ----------- BOTONS ----------- */
.formulari button {
    padding: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 17px;
    transition: background 0.25s;
}

.formulari button:hover {
    background: #0056c2;
}

/* ----------- ENLLAÇOS ----------- */
.formulari a {
    color: #007bff;
    font-weight: bold;
    text-decoration: none;
}

.formulari a:hover {
    text-decoration: underline;
}

/* ----------- TEXT DEL PERFIL ----------- */
.formulari p {
    margin-top: 5px;
}




/* ─────────────────────────────────────────────── */
/* CONTENIDOR GENERAL */
/* ─────────────────────────────────────────────── */
.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.container h1 {
    font-size: 32px;
    margin-bottom: 25px;
    text-align: center;
}

/* ─────────────────────────────────────────────── */
/* DISSENY DEL BLOC AMB PÒSTER + INFORMACIÓ */
/* ─────────────────────────────────────────────── */
.pelicula-detall {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 40px;
}

/* ─────────────────────────────────────────────── */
/* POSTER */
/* ─────────────────────────────────────────────── */
.pelicula-poster img {
    width: 260px;             /* TOTES amb la mateixa mida */
    height: 380px;            /* proporció vertical tipus poster */
    object-fit: cover;        /* manté qualitat sense deformar */
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ─────────────────────────────────────────────── */
/* INFO DE LA PEL·LÍCULA */
/* ─────────────────────────────────────────────── */
.pelicula-info {
    flex: 1;
    margin-left: 50px;
}

.pelicula-info h2,
.pelicula-info h3 {
    margin-top: 15px;
    margin-bottom: 8px;
    color: #333;
}

.pelicula-info p {
    margin-bottom: 10px;
    line-height: 1.5em;
}

.pelicula-info ul {
    margin: 5px 0 15px 18px;
}

/* ─────────────────────────────────────────────── */
/* TAULA DE SESSIONS */
/* ─────────────────────────────────────────────── */
.sessions-taula {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.sessions-taula th {
    background: #007bff;
    color: white;
    padding: 12px;
    text-align: left;
    font-size: 15px;
}

.sessions-taula td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.sessions-taula tr:hover {
    background: #f2f7ff;
}

/* ─────────────────────────────────────────────── */
/* BOTÓ COMPRAR */
/* ─────────────────────────────────────────────── */
.btn-comprar {
    background: #28a745;
    color: white;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.25s;
}

.btn-comprar:hover {
    background: #1e7e34;
}

/* ─────────────────────────────────────────────── */
/* RESPONSIVE */
/* ─────────────────────────────────────────────── */
@media (max-width: 800px) {
    .pelicula-detall {
        flex-direction: column;
        align-items: center;
    }

    .pelicula-poster img {
        width: 70%;
        height: auto;
    }

    .pelicula-info {
        text-align: center;
    }
}




.mapa-sala {
    border-collapse: collapse;
    margin: 20px 0;
}

.mapa-sala td {
    padding: 5px;
    text-align: center;
}

.mapa-sala input[type="radio"] {
    display: none;
}

.mapa-sala label {
    display: inline-block;
    width: 50px;
    height: 35px;
    line-height: 35px;
    border: 1px solid #bbb;
    border-radius: 6px;
    cursor: pointer;
    background: #e0f0ff;
    transition: background 0.2s;
}

.mapa-sala label.lliure:hover {
    background: #007bff;
    color: white;
}

.mapa-sala input[type="radio"]:checked + label {
    background: #28a745;
    color: white;
    font-weight: bold;
}

.mapa-sala label.ocupada {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}


.llistes_titol {
    text-align: center;
    margin-top: 15px;
}