.card-surface .header-controls .d-flex > *:not(:first-child) {
  margin-left: 0.5rem;
}
body {
  font-family: "Poppins", sans-serif;
  color: #0c0c0c;
  background-color: #ffffff;
}

/* Background container (full-screen, behind everything) */
.background-container {
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  z-index: -1; /* Situa el fons darrere de tot el contingut */
  background-image: var(--ceeb-page-background-image, url("../images/fondo.jpg"));
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  pointer-events: none; /* No intercepta clics */
  opacity: 1;
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Ensure main and header are above the background */
main, .footer_section {
  position: relative;
  z-index: 1;
}

/* Ensure hero/header sit above main content */
.hero_area {
  position: relative;
  z-index: 2000;
}
.header_section {
  position: sticky;
  top: 0;
  z-index: 3000; /* higher than hero_area so header controls dropdowns */
}

/* Section surface to separate from the fixed background */
.layout_padding {
  margin: 48px auto;
  max-width: 1100px;       /* opcional: limita l'amplada i centre la secció */
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.85); /* light, slightly translucent surface */
  padding: 36px 24px; /* inner spacing to separate content from edges */
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(18, 38, 63, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.3);
}

@media (max-width: 576px) {
  .layout_padding {
    padding: 20px 12px;
    border-radius: 8px;
  }
}


.layout_padding2 {
  padding: 45px 0;
}

.layout_padding2-top {
  padding-top: 45px;
}

.layout_padding2-bottom {
  padding-bottom: 45px;
}

.layout_padding-top {
  padding-top: 75px;
}

.layout_padding-bottom {
  padding-bottom: 75px;
}

.custom_heading-container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}

.custom_heading-container h2 {
  font-weight: bold;
  border-bottom: 1px solid #feb543;
  padding-bottom: 5px;
}

/*header section*/
.hero_area::before {
  content: "";
  position: absolute;
  width: 58%;
  height: 86%;
  /* background-image: url(../images/hero-bg.png); */
  background-size: 100% 100%;
  background-repeat: no-repeat;
  top: 25px;
  right: 0;
}

.sub_page .hero_area {
  height: auto;
}

.sub_page .hero_area::before {
  display: none;
}

.hero_area.sub_pages {
  height: auto;
}

/* Header adjustments */
.header_section {
    background-color: #203376; /* Color de fons */
    padding: 10px 20px; /* Padding uniforme */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center; /* Centra verticalment el contingut */
    justify-content: space-between; /* Espai entre elements */
    height: auto; /* Permet que l'alçada s'ajusti al contingut */

}

.header_section .container-fluid {
    display: flex;
    align-items: center; /* Centra verticalment el contingut dins del contenidor */
    justify-content: space-between; /* Espai entre el logo i el menú */
}

.header_section .navbar-brand {
    font-size: 1.5rem; /* Mida del text responsiva */
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    display: flex;
    align-items: center; /* Centra verticalment el text */
}

.header_section .navbar-nav {
    display: flex;
    align-items: center; /* Centra verticalment els enllaços */
    
}

.header_section .navbar-nav .nav-link {
    color: #fff;
    font-size: 1rem; /* Mida del text responsiva */
    margin: 0 10px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.header_section .navbar-nav .nav-link:hover {
    color: #feb543; /* Color de hover */
}

.navbar-toggler {
    border: none;
    background-color: #feb543;
    padding: 5px 10px;
    border-radius: 5px;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=UTF8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

@media (max-width: 768px) {
    .header_section {
        flex-direction: column; /* Canvia la direcció a column per pantalles petites */
        padding: 15px;
    }

    .header_section .navbar-nav {
        flex-direction: column; /* Enllaços en column per pantalles petites */
        text-align: center;
    }

    .header_section .navbar-nav .nav-link {
        margin: 5px 0;
    }
}

.custom_nav-container.navbar-expand-lg .navbar-nav .nav-link {
  padding: 10px 30px;
  color: #f9fcfb;
  text-align: center;
  text-transform: uppercase;
}

a,
a:hover,
a:focus {
  text-decoration: none;
}

a:hover,
a:focus {
  color: initial;
}

.btn,
.btn:focus {
  outline: none !important;
  -webkit-box-shadow: none;
          box-shadow: none;
}

.navbar-brand,
.navbar-brand:hover {
  text-transform: uppercase;
  font-weight: bold;
  font-size: 24px;
  color: #fafcfd;
}

.custom_nav-container .nav_search-btn {
  background-image: url(../images/search-icon.png);
  background-size: 22px;
  background-repeat: no-repeat;
  background-position-y: 7px;
  width: 35px;
  height: 35px;
  padding: 0;
  border: none;
}

.navbar-brand {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}

.navbar-brand span {
  font-size: 20px;
  font-weight: 700;
  color: #f9fcfb;
  margin-top: 5px;
  text-transform: uppercase;
}

.custom_nav-container {
  z-index: 99999;
  padding: 5px 0;
}

.custom_nav-container .navbar-toggler {
  outline: none;
}

.custom_nav-container .navbar-toggler .navbar-toggler-icon {
  background-image: url(../images/menu.png);
  background-size: 40px;
}

/*end header section*/
/* slider section */
.slider_section {
  color: #f9fcfb;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  height: 90%;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}

.slider_section .row {
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}

.slider_section #carouselExampleIndicators {
  position: unset;
}

.slider_section .carousel_btn-container {
  width: 110px;
  position: absolute;
  bottom: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  left: 2%;
  z-index: 999;
}

.slider_section .carousel_btn-container .carousel-control-prev,
.slider_section .carousel_btn-container .carousel-control-next {
  position: relative;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 100%;
  opacity: 1;
  background-repeat: no-repeat;
  background-size: 14px;
  background-position: center;
  background-color: #383a90;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
}

.slider_section .carousel_btn-container .carousel-control-prev:hover,
.slider_section .carousel_btn-container .carousel-control-next:hover {
  background-color: #feb543;
}

/* Cards: make body fill available space and keep action button pinned to bottom */
.card-container { display:flex; gap: 24px; flex-wrap:wrap; }
.card {
  display: flex;
  flex-direction: column;
  /* ensure cards have same height when inside a flex row */
  min-width: 260px;
  flex: 1 1 300px;
}
.card .card-img-top {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.card .card-body .btn {
  margin-top: auto; /* push button to bottom */
}

/* Surface for stand-alone content (tables, forms, headings) to contrast with background */
.card-surface {
  background: rgba(255,255,255,0.94);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(18,38,63,0.12);
  border: 1px solid rgba(0,0,0,0.06);
}
.card-surface h2 {
  margin: 0 0 12px 0;
  font-weight: 700;
}
.card-surface .table-responsive {
  margin-top: 8px;
}

@media (max-width: 576px) {
  .card-surface { padding: 12px; }
}

/* Form surface adjustments for seguiment_form */
.card-surface .row .col-md-6,
.card-surface .row .col-md-4,
.card-surface .row .col-md-3,
.card-surface .row .col-md-2,
.card-surface .row .col-md-12 {
  display: block;
}
.card-surface label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.card-surface input,
.card-surface select,
.card-surface textarea,
.card-surface .form-control {
  width: 100%;
}
.card-surface .form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* Add a bit more spacing between the top header controls (search form and Add button) */
.card-surface .header-controls > .btn,
.card-surface .header-controls > a.btn {
  margin-left: 0.5rem;
}

.slider_section .carousel_btn-container .carousel-control-prev {
  background-image: url(../images/prev.png);
}

.slider_section .carousel_btn-container .carousel-control-next {
  background-image: url(../images/next.png);
}

.slider_section ol.carousel-indicators {
  margin: 0;
  width: 75px;
  bottom: 10%;
  left: 47.5%;
}

.slider_section ol.carousel-indicators li {
  width: 55px;
  height: 55px;
  border-radius: 100%;
  text-indent: 0px;
  text-align: center;
  line-height: 55px;
  color: #f9fcfb;
  background-color: #547bfe;
  opacity: 1;
  display: none;
}

.slider_section ol.carousel-indicators li.active {
  display: block;
}

.slider_detail-box h1 {
  font-weight: bold;
  margin-bottom: 25px;
}

.slider_detail-box .btn-box a {
  display: inline-block;
  padding: 12px 40px;
  background-color: #feb543;
  color: #f9fcfb;
  border-radius: 25px;
  -webkit-box-shadow: 0px 2px 7px 0px rgba(32, 50, 117, 0.26);
  box-shadow: 0px 2px 7px 0px rgba(32, 50, 117, 0.26);
  -webkit-transition: all .3s;
  transition: all .3s;
  border: none;
  margin: 35px 0 50px 0;
}

.slider_detail-box .btn-box a:hover {
  -webkit-transform: translateY(-7px);
          transform: translateY(-7px);
}

.slider_img-box {
  width: 75%;
  margin: 0 auto;
}

.slider_img-box img {
  width: 100%;
}

.welcome_section {
  text-align: center;
}

.welcome_section .img-box {
  width: 65%;
  margin: 0 auto;
}

.welcome_section .img-box img {
  width: 100%;
}

.welcome_section .detail-box {
  margin-top: 45px;
}

.welcome_section .detail-box a {
  display: inline-block;
  padding: 12px 40px;
  background-color: #feb543;
  color: #f9fcfb;
  border-radius: 25px;
  -webkit-box-shadow: 0px 2px 7px 0px rgba(32, 50, 117, 0.26);
  box-shadow: 0px 2px 7px 0px rgba(32, 50, 117, 0.26);
  -webkit-transition: all .3s;
  transition: all .3s;
  border: none;
  margin-top: 45px;
}

.welcome_section .detail-box a:hover {
  -webkit-transform: translateY(-7px);
          transform: translateY(-7px);
}

.service_section {
  text-align: center;
  color: #f9fcfb;
  background-image: url(../images/service-bg.png);
  background-size: 100% 100%;
  padding-top: 275px;
  padding-bottom: 125px;
  background-repeat: no-repeat;
  margin-top: -150px;
}

.service_section .custom_heading-container h2 {
  border-color: #f9fcfb;
}

.service_section .service_container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
}

.service_section .service_container .service_box {
  width: 30%;
  min-width: 300px;
  margin: 35px 15px;
}

.service_section .service_container .service_box .img-box {
  border-radius: 18px;
  overflow: hidden;
}

.service_section .service_container .service_box .img-box img {
  width: 100%;
}

.service_section .service_container .service_box .detail-box {
  margin-top: 30px;
}

.service_section .service_container .service_box .detail-box h4 {
  font-weight: bold;
}

.service_section a {
  display: inline-block;
  padding: 12px 40px;
  background-color: #feb543;
  color: #f9fcfb;
  border-radius: 25px;
  -webkit-box-shadow: 0px 2px 7px 0px rgba(32, 50, 117, 0.26);
  box-shadow: 0px 2px 7px 0px rgba(32, 50, 117, 0.26);
  -webkit-transition: all .3s;
  transition: all .3s;
  border: none;
}

.service_section a:hover {
  -webkit-transform: translateY(-7px);
          transform: translateY(-7px);
}

.sub_page .service_section {
  margin-top: 00px;
  margin-bottom: 150px;
}

.problem_section {
  text-align: center;
}

.problem_section .img-box {
  width: 65%;
  margin: 0 auto;
}

.problem_section .img-box img {
  width: 100%;
}

.problem_section .detail-box {
  margin-top: 45px;
}

.problem_section .detail-box a {
  display: inline-block;
  padding: 12px 40px;
  background-color: #feb543;
  color: #f9fcfb;
  border-radius: 25px;
  -webkit-box-shadow: 0px 2px 7px 0px rgba(32, 50, 117, 0.26);
  box-shadow: 0px 2px 7px 0px rgba(32, 50, 117, 0.26);
  -webkit-transition: all .3s;
  transition: all .3s;
  border: none;
  margin-top: 45px;
}

.problem_section .detail-box a:hover {
  -webkit-transform: translateY(-7px);
          transform: translateY(-7px);
}

.why_section {
  color: #f9fcfb;
  background: -webkit-gradient(linear, left top, right top, from(#1b3374), to(#8f4fe8));
  background: linear-gradient(to right, #1b3374, #8f4fe8);
}

.why_section .custom_heading-container h2 {
  border-color: #f9fcfb;
}

.why_section p {
  text-align: center;
  margin: 40px 0 55px 0;
}

.why_section .row .col-md-3 {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}

.why_section .row .col-md-3 .img-box {
  width: 45px;
  margin-right: 15px;
}

.why_section .row .col-md-3 .img-box img {
  width: 100%;
}

.client_section h2 {
  font-weight: bold;
  text-align: center;
}

.client_section .carousel-control-prev,
.client_section .carousel-control-next {
  width: 65px;
  height: 60px;
  border: none;
  opacity: 1;
  background-repeat: no-repeat;
  background-size: 14px;
  background-position: center;
  background-color: #383a90;
  top: 50%;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
}

.client_section .carousel-control-prev:hover,
.client_section .carousel-control-next:hover {
  background-color: #feb543;
}

.client_section .carousel-control-prev {
  background-image: url(../images/prev.png);
}

.client_section .carousel-control-next {
  background-image: url(../images/next.png);
}

.client_container {
  width: 55%;
  margin: 0 auto;
}

.client_container .client_text {
  padding: 30px;
  border: 1px solid #bcbcbc;
  border-radius: 5px;
}

.client_container .detail-box {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  margin-top: 30px;
}

.client_container .detail-box .img-box {
  width: 75px;
  margin-right: 15px;
  border: 10px solid #9852f2;
  border-radius: 100%;
  overflow: hidden;
}

.client_container .detail-box .img-box img {
  width: 100%;
}

.client_container .detail-box .name h5 {
  margin: 0;
}

.client_container .detail-box .name p {
  text-transform: uppercase;
  color: #0b93b1;
  margin: 0;
}

.contact_section .contact_heading {
  text-align: center;
  margin-bottom: 45px;
}

.contact_section .contact_heading h2 {
  font-weight: bold;
}

.contact_section form .form-control {
  border: none;
  background-color: #f2f3f4;
  outline: none;
  -webkit-box-shadow: none;
          box-shadow: none;
  border-radius: 0;
  height: 50px;
}

.contact_section form .form-control#inputMessage {
  height: 120px;
}

.contact_section form select.form-control {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  position: relative;
  background-image: url(../images/down-arrow.png);
  background-repeat: no-repeat;
  background-position: 98%;
}

.contact_section button {
  display: inline-block;
  padding: 12px 40px;
  background-color: #a053f9;
  color: #f9fcfb;
  border-radius: 5px;
  -webkit-box-shadow: 0px 2px 7px 0px rgba(32, 50, 117, 0.26);
  box-shadow: 0px 2px 7px 0px rgba(32, 50, 117, 0.26);
  -webkit-transition: all .3s;
  transition: all .3s;
  border: none;
  text-transform: uppercase;
  -webkit-box-shadow: none;
          box-shadow: none;
  outline: none;
  margin-top: 35px;
  font-size: 15px;
}

.contact_section button:hover {
  -webkit-transform: translateY(-7px);
          transform: translateY(-7px);
}

/* info section */
.footer_bg {
  background-image: url(../images/footer-bg.png);
  background-size: cover;
  padding-top: 280px;
  margin-top: -125px;
}

.info_section {
  position: relative;
  font-family: "Poppins", sans-serif;
}

.info_section h3 {
  text-transform: uppercase;
  font-weight: bold;
  color: #f9fcfb;
  margin-bottom: 35px;
}

.info_section img {
  width: 100%;
}

.info_section ul {
  padding: 0;
}

.info_section ul li {
  list-style-type: none;
  margin: 10px 0;
}

.info_section ul li a,
.info_section ul li a:hover {
  color: #fff;
}

.info_section h5 {
  margin-bottom: 12px;
  font-size: 22px;
  color: #fff;
  padding: 1px 3px;
  border-bottom: 2px solid #feb543;
}

.info_section .social-box {
  margin: 25px 0;
}

.info_section .social-box img {
  width: 35px;
  margin-right: 5px;
}

.form_container form {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}

.info_section .form_container label {
  margin: 0;
  font-size: 18px;
  text-transform: uppercase;
  color: #fff;
}

.info_section .form_container input {
  width: 300px;
  height: 40px;
  border: none;
  outline: none;
  padding-left: 15px;
  background-color: #fff;
  margin-left: 45px;
  margin-right: 10px;
}

.info_section .form_container button {
  display: inline-block;
  padding: 8px 50px;
  background-color: #ffca56;
  color: #f9fcfb;
  border-radius: 5px;
  -webkit-box-shadow: 0px 2px 7px 0px rgba(32, 50, 117, 0.26);
  box-shadow: 0px 2px 7px 0px rgba(32, 50, 117, 0.26);
  -webkit-transition: all .3s;
  transition: all .3s;
  border: none;
  border: none;
  text-transform: uppercase;
}

.info_section .form_container button:hover {
  -webkit-transform: translateY(-7px);
          transform: translateY(-7px);
}

.info_section .form_container button:hover {
  -webkit-transform: none;
          transform: none;
}

/* end info section */
/* footer section*/
.footer_section {
  font-weight: 500;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}

.footer_section p {
  color: #000000;
  margin: 0;
  text-align: center;
  padding: 20px 15%;
  border-top: 1px solid #000504;
}

.footer_section a {
  color: #000000;
}

/* end footer section*/
/*# sourceMappingURL=style.css.map */

/* === CHATBOT WIDGET (CEEB) === */
:root {
  --ceeb-bg: #f1f1f1;
  --ceeb-border: #ccc;
  --ceeb-primary: #203376;
  --ceeb-accent: #feb543;
  --ceeb-text: #0c0c0c;
}

#chatbot {
  position: fixed; /* Permet moure el chatbot */
  bottom: 20px;
  right: 20px;
  width: 320px;
  max-height: 70vh;
  background-color: var(--ceeb-bg);
  border: 1px solid var(--ceeb-border);
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  font-family: "Poppins", Arial, sans-serif;
  overflow: hidden;
  z-index: 10000;
  cursor: default; /* Mostra un cursor de "moure" */
}

#chatbot:active {
  cursor: grabbing; /* Mostra un cursor de "arrossegant" */
}
#chatbot-header {
  background-color: var(--ceeb-primary);
  color: #fff;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move; /* Mostra un cursor de "moure" */
}

#chatbot-header:active {
  cursor: grabbing; /* feedback visual en arrossegar */
}
#chatbot-header h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

#close-chatbot, #minimize-chatbot {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
#close-chatbot:hover, #minimize-chatbot:hover {
  background: rgba(255,255,255,0.1);
}

#chatbot-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background: #ffffff;
  border-top: 1px solid var(--ceeb-border);
  border-bottom: 1px solid var(--ceeb-border);
}

.msg { display: flex; margin: 8px 0; gap: 8px; }
.msg .bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
}
.msg.user { justify-content: flex-end; }
.msg.user .bubble {
  background: var(--ceeb-accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg.bot .bubble {
  background: #f4f7ff;
  color: var(--ceeb-text);
  border-bottom-left-radius: 4px;
  border: 1px solid #e5e9ff;
}

#chatbot-input {
  display: flex;
  padding: 10px;
  gap: 8px;
  background: #fff;
}

#user-input {
  width: 70%; /* Define un ancho específico */
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--ceeb-border);
  border-radius: 8px;
  font-size: 14px;
}

#send-message {
  padding: 8px 14px;
  background-color: var(--ceeb-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
#send-message:hover { background-color: #18265a; }

/* Botó flotant per obrir el xat */
#chatbot-open {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ceeb-accent);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  z-index: 9999;
}
#chatbot-open:hover { filter: brightness(0.95); }

.minimized { display: none; }

@media (max-width: 576px) {
  #chatbot { right: 12px; left: 12px; width: auto; max-height: 75vh; }
  #chatbot-open { right: 12px; bottom: 12px; }
}


/* — Fix visibilitat forçada — */
#chatbot.minimized { display: none !important; }
#chatbot-open.minimized { display: none !important; }

/* Botons com a botons (evita submits accidentals) */
#chatbot-open,
#minimize-chatbot,
#close-chatbot,
#send-message { 
  appearance: none;
}

/* Drag només des del header (evita que el clic del botó es “perdi”) */
#chatbot { cursor: default; }
#chatbot-header { cursor: move; }
#chatbot-header:active { cursor: grabbing; }


.card-container {
    display: flex;
    flex-wrap: wrap; /* Permet que les cards saltin a la següent línia si no hi ha espai */
    gap: 16px; /* Espai entre les cards */
    justify-content: center; /* Centra les cards dins del contenidor */
}

.card {
    flex: 1 1 calc(33.333% - 16px); /* Cada card ocupa 1/3 de l'amplada del contenidor menys l'espai del gap */
    max-width: calc(33.333% - 16px); /* Limita l'amplada màxima */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}


/* Oculta el submenú per defecte */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; /* Mostra el submenú sota l'element principal */
    left: 0;
    background-color: #fff;
    padding: 10px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    list-style: none;
}

/* Mostra el submenú amb hover només en dispositius amb cursor */
@media (hover: hover) and (pointer: fine) {
  .nav-item.dropdown:hover .dropdown-menu {
      display: block;
  }
}

/* Estils per als elements del submenú */
.dropdown-item {
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    display: block;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
    color: #007bff;
}


#loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}

#loading-spinner::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 3px solid #ccc;
  border-top: 3px solid #555;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

#loading-spinner.hidden {
  display: none;
}

/* Bootstrap 4 compatibility helpers for legacy templates using BS5 utility names */
.text-end { text-align: right !important; }
.text-start { text-align: left !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.bg-danger { background-color: #dc3545 !important; color: #fff !important; }
.bg-secondary { background-color: #6c757d !important; color: #fff !important; }
.bg-success { background-color: #28a745 !important; color: #fff !important; }
.bg-info { background-color: #17a2b8 !important; }
.bg-light { background-color: #f8f9fa !important; }
.bg-dark { background-color: #343a40 !important; color: #fff !important; }
.text-bg-light { background-color: #f8f9fa !important; color: #212529 !important; }
.form-select,
select.form-select {
  display: block;
  width: 100%;
  height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
}
.form-select-sm,
select.form-select-sm {
  height: calc(1.5em + 0.5rem + 2px);
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-size: 0.875rem;
}
.col-auto .form-select {
  width: auto;
  min-width: 10rem;
}
.row.g-2 { margin-left: -0.25rem; margin-right: -0.25rem; }
.row.g-2 > [class*="col-"] { padding-left: 0.25rem; padding-right: 0.25rem; margin-bottom: 0.5rem; }
.row.g-3 { margin-left: -0.5rem; margin-right: -0.5rem; }
.row.g-3 > [class*="col-"] { padding-left: 0.5rem; padding-right: 0.5rem; margin-bottom: 1rem; }
.d-flex.gap-1 { gap: 0.25rem; }
.d-flex.gap-2 { gap: 0.5rem; }
.d-flex.gap-3 { gap: 1rem; }
.d-inline.gap-1 > * + * { margin-left: 0.25rem; }
.d-inline.gap-2 > * + * { margin-left: 0.5rem; }
.d-inline.gap-3 > * + * { margin-left: 1rem; }
.d-inline-flex.gap-1 > * + * { margin-left: 0.25rem; }
.d-inline-flex.gap-2 > * + * { margin-left: 0.5rem; }
.d-inline-flex.gap-3 > * + * { margin-left: 1rem; }

/* Navbar behavior on mobile */
.custom_nav-container .navbar-collapse {
  width: 100%;
}
@media (max-width: 991.98px) {
  .custom_nav-container .navbar-collapse {
    background: #203376;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
  }
  .custom_nav-container .navbar-nav .nav-link {
    padding: 0.5rem 0.75rem;
    text-align: left;
    margin: 0;
  }
  .custom_nav-container .dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    border: 0;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.08);
  }
  .custom_nav-container .dropdown-item {
    color: #f9fcfb;
  }
  .custom_nav-container .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
  }
}

/* Respect click-open dropdown state and only use hover-open on pointer devices */
.dropdown-menu.show {
  display: block;
}
@media (hover: hover) and (pointer: fine) {
  .nav-item.dropdown:hover .dropdown-menu {
    display: block;
  }
}

/* Card grid: avoid forced 3-column squeeze on narrow screens */
.card-container > .card {
  flex: 1 1 300px;
  max-width: none;
  min-width: 260px;
}
@media (max-width: 768px) {
  .card-container > .card {
    min-width: 100%;
    flex-basis: 100%;
  }
}
