/*
Theme Name: RMA Custom
Author: Risk Management Advisory
*/
/* --- Modern Global Design System --- */
:root {
  --rma-teal: #29d9c2;
  --rma-teal-dark: #1fb9a8;
  --rma-teal-glow: rgba(41, 217, 194, 0.3);
  --ink: #0f172a;        
  --ink-darker: #020617; 
  --muted: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* --- Reset & Base Styles --- */
* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Inter", -apple-system, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  margin: 0;
}

.container { 
  width: min(1200px, calc(100% - 24px)); 
  margin: 0 auto; 
  position: relative; 
  z-index: 2; 
}

/* --- Header & Navigation (Fixed & Unified) --- */
header.site-header {
  position: sticky; 
  top: 0; 
  z-index: 9999;
  background: rgba(255, 255, 255, 0.98);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 15px 0; 
}

.brand img { height: 45px; width: auto; display: block; }

nav.primary ul { 
  display: flex; 
  list-style: none; 
  gap: 30px; 
  align-items: center; 
  margin: 0; 
  padding: 0; 
}

nav.primary a { 
  color: var(--muted); 
  text-decoration: none; 
  font-weight: 600; 
  font-size: 0.9rem; 
  transition: color 0.2s ease;
}

nav.primary a:hover, 
nav.primary a[aria-current="page"] { color: var(--rma-teal-dark); }

.nav-item:focus-within .dropdown { display: flex; flex-direction: column; }

/* Dropdown Logic - Non-Clickable Parent */
.nav-item { position: relative; padding: 10px 0; }
.nav-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
}

.dropdown-trigger {
  cursor: default !important; /* Visual cue that it's a menu trigger only */
}

.dropdown {
  display: none; 
  position: absolute; 
  top: 100%; 
  left: 50%; 
  transform: translateX(-50%);
  background: #ffffff; 
  border: 1px solid var(--border); 
  border-radius: 8px;
  padding: 12px; 
  min-width: 240px; 
  box-shadow: var(--shadow-lg); 
  z-index: 10000;
  margin-top: 0;
}

.nav-item:hover .dropdown { display: flex; flex-direction: column; }

.dropdown a { 
  padding: 10px 16px; 
  border-radius: 6px; 
  font-size: 0.85rem; 
  color: var(--ink); 
  display: block;
}

.dropdown a:hover { background: var(--bg-alt); color: var(--rma-teal-dark); }

/* --- Browser Compatibility Fallbacks --- */
@supports not (position: sticky) {
  header.site-header { position: static; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  header.site-header { background: #ffffff; }
}

@supports not (gap: 1rem) {
  nav.primary ul li { margin: 0 10px; }
  .clean-pill li { margin: 4px; }
}

/* --- Hero System --- */
.hero {
  position: relative;
  background: radial-gradient(circle at 50% 50%, #0f172a 0%, #020617 100%);
  color: white;
  padding: 140px 0;
  overflow: hidden;
}

#hero-particles {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
}

.kicker {
  display: inline-block;
  color: var(--rma-teal);
  border: 1px solid var(--rma-teal);
  padding: 4px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.75rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 1.5rem; line-height: 1.1; }
h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; }

/* --- Section & Grid Layouts --- */
.section { padding: 100px 0; }
.section.light { background: var(--bg-alt); }

.grid { display: grid; gap: 30px; }
.grid.cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Standard Interactive Card */
.card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--rma-teal);
  border-radius: var(--radius);
  padding: 40px 30px;
  text-decoration: none;
  color: inherit;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-12px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.08);
}

/* Service Pillar Variation (Side Border) */
.pillar-card {
  border-top: 1px solid var(--border);
  border-left: 4px solid var(--rma-teal);
}

.pillar-icon {
  font-size: 3rem; font-weight: 800; color: var(--rma-teal);
  opacity: 0.15; position: absolute; top: 20px; right: 30px;
}

/* --- Contact Portal & Form Styling --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.form-card {
  background: #ffffff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  color: var(--ink);
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 8px; }

.form-group input, 
.form-group textarea {
  width: 100%; 
  padding: 14px; 
  background: var(--bg-alt);
  border: 1px solid var(--border); 
  border-radius: 8px; 
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-group input:focus, 
.form-group textarea:focus { 
  background: #fff; 
  border-color: var(--rma-teal); 
  outline: none; 
  box-shadow: 0 0 0 4px var(--rma-teal-glow);
}

/* --- Button Systems --- */
.btn {
  display: inline-flex; 
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  background: var(--rma-teal); 
  color: var(--ink-darker);
  padding: 15px 30px; 
  border-radius: 8px; 
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-decoration: none; 
  border: none; 
  cursor: pointer; 
  transition: 0.3s;
}

.btn:hover { background: var(--rma-teal-dark); color: #fff; transform: translateY(-2px); }
.btn-full { width: 100%; }

/* --- Footer --- */
footer.site-footer { 
  background: var(--ink-darker); 
  padding: 80px 0; 
  color: #64748b; 
  text-align: center; 
  line-height: 1.8;
}

/* --- Utility Classes --- */
.center { text-align: center; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.mt-4 { margin-top: 2rem; }
.clean { list-style: none; padding: 0; }
.clean li::before { content: "→"; color: var(--rma-teal); margin-right: 10px; font-weight: bold; }

.clean-pill {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clean-pill li {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--rma-teal-dark);
  background: var(--rma-teal-glow);
  padding: 4px 12px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* --- Responsive Adjustments --- */
@media(max-width: 900px) {
  .hero { padding: 100px 0; }
  .contact-grid, .two-col { grid-template-columns: 1fr; gap: 40px; }
  h1 { font-size: 2.4rem; }
  h2 { font-size: 2rem; }
  .card, .form-card { padding: 28px 22px; }
  .header-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  nav.primary { width: 100%; }
  nav.primary ul {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 8px;
    padding-bottom: 4px;
  }
  nav.primary ul > li {
    min-width: 0;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
  nav.primary a,
  .dropdown-trigger {
    display: inline-block;
    width: auto;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
    font-size: clamp(0.82rem, 2.7vw, 0.92rem);
    padding: 8px 12px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
  }
  .nav-item { padding: 0; }
  .nav-item .dropdown {
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    box-shadow: none;
  }
  .dropdown {
    position: static;
    transform: none;
    left: auto;
    top: auto;
    min-width: min(280px, calc(100vw - 32px));
  }
  .dropdown a { padding: 9px 10px; }
  .btn.btn-full { font-size: 0.95rem; padding: 12px 16px; }
  footer.site-footer .container > div,
  footer.site-footer .container > p {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
}
