/*
Theme Name: MES Gestió Divi Child
Theme URI: https://www.mesgestio.com/
Description: Tema fill de Divi per al redisseny corporatiu de MES Gestió.
Author: MES Gestió
Template: Divi
Version: 1.0.0
Text Domain: mes-gestio-divi
*/

:root {
  --mg-navy: #0b2339;
  --mg-navy-2: #142f47;
  --mg-blue: #35a9df;
  --mg-blue-soft: #9bd9f1;
  --mg-orange: #f3921b;
  --mg-sand: #f3f1ec;
  --mg-paper: #faf9f6;
  --mg-white: #ffffff;
  --mg-ink: #102335;
  --mg-muted: #5d6c78;
  --mg-line: #d9dfe3;
  --mg-radius: 6px;
}

body {
  background: var(--mg-paper);
  color: var(--mg-ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#page-container { overflow: hidden; }
#main-content { background: var(--mg-paper); }
.container,
.et_pb_row.mg-container {
  width: min(1160px, calc(100% - 80px)) !important;
  max-width: 1160px !important;
}

.mg-section,
.mg-page-hero,
.mg-home-hero,
.mg-feature-section,
.mg-cta-section,
.mg-reserve-section {
  padding: 112px 0 !important;
}
.mg-section-white { background: var(--mg-white); }
.mg-section-sand { background: var(--mg-sand); }
.mg-section-navy { background: var(--mg-navy); color: var(--mg-white); }

.mg-heading h2,
.mg-feature-copy h2,
.mg-cta-copy h2,
.mg-reserve-copy h2 {
  margin: 0;
  color: var(--mg-navy);
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.02;
}
.mg-heading-light h2,
.mg-section-navy h2,
.mg-feature-copy h2,
.mg-cta-copy h2 { color: var(--mg-white); }
.mg-heading p,
.mg-feature-copy p,
.mg-cta-copy p,
.mg-reserve-copy p,
.mg-body-copy p {
  font-size: 17px;
  line-height: 1.75;
}
.mg-heading-copy {
  max-width: 690px;
  margin-top: 24px;
  color: var(--mg-muted);
}
.mg-heading-light .mg-heading-copy,
.mg-section-navy p,
.mg-feature-copy p,
.mg-cta-copy p { color: #c7d2db; }
.mg-kicker {
  margin-bottom: 18px !important;
  color: var(--mg-blue);
  font-size: 11px !important;
  font-weight: 800;
  letter-spacing: .18em;
  line-height: 1.3 !important;
  text-transform: uppercase;
}
.mg-section-navy .mg-kicker,
.mg-page-hero .mg-kicker,
.mg-home-hero .mg-kicker,
.mg-feature-section .mg-kicker,
.mg-cta-section .mg-kicker { color: var(--mg-blue-soft); }
.mg-large-copy {
  color: var(--mg-navy);
  font-size: 24px !important;
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: 1.45 !important;
}
.mg-split-row { align-items: start; }

/* Header */
.mg-global-topbar {
  padding: 0 !important;
  background: var(--mg-navy);
}
.mg-topbar-row {
  min-height: 30px;
  align-items: center;
}
.mg-topbar-text,
.mg-topbar-text p {
  margin: 0 !important;
  color: #b9c5cf;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 30px;
  text-transform: uppercase;
}
.mg-topbar-right { text-align: right; }
.mg-global-header {
  z-index: 9999;
  padding: 0 !important;
  border-bottom: 1px solid var(--mg-line);
  background: var(--mg-white);
}
.mg-header-row {
  min-height: 94px;
  align-items: center;
}
.mg-header-logo { margin: 0 !important; }
.mg-header-logo img {
  width: 128px !important;
  max-height: 66px;
  object-fit: contain;
}
.mg-header-nav .et_pb_code_inner { width: 100%; }
.mg-desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 27px;
}
.mg-desktop-nav a {
  position: relative;
  color: var(--mg-navy);
  font-size: 14px;
  font-weight: 700;
}
.mg-desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  background: var(--mg-orange);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .16s ease;
}
.mg-desktop-nav a:hover::after { transform: scaleX(1); }
.mg-mobile-nav { display: none; }
.mg-header-button { text-align: right; }

/* Buttons */
.mg-btn {
  display: inline-block;
  margin-top: 18px;
  margin-right: 16px;
}
body #page-container .et_pb_section .mg-btn .et_pb_button {
  padding: 15px 22px !important;
  border: 0 !important;
  border-radius: var(--mg-radius) !important;
  background: var(--mg-navy) !important;
  color: var(--mg-white) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
}
body #page-container .et_pb_section .mg-btn .et_pb_button::after { display: none; }
body #page-container .et_pb_section .mg-btn-orange .et_pb_button {
  background: var(--mg-orange) !important;
  color: var(--mg-navy) !important;
}
body #page-container .et_pb_section .mg-btn-light .et_pb_button {
  background: var(--mg-white) !important;
  color: var(--mg-navy) !important;
}
body #page-container .et_pb_section .mg-btn-ghost .et_pb_button {
  border: 1px solid rgba(255,255,255,.35) !important;
  background: transparent !important;
  color: var(--mg-white) !important;
}
body #page-container .et_pb_section .mg-btn .et_pb_button:hover {
  transform: translateY(-2px);
}

/* Hero */
.mg-home-hero {
  position: relative;
  min-height: 650px;
  padding: 0 !important;
  background: var(--mg-navy);
}
.mg-home-hero-row {
  min-height: 650px;
  align-items: stretch;
}
.mg-home-hero-row > .et_pb_column:first-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 68px 72px 0;
}
.mg-home-hero-row > .et_pb_column:last-child {
  position: relative;
  min-height: 650px;
}
.mg-hero-copy h1,
.mg-page-hero h1 {
  margin: 0;
  color: var(--mg-white);
  font-size: clamp(54px, 6.3vw, 88px);
  font-weight: 720;
  letter-spacing: -.055em;
  line-height: .98;
}
.mg-hero-copy h1 em {
  color: var(--mg-blue-soft);
  font-style: normal;
}
.mg-lead {
  max-width: 680px;
  margin-top: 28px;
  color: #d7e0e7;
  font-size: 19px !important;
  line-height: 1.65 !important;
}
.mg-hero-image {
  height: 100%;
  margin: 0 !important;
}
.mg-hero-image .et_pb_image_wrap,
.mg-hero-image img {
  width: 100%;
  height: 650px;
}
.mg-hero-image img {
  object-fit: cover;
  filter: saturate(.75) contrast(1.03);
}
.mg-hero-note {
  position: absolute;
  right: 0;
  bottom: 48px;
  width: min(320px, 84%);
  padding: 26px;
  border-left: 4px solid var(--mg-orange);
  border-radius: var(--mg-radius);
  background: rgba(11,35,57,.93);
  color: var(--mg-white);
}
.mg-hero-note h3 {
  color: var(--mg-white);
  font-size: 21px;
}
.mg-hero-note p {
  margin: 10px 0 0;
  color: #c7d2db;
  line-height: 1.6;
}
.mg-page-hero {
  padding: 0 !important;
  background: var(--mg-navy);
}
.mg-page-hero-row {
  min-height: 530px;
  align-items: center;
}
.mg-page-hero-row > .et_pb_column:first-child { padding: 72px 70px 72px 0; }
.mg-page-hero h1 { font-size: clamp(48px, 5.5vw, 74px); }
.mg-page-hero-image .et_pb_image_wrap,
.mg-page-hero-image img {
  width: 100%;
  height: 530px;
}
.mg-page-hero-image img { object-fit: cover; filter: saturate(.75); }
.mg-page-hero-mark {
  display: flex;
  min-height: 360px;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(255,255,255,.16);
}
.mg-monogram span {
  color: rgba(155,217,241,.28);
  font-size: 130px;
  font-weight: 800;
  letter-spacing: -.08em;
}

/* Stats and cards */
.mg-stats-section { padding: 0 !important; background: var(--mg-orange); }
.mg-stats-row { min-height: 138px; align-items: center; }
.mg-stat { padding: 20px 26px 20px 0; border-right: 1px solid rgba(11,35,57,.24); }
.mg-stats-row > .et_pb_column:last-child .mg-stat { border-right: 0; }
.mg-stat strong {
  display: block;
  color: var(--mg-navy);
  font-size: 34px;
  letter-spacing: -.04em;
  line-height: 1;
}
.mg-stat span {
  display: block;
  margin-top: 8px;
  color: var(--mg-navy);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}
.mg-card-grid,
.mg-timeline-grid,
.mg-contact-grid { margin-top: 36px; }
.mg-card,
.mg-timeline-card,
.mg-principle-card,
.mg-contact-card {
  height: 100%;
  min-height: 300px;
  padding: 34px;
  border: 1px solid var(--mg-line);
  border-top: 4px solid var(--mg-blue);
  border-radius: var(--mg-radius);
  background: var(--mg-white);
}
.mg-card:nth-child(2n),
.mg-timeline-card:nth-child(2n) { border-top-color: var(--mg-orange); }
.mg-card h3,
.mg-timeline-card h3,
.mg-principle-card h3,
.mg-contact-card h3 {
  margin: 18px 0 16px;
  color: var(--mg-navy);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
}
.mg-card p,
.mg-timeline-card p,
.mg-principle-card p,
.mg-contact-card p {
  color: var(--mg-muted);
  font-size: 15px;
  line-height: 1.7;
}
.mg-number {
  color: var(--mg-orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}
.mg-tag {
  display: inline-block;
  padding: 6px 9px;
  border: 1px solid var(--mg-line);
  border-radius: 3px;
  color: var(--mg-navy);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.mg-card-contact { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--mg-line); }
.mg-card a,
.mg-contact-card a,
.mg-inline-link {
  color: var(--mg-navy);
  font-weight: 750;
}
.mg-centered-action { margin-top: 32px; text-align: center; }
.mg-centered-action .mg-btn { margin-right: 0; }
.mg-dark-card {
  height: 100%;
  min-height: 280px;
  padding: 34px;
  border-top: 4px solid var(--mg-orange);
  border-bottom: 1px solid #31485c;
}
.mg-dark-card h3 {
  margin: 18px 0 14px;
  color: var(--mg-white);
  font-size: 28px;
}
.mg-dark-card p { color: #c7d2db; line-height: 1.7; }
.mg-timeline-card,
.mg-principle-card { min-height: 230px; }
.mg-news-card { min-height: 330px; }
.mg-news-card h3 { font-size: 28px; }
.mg-facility-card { min-height: 390px; }
.mg-project-card { background: var(--mg-navy); border-color: var(--mg-navy); border-top-color: var(--mg-orange); }
.mg-project-card h3,
.mg-project-card a { color: var(--mg-white); }
.mg-project-card p { color: #c7d2db; }

/* Feature and impact */
.mg-feature-section { padding: 0 !important; background: var(--mg-navy); }
.mg-feature-row { align-items: stretch; }
.mg-feature-row > .et_pb_column:first-child { min-height: 620px; }
.mg-feature-image,
.mg-feature-image .et_pb_image_wrap,
.mg-feature-image img { width: 100%; height: 100%; min-height: 620px; }
.mg-feature-image { margin: 0 !important; }
.mg-feature-image img { object-fit: cover; filter: saturate(.72); }
.mg-feature-row > .et_pb_column:last-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 76px 0 76px 70px;
}
.mg-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 28px;
}
.mg-keywords span,
.mg-quality-list span,
.mg-territory span {
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 3px;
  color: var(--mg-white);
  font-size: 12px;
  font-weight: 750;
}
.mg-impact-row { align-items: center; }
.mg-impact-number {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--mg-line);
  border-left: 4px solid var(--mg-blue);
  background: var(--mg-sand);
}
.mg-impact-number strong {
  color: var(--mg-navy);
  font-size: clamp(76px, 9vw, 126px);
  letter-spacing: -.08em;
  line-height: .9;
}
.mg-impact-number span {
  margin-top: 20px;
  color: var(--mg-muted);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.mg-quality-panel {
  min-height: 350px;
  padding: 50px;
  background: var(--mg-navy);
}
.mg-quality-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.mg-quality-list span {
  padding: 18px;
  border-color: #31485c;
}

/* Territory and gallery */
.mg-territory-panel {
  min-height: 390px;
  padding: 54px;
  background: var(--mg-navy);
}
.mg-territory {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.mg-territory span {
  position: relative;
  padding: 26px 18px 26px 38px;
  border-color: #31485c;
}
.mg-territory span::before {
  position: absolute;
  top: 31px;
  left: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mg-orange);
  content: "";
}
.mg-gallery-row { margin-top: 36px; align-items: stretch; }
.mg-gallery-image,
.mg-gallery-image .et_pb_image_wrap,
.mg-gallery-image img { width: 100%; height: 480px; }
.mg-gallery-image img { object-fit: cover; filter: saturate(.75); }

/* Reserve, CTA and contact */
.mg-reserve-section { padding: 72px 0 !important; background: var(--mg-orange); }
.mg-reserve-row,
.mg-cta-row { align-items: center; }
.mg-reserve-copy h2 { font-size: clamp(38px, 4vw, 58px); }
.mg-reserve-copy p { max-width: 720px; color: var(--mg-navy); }
.mg-reserve-copy .mg-kicker { color: var(--mg-navy); }
.mg-cta-section { padding: 84px 0 !important; background: var(--mg-navy); }
.mg-cta-copy h2 { font-size: clamp(38px, 4vw, 58px); }
.mg-contact-card { min-height: 310px; }
.mg-contact-links {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--mg-line);
}
.mg-toggle {
  margin-bottom: 12px !important;
  border: 1px solid var(--mg-line) !important;
  border-radius: var(--mg-radius);
  background: var(--mg-white);
}
.mg-toggle .et_pb_toggle_title { font-weight: 750; }

/* Footer */
.mg-global-footer { padding: 82px 0 28px !important; background: var(--mg-navy); }
.mg-footer-row { align-items: start; }
.mg-footer-logo { max-width: 135px; margin: 0 0 24px !important; }
.mg-footer-copy p,
.mg-footer-links p,
.mg-footer-links a {
  color: #c7d2db;
  font-size: 14px;
  line-height: 2;
}
.mg-footer-title {
  color: var(--mg-blue-soft) !important;
  font-size: 11px !important;
  font-weight: 800;
  letter-spacing: .16em;
}
.mg-footer-bottom-row {
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid #31485c;
}
.mg-footer-bottom p,
.mg-footer-bottom a {
  color: #91a2af;
  font-size: 11px;
}
.mg-footer-bottom-right { text-align: right; }

@media (max-width: 980px) {
  .container,
  .et_pb_row.mg-container { width: min(100% - 48px, 760px) !important; }
  .mg-section,
  .mg-page-hero,
  .mg-home-hero,
  .mg-feature-section { padding: 82px 0 !important; }
  .mg-header-row { min-height: 82px; }
  .mg-desktop-nav,
  .mg-header-button { display: none !important; }
  .mg-mobile-nav { display: block; text-align: right; }
  .mg-mobile-nav summary {
    display: inline-block;
    padding: 10px 14px;
    border: 1px solid var(--mg-line);
    border-radius: 4px;
    color: var(--mg-navy);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
  }
  .mg-mobile-nav div {
    position: absolute;
    z-index: 99999;
    top: 48px;
    right: 0;
    display: grid;
    min-width: 220px;
    padding: 12px;
    border: 1px solid var(--mg-line);
    background: var(--mg-white);
    box-shadow: 0 18px 45px rgba(11,35,57,.15);
    text-align: left;
  }
  .mg-mobile-nav a {
    padding: 10px;
    color: var(--mg-navy);
    font-weight: 700;
  }
  .mg-home-hero-row,
  .mg-page-hero-row { min-height: auto; }
  .mg-home-hero-row > .et_pb_column:first-child,
  .mg-page-hero-row > .et_pb_column:first-child { padding: 62px 0 48px; }
  .mg-home-hero-row > .et_pb_column:last-child { min-height: 500px; }
  .mg-hero-image .et_pb_image_wrap,
  .mg-hero-image img { height: 500px; }
  .mg-page-hero-image .et_pb_image_wrap,
  .mg-page-hero-image img { height: 430px; }
  .mg-page-hero-mark { min-height: 220px; border-left: 0; border-top: 1px solid rgba(255,255,255,.16); }
  .mg-monogram span { font-size: 90px; }
  .mg-card,
  .mg-timeline-card,
  .mg-principle-card,
  .mg-contact-card,
  .mg-dark-card { min-height: auto; }
  .mg-feature-row > .et_pb_column:last-child { padding: 60px 0; }
  .mg-feature-row > .et_pb_column:first-child,
  .mg-feature-image,
  .mg-feature-image .et_pb_image_wrap,
  .mg-feature-image img { min-height: 480px; }
  .mg-footer-bottom-right,
  .mg-topbar-right { text-align: left; }
}

@media (max-width: 767px) {
  .container,
  .et_pb_row.mg-container { width: calc(100% - 36px) !important; }
  .mg-section,
  .mg-page-hero,
  .mg-home-hero,
  .mg-feature-section { padding: 64px 0 !important; }
  .mg-global-topbar { display: none; }
  .mg-heading h2,
  .mg-feature-copy h2,
  .mg-cta-copy h2,
  .mg-reserve-copy h2 { font-size: 39px; }
  .mg-hero-copy h1,
  .mg-page-hero h1 { font-size: 48px; }
  .mg-lead { font-size: 17px !important; }
  .mg-card,
  .mg-timeline-card,
  .mg-principle-card,
  .mg-contact-card,
  .mg-dark-card { padding: 27px; }
  .mg-stat { border-right: 0; border-bottom: 1px solid rgba(11,35,57,.2); }
  .mg-stats-row > .et_pb_column:last-child .mg-stat { border-bottom: 0; }
  .mg-quality-list,
  .mg-territory { grid-template-columns: 1fr; }
  .mg-impact-number,
  .mg-quality-panel,
  .mg-territory-panel { min-height: 290px; padding: 34px; }
  .mg-gallery-image,
  .mg-gallery-image .et_pb_image_wrap,
  .mg-gallery-image img { height: 330px; }
  .mg-footer-bottom-row { margin-top: 30px; }
}