/* =============================================
   Tecno Simple Litoral — Stylesheet
   ============================================= */

/* ----- Variables ----- */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF6FF;
  --primary-border: #BFDBFE;
  --accent: #059669;
  --accent-light: #ECFDF5;
  --dark: #0F172A;
  --body: #374151;
  --muted: #6B7280;
  --border: #E5E7EB;
  --bg: #FFFFFF;
  --bg-alt: #F8FAFC;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --max-w: 1200px;
  --transition: 150ms ease;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1rem;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ----- Typography ----- */
h1, h2, h3, h4 { color: var(--dark); font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
p { color: var(--body); }

/* ----- Layout helpers ----- */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.section {
  padding-block: 5rem;
}
.section--alt {
  background: var(--bg-alt);
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header p {
  margin-top: .75rem;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin-inline: auto;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.5rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn--primary {
  background: var(--primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--primary-dark);
  color: #fff;
}
.btn--outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn--outline:hover {
  background: var(--primary-light);
}
.btn--white {
  background: #fff;
  color: var(--primary);
}
.btn--white:hover {
  background: var(--primary-light);
}
.btn--outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.6);
}
.btn--outline-white:hover {
  background: rgba(255,255,255,.1);
  border-color: #fff;
}
.btn--sm {
  padding: .45rem 1rem;
  font-size: .875rem;
}
.btn--lg {
  padding: .9rem 2rem;
  font-size: 1.05rem;
}

/* =============================================
   NAVIGATION
   ============================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav__logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-decoration: none;
}
.nav__logo-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
}
.nav__logo-tagline {
  font-size: .7rem;
  color: var(--muted);
  font-weight: 400;
}
.nav__logo:hover { text-decoration: none; }
.nav__links {
  display: none;
  gap: .25rem;
  align-items: center;
}
.nav__links a {
  color: var(--body);
  font-size: .9rem;
  font-weight: 500;
  padding: .4rem .75rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.nav__links a:hover,
.nav__links a.active {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}
.nav__cta { display: none; }
.nav__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: .5rem;
  border-radius: var(--radius-sm);
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav__hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav__hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.nav__mobile {
  display: none;
  flex-direction: column;
  gap: .25rem;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
  background: #fff;
}
.nav__mobile.open { display: flex; }
.nav__mobile a {
  color: var(--body);
  font-weight: 500;
  padding: .6rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
}
.nav__mobile a:hover,
.nav__mobile a.active {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}

@media (min-width: 768px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__hamburger { display: none; }
}

/* =============================================
   HERO
   ============================================= */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #3B82F6 100%);
  color: #fff;
  padding-block: 6rem 5rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  padding: .35rem .85rem;
  border-radius: 99px;
  margin-bottom: 1.5rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.hero h1 {
  color: #fff;
  margin-bottom: 1.25rem;
  font-size: clamp(2rem, 5vw, 3.25rem);
}
.hero p {
  color: rgba(255,255,255,.9);
  font-size: 1.15rem;
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,.2);
}
.hero__stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
}
.hero__stat span {
  font-size: .85rem;
  color: rgba(255,255,255,.75);
}

/* =============================================
   QUE HACEMOS
   ============================================= */
.que-hacemos__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
.que-hacemos__text {
  max-width: 580px;
}
.que-hacemos__text p {
  font-size: 1.1rem;
  color: var(--body);
  margin-bottom: 1.5rem;
  line-height: 1.75;
}
.que-hacemos__values {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 2rem;
}
.badge-value {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--accent-light);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  padding: .35rem .8rem;
  border-radius: 99px;
  text-transform: capitalize;
}
.que-hacemos__cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.pain-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.pain-card__icon {
  font-size: 1.75rem;
  margin-bottom: .75rem;
}
.pain-card h4 {
  font-size: .875rem;
  color: var(--dark);
  margin-bottom: .25rem;
}
.pain-card p {
  font-size: .8rem;
  color: var(--muted);
}

@media (min-width: 768px) {
  .que-hacemos__grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
  }
}

/* =============================================
   SERVICES
   ============================================= */
.services__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.service-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}
.service-card h3 {
  margin-bottom: .5rem;
}
.service-card > p {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 1.25rem;
  flex: 1;
}
.service-card__deliverables {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.service-card__deliverables li {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: var(--body);
}
.service-card__deliverables li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* =============================================
   TOOLS
   ============================================= */
.tools__filter {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
  justify-content: center;
}
.filter-btn {
  padding: .4rem .9rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--body);
  font-size: .875rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.tools__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.tool-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow var(--transition);
}
.tool-card:hover {
  box-shadow: var(--shadow-md);
}
.tool-card__category {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--primary);
  margin-bottom: .75rem;
}
.tool-card h4 {
  margin-bottom: .4rem;
}
.tool-card p {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.tool-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.tag {
  font-size: .75rem;
  padding: .2rem .55rem;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--muted);
}
.tag--oss {
  background: var(--accent-light);
  border-color: #6EE7B7;
  color: var(--accent);
}

/* =============================================
   INTERACTIVE FEATURES
   ============================================= */
.features__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}
.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.feature-card__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.25rem;
}
.feature-card h3 { margin-bottom: .5rem; }
.feature-card p {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 1.5rem;
}

/* =============================================
   CASOS DE USO
   ============================================= */
.casos__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.caso-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border-top: 4px solid var(--primary);
}
.caso-card__industry {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--primary);
  margin-bottom: .75rem;
}
.caso-card h3 { margin-bottom: .5rem; }
.caso-card > p {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 1.25rem;
}
.caso-card__result {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: .6rem 1rem;
  border-radius: var(--radius-sm);
}

/* =============================================
   FAQ
   ============================================= */
.faq__list {
  max-width: 720px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-item__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.1rem 1.25rem;
  background: none;
  border: none;
  text-align: left;
  font-size: .975rem;
  font-weight: 600;
  color: var(--dark);
  transition: background var(--transition);
}
.faq-item__question:hover { background: var(--bg-alt); }
.faq-item__question[aria-expanded="true"] { background: var(--primary-light); color: var(--primary); }
.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  transition: background var(--transition), transform var(--transition);
}
.faq-item__question[aria-expanded="true"] .faq-icon {
  background: var(--primary);
  color: #fff;
  transform: rotate(45deg);
}
.faq-item__answer {
  display: none;
  padding: 0 1.25rem 1.25rem;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.7;
}
.faq-item__answer.open { display: block; }

/* =============================================
   CONTACT SECTION (homepage)
   ============================================= */
.contact-cta {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  text-align: center;
  padding-block: 5rem;
}
.contact-cta h2 { color: #fff; margin-bottom: .75rem; }
.contact-cta p {
  color: rgba(255,255,255,.85);
  font-size: 1.1rem;
  max-width: 540px;
  margin: 0 auto 2.5rem;
}
.contact-cta__channels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,.7);
  padding-block: 3rem 1.5rem;
}
.footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-bottom: 2.5rem;
}
.footer__brand-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  display: block;
  margin-bottom: .5rem;
}
.footer__brand-desc {
  font-size: .875rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: rgba(255,255,255,.6);
}
.footer__col-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.4);
  margin-bottom: 1rem;
}
.footer__links {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.footer__links a {
  color: rgba(255,255,255,.7);
  font-size: .875rem;
  transition: color var(--transition);
}
.footer__links a:hover { color: #fff; text-decoration: none; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
}
@media (min-width: 640px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* =============================================
   CONTACT PAGE
   ============================================= */
.contact-page__grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .contact-page__grid { grid-template-columns: 1fr 1.5fr; }
}
.contact-info__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.contact-info__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.contact-info__label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: .2rem;
}
.contact-info__value {
  font-weight: 600;
  color: var(--dark);
}
.contact-info__sub {
  font-size: .8rem;
  color: var(--muted);
}
.contact-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.contact-form h3 { margin-bottom: 1.5rem; }
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: .4rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: inherit;
  color: var(--dark);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 480px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}
.form-success {
  display: none;
  background: var(--accent-light);
  border: 1px solid #6EE7B7;
  border-radius: var(--radius);
  padding: 1.25rem;
  color: var(--accent);
  font-weight: 600;
  text-align: center;
  margin-top: 1rem;
}
.form-success.show { display: block; }

/* =============================================
   SERVICES PAGE
   ============================================= */
.page-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding-block: 3rem;
}
.page-hero h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.page-hero p { color: var(--muted); margin-top: .75rem; font-size: 1.05rem; }
.breadcrumb {
  display: flex;
  gap: .5rem;
  align-items: center;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--muted); }

.service-detail {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}
.service-detail:last-of-type { border-bottom: none; }
@media (min-width: 768px) {
  .service-detail { grid-template-columns: 1fr 1fr; align-items: center; gap: 4rem; }
  .service-detail--reverse .service-detail__visual { order: -1; }
}
.service-detail__visual {
  background: var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}
.service-detail__visual-icon { font-size: 4rem; }
.service-detail__visual h3 { color: var(--primary); }
.service-detail__deliverables {
  display: grid;
  gap: .75rem;
  margin-top: 1rem;
}
.deliverable-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.deliverable-item__check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.deliverable-item p { font-size: .9rem; color: var(--body); }

.metodologia__steps {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  counter-reset: step;
}
.step-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
  counter-increment: step;
}
.step-card::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .05em;
  margin-bottom: .75rem;
}
.step-card h4 { margin-bottom: .5rem; }
.step-card p { font-size: .875rem; color: var(--muted); }

/* =============================================
   CHATBOT WIDGET
   ============================================= */
.chatbot-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(37,99,235,.4);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.chatbot-toggle:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(37,99,235,.5);
}
.chatbot-toggle .icon-close { display: none; }
.chatbot-toggle.open .icon-open { display: none; }
.chatbot-toggle.open .icon-close { display: block; }

.chatbot-window {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  z-index: 199;
  width: min(360px, calc(100vw - 2rem));
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  max-height: 500px;
}
.chatbot-window.open { display: flex; }
.chatbot-header {
  background: var(--primary);
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.chatbot-header__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.chatbot-header__info strong { display: block; font-size: .9rem; }
.chatbot-header__info span { font-size: .75rem; opacity: .8; }
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.chat-msg {
  display: flex;
  gap: .5rem;
  max-width: 85%;
}
.chat-msg--bot { align-self: flex-start; }
.chat-msg--user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg__bubble {
  padding: .65rem .9rem;
  border-radius: var(--radius);
  font-size: .875rem;
  line-height: 1.5;
}
.chat-msg--bot .chat-msg__bubble {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--dark);
  border-bottom-left-radius: 2px;
}
.chat-msg--user .chat-msg__bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 2px;
}
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: 0 1rem .75rem;
}
.chat-suggestion {
  padding: .3rem .7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-border);
  background: var(--primary-light);
  color: var(--primary);
  font-size: .775rem;
  cursor: pointer;
  transition: background var(--transition);
}
.chat-suggestion:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.chatbot-input {
  padding: .75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .5rem;
}
.chatbot-input input {
  flex: 1;
  padding: .5rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-family: inherit;
}
.chatbot-input input:focus {
  outline: none;
  border-color: var(--primary);
}
.chatbot-input button {
  padding: .5rem .85rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
}
.chatbot-input button:hover { background: var(--primary-dark); }

/* =============================================
   DIAGNOSTIC MODAL
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 { margin: 0; }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: none;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.modal-close:hover { background: var(--border); }
.modal-body { padding: 1.5rem; }
.diag-progress {
  margin-bottom: 1.5rem;
}
.diag-progress__label {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: .4rem;
}
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
  transition: width .3s ease;
}
.diag-question h4 {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}
.diag-options {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.diag-option {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.diag-option:hover { border-color: var(--primary); background: var(--primary-light); }
.diag-option input[type="radio"] { accent-color: var(--primary); }
.diag-option label { cursor: pointer; font-size: .9rem; }
.diag-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.diag-result {
  display: none;
  text-align: center;
}
.diag-result.show { display: block; }
.diag-result__icon { font-size: 3.5rem; margin-bottom: 1rem; }
.diag-result h3 { margin-bottom: .5rem; }
.diag-result > p { color: var(--muted); margin-bottom: 1.5rem; }
.diag-recommendations {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: 1.5rem;
  text-align: left;
}
.diag-rec-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-border);
}
.diag-rec-item span { font-size: .875rem; font-weight: 600; color: var(--primary); }

/* =============================================
   SKIP LINK (accessibility)
   ============================================= */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 0;
  padding: .5rem 1rem;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: .875rem;
  z-index: 9999;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.skip-link:focus {
  top: 0;
}

/* =============================================
   UTILITIES
   ============================================= */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ----- Responsive helpers ----- */
@media (max-width: 639px) {
  .section { padding-block: 3rem; }
  .hero { padding-block: 4rem 3rem; }
}
