/* ************ WIDTHS *********** */


/***********************************************/
/********** REGISTRAR-USUARI-PAGE **********/
/***********************************************/
#contenidor-registre-inici-sessio .titol{
    border-bottom: 1px solid #e5e5e5;
    font-size: 21px;
    font-weight: bold;
    margin-bottom: 1em;
    color: #333;
}

.contenidor-inici-sessio {
    margin-bottom: 1em;
}

#contenidor-registre-inici-sessio .form-group {
    width: 60%;
    /*align-items: center;*/
    margin-bottom: 1em;
}

#contenidor-registre-inici-sessio .form-group label {
    /*text-align: right;*/
    padding: 0 10px 0 10px;
}

#contenidor-registre-inici-sessio .form-group input {
    height: 40px;
    color: #565656;
    width: 100%;
}

#contenidor-registre-inici-sessio button{
    background-color: #05989f;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    margin: 5px;
}

#contenidor-registre-inici-sessio button:hover{
    background-color: rgb(219 153 0 / 88%);
}


@media screen and (max-width: 768px) {
    #contenidor-registre-inici-sessio .form-group {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    #contenidor-registre-inici-sessio .form-group label {
        text-align: left;
    }
}

/***********************************************/
/************** OFERTES-LIST.PHP ***************/
/***********************************************/

#ofertes-list {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 16px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    /*box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);*/
}

/* Estilos para los encabezados de la tabla */
#ofertes-list thead {
    background-color: #05989f;
    color: #ffffff;
}

#ofertes-list thead th {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 2px solid #05989f;
}

/* Ajuste de ancho de columnas */
#ofertes-list th:nth-child(1), /* Data */
#ofertes-list td:nth-child(1) {
    width: 15%; /* Ajusta según necesites */
    min-width: 100px;
}

/* Estilos para las filas de la tabla */
#ofertes-list tbody tr {
    border-bottom: 1px solid #ddd;
    /*transition: background-color 0.2s ease-in-out;*/
}

#ofertes-list tbody tr:nth-child(even) {
    background-color: #f9f9f9; /* Color alterno para filas */
}

/* Estilos para celdas de datos */
#ofertes-list tbody td {
    padding: 5px 8px;
}

/* Resaltado al pasar el mouse */
#ofertes-list tbody tr:hover {
    background-color: #e3f2fd;
}

/* Enlace dentro de la tabla */
#ofertes-list tbody td a {
    color: #05989f;
    text-decoration: none;
    font-weight: bold;
}

#ofertes-list tbody td a:hover {
    text-decoration: underline;
}

/* Mensaje cuando no hay ofertas */
.no-items {
    text-align: center;
    font-weight: bold;
    color: #777;
    padding: 12px;
}

#table-loader {
    text-align: center;
    padding: 20px;
    font-weight: bold;
    color: #555;
}

#oferta-loader {
    text-align: center;
    padding: 20px;
    font-weight: bold;
    color: #555;
}

.loader-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #555;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Cercador */
#buscador-ofertes-container {
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.buscador-ofertes-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.filtres-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}

.filtre {
    min-width: 200px;
    max-width: 200px;
}

.filtre label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: bold;
}

.filtre input,
.filtre select {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    color: #565656 !important;
    height: 40px !important;
}

.boto-cercar {
    width: 100%;
    margin-top: 1rem;
}

.boto-cercar button {
    padding: 0.5rem 1rem;
    font-weight: bold;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    background-color: #565656;
    color: white;
    cursor: pointer;
}

@media (max-width: 768px) {
    #search-ofertes {
        width: 100%;
    }

    #form-buscador-ofertes {
        font-size: 12px;
    }

    #form-buscador-ofertes .filtre select{
        font-size: 12px;
    }

    .filtres-row {
        display: block;
        gap: 1rem;
        width: 100%;
    }

    .filtre {
        max-width: unset;
    }

    #ofertes-list tbody tr td {
        font-size: 12px;
    }

    /* Oculta las columnas "Data" (1ª columna) y "Presencialitat" (4ª columna) */
    #ofertes-list th:nth-child(1),
    #ofertes-list td:nth-child(1),
    #ofertes-list th:nth-child(3),
    #ofertes-list td:nth-child(3) {
        display: none;
    }


}
/************** FINAL DE OFERTES-LIST.PHP ***************/


/***********************************************/
/************** REGISTRAR-USUARI-PAGE.PHP **********/
/***********************************************/
.errorsValidacioRegistreUsuari {
    color: red !important;
    font-size: 14px !important;
    flex-grow: 1;
}

#contenidor-registre-usuari .titol{
    border-bottom: 1px solid #e5e5e5;
    font-size: 21px;
    font-weight: bold;
    margin-bottom: 1em;
    color: #333;
}

#contenidor-registre-usuari .form-group {
    width: 60%;
    /*align-items: center; */
    margin-bottom: 1em;
}

#contenidor-registre-usuari .form-group label {
    /*text-align: right; */
    padding: 0 10px 0 10px;
}

#contenidor-registre-usuari .form-group input {
    height: 40px;
    color: #565656;
    width: 100%;
}

 #contenidor-drets-imatge{
    width: 100%;
    background-color: rgb(223, 240, 216);
    font-size: 12px;
    padding: 18px;
}

#radio-drets-imatge {
    display: flex;
    gap: 15px;
    align-items: start;
}

#radio-drets-imatge p {
    font-size: 14px;
    font-weight: bold;
    margin: -2px 0 0 0;
}

#contenidor-condicions-legals {
    margin: 20px 0 20px 0;
    width: 100%;
    background-color: #d9edf7;
    font-size: 12px;
    padding: 18px;
}

#check-condicions-legals {
    font-size: 14px;
    font-weight: bold;
}

#contenidor-registre-usuari button {
    background-color: #05989f;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    width: 100%;
}

@media (max-width: 768px) {
    #contenidor-registre-usuari .form-group {
        width: 100%;
        align-items: center;
        margin-bottom: 1em;
    }
}
/************** FINAL REGISTRAR-USUARI-PAGE.PHP ***************/

/***********************************************/
/************** REGISTRAR-ORGANITZACIO-PAGE.PHP **********/
/***********************************************/
.errorsValidacioRegistreOrganitzacio {
    color: red !important;
    font-size: 14px !important;
    flex-grow: 1;
    white-space: nowrap; /* Evita que el texto se divida en varias líneas */
    display: block;
}


#contenidor-registre-organitzacio .titol{
    border-bottom: 1px solid #e5e5e5;
    font-size: 21px;
    font-weight: bold;
    margin-bottom: 1em;
    color: #333;
}

.form-inline {
    display: flex;
    flex-wrap: wrap;  /* Permite que los elementos se ajusten si no caben en una línea */
    gap: 10px;
    align-items: center;
}

#contenidor-registre-organitzacio .form-group  {
    margin: 10px 0 1em;
    display: flex;
    flex-direction: column; /* Coloca los elementos en columna (label, input, error) */
    position: relative;
}

.form-group label span {
    color: red;
}

#contenidor-registre-organitzacio .form-group textarea {
    color: #565656;
}

#contenidor-registre-organitzacio .form-group input {
    height: 40px;
    color: #565656;
}

#contenidor-registre-organitzacio .nif {
    width: 140px;
}

#contenidor-registre-organitzacio .nom-comercial {
    width: 250px;
}

#contenidor-registre-organitzacio .nom-fiscal {
    width: 250px;
}

#contenidor-registre-organitzacio .cp {
    width: 90px;
}

#contenidor-registre-organitzacio .poblacio {
    width: 200px;
}

#contenidor-registre-organitzacio .telefon {
    width: 140px;
}

#contenidor-registre-organitzacio .email {
    width: 250px;
}

#contenidor-registre-organitzacio .web {
    width: 250px;
}

#contenidor-registre-organitzacio .constituida {
    width: 180px;
}

#contenidor-registre-organitzacio .num-treballadors {
    width: 160px;
}

#contenidor-registre-organitzacio .cnae {
    width: 100px;
}

#contenidor-registre-organitzacio .descripcio {
    display: flex;
    flex-direction: column;
}

#check-drets-digitals {
    font-size: 14px;
    font-weight: bold;
}

#contenidor-registre-organitzacio button#btn-enviar-registrar-organitzacio {
    background-color: #05989f;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    width: 100%;
}


/*.password-container {*/
/*    position: relative;*/
/*    display: flex;*/
/*    align-items: center;*/
/*    width: 100%;*/
/*}*/

/*.password-container input {*/
/*    padding-right: 40px; !* Espacio para el botón *!*/
/*}*/

.password-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 250px;
    max-width: 250px; /* Fija un ancho máximo para evitar que crezca */
}

.password-container input {
    width: 100%;
    max-width: 250px; /* Fija un tamaño máximo */
    flex-shrink: 0; /* Evita que el input se reduzca o crezca */
    padding-right: 40px; /* Espacio para el botón */
    font-size: 16px;
    box-sizing: border-box; /* Asegura que el padding no afecte el tamaño total */
}

.password-container .toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #555;
    width: 40px;
}

.password-container .toggle-password:focus {
    outline: none;
}

@media (max-width: 768px) {
    #contenidor-registre-organitzacio .form-inline {
        display: block;
    }

    #contenidor-registre-organitzacio .form-group {
        width: 100%;
        margin-bottom: 1em;
    }

    #contenidor-registre-organitzacio .form-group input {
        width: 100%;
    }

    .errorsValidacioRegistreOrganitzacio {
        color: red !important;
        font-size: 14px !important;
        white-space: normal;
    }
}

/************** FINAL REGISTRAR-ORGANITZACIO-PAGE.PHP ***************/

/***********************************************/
/**************** OFERTA-DETALL.PHP ***************/
/***********************************************/
#oferta-detall-page .inscriute-iniciant-sessio {
    margin: 20px 0 0 0;
    color: #155724;               /* texto verde oscuro */
    background-color: #d4edda;    /* fondo verde claro */
    border-color: #c3e6cb;        /* borde verde medio */
    padding: 15px 20px;
    font-weight: bold;
    cursor: pointer;
}

#oferta-detall-page .inscriute-iniciant-sessio a{
    color: #155724;
}

#oferta-detall-page .inscriute {
    margin: 20px 0 0 0;
    width: 100%;
}

#oferta-detall-page .inscriute a{
    width: 100%;
}

#oferta-detall-page #container-detalls-oferta {
    /* 1) Altura automática en lugar de fija */
    height: auto !important;
    max-height: none !important;
    /* 2) Mostrar toodo el contenido sin scroll */
    overflow: visible !important;
}

#oferta-detall-page #container-detalls-oferta h1 {
    font-size: 50px;
}

.torna-enrere {
    margin: 40px 0 20px 0;
}

#oferta-detall-page #taula-oferta {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: fixed;
    border-left: none;
    border-right: none;
}


/* Definir los anchos de las columnas */
#oferta-detall-page #taula-oferta th:nth-child(1),
#oferta-detall-page #taula-oferta td:nth-child(1) {
    width: 30%;

}

#oferta-detall-page #taula-oferta th:nth-child(2),
#oferta-detall-page #taula-oferta td:nth-child(2) {
    width: 70%;
}

#oferta-detall-page #taula-oferta .theader {
    text-align: left;
    padding: 8px 8px 15px 8px;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
    font-size: 16px;
}

/* Celdas de datos */
#oferta-detall-page .tdades {
    text-align: left;
    vertical-align: top; /* Alineación arriba */
    padding: 8px;
    border-top: 1px solid #ddd;
    font-size: 16px;
}

#oferta-detall-page ul{
    margin: 0;
}

/* Efecto strip (zebra) */
#oferta-detall-page #taula-oferta tr:nth-child(even) {
    background-color: rgba(5, 152, 159, 0.05); /* Color de fondo para filas pares */
}

/******* Taula creada per CEI Balaguer ******/
#oferta-detall-page #container-detalls-oferta .table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: fixed;
    border-left: none;
    border-right: none;
}

/* Definir los anchos de las columnas */
#oferta-detall-page #container-detalls-oferta .table th:nth-child(1),
#oferta-detall-page #container-detalls-oferta .table td:nth-child(1) {
    width: 30%;
    padding: 10px 20px;
}

#oferta-detall-page #container-detalls-oferta .table th:nth-child(2),
#oferta-detall-page #container-detalls-oferta .table td:nth-child(2) {
    width: 70%;
    padding: 10px 20px;
}

#oferta-detall-page #container-detalls-oferta .titol-pagina {
    font-size: 50px !important;
    font-weight: bold;
}

#oferta-detall-page #container-detalls-oferta .table thead {
    text-align: left;
    padding: 8px 8px 15px 8px;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
    font-size: 16px;
}

#oferta-detall-page #container-detalls-oferta .table thead th {
    border: none;
}

#oferta-detall-page #container-detalls-oferta .table tbody {
    text-align: left;
    vertical-align: top; /* Alineación arriba */
    padding: 8px;
    border-top: 1px solid #ddd;
    font-size: 16px;
}

/* Striped */
#oferta-detall-page #container-detalls-oferta .table tbody tr:nth-child(even) {
    background-color: rgba(5, 152, 159, 0.05); /* Color de fondo para filas pares */
}


@media (max-width: 768px) {
    #oferta-detall-page #taula-oferta th td{
        padding: 5px 10px;
    }

    /* Definir los anchos de las columnas */
    #taula-oferta th:nth-child(1),
    #taula-oferta td:nth-child(1) {
        width: 45% !important;
    }

    #taula-oferta th:nth-child(2),
    #taula-oferta td:nth-child(2) {
        width: 55% !important;
    }

    #oferta-detall-page #container-detalls-oferta h1 {
        font-size: 26px !important;
    }

    #oferta-detall-page #container-detalls-oferta .titol-pagina {
        font-size: 26px !important;
        font-weight: bold;
    }

    /* Definir los anchos de las columnas */
    /* Igualamos las dos columnas al 50% */
    #oferta-detall #container-detalls-oferta .table th:nth-child(1),
    #oferta-detall #container-detalls-oferta .table td:nth-child(1){
        width: 45% !important;
    }
    #oferta-detall #container-detalls-oferta .table th:nth-child(2),
    #oferta-detall #container-detalls-oferta .table td:nth-child(2) {
        width: 55% !important;
    }
}

/**************************************************************/
/**************** PUBLICA-OFERTA-PAGE.PHP *********************/
/**************************************************************/

#publica-oferta-page {
    width: 60%;
}

#form-crear-oferta .form-inline {
    display: flex;
    flex-wrap: wrap;  /* Permite que los elementos se ajusten si no caben en una línea */
    /*gap: 10px; */
    justify-content: space-around;
    align-items: center;
}

#form-crear-oferta .titol {
    border-bottom: 1px solid #e5e5e5;
    font-size: 21px;
    font-weight: bold;
    margin-bottom: 1em;
    color: #333;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1em;
}

.form-group select{
    height: 40px;
    color: #565656;
}

.form-group select option{
    color: #565656;
}

.form-group textarea{
    width: 100%;
    color: #565656;
}

#form-crear-oferta .form-group input {
    height: 40px;
    color: #565656;
    width: 100%;
}

#form-crear-oferta .form-group.nif {
    width: 20%;
}

#form-crear-oferta .form-group.nom-fiscal {
    width: 38%;
}

#form-crear-oferta .form-group.nom-comercial {
    width: 38%;
}

#form-crear-oferta .form-group.w-33 {
    width: 32%;
}

#form-crear-oferta .form-group.experiencia {
    width: 30%;
}

#form-crear-oferta .form-group.formacio {
    width: 68%;
}

#form-crear-oferta .form-group.w-50 {
    width: 49%;
}

#form-crear-oferta .form-group.places {
    width: 29%;
}

#form-crear-oferta .form-group.poblacio {
    width: 69%;
}

#form-crear-oferta #presentacio-container {
    margin-top: 15px;
}

.form-buttons {
    display: flex;
    gap: 2%;
}

.form-buttons button[type="submit"] {
    width: 49%;
    background-color: #05989f;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
}

.form-buttons .btn-cancel {
    width: 49%;
    background-color: rgb(98, 98, 98);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
}

@media (max-width: 1024px) {
    #publica-oferta-page {
        width: 80%;
    }
}

@media (max-width: 768px) {
    #publica-oferta-page {
        width: 100%;
    }

    #form-crear-oferta .form-group.nif {
        width: 100%;
    }

    #form-crear-oferta .form-group.nom-fiscal {
        width: 100%;
    }

    #form-crear-oferta .form-group.nom-comercial {
        width: 100%;
    }

    #form-crear-oferta .form-group.nom-comercial {
        width: 100%;
    }

    #form-crear-oferta .form-group.experiencia {
        width: 100%;
    }

    #form-crear-oferta .form-group.formacio {
        width: 100%;
    }

    #form-crear-oferta .form-group.places {
        width: 100%;
    }

    #form-crear-oferta .form-group.poblacio {
        width: 100%;
    }

    #form-crear-oferta .form-inline {
        display: block;
    }

    #form-crear-oferta .form-group.w-33 {
        width: 100%;
    }

    #form-crear-oferta .form-group.w-50 {
        width: 100%;
    }

    #form-crear-oferta .form-group input {
        width: 100%;
    }

    #form-crear-oferta .form-group.add-idioma {
        align-items: center;
    }

    #form-crear-oferta #add-idioma i {
        font-size: 25px !important;
        color: #05989f !important;
    }

    /*.errorsValidacioRegistreOrganitzacio {*/
    /*    color: red !important;*/
    /*    font-size: 14px !important;*/
    /*    white-space: normal;*/
    /*}*/
}

/* SECCIONS OFERTES I CURSOS*/
/* GRID DE CARDS */
.offers-wrapper, .cursos-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.offer-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 16px;
    background-color: #e2e2e2;
    flex: 1 1 calc(25% - 20px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* aplicamos márgenes laterales */
    margin: 10px 10px;
    border-radius: 10px;
    max-width: 25%;
    word-break: break-word;
}

/* Cada cuarta card (posición 4, 8, 12...) quita el margen derecho */
.offers-wrapper .offer-card:nth-child(4n) {
    margin-right: 0;
}

/* Cada quinta, novena, etc. (es decir, justo después de cada fila) quita el margen izquierdo */
.offers-wrapper .offer-card:nth-child(4n + 1) {
    margin-left: 0;
}

/* Cada cuarta card (posición 4, 8, 12...) quita el margen derecho */
.cursos-wrapper .curs-card:nth-child(4n) {
    margin-right: 0;
}

/* Cada quinta, novena, etc. (es decir, justo después de cada fila) quita el margen izquierdo */
.cursos-wrapper .curs-card:nth-child(4n + 1) {
    margin-left: 0;
}

/* TITULOS Y ESTILOS INTERNA */
.offer-card .titol-oferta, .curs-card .titol-curs {
    margin-bottom: 8px;
    font-size: 26px;
    line-height: 1.3
}

.offer-card .fusion-title-2, .curs-card .fusion-title-2 { margin: 0 0 8px; }

.offer-card .poblacio-oferta, .curs-card .poblacio-curs {
    margin: 0;
    text-transform: uppercase;
    font-size: 22px;
}

/* BOTÓN */
.offer-card .fusion-button, .curs-card .fusion-button {
    margin-top: 16px;
    align-self: flex-start;
}

/* SECCIO CURSOS */
/* GRID DE CARDS CURSOS*/
.curs-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 16px;
    background-color: #ffffff;
    flex: 1 1 calc(25% - 20px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* aplicamos márgenes laterales */
    margin: 10px 10px;
    border-radius: 10px;
    max-width: 25%;
    word-break: break-word;
}

.curs-card .entitat-curs {
    color: #db9900;
}

.curs-card .btn-veure-curs{
    background-color: rgba(219, 153, 0, 0.16);
}

.curs-card .btn-veure-curs span{
    color: rgba(219, 153, 0);
}

/* EN MÓVIL: 1 card por fila */
@media (max-width: 768px) {
    .offer-card, .curs-card{
        max-width: 100%;
        flex: 1 1 100%;
        margin: 10px 0;
    }
}
