/* ==========================================================================
   rimas-global.min.css — Rimas 2.0 Global Theme
   Owns site-wide layout, typography, hero, cards, footer, and shared UI.
   Navbar is owned ONLY by navbar-override.css.
   ========================================================================== */

/* ------------------------------
   Root + Base
-------------------------------- */
:root {
  --rbs-navy: #0f2f54;
  --rbs-blue: #1b4f7e;
  --rbs-accent: #00bfff;
  --rbs-gold: #f4c76a;

  --rbs-text: #212529;
  --rbs-bg: #f6f7fb;

  --rbs-frame-radius: 20px;
  --rbs-frame-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);

  --rbs-anchor-offset: 56px;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 56px;
}

[id] {
  scroll-margin-top: var(--rbs-anchor-offset);
}

#content {
  scroll-margin-top: 0;
}

main[id],
section[id] {
  scroll-margin-top: 56px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--rbs-bg);
  color: var(--rbs-text);
  margin: 0;
  padding: 0;
}

main {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--rbs-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Montserrat", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
}

.text-primary {
  color: var(--rbs-blue) !important;
}

/* ------------------------------
   Accessibility
-------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 0.55rem 0.95rem;
  background: #ffdb3c;
  color: #000;
  z-index: 9999;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--rbs-blue);
  outline-offset: 3px;
}

/* ------------------------------
   Shared section spacing
-------------------------------- */
main section {
  padding: clamp(3.5rem, 6vw, 5rem) 0;
}

.content-sections {
  opacity: 1;
  transition: opacity 0.35s ease;
}

.content-sections.is-collapsed {
  opacity: 0;
  pointer-events: none;
}

/* ------------------------------
   Hero — classic shell
-------------------------------- */
.hero-classic {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 56px);
  min-height: calc(100svh - 56px);
  min-height: calc(100dvh - 56px);
  display: flex;
  align-items: center;
}

.hero-classic .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-classic .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 88% center;
  transform: scale(1.02);
}

.hero-classic .hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(15, 47, 84, 0.82) 0%,
    rgba(27, 79, 126, 0.60) 55%,
    rgba(15, 47, 84, 0.25) 100%
  );
}

.hero-classic .hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(4rem, 8vw, 6rem) 0;
  max-width: 840px;
}

.hero-title {
  font-size: clamp(2.25rem, 4.3vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  text-shadow: 0 14px 28px rgba(0, 0, 0, 0.30);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  max-width: 58ch;
  margin: 0 0 1.6rem;
  text-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
}

.hero-cta {
  border-radius: 999px !important;
  padding: 0.85rem 1.35rem !important;
  font-weight: 600 !important;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
  text-decoration: none !important;
}

/* ------------------------------
   Shared surfaces
-------------------------------- */
.frame {
  background: #fff;
  border-radius: var(--rbs-frame-radius);
  box-shadow: var(--rbs-frame-shadow);
  padding: clamp(2rem, 4vw, 3rem);
}

.form-section {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
  width: min(90vw, 1100px);
  margin: 0 auto;
  padding: clamp(1.5rem, 3.2vw, 2.5rem);
}

/* ------------------------------
   Insight highlight / metrics
-------------------------------- */
.insight-highlight {
  background-color: rgba(255, 255, 255, 0.72);
  border-radius: 1.5rem;
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(12px);
}

.insight-highlight h3 {
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  margin: 0 0 1.25rem;
}

.insight-metrics {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.insight-metric {
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.08);
  padding: 1.15rem 1rem;
}

.insight-metric strong {
  display: block;
  font-size: clamp(1.15rem, 1.7vw, 1.65rem);
  line-height: 1.08;
  color: #0c1240;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.insight-metric span {
  display: block;
  color: rgba(12, 18, 64, 0.75);
  font-weight: 500;
  font-size: 0.95rem;
}

.insight-footnote {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: rgba(12, 18, 64, 0.72);
}

/* ------------------------------
   Shared cards
-------------------------------- */
.services-grid .card,
.sectors-grid .card,
.insights-grid .card {
  border-radius: 18px;
  border: 1px solid rgba(12, 18, 64, 0.08);
  height: 100%;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.services-grid .card:hover,
.sectors-grid .card:hover,
.insights-grid .card:hover {
  border-color: rgba(37, 99, 235, 0.55);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.services-grid .card-body,
.sectors-grid .card-body,
.insights-grid .card-body {
  display: flex;
  flex-direction: column;
}

.services-grid .card-body .stretched-link,
.sectors-grid .card-body .stretched-link,
.insights-grid .card-body .stretched-link {
  margin-top: auto;
}

/* ------------------------------
   Insight share button
-------------------------------- */
.insight-share {
  margin-top: 0.9rem;
}

.insight-share__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 0;
  background: rgba(15, 47, 84, 0.08);
  color: #0f2f54;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.insight-share__button:hover,
.insight-share__button:focus-visible {
  background: rgba(15, 47, 84, 0.12);
  text-decoration: none;
}

/* ------------------------------
   Footer
-------------------------------- */
.content-footer {
  background: #f6f7fb;
  padding: 1.25rem 0 2rem;
}

.footer-surface {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.1rem 1.25rem 1.4rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
}

@media (min-width: 768px) {
  .footer-surface .col-md-6 + .col-md-6 {
    position: relative;
    padding-left: 2rem;
  }

  .footer-surface .col-md-6 + .col-md-6::before {
    content: "";
    position: absolute;
    left: 0.5rem;
    top: 0.25rem;
    bottom: 0.25rem;
    width: 1px;
    background: rgba(16, 35, 71, 0.2);
  }
}

footer[role="contentinfo"] a {
  color: var(--rbs-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-headquarters {
  color: rgba(16, 35, 71, 0.82);
}

.footer-security {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(16, 35, 71, 0.85);
}

.footer-security__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.footer-security__icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

/* ------------------------------
   Cookie / GPC UI
-------------------------------- */
.cookie-consent {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(12, 59, 102, 0.16);
  box-shadow: 0 14px 34px rgba(6, 24, 44, 0.2);
  font-size: 0.875rem;
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  color: #0f2f4d;
  backdrop-filter: blur(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cookie-consent.cookie-consent--floating.cookie-consent--centered {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  width: min(360px, calc(100% - 32px));
  z-index: 2147483000;
}

@media (max-width: 575.98px) {
  .cookie-consent.cookie-consent--floating.cookie-consent--centered {
    right: 12px;
    bottom: 12px;
    max-width: none;
    width: calc(100% - 24px);
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    font-size: 0.82rem;
  }

  .cookie-gpc-notice {
    left: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
    padding: 12px 14px;
    border-radius: 14px;
  }

  .cookie-gpc-notice__title {
    font-size: 0.92rem;
  }

  .cookie-gpc-notice__body {
    font-size: 0.84rem;
  }

  .cookie-consent .btn,
  .cookie-consent button,
  .cookie-gpc-notice .btn,
  .cookie-gpc-notice button {
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
  }
}

.cookie-consent.cookie-consent--hidden {
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  pointer-events: none;
}

.cookie-gpc-notice {
  position: fixed;
  z-index: 2147483001;
  bottom: 24px;
  left: 24px;
  width: min(320px, calc(100% - 48px));
  background: rgba(15, 44, 73, 0.96);
  color: #e6f1fd;
  border-radius: 16px;
  border: 1px solid rgba(0, 191, 255, 0.35);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.32);
  padding: 14px 16px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.cookie-gpc-notice.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-gpc-notice__title {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.cookie-gpc-notice__body {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ------------------------------
   Reduced motion
-------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .content-sections,
  .content-sections.is-collapsed,
  .services-grid .card,
  .sectors-grid .card,
  .insights-grid .card,
  .cookie-consent,
  .cookie-gpc-notice {
    transition: none;
    transform: none;
  }
}

/* ------------------------------
   Small screens
-------------------------------- */
@media (max-width: 575.98px) {
  .hero-classic {
    min-height: calc(100vh - 56px);
    min-height: calc(100svh - 56px);
    min-height: calc(100dvh - 56px);
  }

  .hero-classic .hero-content {
    padding: 3.25rem 0;
  }

  .cookie-consent.cookie-consent--floating.cookie-consent--centered {
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
    max-width: none;
  }

  .cookie-gpc-notice {
    left: 16px;
    bottom: calc(16px + 96px);
    width: calc(100% - 32px);
  }
}

/* ================================
   Footer brand sizing refinement
   ================================ */

footer[role="contentinfo"] .d-inline-flex.align-items-center.gap-2.mb-2 {
  align-items: center !important;
  gap: 0.6rem !important;
  flex-wrap: nowrap;
}

footer[role="contentinfo"] .d-inline-flex.align-items-center.gap-2.mb-2 img {
  height: 28px !important;
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto;
  display: block;
}

footer[role="contentinfo"] .d-inline-flex.align-items-center.gap-2.mb-2 span {
  font-size: 0.98rem;
  line-height: 1.1;
  white-space: nowrap;
  display: inline-block;
}

@media (max-width: 575.98px) {
  footer[role="contentinfo"] .d-inline-flex.align-items-center.gap-2.mb-2 img {
    height: 24px !important;
  }

  footer[role="contentinfo"] .d-inline-flex.align-items-center.gap-2.mb-2 span {
    font-size: 0.92rem;
  }
}
