/* DevoriaSoft layout — page structure, section rhythm, container, responsive helpers. */

.site-main {
  min-height: calc(100vh - var(--ds-header-height));
}

.container-ds {
  width: 100%;
  max-width: var(--ds-container-max);
  margin-inline: auto;
  padding-inline: var(--ds-space-5);
}

@media (max-width: 575.98px) {
  .container-ds {
    padding-inline: var(--ds-space-4);
  }
}

.section {
  padding-block: var(--ds-space-8);
}

.section-sm {
  padding-block: var(--ds-space-7);
}

@media (max-width: 767.98px) {
  .section {
    padding-block: var(--ds-space-7);
  }
  .section-sm {
    padding-block: var(--ds-space-6);
  }
}

.section-alt {
  background-color: var(--ds-bg-alt);
}

.section-dark {
  background-color: var(--ds-bg-dark);
  color: var(--ds-text-on-dark);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--ds-text-on-dark);
}

.section-dark p {
  color: var(--ds-text-on-dark-muted);
}

.section-header {
  max-width: 640px;
  margin-bottom: var(--ds-space-6);
}

.section-header.text-center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: var(--ds-fs-xs);
  font-weight: var(--ds-fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ds-blue);
  margin-bottom: var(--ds-space-3);
}

/* Simple responsive grid of equal-width cards using CSS grid, avoids fighting Bootstrap column math for feature grids */
.grid-auto {
  display: grid;
  gap: var(--ds-space-5);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--ds-white);
  border-bottom: 1px solid transparent;
  padding-block: 9px;
  display: flex;
  align-items: center;
  z-index: 1040;
  transition: box-shadow var(--ds-duration-base) var(--ds-ease),
              border-color var(--ds-duration-base) var(--ds-ease);
}

.site-header.is-scrolled {
  box-shadow: var(--ds-shadow-sm);
  border-bottom-color: var(--ds-border);
}

.site-logo {
  display: block;
  width: auto;
  height: 52px;
}

@media (min-width: 992px) {
  .site-header {
    padding-block: 6px;
  }

  .site-logo {
    height: 68px;
  }
}

.site-logo-mobile-nav {
  display: block;
  width: auto;
  height: 46px;
}

.site-header .nav-link {
  color: var(--ds-navy);
  font-weight: var(--ds-fw-semibold);
  font-size: 18px;
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid transparent;
}

.site-header .nav-link.active {
  color: var(--ds-blue);
  border-bottom-color: var(--ds-blue);
}

.site-header .navbar-nav .nav-item {
  position: relative;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
  color: var(--ds-blue);
}

.site-header .navbar-toggler {
  padding: 0.4rem 0.55rem;
  border: 1.5px solid var(--ds-border);
  border-radius: var(--ds-radius-sm);
  background-color: transparent;
  line-height: 1;
  transition: border-color var(--ds-duration-fast) var(--ds-ease),
              background-color var(--ds-duration-fast) var(--ds-ease);
}

.site-header .navbar-toggler:hover {
  border-color: var(--ds-blue);
}

.site-header .navbar-toggler:focus {
  outline: 0;
  box-shadow: 0 0 0 3px var(--ds-blue-100);
  border-color: var(--ds-blue);
}

.site-header .navbar-toggler-icon {
  display: inline-block;
  width: 1.4em;
  height: 1.4em;
  vertical-align: middle;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(10, 27, 51, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.site-header .dropdown-menu {
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  box-shadow: var(--ds-shadow-md);
  padding: var(--ds-space-2);
  margin-top: var(--ds-space-2);
}

.site-header .dropdown-item {
  border-radius: var(--ds-radius-sm);
  padding: 0.55rem 0.9rem;
  font-size: var(--ds-fs-sm);
  color: var(--ds-text);
}

.site-header .dropdown-item:hover,
.site-header .dropdown-item:focus {
  background-color: var(--ds-blue-50);
  color: var(--ds-blue);
}

.offcanvas .nav-link {
  color: var(--ds-navy);
  font-weight: var(--ds-fw-medium);
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid var(--ds-border);
  border-left: 3px solid transparent;
}

.offcanvas .nav-link.active {
  color: var(--ds-blue);
  font-weight: var(--ds-fw-bold);
  background-color: var(--ds-blue-50);
  border-left-color: var(--ds-blue);
}

.mobile-submenu-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  text-align: left;
}

.mobile-submenu-chevron {
  flex-shrink: 0;
  transition: transform var(--ds-duration-fast) var(--ds-ease);
}

.mobile-submenu-toggle[aria-expanded="true"] .mobile-submenu-chevron {
  transform: rotate(180deg);
}

.mobile-submenu {
  margin: 0;
  padding: 0 0 var(--ds-space-2);
  border-bottom: 1px solid var(--ds-border);
}

.mobile-submenu-link {
  display: block;
  padding: 0.6rem 0 0.6rem var(--ds-space-4);
  color: var(--ds-text-muted);
  font-size: var(--ds-fs-sm);
}

.mobile-submenu-link:hover,
.mobile-submenu-link:focus {
  color: var(--ds-blue);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ds-navy);
  color: var(--ds-text-on-dark-muted);
}

.site-logo-footer {
  filter: brightness(0) invert(1);
}

.footer-about {
  color: var(--ds-text-on-dark-muted);
  max-width: 34ch;
}

.footer-heading {
  color: var(--ds-text-on-dark);
  font-size: var(--ds-fs-sm);
  font-weight: var(--ds-fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--ds-space-4);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3);
}

.footer-links a {
  color: var(--ds-text-on-dark-muted);
  font-size: var(--ds-fs-sm);
}

.footer-links a:hover {
  color: var(--ds-white);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ds-text-on-dark-muted);
}

.footer-bottom a {
  color: var(--ds-text-on-dark-muted);
}

.footer-bottom a:hover {
  color: var(--ds-white);
}

.newsletter-form .input-group .form-control {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ds-white);
}

.newsletter-form .input-group .form-control::placeholder {
  color: var(--ds-text-on-dark-muted);
}

.newsletter-form .input-group .form-control:focus {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(2, 201, 192, 0.25);
}

/* ---------- Page loader (top progress bar) ---------- */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--ds-blue), var(--ds-teal));
  z-index: 2050;
  transition: width var(--ds-duration-slow) var(--ds-ease), opacity var(--ds-duration-base) var(--ds-ease);
  opacity: 0;
}

.page-loader.is-loading {
  opacity: 1;
  width: 70%;
}

.page-loader.is-done {
  opacity: 1;
  width: 100%;
}

/* ---------- Cookie consent ---------- */
.cookie-consent {
  position: fixed;
  left: var(--ds-space-4);
  right: var(--ds-space-4);
  bottom: var(--ds-space-4);
  max-width: 720px;
  margin-inline: auto;
  background: var(--ds-navy);
  color: var(--ds-text-on-dark-muted);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-lg);
  padding: var(--ds-space-5);
  z-index: 1900;
  transform: translateY(16px);
  opacity: 0;
  transition: transform var(--ds-duration-base) var(--ds-ease), opacity var(--ds-duration-base) var(--ds-ease);
}

.cookie-consent.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-consent p {
  color: var(--ds-text-on-dark-muted);
  font-size: var(--ds-fs-sm);
  margin-bottom: 0;
}

.cookie-consent a {
  color: var(--ds-teal);
}

.cookie-consent-inner {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2);
}

@media (min-width: 576px) {
  .cookie-consent-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--ds-space-4);
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: var(--ds-space-9);
  background:
    radial-gradient(60% 80% at 85% 0%, rgba(0, 87, 252, 0.25), transparent 60%),
    radial-gradient(50% 60% at 10% 100%, rgba(2, 201, 192, 0.2), transparent 60%),
    var(--ds-navy);
}

@media (max-width: 767.98px) {
  .hero {
    padding-block: var(--ds-space-7);
  }
}

/* ---------- Error / status pages ---------- */
.error-page {
  min-height: calc(100vh - var(--ds-header-height));
  display: flex;
  align-items: center;
}

.error-code {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: var(--ds-fw-bold);
  line-height: 1;
  margin-bottom: var(--ds-space-4);
  background: linear-gradient(135deg, var(--ds-blue), var(--ds-teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Visually hidden but available to assistive tech */
.visually-hidden-ds {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
