/* ==========================================================================
   AVA — modern insurance portfolio
   Design system: deep insurance blue + muted gold trust accent.
   Mobile-first, responsive, framework-free.
   ========================================================================== */

:root {
  --c-primary: #14305c;
  --c-primary-600: #1b3a6b;
  --c-primary-500: #2b5fa8;
  --c-primary-050: #eef2f9;
  --c-accent: #d4a23a;
  --c-accent-600: #bd8c28;

  --c-bg: #f5f7fb;
  --c-surface: #ffffff;
  --c-text: #1f2733;
  --c-heading: #15233a;
  --c-muted: #6b7686;
  --c-border: #e4e9f2;

  --shadow-sm: 0 1px 2px rgba(20, 48, 92, .06), 0 1px 3px rgba(20, 48, 92, .08);
  --shadow-md: 0 6px 18px rgba(20, 48, 92, .10);
  --shadow-lg: 0 18px 40px rgba(20, 48, 92, .16);

  --radius: 14px;
  --radius-sm: 10px;
  --container: 1140px;
  --header-h: 68px;

  --font-body: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Sora', 'Open Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* The [hidden] attribute must always win over component display rules. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }

a { color: var(--c-primary-500); text-decoration: none; }
a:hover { color: var(--c-primary); }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); color: var(--c-heading); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.text-center { text-align: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 999px;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}

.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-600); color: #fff; transform: translateY(-1px); }

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

.navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--c-heading);
  letter-spacing: .2px;
}
.navbar-brand:hover { color: var(--c-primary); }

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  position: relative;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 15px;
  color: var(--c-text);
  border-radius: 8px;
  transition: color .2s ease, background .2s ease;
}
.nav-link:hover { color: var(--c-primary); background: var(--c-primary-050); }

.navbar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  cursor: pointer;
}
.navbar-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--c-heading);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.navbar-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggle.open span:nth-child(2) { opacity: 0; }
.navbar-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Sections & headings
   ========================================================================== */
.section { padding: 64px 0; }
.section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }
#me { padding-top: 56px; }

.section-heading { margin-bottom: 44px; }
.section-heading.text-center { text-align: center; }

.section-heading h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.15;
}
.section-heading em {
  font-style: normal;
  color: var(--c-primary-500);
}
.section-heading p {
  margin: 0;
  max-width: 720px;
  font-size: 16px;
  color: var(--c-muted);
}
.section-heading.text-center p { margin-left: auto; margin-right: auto; }

.txt-content-secondary { color: var(--c-heading); font-weight: 700; }

/* ==========================================================================
   About me
   ========================================================================== */
.about-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-bottom: 48px;
}

.about-avatar img {
  width: 188px;
  height: 188px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: var(--shadow-lg);
}

.pill-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pill {
  text-align: center;
  background: var(--c-surface);
  border: 1.5px solid var(--c-primary-500);
  color: var(--c-primary);
  font-weight: 600;
  font-size: 14px;
  width: 240px;
  max-width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.pill:hover {
  background: var(--c-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.text-content {
  margin: 0;
}
.about-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 56px;
}
.about-block h6 {
  position: relative;
  margin: 0 0 16px;
  padding-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--c-primary);
  border-bottom: 1px solid var(--c-border);
}
.about-block h6::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 48px;
  height: 2px;
  background: var(--c-accent);
}
.about-block p {
  margin: 0;
  color: var(--c-muted);
  font-size: 15.5px;
}
.about-blog {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--c-border);
}

/* ==========================================================================
   Products
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
}

.product-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-image {
  position: relative;
  height: 170px;
  overflow: hidden;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-image img { transform: scale(1.05); }

.product-cta {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 46px;
  line-height: 46px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #fff;
  background: var(--c-primary-500);
  transform: translateY(100%);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
}
.product-card:hover .product-cta { transform: translateY(0); opacity: 1; }

.product-body { padding: 18px 18px 22px; }
.product-body h4 {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 700;
  color: var(--c-heading);
}
.product-body .product-subtitle {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--c-primary-500);
  margin-bottom: 10px;
}
.product-body p {
  margin: 0;
  font-size: 13.5px;
  color: var(--c-muted);
  line-height: 1.6;
}

.other-products {
  margin: 40px auto 0;
  max-width: 720px;
  font-size: 16px;
  font-weight: 600;
  color: var(--c-heading);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 36px;
  align-items: stretch;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.hours p { margin: 0 0 14px; color: var(--c-text); }

.contact-links { display: flex; flex-direction: column; gap: 12px; }
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  color: var(--c-text);
  font-weight: 600;
  font-size: 14.5px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
  word-break: break-word;
}
.contact-links a:hover {
  border-color: var(--c-primary-500);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.contact-links a i {
  color: var(--c-primary-500);
  font-size: 18px;
  width: 22px;
  text-align: center;
}

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--c-border);
  min-height: 320px;
}
.contact-map iframe { display: block; width: 100%; height: 100%; min-height: 400px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--c-primary);
  color: #fff;
  text-align: center;
  padding: 28px 20px;
}
.footer p { margin: 0; font-size: 13.5px; font-weight: 300; letter-spacing: .3px; }
.footer a { color: #fff; font-weight: 600; }
.footer a:hover { color: var(--c-accent); }

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(15, 25, 45, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
.modal-card {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 540px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: popIn .22s ease;
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--c-border);
}
.modal-header h5 { margin: 0; font-size: 19px; font-weight: 700; color: var(--c-primary); }
.modal-body { padding: 18px 24px; overflow-y: auto; }
.modal-subtitle { font-weight: 700; color: var(--c-heading); margin-bottom: 10px; }
.modal-description { color: var(--c-muted); font-size: 14.5px; }
.modal-products { margin: 8px 0 0; padding-left: 20px; }
.modal-products li { margin: 6px 0; color: var(--c-text); font-size: 14px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--c-border);
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   Toast
   ========================================================================== */
.toast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 54px;
  padding: 10px 20px;
  background: var(--c-primary-500);
  color: #fff;
  font-weight: 600;
}
.toast-danger { background: #c0392b; }
.toast-success { background: #1e8e5a; }
.toast-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* ==========================================================================
   AVA assistant
   ========================================================================== */
#bar-ava {
  position: fixed;
  height: 76px;
  width: 76px;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
}
#bar-ava.hidden-bar { display: none; }

.centered-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--c-primary);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.centered-avatar img { width: 50px; height: 50px; border-radius: 0 0 24px 24px; }

#ava .card {
  position: fixed;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 80%;
  max-height: 640px;
  bottom: 20px;
  right: 2rem;
  z-index: 950;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
#ava .card[hidden] { display: none; }

#ava .card-header {
  position: relative;
  background: var(--c-primary);
  padding: 18px 20px 16px;
  text-align: center;
}
#ava .circle {
  height: 70px;
  width: 70px;
  margin: 2px auto 12px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .9);
  background: var(--c-primary-600);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}
#ava .circle .avatar-header { width: 46px; height: 44px; }
#ava .introduction { padding-top: 0; }
#ava .introduction p { color: #fff; margin: 0; font-size: 14px; font-weight: 300; }
#ava .introduction em { font-style: normal; font-weight: 700; }
#ava .close-btn {
  position: absolute;
  right: 16px;
  top: 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .6);
  color: #fff;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
}
#ava .close-btn:hover { background: rgba(255, 255, 255, .15); }

#chat-content {
  flex: 1;
  overflow-y: auto;
  padding: 18px 8px;
  background: var(--c-primary-050);
}

.media { display: flex; padding: 0 10px; }
.media > * { margin: 0 6px; }
.media-chat { justify-content: flex-start; }
.media-chat-reverse { justify-content: flex-end; }

.avatar, #ava .avatar {
  width: 40px;
  height: 40px;
  padding: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  align-self: flex-end;
}
.avatar-placeholder { width: 34px; height: 34px; }

.outer-chat {
  margin: 6px 0;
  max-width: 264px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  line-height: 1.5;
  font-size: 14px;
  border-radius: 14px;
  border-top-left-radius: 2px;
}
.outer-chat a { color: var(--c-primary-500); font-weight: 600; }
.media-chat-reverse .outer-chat {
  background: var(--c-primary-500);
  color: #fff;
  border-top-left-radius: 14px;
  border-top-right-radius: 2px;
}

#ava .card-footer {
  padding: 12px;
  background: var(--c-primary);
}
#ava .publisher {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 16px;
  background: #fff;
  border-radius: 999px;
}
#ava .publisher input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
}
#ava .send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--c-accent);
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
}
#ava .send-btn:hover { background: var(--c-accent-600); color: #fff; }

/* typing loader */
.loader-dot {
  display: inline-block;
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: var(--c-muted);
  margin-right: 4px;
  animation: bounce 1s linear infinite;
}
.loader-dot:nth-of-type(2) { animation-delay: .15s; }
.loader-dot:nth-of-type(3) { animation-delay: .3s; }

/* AVA quick-reply chips */
.ava-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 18px 10px 58px;
}
.ava-chip {
  background: #fff;
  border: 1px solid var(--c-primary-500);
  color: var(--c-primary-500);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.ava-chip:hover { background: var(--c-primary-500); color: #fff; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s ease;
}
.faq-item[open] { box-shadow: var(--shadow-md); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--c-heading);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--c-primary-500);
  transition: transform .2s ease;
  line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--c-primary); }
.faq-answer { padding: 0 22px 20px; }
.faq-answer p { margin: 0; color: var(--c-muted); font-size: 15px; line-height: 1.65; }
.faq-answer a { font-weight: 600; }

/* ==========================================================================
   WhatsApp floating button
   ========================================================================== */
.wa-fab {
  position: fixed;
  /* stacked just above the AVA button (76px tall) on the right */
  right: calc(2rem + 8px);
  bottom: calc(2rem + 90px);
  z-index: 900;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: var(--shadow-lg);
  transition: transform .15s ease, background .2s ease;
}
.wa-fab:hover { background: #1ebe5a; color: #fff; transform: translateY(-2px) scale(1.05); }
.wa-fab.hidden-bar { display: none; }

/* ==========================================================================
   Animations
   ========================================================================== */
.pulse { animation: pulse 1.6s infinite; }
.pulse:hover { animation: none; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(43, 95, 168, .7); }
  70% { box-shadow: 0 0 0 14px rgba(43, 95, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(43, 95, 168, 0); }
}

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.animate-to-top { animation: animateToTop .55s ease forwards; }
.animate-to-bottom { animation: animateToBottom .5s ease forwards; pointer-events: none; }

@keyframes animateToTop {
  0% { opacity: 0; transform: translateY(24px) scale(.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes animateToBottom {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(24px) scale(.96); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .navbar-toggle { display: flex; }
  .navbar-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-md);
    padding: 8px;
    display: none;
  }
  .navbar-nav.open { display: flex; }
  .nav-link { padding: 12px 14px; border-radius: 8px; }

  .about-hero { flex-direction: column; gap: 24px; }
  .about-avatar { order: -1; }
  .pill-column {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
  .pill { width: auto; min-width: 200px; }

  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-map { min-height: 300px; }
}

@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .section-heading { margin-bottom: 32px; }

  .about-columns { grid-template-columns: 1fr; gap: 28px; }

  #bar-ava { right: 1.2rem; bottom: 1.2rem; width: 62px; height: 62px; }
  .centered-avatar { width: 62px; height: 62px; }
  .centered-avatar img { width: 40px; height: 40px; }
  .wa-fab { right: calc(1.2rem + 6px); bottom: calc(1.2rem + 74px); width: 50px; height: 50px; font-size: 26px; }
  .ava-chips { padding-left: 18px; }

  #ava .card {
    right: 50%;
    transform: translateX(50%);
    width: 92vw;
    height: 82vh;
    bottom: 12px;
  }
  .animate-to-top { animation: animateToTopMobile .55s ease forwards; }
  .animate-to-bottom { animation: animateToBottomMobile .5s ease forwards; }
  @keyframes animateToTopMobile {
    0% { opacity: 0; transform: translateX(50%) translateY(24px) scale(.96); }
    100% { opacity: 1; transform: translateX(50%) translateY(0) scale(1); }
  }
  @keyframes animateToBottomMobile {
    0% { opacity: 1; transform: translateX(50%) translateY(0) scale(1); }
    100% { opacity: 0; transform: translateX(50%) translateY(24px) scale(.96); }
  }

  .pill { min-width: 0; width: 100%; }
  .pill-column { flex-direction: column; }
}
