/*
Theme Name: Cactus
Theme URI: http://www.cactussenygrafic.com/
Version: 1.0
Description: Plantilla desenvolupada per Cactus
Author: Cactus Seny Grafic
Author URI: https://www.cactussenygrafic.com/
Template: Divi
*/


/** font custom **/
body, p, h1, h2, h3, h4, h5, h6, a, span:not(.ab-icon), li, div, td, th, label, input, textarea, button, .saes {}

.csg-revista-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:72px 24px}
@media (max-width:1200px){.csg-revista-grid{grid-template-columns:repeat(4,1fr)}}
@media (max-width:900px){.csg-revista-grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width:680px){.csg-revista-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:420px){.csg-revista-grid{grid-template-columns:1fr}}
.csg-revista-card{display:flex;flex-direction:column;gap:12px}
.csg-revista-card .cover a.button, .more-link{display:block;border-radius:8px;overflow:hidden}
.csg-revista-card .title{font-weight:700;font-size:1.4rem;line-height:1.2;margin:6px 0 0 0;}
.csg-revista-card .numero{font-size:.95rem}
.csg-revista-card .boton, .more-link{width:fit-content;justify-content:center;background-color: #005056; color: #fff !important; border-radius: 5px; margin-top: 12px;font-size: 16px;}
.csg-revista-pagination{margin-top:72px;display:flex;gap:8px;flex-wrap:wrap; justify-content: center;}
.csg-revista-pagination a,.csg-revista-pagination span{padding:6px 10px;border-radius:6px;text-decoration:none;}
.csg-revista-pagination .current{background:#005056;color:#fff !important}

.csg-revista-card .boton{}


.revista_home .et_pb_text_inner .csg-revista-grid{grid-template-columns: repeat(3, 1fr);}
.revista_home .csg-revista-card .title, .revista_home .csg-revista-card .numero{color: #CDE9EE;}
.revista_home .csg-revista-card .boton{background-color: #CDE9EE; color: #000 !important;}
.revista_home .csg-revista-card .boton:hover{background-color: var(--gcid-mez9jm71yl) !important; color: #fff !important;}

.blog_home .et_pb_post .et_pb_image_container{margin-left: 0; margin-right: 0; margin-top: 0;}
.more-link{padding:0.75em 2em;line-height: 1.2;}

.et_pb_posts .et_pb_post{display: flex; flex-direction: column;}
.et_pb_posts .et_pb_post .post-content{height: 100%; display: flex; flex-direction: column;}
.et_pb_posts .et_pb_post .post-content .more-link{margin-top: auto;}
.et_pb_posts .et_pb_post .post-content .post-content-inner{margin-bottom: 16px;}


.et_pb_post .entry-featured-image-url{margin-bottom: 0px !important;}
.et_pb_posts.loop_blog .et_pb_post{padding:0px !important}
.et_pb_posts.loop_blog .et_pb_post .et_pb_image_container{margin-left: 0; margin-right: 0; margin-top: 0;}

.et_pb_image_container {
  position: relative;
  width: 100%;
  height: 296px;
  overflow: hidden;
  flex-shrink: 0;
}

.et_pb_image_container a.entry-featured-image-url,
.et_pb_image_container img {
  width: 100%;
  height: 100%;
  display: block;
}

.et_pb_image_container img {
  object-fit: cover;
  object-position: center;
}


.et_pb_image_container img {
  height: 100% !important;
  width: 100% !important;
  max-width: none !important;
}




.csg-llibre-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:72px 24px;}
@media (max-width:1200px){.csg-llibre-grid{grid-template-columns:repeat(4,1fr)}}
@media (max-width:900px){.csg-llibre-grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width:680px){.csg-llibre-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:420px){.csg-llibre-grid{grid-template-columns:1fr}}

.csg-llibre-card{display:flex;flex-direction:column;gap:6px;height: 100%; margin-bottom: 24px;}
.csg-llibre-card .cover{height: 379px;}
.csg-llibre-card .cover img{height: 100%; width: auto;}
.csg-llibre-card .subtitol{font-weight: 600; font-size: 18px; line-height: 1.2;}
.csg-llibre-card  .llibre_meta{font-size: 16px; margin-top: 16px; margin-bottom: 16px;line-height: 1.4;}
.csg-llibre-card  .numero_coleccio {font-weight: 600;}


.csg-llibre-card .cover a.button, .more-link{display:block;border-radius:8px;overflow:hidden}
.csg-llibre-card .title{font-weight:700;font-size:20px;line-height:1.2;margin:0;margin-bottom: 6px;}
.csg-llibre-card .numero{font-size:.95rem}
.csg-llibre-card .boton{width:fit-content;justify-content:center;background-color: #005056; color: #fff !important; border-radius: 5px; margin-top: 12px;font-size: 16px;margin-top: auto;}


/* ===== Select Biblioteca – estilos aislados por ID ===== */
.csg-biblio-select{
    --csg-bg: #efe7a8;       /* fondo listado (amarillo suave) */
    --csg-bg-head:#fff;   /* cabecera */
    --csg-text:#1f5a57;      /* texto (verde) */
    --csg-border:#e3c55f;    /* borde/accents */
    --csg-radius: 0px;
    --csg-shadow: 0 4px 18px rgba(0,0,0,.07);
}
.csg-biblio-select .csg-bs-toggle{
    width:100%;
    display:flex; align-items:center; justify-content:space-between;
    background:var(--csg-bg-head);
    color:var(--csg-text);
    border:2px solid var(--csg-border);
    border-radius: var(--csg-radius);
    padding:20px 22px; font-size:26px; font-weight:700; line-height:1;
    cursor:pointer;
}
.csg-biblio-select .csg-bs-caret{
    width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent;
    border-top: 12px solid var(--csg-text); transition: transform .2s ease;
}
.csg-biblio-select .csg-bs-toggle[aria-expanded="true"] .csg-bs-caret{ transform: rotate(180deg); }

.csg-biblio-select .csg-bs-panel{
    background: var(--csg-bg);
    border:2px solid var(--csg-border);
    border-top:0;
    border-radius: 0 0 var(--csg-radius) var(--csg-radius);
    padding: 18px 18px 8px;
    max-height: 60vh; overflow: auto;
    position: absolute;
    width: 100%;
    z-index: 999;
}
.csg-biblio-select .csg-bs-search{ margin-bottom:14px; }
.csg-biblio-select .csg-bs-input{
    width:100%; padding:12px 14px; border:1px solid var(--csg-border);
    border-radius:8px; background: #fffef1; color:#244b48; font-size:16px;
}
.csg-biblio-select .csg-bs-options{ list-style:none; margin:0; padding:0 6px 8px; }
.csg-biblio-select .csg-bs-option{ margin: 10px 0; }
.csg-biblio-select .csg-bs-link{
    display:block; text-decoration:none;
    color:var(--csg-text); font-size:28px; line-height:1.2; padding:4px 2px;
    border-radius:6px;
}
.csg-biblio-select .csg-bs-link:hover{ background: rgba(31,90,87,.08); }
@media (max-width: 768px){
    .csg-biblio-select .csg-bs-toggle{ font-size:22px; padding:16px 18px; }
    .csg-biblio-select .csg-bs-link{ font-size:22px; }
}


.csg-biblio-msg{padding:1em;background:#fff3cd;border:1px solid #ffeeba;color:#856404;border-radius:6px}
table.csg-biblio{width:100%;border-collapse:collapse}
.csg-biblio #titol{font-weight:700;font-size:1.1rem}
.csg-biblio #localitzacio{color:#333}
.csg-biblio .gradient_one{border:0;height:2px;background:linear-gradient(90deg,#e3c55f 0%, #f0e1a6 50%, #e3c55f 100%);margin:1.2em 0;}
.csg-biblio-tag{padding: 7px 10px;border: 1px solid #ccc;border-radius: 6px;background: #f0f0f0;margin: 0 0.5ch;}

.csg-biblio-results{display: flex;gap: 20px;flex-wrap: wrap; margin-right: -20px; margin-top: 2em;}
.csg-biblio-results .csg-resultat-biblioteca{background-color: #F1E8A4; padding: 20px; flex: 0 0 calc(25% - 20px);}
.csg-biblio-results .csg-resultat-biblioteca .a_corp, .csg-biblio-results .csg-resultat-biblioteca .auto{font-weight: 300;opacity: .7;}
.csg-biblio-results .csg-resultat-biblioteca .titol{margin-bottom: 0.5em;font-weight: 600;}
.localitzacio.csg-biblio-tag{margin:0; background-color: #fff; margin-top: 0.5em; width: fit-content;font-size: 16px}

.csg-biblio-results .csg-resultat-biblioteca .editor_any,
.csg-biblio-results .csg-resultat-biblioteca .materia,
.csg-biblio-results .csg-resultat-biblioteca .tipus{font-size: 16px;line-height: 22px;margin-left: 1ch;margin-bottom: 10px;text-indent: -1ch}
.csg-biblio-results .csg-resultat-biblioteca .editor_any:before,
.csg-biblio-results .csg-resultat-biblioteca .materia:before,
.csg-biblio-results .csg-resultat-biblioteca .tipus:before{content:"● ";}
.csg-materies ul{display: flex; flex-wrap: wrap;padding:0px}
.csg-materies ul li{flex: 0 0 calc(100%/6); list-style: none; font-size: 16px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0;}

.csg-biblio-form{display:flex;gap:.5rem;align-items:center;max-width:680px}
.csg-biblio-form input[type="text"]{flex:1;padding:.75rem 1rem;border:2px solid #e3c55f;border-radius:0px;background:#fff;color:#244b48;font-size: 26px;padding: 17px 22px;
    height: 70px;}
.csg-biblio-form {position: relative;}
.csg-biblio-form button{cursor: pointer; background-color: transparent; color: transparent; border: 0px; position: absolute; width:40px; right: 20px; }
.csg-biblio-form button:hover{filter:brightness(.98)}
.csg-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}