/* Custom project overrides and layout helpers */

/* Global background images (moved from default.blade.php) */
body {
  background-image: url('../images/bkg/bkg.jpg');
  background-repeat: no-repeat;
  background-position: center 50px;
  background-size: cover;
  min-height: 100vh;
}

#page {
  background-image: url('../images/bkg/bkg.jpg');
  background-repeat: no-repeat;
  background-position: center 150px;
  background-size: cover;
  min-height: 100vh;
}

/* Junior (Juni'OR): keep global mountain bg; light grey article panel like prod */
body.junior-page #subheader h1 {
  font-family: 'Mulish', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 26px;
  line-height: 50px;
  color: #8d121e;
}
body.junior-page #subheader span {
  font-family: 'Mulish', sans-serif;
  font-style: normal;
  font-weight: 300;
  font-size: 25px;
  line-height: 50px;
  color: #ffffff;
}
body.junior-page .content {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}
body.junior-page .fondoarti {
  background-color: #eeeeee !important;
  background-image: none !important;
  padding: 30px !important;
  margin-bottom: 50px;
  position: relative;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
}
body.junior-page .fondoarti h2 {
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
}
/* Prod lists are bullet-style, not 1.2.3. even if CMS outputs <ol> */
body.junior-page .fondoarti ol,
body.junior-page .fondoarti ul {
  margin-bottom: 1rem;
  padding-left: 0;
  list-style: none;
}
body.junior-page .fondoarti ol li,
body.junior-page .fondoarti ul li {
  position: relative;
  padding-left: 1.15em;
  margin-bottom: 0.35em;
}
body.junior-page .fondoarti ol li::before,
body.junior-page .fondoarti ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #5d5d5d;
  font-weight: bold;
  line-height: 1.5;
}

/* Bottom CTA: cta-2 uses inline-block; Bootstrap/form can break it — flex + explicit resets */
body.junior-page .ctahorin {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  width: 100% !important;
  max-width: 1100px;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 20px !important;
  margin-bottom: 10px !important;
  background-color: #212529 !important;
  border-radius: 20px;
  min-height: 120px;
  max-height: none !important;
  padding: 0 !important;
  box-sizing: border-box;
}
body.junior-page .ctahorin .secimgizq {
  display: block !important;
  width: auto !important;
  flex: 0 0 auto;
  max-width: 34%;
}
body.junior-page .ctahorin .secimgizq img.imgcta {
  display: block;
  max-height: 150px;
  width: auto;
  height: auto;
  border-radius: 0 0 0 20px;
  vertical-align: bottom;
}
body.junior-page .ctahorin .secder {
  display: flex !important;
  flex: 1 1 58%;
  min-width: 220px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 12px 20px 12px 12px;
  box-sizing: border-box;
}
body.junior-page .ctahorin .sectitulo {
  display: block !important;
  width: auto !important;
  flex: 1 1 45%;
  min-width: 180px;
}
body.junior-page .ctahorin .tituctain {
  display: block !important;
  color: #faaf40 !important;
  font-size: 28px !important;
  line-height: 1.2 !important;
  font-weight: bold !important;
}
body.junior-page .ctahorin .secboton {
  display: block !important;
  width: auto !important;
  flex: 0 1 auto;
  text-align: right;
}
body.junior-page .ctahorin .botonin {
  appearance: none;
  -webkit-appearance: none;
  color: #fff !important;
  background-color: #ab000d !important;
  border: none !important;
  border-radius: 15px !important;
  padding: 10px 30px !important;
  font-size: 20px !important;
  font-weight: 300 !important;
  line-height: 25px !important;
  margin: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
}
body.junior-page .ctahorin .botonin:hover {
  background: #faaf40 !important;
  color: #000 !important;
}

@media (max-width: 900px) {
  body.junior-page .ctahorin .secimgizq {
    display: none !important;
  }
  body.junior-page .ctahorin .secder {
    flex: 1 1 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 16px;
    justify-content: center;
    text-align: center;
  }
  body.junior-page .ctahorin .sectitulo {
    flex: 1 1 100%;
    text-align: center;
  }
  body.junior-page .ctahorin .tituctain {
    font-size: 18px !important;
    padding: 8px 0;
  }
  body.junior-page .ctahorin .secboton {
    text-align: center;
    width: 100%;
  }
  body.junior-page .ctahorin .botonin {
    font-size: 15px !important;
    padding: 10px 15px !important;
  }
}

/* Pages that must NOT show the mountain background */

/* Testimonials: make stars gold + improve readability */
body.temoignages-page .testi .descrip {
  color: #666;
}
body.temoignages-page .testi .cliente,
body.temoignages-page .testi .dato span {
  color: #666;
}
body.temoignages-page .testi img[src*="star-0.png"] {
  filter: brightness(0) saturate(100%) invert(72%) sepia(22%) saturate(1250%) hue-rotate(355deg) brightness(97%) contrast(90%);
}

/* Table padding and logo hover (from default.blade.php) */
.table td,
.table th {
  padding: 8px;
}

.main-subtitle {
  font-size: 16px;
  width: 280px;
  text-align: center;
  margin: 0;
  margin-top: 5px;
  display: block;
  color: #8d121e !important;
  font-weight: normal;
  line-height: 1.3;
  text-shadow: none !important;
  padding: 0 !important;
}

/* Desktop header subtitle (legacy class kept for compatibility) */
.logo-tagline {
  display: block;
  color: #8d121e !important;
  font-size: 12px;
  line-height: 1.3;
  text-align: left;
  max-width: 260px;
  margin-top: 4px;
  margin-bottom: 0;
  padding: 0;
  font-weight: normal;
}

a.logo-container .logo-tagline {
  color: #8d121e !important;
  padding: 0;
}

/* Stronger override for subtitle under logo: remove any theme text-shadow and extra gap */
header .header-desktop-logo-row .logo .logo-container .logo-tagline {
  text-shadow: none !important;
  margin-top: 2px;
}

/* Header top rates: add clear X spacing between Ag and Au blocks */
header .top-bar .moveable-banner ul li {
  margin-right: 18px !important;
}
header .top-bar .moveable-banner ul li:last-child {
  margin-right: 0 !important;
}

/* Subtitle: remove any inherited horizontal/inner padding */
.logo-tagline,
.main-subtitle,
header .header-desktop-logo-row .logo .logo-container .logo-tagline {
  padding: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Match footer background below the footer so no white band appears */
body {
  background-color: #1b1d21;
}

@media screen and (min-width: 1200px) {
  .main-subtitle {
    margin-top: -10px;
  }
}

@media screen and (min-width: 680px) {
  .main-subtitle {
    display: block;
  }
}

a.logo-container:hover {
  text-decoration: none !important;
}

/* Utility backgrounds */
.bg-light-eee {
  background-color: #eee;
}

/* Use instead of inline style="background-color:#eeeeee" */
.bg-eeeeee {
  background-color: #eee !important;
  background-image: none !important;
}

/* Ensure light grey wins even over legacy ID-based rules */
#page .bg-eeeeee {
  background-color: #eee !important;
  background-image: none !important;
}

/* Presse page: keep mountain page background and style inner blocks only */
.page-presse {
  padding-bottom: 2rem;
}

/* Certificate page content box */
.cert-page .cert-block {
  background-color: #eee;
  border-radius: 0;
  padding: 2rem;
}

/* Articles page tabs: same state model as categories tabs */
.articles-tabs {
  border-bottom: none !important;
  background: none !important;
}

.articles-tabs .nav-item {
  margin: 0;
}

.articles-tabs .nav-link {
  margin: 0 !important;
  padding: 9px 12px;
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  line-height: 28px;
  white-space: nowrap;
  border-radius: 4px 4px 0 0;
  border: 1px solid #aaaaaa;
  border-bottom: 0;
  background: #cccccc;
  color: #8d121e;
  text-decoration: none;
}

.articles-tabs .nav-link img.icon-20 {
  width: 18px;
  height: 18px;
  margin-right: 4px;
  vertical-align: middle;
}

/* Non-active hover/focus state */
.articles-tabs .nav-link:not(.active):hover,
.articles-tabs .nav-link:not(.active):focus {
  background: #cccccc !important;
  color: rgb(255, 0, 0) !important;
  border-color: #ffffff !important;
  border-bottom: 0 !important;
  text-decoration: none;
}

/* Active state */
.articles-tabs .nav-link.active {
  background: #ffffff !important;
  color: #1a1a1a !important;
  font-weight: 700 !important;
  border: 1px solid #aaaaaa !important;
  border-bottom: 0 !important;
}

.articles-tabs .nav-link.active:hover,
.articles-tabs .nav-link.active:focus {
  background: #ffffff !important;
  color: #1a1a1a !important;
}

@media (max-width: 767.98px) {
  .articles-tabs .nav-link {
    padding: 8px 10px;
    font-size: 14px;
    line-height: 22px;
  }
}

/* Articles page "Sort the items" buttons (match screenshot) */
.articles-sort-panel {
  align-items: stretch; /* keep full-width buttons inside flex column */
}

.articles-sort-panel h2 {
  text-transform: none !important;
}

.articles-sort-panel h2.h5,
.articles-sort-panel .h5 {
  text-transform: none !important;
}

.articles-sort-button {
  text-transform: none !important;
  width: 100% !important;
  display: block !important;
  text-align: center;
  padding: 10px 14px !important;
  font-size: 20px;
  font-weight: 700;
  border-radius: 6px;
  line-height: 1.2;
  text-decoration: none;
  box-sizing: border-box;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 12px !important;
  background-image: none !important;
  opacity: 1 !important;
}

.articles-sort-panel a.articles-sort-button--active {
  background-color: #ffffff !important;
  border: 1px solid #d7d7d7 !important;
  color: #8d121e !important;
  background-image: none !important;
}

.articles-sort-panel a.articles-sort-button--inactive {
  background-color: #8d121e !important;
  border: 1px solid #8d121e !important;
  color: #ffffff !important;
  background-image: none !important;
}

.articles-sort-panel a.articles-sort-button--inactive:hover,
.articles-sort-panel a.articles-sort-button--inactive:focus,
.articles-sort-panel a.articles-sort-button--inactive:visited {
  background-color: #8d121e !important;
  border-color: #8d121e !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

/* (Other styles from the main custom.css can be copied here as needed) */

