/* ==========================================================================
   rimas-global.min.css  |  Rimas sitewide styles
   Unifies navbar gradient, framed sections, footer/copyright boxes,
   dropdown hover gradients, logo alignment, responsive widths,
   and includes Cookie Consent styles at the end.
   ========================================================================== */

/* ---------- Theme Variables ---------- */
:root{
  /* Brand palette */
  --navy-900: #0f2f4d;
  --navy-800: #1B4F7E;        /* Primary brand blue */
  --navy-700: #215e97;
  --navy-600: #2c6fb2;
  --sky-400:  #00BFFF;        /* Accent */
  --ink-900:  #0b1320;
  --ink-800:  #1a2433;
  --ink-700:  #2a3445;
  --ink-600:  #3a465a;
  --ink-500:  #4a5870;

  /* Text */
  --text-on-dark: #ECF0F1;
  --text-on-light: #212529;
  --muted: #6b7a90;

  /* Surfaces */
  --page-bg: #1B4F7E;         /* Site background (dark blue) */
  --frame-bg: rgba(255,255,255,0.97);
  --frame-border: #dee2e6;
  --frame-shadow: 0 8px 24px rgba(0,0,0,.08);

  /* Navbar gradient + edge */
  --nav-grad: linear-gradient(120deg, #122a52 0%, #1b4f7e 42%, #2c6fb2 100%);
  --nav-border: 1px solid rgba(18, 74, 126, 0.35);

  /* Layout sizing */
  --content-max: 1140px;                /* Aligns logo & frames */
  --content-pad: clamp(16px, 4vw, 28px);
  --section-gap:  28px ;
  --radius: 10px;

  /* Logo */
  --logo-height: 48px;

  /* Buttons */
  --btn-primary-bg: #1B4F7E;
  --btn-primary-text: #fff;
  --btn-primary-hover: #215e97;
  --pegasus-gold: #C49A3A;
  --pegasus-gold-hover: #B5892F;
  --pegasus-gold-active: #9C7626;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: clamp(72px, 10vh, 112px); }

body{
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text-on-dark);
  background: var(--page-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: clamp(72px, 10vh, 112px);
}

main {
  flex: 1 0 auto;
}

/* Skip link styling for keyboard users */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: #ffdb3c;
  color: #000;
  z-index: 999;
  border-radius: 999px;
}

/* Ensure Bootstrap containers align with frames + logo */
.container,
.container-fluid{
  max-width: var(--content-max);
  padding-left: var(--content-pad);
  padding-right: var(--content-pad);
}

/* Headings (sitewide) */
h1, h2, h3, h4, h5{
  font-family: "Montserrat", Inter, system-ui, sans-serif;
  color: var(--text-on-dark);
  margin-top: 0;
}

.frame h1,
.frame h2,
.frame h3,
.frame h4,
.frame h5{
  color: var(--ink-800);
}

/* Link treatment (on dark) */
a { color: var(--sky-400); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Navbar (gradient, flex-aligned, stable hamburger) ---------- */
.navbar{
  background: var(--nav-grad) !important;
  border-bottom: var(--nav-border);
  color: var(--text-on-dark);
  -webkit-backdrop-filter: saturate(120%) blur(2px);
  backdrop-filter: saturate(120%) blur(2px);
}

.navbar .container-fluid,
.navbar .container{
  max-width: var(--content-max);
  padding-left: var(--content-pad);
  padding-right: var(--content-pad);
  display: flex;
  align-items: flex-end;
  gap: clamp(0.75rem, 2vw, 2.5rem);
}

.navbar-brand{
  display: flex; align-items: center; gap: .6rem;
  margin-right: 1rem; flex-shrink: 0;
  color: var(--text-on-dark) !important;
}
.navbar-brand img{
  height: var(--logo-height);
  width: auto; object-fit: contain;
}

.navbar-dark .navbar-nav .nav-link{
  color: var(--text-on-dark);
  font-weight: 500;
}
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus,
.navbar-dark .navbar-nav .show>.nav-link{
  color: #fff;
}

.navbar-toggler{
  margin-left: auto;                 /* keeps toggler on far right */
  border-color: rgba(255,255,255,.35);
}
.navbar-toggler:focus { box-shadow: 0 0 0 .1rem rgba(255,255,255,.35); }

.navbar-collapse{
  flex-grow: 0;
}

.navbar-nav{
  margin-left: auto !important;
  gap: clamp(0.5rem, 1.5vw, 1.75rem);
  align-items: flex-end;
}

.navbar-nav .nav-link{
  padding: .35rem 0;
}

/* Dropdown styling + blue gradient hover */
.dropdown-menu{
  background: #0f2f4d;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  overflow: hidden;
}
.dropdown-item{
  color: #e6eef6;
}
.dropdown-item:hover,
.dropdown-item:focus{
  color: #fff;
  background: linear-gradient(90deg, #1b4f7e 0%, #2c6fb2 100%);
}

/* Keep collapsed menu aligned under toggler on mobile */
@media (max-width: 991.98px){
  .navbar-collapse{
    width: 100%;
    text-align: left;
  }
  .navbar-nav{
    padding: .4rem 0 1rem;
    align-items: flex-start;
    gap: .5rem;
  }
  .navbar-nav .dropdown-menu{
    position: static;
    width: 100%;
    margin-top: .5rem;
  }
}

/* ---------- Framed Sections (form & content) ---------- */
.form-section,
.content-section,
.frame{
  background: var(--frame-bg);
  color: var(--text-on-light);
  border: 1px solid var(--frame-border);
  border-radius: var(--radius);
  box-shadow: var(--frame-shadow);
  max-width: var(--content-max);
  width: 100%;
  margin: var(--section-gap) auto;
  padding: clamp(22px, 3.5vw, 36px);
  scroll-margin-top: clamp(72px, 10vh, 112px);
}

/* Headings inside light frames switch to dark text */
.form-section h1, .form-section h2, .form-section h3, .form-section h4,
.content-section h1, .content-section h2, .content-section h3, .content-section h4{
  color: var(--text-on-light);
}

/* Locations (maps/info blocks) */
.location{
  background: #f8f9fa;
  color: var(--text-on-light);
  border: 1px solid var(--frame-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
  padding: 1rem;
  margin-bottom: 1.25rem;
}
.map-container iframe{
  width: 100%;
  height: 220px;
  border: 0;
  border-radius: 8px;
}
.location-info a{
  color: var(--sky-400);
  font-weight: 600;
}
.location-info a:hover{
  text-decoration: underline;
}

/* Lists inside framed sections */
.link-list{
  list-style: none; padding: 0; margin: 0;
}
.link-list li{ margin-bottom: 8px; }

/* Buttons */
.btn-primary{
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: 1px solid rgba(255,255,255,.2);
}
.btn-primary:hover{
  background: var(--btn-primary-hover);
  color: #fff;
}

.btn-warning{
  --bs-btn-color: #1f1a09;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
  --bs-btn-bg: var(--pegasus-gold);
  --bs-btn-border-color: rgba(0,0,0,0.12);
  --bs-btn-hover-bg: var(--pegasus-gold-hover);
  --bs-btn-hover-border-color: rgba(0,0,0,0.18);
  --bs-btn-active-bg: var(--pegasus-gold-active);
  --bs-btn-active-border-color: rgba(0,0,0,0.18);
  --bs-btn-focus-shadow-rgb: 196,154,58;
  background: var(--pegasus-gold);
  border: 1px solid rgba(0,0,0,0.12);
  color: #1f1a09;
  box-shadow: 0 8px 18px rgba(196,154,58,0.32);
  transition: transform .2s ease, box-shadow .2s ease;
}

.btn-warning:hover,
.btn-warning:focus{
  background: var(--pegasus-gold-hover);
  border-color: rgba(0,0,0,0.18);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(181,137,47,0.35);
}

.btn-warning:active,
.btn-warning.active,
.show > .btn-warning.dropdown-toggle{
  background: var(--pegasus-gold-active);
  border-color: rgba(0,0,0,0.18);
  color: #fff;
  box-shadow: inset 0 3px 6px rgba(0,0,0,0.12);
}

/* ---------- Footer (framed, aligned with forms) ---------- */
.footer,
footer{
  color: var(--text-on-light);
  background-color: rgba(255,255,255,0.98);
}

.footer{
  background: var(--frame-bg);
  color: var(--text-on-light);
  border: 1px solid var(--frame-border);
  border-radius: var(--radius);
  box-shadow: var(--frame-shadow);
  width: min(90vw, var(--content-max));
  margin: var(--section-gap) auto;
  padding: clamp(22px, 3.5vw, 36px);
}
.footer h5{ color: var(--text-on-light); margin-bottom: .75rem; }
.footer a,
footer a{
  color: var(--sky-400);
}

.footer a:hover,
footer a:hover{
  text-decoration: underline;
  color: var(--navy-800);
}

/* ---------- Copyright / Year Frame ---------- */
.copyright-frame{
  background: #ffffff;
  color: #000;
  border: 1px solid #000;
  border-radius: var(--radius);
  width: min(90vw, var(--content-max));
  margin: calc(var(--section-gap) * 0.75) auto var(--section-gap);
  padding: clamp(14px, 2.5vw, 22px);
  text-align: center;
  box-shadow: var(--frame-shadow);
  font-size: 0.98rem;
}

/* ---------- Utilities ---------- */
.align-right{ text-align: right !important; }
.align-center{ text-align: center !important; }
.mt-gap{ margin-top: var(--section-gap) !important; }
.mb-gap{ margin-bottom: var(--section-gap) !important; }

/* ---------- Contact page specifics ---------- */
.contact-page a:focus-visible,
.contact-page button:focus-visible {
  outline: 2px solid var(--navy-600);
  outline-offset: 3px;
}

.contact-page main {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
  padding: 0 0 clamp(16px, 5vw, 40px);
}

.contact-page .contact-hero {
  text-align: center;
  margin: 0 auto;
  max-width: min(90vw, var(--content-max));
}

.contact-page .contact-hero p {
  margin-left: auto;
  margin-right: auto;
  max-width: 42rem;
  font-size: 1rem;
}

.contact-page .contact-form legend {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

.contact-page .contact-form #form-status {
  min-height: 1.5rem;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.contact-page .contact-form #form-status.is-visible {
  opacity: 1;
}

.contact-page .contact-form #form-status.status-success,
.contact-page .contact-form #form-status.status-pending {
  background: rgba(44, 111, 178, 0.08);
  border-left: 4px solid var(--navy-600);
  border-radius: var(--radius);
  color: var(--navy-800);
  padding: 0.75rem 1rem;
}

.contact-page .contact-form #form-status.status-error {
  background: rgba(180, 35, 29, 0.12);
  border-left: 4px solid #b4231d;
  border-radius: var(--radius);
  color: #8f1d18;
  padding: 0.75rem 1rem;
}

.contact-page .contact-form #form-status.is-fading {
  opacity: 0;
}

.contact-page .locations-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-page .location .map-container iframe {
  height: 240px;
}

.contact-page .footer .link-list li {
  margin-bottom: 0.45rem;
}

@media (max-width: 767.98px) {
  .contact-page .contact-hero {
    text-align: left;
  }

  .contact-page .contact-hero p {
    text-align: left;
  }
}

/* Give a bit more breathing room under fixed navbar */
body > .page-top-spacer{ height: 72px; }
@media (max-width: 991.98px){
  body > .page-top-spacer{ height: 56px; }
}

/* ---------- Light Theme (optional override) ---------- */
/* Add class="theme-light" to <body> on pages that need a light background */
.theme-light{
  --page-bg: #FFF8F1;
  color: var(--text-on-light);
}
.theme-light .navbar{ background: var(--nav-grad) !important; }
.theme-light h1, .theme-light h2, .theme-light h3, .theme-light h4, .theme-light h5{
  color: #003366;
}

/* ==========================================================================
   Cookie Consent (drop-in styles consolidated here)
   ========================================================================== */
:root{
  --cookie-bg: rgba(20, 53, 86, 0.98);
  --cookie-text: #f1f5f9;
  --cookie-accent: #00BFFF;
  --cookie-border: #2b6a9a;
  --cookie-panel: #0e3a5c;
  --cookie-link: #90caf9;
  --cookie-manage-bg:#0b3556;
  --cookie-shadow: 0 16px 36px rgba(0,0,0,0.45);
  --cookie-width: min(90vw, var(--content-max));
  --cookie-radius: 12px;
}

/* Banner */
.cc-banner{
  position: fixed; left:0; right:0; bottom:0; z-index:1080;
  background: var(--cookie-bg); color: var(--cookie-text);
  box-shadow: 0 -8px 22px rgba(0,0,0,0.35); display:none;
}
.cc-inner{
  width: var(--cookie-width); margin: 0 auto; padding: 16px 0;
  display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between;
}
.cc-text{ flex:1 1 420px; font-size:.95rem; }
.cc-link{ color: var(--cookie-link); text-decoration: underline; }
.cc-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.cc-btn{ border-radius:8px; padding:.45rem .9rem; font-weight:600; cursor:pointer; }
.cc-accept{ background: var(--cookie-accent); border:none; color:#00223b; }
.cc-reject{ background:transparent; border:1px solid #90caf9; color:#e3f2fd; }
.cc-settings{ background: var(--cookie-manage-bg); border:1px solid var(--cookie-border); color:#cfe8ff; }

/* Settings Panel */
.cc-panel{
  position: fixed; right:20px; bottom:86px; z-index:1081;
  width:320px; max-width:92vw; background: var(--cookie-panel); color:#e8f1fb;
  border:1px solid var(--cookie-border); border-radius: var(--cookie-radius);
  box-shadow: var(--cookie-shadow); padding: 14px; display:none;
}
.cc-panel h6{ margin:0 0 8px 0; }
.cc-panel .small-note{ font-size:.85rem; color:#cfe8ff; }
.cc-panel .actions{ display:flex; gap:8px; justify-content:flex-end; margin-top:8px; }
.cc-panel .btn{ border-radius:8px; padding:.35rem .75rem; font-weight:600; cursor:pointer; }

/* Floating manage button */
.cc-manage{
  position: fixed; right:16px; bottom:16px; z-index:1082;
  background: var(--cookie-manage-bg); color:#cfe8ff;
  border:1px solid var(--cookie-border); border-radius:20px;
  padding:.4rem .75rem; font-size:.9rem; display:none; cursor:pointer;
}

/* Mobile tweaks */
@media (max-width: 992px){
  .cc-inner{ padding: 14px; }
  .cc-actions{ justify-content:flex-start; }
}
/* ensure framed content boxes */
.form-section{
  background-color: rgba(255,255,255,0.98);
  color:#212529;
  border-radius:12px;
  padding:30px;
  box-shadow:0 10px 24px rgba(0,0,0,0.12);
  border:1px solid rgba(0,0,0,.06);
}

/* === RIMAS Typography (moved from Index.html) === */
html { font-size: 93.75%; }            /* ~15px base */
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Primary text & nav links */
.navbar .nav-link,
body p, body li { font-size: 0.95rem; }

/* Buttons (including footer CTA & cookie buttons) */
.btn { font-size: 0.95rem; }

/* Footer + cookie bar microcopy */
.content-footer .form-section .small,
.cookie-consent { font-size: 0.875rem; }

/* Headings (keep hierarchy with slightly tighter scale) */
h1 { font-size: 2.125rem; line-height: 1.25; }
h2 { font-size: 1.625rem; line-height: 1.3; }
h3 { font-size: 1.25rem;  line-height: 1.35; }

/* Lift copyright box above cookie bar */
.content-footer .copyright-box{ margin-bottom:clamp(80px, 10vh, 140px); }

/* RIMAS Blue Gradient */
body {
  background: linear-gradient(180deg, #0d6efd 0%, #0b5ed7 42%, #084298 100%) fixed;
  background-attachment: fixed;
}
/* Keep main content readable on gradient */
.form-section, .navbar, .cookie-consent {
  background-color: rgba(255,255,255,0.98);
}

/* Cookie bar (floating, centered) */
.cookie-consent{
  background:#ffffff; border:1px solid rgba(0,0,0,.08);
  box-shadow:0 8px 24px rgba(0,0,0,.12);
  font-size:.875rem; padding:.75rem .9rem; border-radius:12px;
  color:#1a1a1a;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition:opacity .3s ease, transform .3s ease;
}
.cookie-consent.cookie-consent--floating.cookie-consent--centered{
  position:fixed; left:0; right:0; bottom:16px;
  margin-left:auto; margin-right:auto;
  max-width:640px; width:calc(100% - 32px);
  z-index:2147483000;
}
.cookie-consent.cookie-consent--compact{
  left:auto; right:16px;
  margin:0;
  max-width:320px;
  width:min(320px, calc(100% - 32px));
}
.cookie-consent.cookie-consent--hidden{
  opacity:0;
  transform:translateY(18px);
  pointer-events:none;
}
.cookie-consent .small{ color:#1a1a1a; opacity:1; }
.cookie-consent .d-flex{ flex-wrap:wrap; }
.cookie-consent .gap-2{ column-gap:.5rem; row-gap:.5rem; }

/* RIMAS Gradient Button Wrap */
.rimas-gradient-wrap{
  background: linear-gradient(180deg, #0d6efd 0%, #0b5ed7 50%, #084298 100%);
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

/* Ensure CTA inside gradient has white text */
.rimas-gradient-wrap .text-white { color:#fff !important; }

/* RIMAS form-section standard */
.form-section{
  border-radius:12px;
  padding:30px;
  box-shadow:0 10px 24px rgba(0,0,0,0.12);
  border:1px solid rgba(0,0,0,.06);
  background-color: rgba(255,255,255,0.98);
}

.container-narrow{ max-width: 1120px; }

/* RIMAS form-section standard v2 */
.form-section{
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,0.98);
}

.justify-content-end{ justify-content:flex-end !important; }

.form-section hr{ width:100%; margin:1rem 0; opacity:.25; border-color: rgba(0,0,0,.2); }

.text-end{ text-align:right !important; }

button:empty{ display:none !important; }


/* Gradient button variant (Option B) */
.btn-gradient{
  background: linear-gradient(180deg, #0d6efd 0%, #0b5ed7 50%, #084298 100%);
  border: 0;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.btn-gradient:hover,
.btn-gradient:focus{
  filter: brightness(1.05);
  color:#fff;
}

/* Chip icon for sector badges */
.chip-icon{
  width: 20px; height: 20px;
  margin-right: .5rem;
  vertical-align: middle;
  object-fit: contain;
}

/* Ensure chip icons render inside Bootstrap buttons */
.btn .chip-icon{
  display:inline-block !important;
  width: 20px; height: 20px;
  margin-right: .5rem;
  vertical-align: middle;
  object-fit: contain;
}

/* Emoji icon for sector chips */
.chip-emoji{
  display:inline-block;
  margin-right:.5rem;
  line-height:1;
  font-size:1.15rem;
  transform: translateY(1px);

  filter: grayscale(1) contrast(1.1);
  color:#000;
}


/* RIMAS-073l: Engage inline form + cookie manage fix */
.inline-form{
  display:grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap:12px;
  align-items:center;
}
.inline-form input, .inline-form select, .inline-form button{
  height:44px;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid #d9d9d9;
  font: inherit;
}
.inline-form button.btn{ border:none; }

@media (max-width: 992px){ .inline-form{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px){ .inline-form{ grid-template-columns: 1fr; } }

/* Keep cookie manage control out of footer */
.cc-manage{ position: fixed; right: 16px; bottom: 16px; z-index: 1085; }


/* RIMAS-073n: ensure blank frame sizing behaves like a content frame */
#blank-test-frame{ box-sizing: border-box; }
#blank-test-frame > .container-narrow{ min-height: 100%; }


/* RIMAS-073o: Equalize vertical spacing between framed sections */
section.frame.form-section{
  /* enforce same top/bottom margins regardless of Bootstrap .mt-4/.mb-4 utilities */
  margin-top: var(--section-gap) !important;
  margin-bottom: var(--section-gap) !important;
}
/* neutralize Bootstrap utility stacking for these sections specifically */
section.frame.form-section.mt-4{ margin-top: var(--section-gap) !important; }
section.frame.form-section.mb-4{ margin-bottom: var(--section-gap) !important; }

/* RIMAS-104: Section #3 CTA layout */
#section-3 .container-narrow{ position: relative; }
.cta-stack{ display:flex; flex-direction:column; min-height:100%; }
.cta-actions{ margin-top:auto; display:flex; justify-content:flex-end; }

/* RIMAS-105: Section #3 three columns and CTA */
 /* ~2.67px smaller than base */

#section-3 .link-col{ text-align: center; }
#section-3 .link-col-title{ margin-bottom: 8px; font-weight: 600; }
#section-3 .link-col a{ color: var(--text-on-light); }
#section-3 .container-narrow{ position: relative; }
#section-3 .cta-stack{ display:flex; flex-direction:column; } /* no fixed min-height; container height follows content */
#section-3 .cta-actions{ display:flex; justify-content:flex-end; margin-top: 16px; }
@media (max-width: 640px){
  
   /* soften reduction on small screens */
}

/* RIMAS-106: Section #3 redo - three columns + centered CTA below */

#section-3 .link-col{ text-align: left; }
#section-3 .link-col-title{ margin-bottom: 6px; font-weight: 600; text-align: center; }
#section-3 .cta-actions{ display:flex; justify-content:center; margin-top: 20px; }
@media (max-width: 640px){
  
}

/* RIMAS-107: Section #3 columns via flex (3 across, wrap) */
#section-3 .link-columns{
  display: flex !important;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 12px;
}
#section-3 .link-col{
  flex: 1 1 280px;
  max-width: 360px;
  text-align: left;
}
#section-3 .link-col-title{
  margin-bottom: 6px;
  font-weight: 600;
  text-align: center;
}
#section-3 .cta-actions{
  display: flex;
  justify-content: center;
  margin-top: 20px;
}
@media (max-width: 640px){
  #section-3 .link-columns{
    flex-direction: column;
    gap: 12px 0;
  }
  #section-3 .link-col{
    flex: 1 1 auto;
    max-width: none;
  }
}
