/*
 * Salvarient Ingeniería Ambiental S.A. - Custom Stylesheet
 * Based on Digital Trend Architecture (#057a8d / #0c8195 / #f1c111 / #171819)
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-color:        #057a8d;
  --primary-dark:         #035361;
  --secondary-color:      #f1c111;
  --secondary-dark:       #b48600;
  --white-color:          #ffffff;
  --dark-color:           #171819;
  --project-bg:           #f0f8ff;
  --menu-bg:              #075e6d;

  --title-color:          #0f172a;
  --gray-color:           #64748b;
  --link-color:           #0f172a;
  --p-color:              #334155;

  --base-font-family:     'Inter', sans-serif;
  --title-font-family:    'Inter', sans-serif;
  --font-bold-family:     'Inter', sans-serif;
  --font-weight-bold:     700;

  --h1-font-size:         38px;
  --h2-font-size:         28px;
  --h3-font-size:         21px;
  --p-font-size:          16.5px;
  --base-font-size:       16px;
  --menu-font-size:       14.5px;

  --border-radius-large:  100px;
  --border-radius-small:  8px;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--white-color);
  font-family: var(--base-font-family);
  color: var(--p-color);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--title-font-family);
  line-height: 1.28;
  color: var(--title-color);
  font-weight: 700;
}

h1 {
  font-size: var(--h1-font-size);
  font-weight: 800;
}

h2 {
  font-size: var(--h2-font-size);
  font-weight: 700;
}

h3 {
  font-size: var(--h3-font-size);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

h4 {
  color: var(--primary-color);
  font-family: var(--base-font-family);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

p {
  color: var(--p-color);
  font-size: var(--p-font-size);
  line-height: 1.62;
}

b, strong {
  color: #0f172a;
  font-weight: 700;
}

.text-white strong,
.hero strong,
.site-footer strong {
  color: var(--secondary-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.25s ease;
}

a:hover, a:focus {
  color: var(--primary-dark);
  text-decoration: none;
}

.section-padding {
  padding: 5.5em 0;
}

.section-padding-half {
  padding: 3.5em 0;
}

/* BUTTONS */
.custom-btn {
  background: transparent;
  border: 2px solid var(--dark-color);
  border-radius: var(--border-radius-large);
  padding: 12px 28px;
  color: var(--dark-color);
  font-family: var(--title-font-family);
  font-size: 15.5px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-block;
  transition: all 0.3s ease;
}

.custom-btn.btn-bg {
  background: var(--secondary-color);
  color: #0f172a;
  border-color: var(--secondary-color);
}

.custom-btn.btn-bg:hover,
.custom-btn.btn-bg:focus {
  background: #ffffff;
  color: #075e6d;
  border-color: #ffffff;
}

.custom-btn-teal {
  background: var(--primary-color);
  color: #ffffff !important;
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius-large);
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  display: inline-block;
}

.custom-btn-teal:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #ffffff !important;
}

/*---------------------------------------
  HEADER & SINGLE-ROW NAVIGATION
-----------------------------------------*/
.navbar {
  background: var(--menu-bg);
  z-index: 1030;
  position: sticky;
  top: 0;
  right: 0;
  left: 0;
  padding: 0.95em 1.2em;
  box-shadow: 0 4px 20px rgba(7, 94, 109, 0.22);
  overflow: visible !important;
}

.navbar > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  overflow: visible !important;
}

.navbar-brand {
  color: var(--white-color) !important;
  font-size: 21px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  margin-right: 18px;
}

.navbar-brand i {
  color: var(--secondary-color);
  font-size: 24px;
}

.navbar-brand .brand-sub {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  color: #bae6fd;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-top: -2px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
}

.navbar-nav .nav-item {
  position: relative;
  white-space: nowrap;
}

.nav-link {
  color: var(--white-color) !important;
  font-size: var(--menu-font-size);
  font-weight: 600;
  letter-spacing: 0.2px;
  margin: 0 0.55em;
  padding: 0.55em 0.35em !important;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-link.active,
.nav-link:hover {
  color: var(--secondary-color) !important;
}

.navbar-expand-lg .navbar-nav .nav-link.contact {
  border: 2px solid var(--secondary-color);
  border-radius: var(--border-radius-large);
  color: var(--secondary-color) !important;
  font-weight: 700;
  padding: 0.48em 1.45em !important;
  margin-left: 0.6em;
}

.navbar-expand-lg .navbar-nav .nav-link.contact:hover,
.navbar-expand-lg .navbar-nav .nav-link.contact.active {
  background: var(--secondary-color);
  color: #0f172a !important;
}

/* DROPDOWN SUBMENU */
.nav-item.has-sub {
  position: relative;
}

.nav-item.has-sub .caret-icon {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.nav-item.has-sub:hover .caret-icon {
  transform: rotate(180deg);
}

.nav-item.has-sub > .submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 275px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
  border: 1px solid #e2e8f0;
  padding: 10px 0;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.22s ease;
  z-index: 1100;
}

.nav-item.has-sub:hover > .submenu,
.nav-item.has-sub:focus-within > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-item.has-sub > .submenu li {
  display: block;
  margin: 0;
}

.nav-item.has-sub > .submenu li a {
  display: block;
  padding: 9px 18px;
  color: #0f172a !important;
  font-size: 13.8px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-item.has-sub > .submenu li a:hover {
  background: #f0f8ff;
  color: #057a8d !important;
}

/* Mobile Toggler */
.navbar-toggler {
  border: 0;
  padding: 0;
  cursor: pointer;
  margin: 0;
  width: 32px;
  height: 35px;
  outline: none;
}

.navbar-toggler .navbar-toggler-icon {
  background: var(--white-color);
  display: block;
  width: 28px;
  height: 2px;
  position: relative;
}

.navbar-toggler .navbar-toggler-icon::before,
.navbar-toggler .navbar-toggler-icon::after {
  position: absolute;
  right: 0;
  left: 0;
  background: var(--white-color);
  width: 28px;
  height: 2px;
  content: '';
}

.navbar-toggler .navbar-toggler-icon::before { top: -8px; }
.navbar-toggler .navbar-toggler-icon::after { top: 8px; }

/*---------------------------------------
  HERO & SUBPAGE HERO
-----------------------------------------*/
.hero {
  position: relative;
  padding: 4.5em 0;
  overflow: hidden;
}

.hero-bg {
  background: linear-gradient(168deg, #075e6d 68%, var(--project-bg) 32%);
}

.hero-text h1 {
  color: #ffffff;
  font-size: 2.45rem;
  line-height: 1.22;
}

.hero-text p {
  color: #e0f2fe;
  font-size: 1.08rem;
}

.hero-image img {
  border-radius: 14px;
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.32);
  border: 3px solid rgba(255, 255, 255, 0.2);
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.subpage-hero {
  background: linear-gradient(135deg, #075e6d 0%, #033a44 100%);
  padding: 3.6em 0 3.2em 0;
  color: #ffffff;
  border-bottom: 4px solid var(--secondary-color);
}

.subpage-hero h1 {
  color: #ffffff;
  font-size: 2.15rem;
  margin-bottom: 0.4rem;
}

.subpage-hero p {
  color: #bae6fd;
  margin-bottom: 0;
  font-size: 1.02rem;
}

.breadcrumb-strip {
  font-size: 13.5px;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.breadcrumb-strip a {
  color: var(--secondary-color);
  font-weight: 600;
}

/*---------------------------------------
  PROJECT / SERVICES CARDS & OWL CAROUSEL
-----------------------------------------*/
.project {
  background: var(--project-bg);
}

.project-wrapper {
  position: relative;
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  border: 1px solid #dbeafe;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-wrapper img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.project-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-card-body small {
  color: var(--primary-color);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  display: block;
}

.project-card-body h3 {
  font-size: 1.25rem;
  color: #0f172a;
  margin-bottom: 10px;
}

.project-card-body p {
  font-size: 15px;
  color: #334155;
  margin-bottom: 16px;
}

.project-meta-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  font-weight: 700;
}

/* Native list-detail from Digital Trend */
.list-detail {
  margin-left: 0.5em;
  padding-left: 1.2em;
  position: relative;
}

.list-detail li {
  display: block;
  list-style: none;
  margin: 0.75em 0 0 0.8em;
  position: relative;
  color: #1e293b;
  font-size: 15.5px;
}

.list-detail li::before {
  content: "";
  width: 0;
  height: 0;
  border-width: 0 12px 12px 0;
  border-color: transparent var(--primary-color) transparent transparent;
  border-style: solid;
  position: absolute;
  left: -22px;
  top: 5px;
}

/*---------------------------------------
  TECHNICAL TABLES & MATRIZ AMBIENTAL
-----------------------------------------*/
.eng-table-wrap {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.07);
  border: 1px solid #cbd5e1;
  overflow: hidden;
}

.eng-table {
  width: 100%;
  border-collapse: collapse;
}

.eng-table thead th {
  background: #075e6d;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 3px solid var(--secondary-color);
}

.eng-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 14.5px;
  vertical-align: middle;
}

.eng-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.nca-box {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  padding: 30px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.nca-result-panel {
  background: linear-gradient(155deg, #075e6d 0%, #03333b 100%);
  color: #ffffff;
  border-radius: 14px;
  padding: 30px;
  position: sticky;
  top: 100px;
  box-shadow: 0 16px 38px rgba(7, 94, 109, 0.25);
}

.nca-result-panel p,
.nca-result-panel span,
.nca-result-panel li {
  color: #e0f2fe;
}

.nca-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 13px;
  background: var(--secondary-color);
  color: #0f172a !important;
}

/*---------------------------------------
  CONTACT & FORMS
-----------------------------------------*/
.contact-form .form-control {
  box-shadow: none;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 16px;
  height: auto;
  color: #0f172a;
  font-size: 15px;
  margin-bottom: 14px;
}

.contact-form .form-control:focus {
  border-color: var(--primary-color);
  background: #ffffff;
}

.form-status-msg {
  display: none;
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 8px;
  background: #ecfdf5;
  border: 1px solid #10b981;
  color: #065f46;
  font-weight: 600;
  font-size: 14.5px;
}

/*---------------------------------------
  FOOTER
-----------------------------------------*/
.site-footer {
  background: var(--dark-color);
  color: #cbd5e1;
  padding: 4.5em 0 3em 0;
  border-top: 4px solid var(--primary-color);
}

.site-footer h3,
.site-footer h4 {
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: none;
  letter-spacing: 0;
}

.site-footer p {
  color: #cbd5e1;
  font-size: 14.5px;
}

.site-footer a {
  color: #cbd5e1;
  font-size: 14.5px;
}

.site-footer a:hover {
  color: var(--secondary-color);
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links-list li {
  margin-bottom: 9px;
}

/* Cookie Banner */
.salv-cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 960px;
  margin: 0 auto;
  background: #0f172a;
  color: #f8fafc;
  padding: 18px 24px;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  border: 1px solid #334155;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.salv-cookie-banner p {
  color: #e2e8f0;
  font-size: 13.8px;
  margin: 0;
}

@media screen and (max-width: 991px) {
  .navbar > .container {
    flex-wrap: wrap;
  }
  .navbar-collapse {
    background: #054a57;
    padding: 16px;
    border-radius: 10px;
    margin-top: 12px;
    width: 100%;
  }
  .navbar-nav {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  .nav-item.has-sub > .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    padding-left: 12px;
    margin: 4px 0 8px 0;
    width: 100%;
  }
  .nav-item.has-sub > .submenu li a {
    color: #e0f2fe !important;
  }
  .salv-cookie-banner {
    flex-direction: column;
    text-align: left;
  }
}

/* === SURGICAL GEOMETRY FIXES === */
html, body {
  overflow-x: hidden !important;
}
select, .form-control, input, textarea {
  max-width: 100% !important;
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
[class*="col-"], .nca-box, form {
  min-width: 0 !important;
  max-width: 100% !important;
}
.eng-table {
  display: block;
  width: 100%;
  overflow-x: auto;
}
