:root {
  --bg: #f4f8f8;
  --surface: #ffffff;
  --surface-soft: #eef5f6;
  --text: #1f3340;
  --muted: #5f7481;

  --primary: #5f8f87;
  --primary-dark: #4f7a73;
  --primary-ink: #ffffff;

  --secondary: #8da7c2;
  --lavender: #c7bfd9;
  --accent: #f2b8a0;
  --blue: #4f86c6;
  --blue-soft: #d9e8f8;
  --mint: #cfe6de;

  --border: #d8e3e5;
  --shadow: 0 8px 30px rgba(36, 66, 78, 0.08);
  --radius: 14px;
  --max: 1080px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 90% -10%, rgba(141, 167, 194, 0.20), transparent 60%),
    radial-gradient(1200px 500px at -10% -20%, rgba(199, 191, 217, 0.22), transparent 65%),
    var(--bg);
  line-height: 1.6;
}

.container { width: min(92%, var(--max)); margin: 0 auto; }

header {
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.3px;
  text-decoration: none;
  color: #17324a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.02rem;
}

.brand::before {
  content: "AIP";
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-dark), var(--blue));
  box-shadow: 0 6px 14px rgba(79, 122, 115, 0.28);
}

.brand:hover { color: #102638; }

.nav-links a {
  margin-left: 18px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

.nav-links a:hover { color: var(--text); }

.hero {
  padding: 76px 0 48px;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  line-height: 1.13;
  margin: 0 0 14px;
}

.hero p {
  color: var(--muted);
  max-width: 760px;
  margin: 0 0 26px;
}

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  border: 1px solid var(--border);
  transition: 0.2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--blue));
  color: var(--primary-ink);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(95, 143, 135, 0.24);
}

.btn.primary:hover { transform: translateY(-1px); }

.btn.secondary {
  background: var(--surface);
  color: var(--text);
}

.btn.secondary:hover {
  border-color: var(--secondary);
  color: var(--primary-dark);
}

.section { padding: 44px 0; }

.section.alt {
  background: linear-gradient(180deg, rgba(207, 230, 222, 0.33), rgba(207, 230, 222, 0));
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card h3, .card h2 { margin-top: 0; }

.muted { color: var(--muted); }

.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.83rem;
  margin-bottom: 10px;
}

footer {
  margin-top: 46px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
}

.list-clean { padding-left: 18px; }

.page-title { padding: 50px 0 10px; }
.page-title h1 { margin: 0; }



.image-placeholder {
  border: 2px dashed var(--border);
  background: linear-gradient(135deg, #f7fbfb, #eef5f6);
  border-radius: var(--radius);
  min-height: 210px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  padding: 14px;
}
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.subnav a {
  font-size: 0.92rem;
  text-decoration: none;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--primary-dark);
  padding: 7px 10px;
  border-radius: 999px;
}


.quick-actions { display:flex; gap:8px; flex-wrap:wrap; }
.btn.call { background: var(--accent); color:#24333d; border-color:transparent; }
.btn.msg { background: var(--secondary); color:#fff; border-color:transparent; }
.review-strip { margin-top:18px; }
.review-grid { display:grid; gap:12px; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }
.small { font-size:0.92rem; }
.embed-box { border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; background:#fff; box-shadow:var(--shadow); }
.embed-box iframe { width:100%; min-height:320px; border:0; }
.form-grid { display:grid; gap:12px; grid-template-columns:1fr 1fr; }
.form-grid .full { grid-column:1/-1; }
input, textarea, select { width:100%; padding:11px 12px; border:1px solid var(--border); border-radius:10px; font:inherit; }
label { font-weight:600; display:block; margin-bottom:6px; }
.blog-list { display:grid; gap:14px; }
@media (max-width: 700px){ .form-grid{grid-template-columns:1fr;} }


.hero.blue { background: linear-gradient(180deg, rgba(79,134,198,0.12), rgba(79,134,198,0.03)); border-bottom:1px solid var(--border); }
.stars { color:#f5b301; letter-spacing:2px; font-size: 0.95rem; }
.review-link { text-decoration:none; color:inherit; display:block; }
.review-link:hover { transform: translateY(-1px); }
.review-summary { background: var(--blue-soft); border:1px solid #bfd6f1; color:#264a73; border-radius: 10px; padding:10px 12px; margin: 10px 0 14px; font-weight:600; }
.profile-photo { width:100%; max-width:360px; border-radius:14px; border:1px solid var(--border); box-shadow: var(--shadow); }


.nav-links { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.nav-links > a, .dropbtn { margin-left:0; }
.dropdown { position: relative; padding-bottom: 6px; }
.dropbtn { text-decoration:none; color: var(--muted); font-weight:600; }
.dropdown-menu {
  padding-top: 6px;
  position:absolute;
  top: 100%;
  left: 0;
  display:none;
  min-width: 190px;
  background:#fff;
  border:1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 50;
}
.dropdown-menu a {
  display:block;
  margin:0;
  padding:8px 10px;
  border-radius:8px;
}
.dropdown-menu a:hover { background: var(--surface-soft); }
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  padding-top: 6px; display:block; }


.media-fit{width:100%;height:auto;display:block;object-fit:contain;background:#fff;border-radius:12px;border:1px solid var(--border);box-shadow:var(--shadow);}
.media-hero,.media-card,.media-square,.media-wide{width:100%;max-width:100%;height:auto;}
.image-frame{overflow:visible;border-radius:12px;}
.video-box{border-radius:12px;}
.video-box video{width:100%;height:auto;display:block;border-radius:12px;border:1px solid var(--border);background:#000;}
@media (max-width: 700px){
  .media-hero{max-width:100%;}
}

@media (max-width: 680px) {
  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .brand { margin-bottom: 2px; }
  .nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .nav-links a, .dropbtn {
    margin: 0;
    padding: 10px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    text-align: center;
    font-size: 0.92rem;
  }
  .dropdown { display: contents; }
  .dropbtn { display: none; }
  .dropdown-menu {
  padding-top: 6px;
    display: contents;
    position: static;
    min-width: 0;
    border: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
  }
  .dropdown-menu a {
    padding: 10px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    text-align: center;
  }
  .quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .quick-actions .btn {
    text-align: center;
    width: 100%;
    padding: 10px 12px;
  }
}



.nav-toggle{
  display:none;
  border:1px solid var(--border);
  background:#fff;
  border-radius:10px;
  padding:8px 12px;
  font-size:1rem;
  line-height:1;
  cursor:pointer;
}

@media (max-width: 680px){
  .nav{
    flex-direction: row;
    align-items:center;
    justify-content: space-between;
    flex-wrap:wrap;
    gap:8px;
  }
  .nav-toggle{display:inline-block;}
  .nav-links,
  .quick-actions{display:none; width:100%;}
  header.menu-open .nav-links{display:grid; grid-template-columns:1fr 1fr; gap:8px;}
  header.menu-open .quick-actions{display:grid; grid-template-columns:1fr 1fr; gap:8px;}
  .nav-links a, .dropbtn, .dropdown-menu a{
    margin:0;
    padding:10px;
    border:1px solid var(--border);
    border-radius:10px;
    background:#fff;
    text-align:center;
    font-size:0.92rem;
  }
  .dropdown { display: contents; }
  .dropbtn { display:none; }
  .dropdown-menu{
    display:contents;
    position:static;
    border:0;
    box-shadow:none;
    background:transparent;
    min-width:0;
    padding:0;
  }
}


.page-title p,
.page-title .muted {
  max-width: 760px;
  margin-top: 8px;
  overflow-wrap: anywhere;
  word-break: normal;
}
.page-title h1 {
  overflow-wrap: anywhere;
  hyphens: auto;
}


/* Overflow safety */
.card, .container, .subnav, .nav-links, .dropdown-menu { min-width: 0; }
p, li, a, h1, h2, h3 { overflow-wrap: anywhere; }
.subnav a { white-space: normal; line-height: 1.3; }
.nav-links a, .dropdown-menu a { white-space: normal; }
video, iframe, img { max-width: 100%; }


/* Heading + subheading redesign */
h1, h2, h3 {
  color: #183047;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 10px;
}

h2 {
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  line-height: 1.2;
  font-weight: 750;
  margin-bottom: 10px;
  position: relative;
}

h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 3px;
  border-radius: 99px;
  margin-top: 8px;
  background: linear-gradient(90deg, var(--blue), var(--primary));
}

h3 {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.3;
  font-weight: 700;
}

.page-title {
  padding: 54px 0 18px;
  background: linear-gradient(180deg, rgba(79,134,198,0.12), rgba(255,255,255,0));
  border-bottom: 1px solid var(--border);
}

.page-title .muted,
.hero p,
.page-title p {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: #4a6170;
}

/* NAV CLEAN OVERRIDES */
.nav-links { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.nav-links > a { margin:0; }
.dropdown { position: relative; padding-bottom: 0 !important; }
.dropbtn {
  text-decoration:none;
  color: var(--muted);
  font-weight:600;
  padding: 8px 10px;
  border-radius: 8px;
  display:inline-block;
}
.dropbtn:hover { background: var(--surface-soft); color: var(--text); }
.dropdown-menu {
  position: absolute !important;
  top: calc(100% + 2px) !important;
  left: 0;
  min-width: 220px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 120;
  display:none;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display:block !important; }
.dropdown-menu a {
  display:block;
  text-align:left;
  margin:0;
  padding:8px 10px;
  border-radius:8px;
  border:0 !important;
  background:transparent !important;
}

@media (max-width: 680px){
  .nav{flex-direction:row;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;}
  .nav-toggle{display:inline-block !important;}
  .nav-links,
  .quick-actions{display:none !important; width:100%;}
  header.menu-open .nav-links{display:grid !important;grid-template-columns:1fr 1fr;gap:8px;}
  header.menu-open .quick-actions{display:grid !important;grid-template-columns:1fr 1fr;gap:8px;}
  .dropdown{display:contents;}
  .dropbtn{display:none !important;}
  .dropdown-menu{display:contents !important;position:static !important;border:0 !important;box-shadow:none !important;padding:0 !important;background:transparent !important;min-width:0 !important;}
  .nav-links a, .dropdown-menu a {
    text-align:center;
    border:1px solid var(--border) !important;
    border-radius:10px;
    background:#fff !important;
    padding:10px;
  }
}

.offer-ribbon { background: #ffe8a3; color: #2b2b2b; border-top: 1px solid #f4cf6b; border-bottom: 1px solid #f4cf6b; font-weight: 700; }
.offer-ribbon .container { padding: 10px 0; text-align: center; }
