/* ==============================
   ESTILS GLOBALS
   ============================== */
body {
    background-color: #f8f9fa;   /* color de fons per defecte */
    font-family: Arial, sans-serif;
    line-height: 1.6;
	overflow-x: hidden;
}

/* Enllaços */
a {
    text-decoration: none;
    color: inherit;
}


/* ==============================
   HEADER
   ============================== */
/* Header */
header {
  position: relative;
  min-height: 150px; /* pots ajustar */
  background: url('../img/imatge.jpg') center/cover no-repeat;
  color: white;
  display: flex;
  align-items: center; /* centra verticalment tot el contingut */
  padding: 0 1rem;
}

/* Overlay fosc */
.header-overlay {
  position: absolute;
  inset: 0; /* top:0; left:0; right:0; bottom:0 */
  background-color: rgba(0,0,0,0.3); /* més fosc */
  z-index: 1; /* darrere del contingut */
}

/* Contingut del header */
.header-content {
  position: relative;
  z-index: 2; /* sobre l'overlay */
  width: 100%;
  display: flex;
  margin-top: 35px;
  justify-content: space-between; /* logo a l'esquerra, menú a la dreta */
  align-items: center;            /* centra verticalment els elements */
}

/* Menú horitzontal */
.header-menu .btn,
.header-menu .dropdown-toggle {
  display: flex;
  align-items: center;
  min-height: 38px;
  transition: background-color 0.3s;
}

.header-menu .btn:hover,
.header-menu .dropdown-toggle:hover {
  background-color: rgba(255,255,255,0.2);
  color: #ffffff;
}



/* ==============================
   SIDEBAR
   ============================== */
.sidebar {
    background-color: #212529; /* fosc */
    color: #ffffff;  	/* text blanc */
	font-size: 14px !important;
	

}

.sidebar .nav-link {
    color: #ffffff;             /* enllaços blancs */
}

.sidebar .nav-link:hover {
    color: #0d6efd;             /* opcional: blau al passar el ratolí */
    background-color: rgba(255,255,255,0.6);
    border-radius: 0.25rem;
}
.sidebar .nav-link.active { 
	background-color: rgba(255,255,255,0.2); 
	font-weight:bold; 
	border-radius:0.25rem; 
}
.submenu {
  border-left: 2px solid rgba(255,255,255,0.2);
  margin-left: 0.5rem;
  padding-left: 0.5rem;
}
.toggle-submenu i.bi-chevron-down {
  transition: transform 0.3s;
}
.toggle-submenu.open i.bi-chevron-down {
  transform: rotate(180deg);
}
/*Prova2 de submenus*/
.sidebar .collapse .nav-link {
  padding-left: 1.5rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.sidebar .nav-link:hover {
  background-color: rgba(255,255,255,0.1);
  border-radius: 0.25rem;
}

.sidebar .collapse.show .nav-link.active {
  background-color: rgba(255,255,255,0.2);
  font-weight: bold;
}



/* ==============================
   CONTINGUT PRINCIPAL
   ============================== */
main {
    padding: 2rem;
    background: #fff;
    min-height: 100vh;  /* almenys tota l'alçada visible */
    border-radius: 0;  /* opcional, si no vols arrodoniment */
}

/* ==============================
   FOOTER
   ============================== */
footer {
    background-color: #343a40;
    color: #fff;
    padding: 1rem;
    margin-top: 2rem;
}

footer h6 {
    margin-bottom: 0.5rem;
}







/* ==============================
   BOTÓ "TORNAR A DALT"
   ============================== */
#btnTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 999;
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
}

#btnTop::after {
    content: "";
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 12px solid #555;
}

#btnTop:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

/* ==============================
   REQUADRE
   ============================== */
.card-title i {
  color: #0d6efd;
}

blockquote {
  color: #333;
}

/*===============================

  TABULADORS
  
  =============================== */
  


.nav-tabs .nav-link {
  color: #555; /* color del text per defecte */
  border: none; /* opcional: treu el contorn */
}

.nav-tabs .nav-link:hover {
  color: #007bff; /* color en passar el ratolí */
  background-color: #f0f0f0;
}

.nav-tabs .nav-link.active {
  color: #fff !important; /* color del text actiu */
  background-color: #777777 !important; /* color de fons actiu; #007bff */
  border: none;
}





/*===============================

ESTILS PER A LA PÀGINA INICIAL

=================================*/

.fade-in {
  opacity: 0;
  animation: fadeIn 2s ease forwards;
}
@keyframes fadeIn {
  to { opacity: 1; }
}

/*===============================

ESTILS PER A TITOLS
=================================*/

.title1 {
	
color:#a4a99d !important; /* color gris fosc: #949191 */
	
}
/* ==============================

ESTILS PER A DATATABLES

=================================*/

.dataTables_filter label {
  display: flex !Important;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
  white-space: nowrap;
}


/* =============================

ESTILS DEL GESTOR D'IMATGES

================================ */

.gestor body {
    font-family: sans-serif;
    margin: 20px;
    background-color: #f8f8f8;
}

.gestor h1 {
    text-align: center;
    margin-bottom: 30px;
}

.gestor .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    max-width: 1000px;
    margin: 0 auto;
}

.gestor .grid > div {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    border-radius: 6px;
    background-color: #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gestor .grid > div img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gestor .paginacio {
    text-align: center;
    margin-top: 20px;
    font-size: 1rem;
}

.gestor .paginacio a {
    margin: 0 10px;
    text-decoration: none;
    color: #0066cc;
    font-weight: bold;
}

.gestor .paginacio span {
    margin: 0 10px;
}

.gestor .modal2 {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    cursor: zoom-out;
}

.gestor .modal2 img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 8px;
}

.gestor .imatge-item {
    position: relative;
}

.gestor .accions {
    position: absolute;
    bottom: 5px;
    left: 5px;
    right: 5px;
    display: flex;
    justify-content: space-between;
    background: rgba(0,0,0,0.4);
    padding: 4px;
    font-size: 0.8rem;
    border-radius: 4px;
}

.gestor .accions a,
.gestor .accions button {
    color: white;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

.gestor .accions button:hover,
.gestor .accions a:hover {
    text-decoration: underline;
}

.gestor form {
    margin-bottom: 20px;
    text-align: center;
}

.gestor .modal-content2 {
    text-align: center;
    max-width: 90%;
    max-height: 90%;
}

.gestor .modal-content2 img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.gestor .caption2 {
    color: white;
    margin-top: 10px;
    font-size: 1rem;
    word-break: break-all;
}

.gestor .download-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 14px;
    background-color: #2196F3;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.gestor .download-btn:hover {
    background-color: #0b7dda;
}

.gestor input[type="file"] {
    display: none;
}
/* ======================================= ESTILS DE LA PAGINACIO =========================================== */

/*body { font-family: Arial, sans-serif; margin: 20px; }*/

.gestor .pagination { margin-top:20px; display:flex; gap:6px; flex-wrap:wrap; justify-content: center; }
.gestor .pagination a, .pagination strong {
        padding:6px 12px;
        border-radius:20px;
        text-decoration:none;
        border:1px solid #0073e6;
        color:#0073e6;
        font-size:14px;
    }
.gestor .pagination a:hover {
        background:#0073e6;
        color:white;
    }
.gestor.pagination strong {
        background:#0073e6;
        color:white;
        border:1px solid #0073e6;
    }
.gestor .goto-form { margin-top:15px; }

    /* Modal (lightbox) */
.gestor .modal {
        display:none;
        position:fixed;
        z-index:999;
        left:0;
        top:0;
        width:100%;
        height:100%;
        background:rgba(0,0,0,0.8);
        justify-content:center;
        align-items:center;
    }
.gestor .modal img {
        max-width:90%;
        max-height:90%;
        border-radius:8px;
        box-shadow:0 0 20px rgba(0,0,0,0.5);
    }
.gestor .modal-close {
        position:absolute;
        top:20px;
        right:30px;
        font-size:30px;
        color:white;
        cursor:pointer;
        font-weight:bold;
    }
/* ==================  Estils fletxes ordenar a les taules ============================ */

/* Amaga les fletxes d'ordenació de totes les columnes */
#personal thead th.sorting:after,
#personal thead th.sorting_asc:after,
#personal thead th.sorting_desc:after {
    display: none !important;
}