/* ==========================================================================
   PREMIUM INSURANCE AGENCY - ENTERPRISE DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Corporate Palette (Inspired by Marsh MMA / Enterprise Brokers) */
  --primary-color: #003B70; /* Deep Navy Blue */
  --primary-hover: #00284D;
  --secondary-color: #00A3E0; /* Cyan/Light Blue Accent */
  
  --text-main: #1A1A1A; /* Near Black for readability */
  --text-muted: #545454; /* Slate Gray */
  
  --bg-white: #FFFFFF;
  --bg-light: #F4F6F8; /* Very light cool gray */
  --bg-dark: #0A192F; /* Deepest blue/black */
  
  --border-color: #E2E8F0;
  
  /* Typography */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Shadows & Radius */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 24px rgba(0,0,0,0.12);
  
  --radius-sm: 2px;
  --radius-md: 4px; /* Harder corners for corporate feel */
  --radius-lg: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-main);
  background-color: var(--bg-white);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  color: var(--primary-color);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
ul { list-style: none; }

.container {
  max-width: 1280px; /* Wider container for enterprise feel */
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.bg-light { background-color: var(--bg-light); }
.bg-primary { background-color: var(--primary-color); color: white; }
.text-white h1, .text-white h2, .text-white p { color: white; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* ==========================================================================
   TOP UTILITY BAR
   ========================================================================== */
.utility-bar {
  background-color: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.utility-flex {
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem 2rem !important; /* Override sticky padding */
}

.utility-left { display: none; /* Hide on mobile, show on desktop */ }
.utility-right a { color: var(--primary-color); display: flex; align-items: center; gap: 0.5rem; }

@media (min-width: 768px) {
  .utility-flex { justify-content: space-between; }
  .utility-left { display: flex; gap: 2rem; }
  .utility-left a { color: var(--text-muted); }
  .utility-left a:hover { color: var(--primary-color); }
}

/* ==========================================================================
   NAVIGATION & MEGA MENU
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-mark {
  background: var(--primary-color);
  color: white;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700;
  border-radius: var(--radius-sm);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-main { font-size: 1.25rem; font-weight: 700; color: var(--primary-color); letter-spacing: 0.02em; }
.logo-sub { font-size: 0.65rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* Links */
.nav-desktop {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  height: 100%;
}

.nav-link {
  background: none; border: none;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 0.25rem;
  padding: 1.5rem 0; /* Huge hover area */
  position: relative;
}

.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--secondary-color);
  transform: scaleX(0); transition: transform 0.2s ease;
  transform-origin: left;
}

.nav-link:hover { color: var(--primary-color); }
.has-dropdown:hover .nav-link::after { transform: scaleX(1); }

/* Mega Menu Dropdown */
.has-dropdown { position: relative; }

.mega-menu-wrapper {
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  padding-top: 0; /* Flush with bottom of header */
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
}

.has-dropdown:hover .mega-menu-wrapper {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mega-menu {
  width: 900px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
}

.mega-menu-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
}

.mega-info h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--primary-color); }
.mega-info p { color: var(--text-muted); margin-bottom: 2rem; font-size: 0.95rem; }
.btn-text { color: var(--secondary-color); font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.05em; }
.btn-text:hover { color: var(--primary-color); }

.mega-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  border-left: 1px solid var(--border-color);
  padding-left: 3rem;
}

.mega-links a {
  color: var(--text-main);
  font-size: 0.95rem;
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
}

.mega-links a:hover {
  color: var(--secondary-color);
  transform: translateX(5px);
}

/* ==========================================================================
   BUTTONS & LINKS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  border: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

.btn-lg { padding: 1rem 2rem; }
.btn-full { width: 100%; }

.link-arrow {
  color: var(--secondary-color);
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.85rem;
}
.link-arrow::after { content: '→'; transition: transform 0.2s; }
.link-arrow:hover::after { transform: translateX(5px); }

/* ==========================================================================
   HERO SECTIONS
   ========================================================================== */
.hero-corporate {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background-color: var(--bg-dark);
}

.hero-image-bg {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background-image: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&q=80&w=2000&h=1000');
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(0,59,112,0.95) 0%, rgba(0,59,112,0.8) 50%, rgba(0,59,112,0.4) 100%);
}

.hero-content-wrapper { position: relative; z-index: 2; width: 100%; }

.hero-text-box {
  max-width: 650px;
  color: white;
}

.eyebrow-light {
  display: block; color: var(--secondary-color); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1.5rem; font-size: 0.85rem;
}

.hero-corporate h1 { color: white; font-size: clamp(3.5rem, 6vw, 5rem); margin-bottom: 1.5rem; }
.hero-corporate p { font-size: 1.25rem; color: #E2E8F0; margin-bottom: 3rem; line-height: 1.6; }

/* Internal Hero */
.hero-internal {
  background-color: var(--bg-light);
  padding: 6rem 0 4rem;
  border-bottom: 1px solid var(--border-color);
}
.hero-internal h1 { font-size: clamp(2.5rem, 4vw, 3.5rem); margin-bottom: 1rem; }
.eyebrow { display: block; color: var(--secondary-color); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; font-size: 0.85rem; }
.hero-lead { font-size: 1.25rem; color: var(--text-muted); max-width: 800px; }

/* ==========================================================================
   LAYOUTS & COMPONENTS
   ========================================================================== */
.padding-section { padding: 6rem 0; }

.section-header-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-bottom: 4rem;
}
.section-header-split h2 { font-size: 2.5rem; margin: 0; }
.section-header-split p { font-size: 1.25rem; color: var(--text-muted); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }

/* Stats Banner */
.stats-banner { padding: 4rem 0; }
.stats-flex { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; }
.stat-item { display: flex; flex-direction: column; }
.stat-number { font-size: 3.5rem; font-weight: 700; line-height: 1; margin-bottom: 0.5rem; color: white; }
.stat-label { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--secondary-color); font-weight: 600; }

/* Solution Cards */
.solution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.solution-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.solution-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.solution-card img { width: 100%; height: 250px; object-fit: cover; }
.solution-content { padding: 2.5rem; }
.solution-content h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.solution-content p { color: var(--text-muted); margin-bottom: 2rem; }

/* Industry Grid */
.industry-grid-home {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem;
}
.industry-box {
  background: var(--bg-white); border: 1px solid var(--border-color);
  padding: 2rem 1rem; text-align: center;
  transition: all 0.2s;
}
.industry-box:hover { border-color: var(--primary-color); background: var(--primary-color); color: white; }
.industry-box:hover h4, .industry-box:hover svg { color: white; }
.icon-wrap { margin-bottom: 1rem; color: var(--secondary-color); }
.industry-box h4 { font-size: 1rem; margin: 0; color: var(--text-main); }
.view-all-box { background: var(--bg-light); display: flex; align-items: center; justify-content: center; }

/* Article Card */
.article-card { border-top: 2px solid var(--primary-color); padding-top: 1.5rem; }
.article-date { display: block; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; font-weight: 600; }
.article-card h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.article-card p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* Layout Sidebar */
.layout-sidebar { display: grid; grid-template-columns: 2fr 1fr; gap: 4rem; }
.rich-text h2 { font-size: 2rem; margin-bottom: 1.5rem; }
.rich-text h3 { font-size: 1.5rem; margin: 2rem 0 1rem; }
.rich-text p { font-size: 1.125rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.rich-text ul { margin-left: 1.5rem; margin-bottom: 2rem; }
.rich-text li { font-size: 1.125rem; color: var(--text-muted); margin-bottom: 0.75rem; padding-left: 0.5rem; list-style-type: square; }

.callout-box { background: var(--bg-light); border-left: 4px solid var(--secondary-color); padding: 2rem; margin: 2rem 0; }
.callout-box h3 { margin: 0 0 1rem 0; font-size: 1.25rem; }
.callout-box p { margin: 0; font-size: 1rem; }

.sticky-sidebar { position: sticky; top: 140px; align-self: start; }
.contact-card { background: var(--bg-light); padding: 2.5rem; border: 1px solid var(--border-color); }
.contact-card h3 { font-size: 1.25rem; margin-bottom: 1rem; color: var(--text-main); }

/* Forms */
.form-wrapper { background: var(--bg-white); }
.corporate-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-group { margin-bottom: 1.5rem; }
.corporate-form label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.corporate-form input, .corporate-form textarea {
  width: 100%; padding: 1rem; background: var(--bg-white); border: 1px solid var(--border-color);
  font-family: var(--font-main); font-size: 1rem; transition: border-color 0.2s;
}
.corporate-form input:focus, .corporate-form textarea:focus { outline: none; border-color: var(--primary-color); }

/* Hub Cards */
.hub-card {
  background: var(--bg-white); border: 1px solid var(--border-color); padding: 2rem;
  transition: all 0.2s; display: block;
}
.hub-card:hover { border-color: var(--primary-color); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.tag { display: inline-block; background: var(--bg-light); padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background-color: var(--bg-dark); color: white; padding: 5rem 0 2rem; }
.footer-top { display: grid; grid-template-columns: 1fr 2fr; gap: 6rem; margin-bottom: 4rem; }
.footer-brand p { font-size: 1rem; line-height: 1.6; color: #94A3B8; }

.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.link-col h4 { font-size: 1rem; margin-bottom: 1.5rem; color: white; text-transform: uppercase; letter-spacing: 0.05em; }
.link-col a { display: block; margin-bottom: 1rem; color: #94A3B8; font-size: 0.95rem; }
.link-col a:hover { color: var(--secondary-color); }

.footer-bottom { display: flex; justify-content: space-between; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); color: #94A3B8; font-size: 0.85rem; }
.legal { display: flex; gap: 2rem; }
.legal a:hover { color: white; }

/* ANIMATIONS */
.fade-in-up { opacity: 0; transform: translateY(20px); animation: fadeInUp 0.8s ease forwards; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 992px) {
  .section-header-split, .layout-sidebar, .footer-top, .solution-grid, .corporate-form .form-row { grid-template-columns: 1fr; }
  .industry-grid-home { grid-template-columns: repeat(2, 1fr); }
  .mega-menu-wrapper { 
      display: none; 
      position: static; 
      box-shadow: none; 
      border: none; 
      padding-left: 1rem; 
      background: #ffffff !important;
  }
  .mega-menu-wrapper.active { display: block; opacity: 1 !important; visibility: visible !important; }
  
}


/* MOBILE MENU STYLES */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
}

@media (max-width: 992px) {
    .mobile-menu-btn { display: block; }
    .btn-contact-desktop { display: none; }
    .nav-desktop {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff !important; box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
        z-index: 9999;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 2rem 2rem;
        box-shadow: var(--shadow-md);
        transform: translateY(-150%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .nav-desktop.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link { padding: 0.5rem 0; width: 100%; text-align: left; }
    
}

/* Logo Image Styles */
.logo-img {
    max-height: 65px;
    width: auto;
    object-fit: contain;
}
.footer-logo .logo-img {
    max-height: 75px;
}


/* MOBILE MEGA MENU FIXES */
@media (max-width: 992px) {
    .mega-menu-wrapper {
        position: static !important;
        display: none !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .mega-menu-wrapper.active {
        display: block !important;
    }
    
    .mega-menu {
        display: flex !important;
        flex-direction: column !important;
        padding: 1rem 0 !important;
        gap: 1.5rem !important;
    }
    
    .mega-menu-inner {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    
    .mega-info {
        padding-bottom: 1rem !important;
        border-bottom: 1px solid var(--border-color) !important;
        border-right: none !important;
    }
    
    .mega-links {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .mega-links ul {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
}


/* --- NEW OFF-CANVAS MOBILE MENU (MARSH MCLENNAN STYLE) --- */
.mobile-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9998;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}
.mobile-overlay.active {
    opacity: 1; visibility: visible;
}
.mobile-menu-header { display: none; }

@media (max-width: 992px) {
    .mobile-menu-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 1rem;
    }
    .mobile-close-btn {
        background: none; border: none; font-size: 2rem; cursor: pointer; color: var(--text-main);
        line-height: 1; padding: 0 0.5rem;
    }
    
    /* Override existing nav-desktop rules */
    .nav-desktop {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important; /* Start hidden on right */
        left: auto !important;
        width: 85% !important;
        max-width: 400px !important;
        height: 100vh !important;
        background: #ffffff !important;
        z-index: 9999 !important;
        padding: 1.5rem 1.5rem !important;
        box-shadow: -5px 0 30px rgba(0,0,0,0.15) !important;
        transform: translateX(0) !important;
        transition: right 0.3s ease !important;
        overflow-y: auto !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0 !important;
    }
    .nav-desktop.active {
        right: 0 !important;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    .nav-link {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.25rem 0 !important;
        font-size: 1.05rem !important;
        color: var(--primary-color) !important;
    }
    .nav-link svg {
        transition: transform 0.3s ease;
        stroke: var(--primary-color);
    }
    .nav-link.expanded svg {
        transform: rotate(180deg);
    }
    
    /* Mega menu mobile adjustments */
    .mega-menu-wrapper {
        position: static !important;
        display: none !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        padding: 0 0 1rem 1rem !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important; /* CRITICAL: Override translateX(-50%) from desktop */
    }
    .mega-menu-wrapper.active {
        display: block !important;
    }
    
    /* Hide the text blurbs to save space */
    .mega-info { display: none !important; }
    
    .mega-menu { padding: 0 !important; gap: 0 !important; display: flex !important; flex-direction: column !important; width: 100% !important; border-radius: 0 !important; }
    .mega-menu-inner { display: flex !important; flex-direction: column !important; gap: 0 !important; }
    .mega-links { display: flex !important; flex-direction: column !important; gap: 0 !important; padding: 0 !important; border: none !important; }
    .mega-links ul { display: flex !important; flex-direction: column !important; gap: 0 !important; }
    
    /* Style sub-links to have chevrons */
    .mega-links a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 0;
        font-size: 0.95rem;
        color: var(--text-main);
        border-bottom: 1px solid #f1f5f9;
    }
    .mega-links a:last-child {
        border-bottom: none;
    }
    .mega-links a::after {
        content: '›';
        font-size: 1.4rem;
        color: var(--text-light);
        margin-right: 0.5rem;
    }
    .btn-contact-desktop { display: none !important; }
}
