/* ===== PORTFOLIO COMPONENTS ===== */
.portfolio-section {
  background: var(--white);
  padding: 5rem 2rem;
  border-top: 1px solid var(--border);
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
  margin-top: 3rem;
}
.portfolio-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: transform .22s, box-shadow .22s;
  background: var(--white);
}
.portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.portfolio-thumb {
  height: 124px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}
.pt1 { background: linear-gradient(135deg, var(--sage-dark), #3D8A65); }
.pt2 { background: linear-gradient(135deg, var(--lavender), #7B6DAA); }
.pt3 { background: linear-gradient(135deg, #5C5C7A, #3a3a5a); }
.pt4 { background: linear-gradient(135deg, var(--coral), #d4845a); }
.pt5 { background: linear-gradient(135deg, var(--sage), var(--sage-dark)); }
.pt6 { background: linear-gradient(135deg, var(--lavender-light), var(--lavender)); }
.portfolio-info {
  padding: 16px 18px;
}
.portfolio-info h4 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--ink);
}
.portfolio-info p {
  font-size: .78rem;
  color: var(--ink-60);
}

/* ===== FAQ ACCORDION ===== */
.faq-section {
  background: var(--sage-pale);
  padding: 5rem 2rem;
}
.faq-list {
  max-width: 720px;
  margin: 3rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.faq-item.open {
  border-color: var(--sage-dark);
  box-shadow: var(--shadow-soft);
}
.faq-q {
  width: 100%;
  text-align: left;
  padding: 20px 22px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  transition: color .2s;
}
.faq-q:hover {
  color: var(--sage-dark);
}
.faq-arrow {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background: var(--cream-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  color: var(--ink-60);
  transition: transform .28s, background .2s, color .2s;
}
.faq-item.open .faq-arrow {
  transform: rotate(180deg);
  background: var(--sage-dark);
  color: #fff;
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .38s ease, padding .3s;
  padding: 0 22px;
}
.faq-item.open .faq-a {
  max-height: 320px;
  padding: 0 22px 22px;
}
.faq-a p {
  font-size: .9rem;
  color: var(--ink-60);
  line-height: 1.75;
}

/* ===== PRICING TABLES ===== */
.pricing-section {
  padding: 5rem 2rem;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.pricing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  transition: all .3s;
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.pricing-card.featured {
  border-color: var(--sage);
  border-width: 2px;
  background: var(--sage-pale);
}
.featured-badge {
  background: var(--sage-dark);
  color: #fff;
  border-radius: 100px;
  padding: .25rem .85rem;
  font-size: .72rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1rem;
}
.plan-name {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .5rem;
}
.plan-price {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--ink);
  line-height: 1;
}
.plan-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-60);
}
.plan-desc {
  font-size: .8rem;
  color: var(--ink-60);
  margin-bottom: 1.5rem;
  margin-top: .25rem;
}
.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: 1.75rem;
}
.plan-features li {
  font-size: .87rem;
  color: var(--ink-60);
}

/* ===== FORMULARIOS ===== */
.contact-section {
  padding: 5rem 2rem;
  background: var(--cream-deep);
}
.contact-inner {
  max-width: 560px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 1.25rem;
}
.form-group label {
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink);
}
.form-group input, .form-group select, .form-group textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .92rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color .2s;
  outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(126, 200, 164, .15);
}
.form-group textarea {
  min-height: 100px;
  resize: vertical;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ===== MODALES BASE ===== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 46, .45);
  backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.modal.open {
  display: flex;
}
.modal-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 50px rgba(28, 28, 46, .15);
  animation: fadeUp .4s cubic-bezier(.22, 1, .36, 1);
}
.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--cream-deep);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--ink-60);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.modal-close:hover {
  background: var(--border);
  color: var(--ink);
}
.modal-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  margin-bottom: .75rem;
}
.modal-text {
  font-size: .9rem;
  color: var(--ink-60);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* ===== CHATBOT WINDOW ===== */
.chat-widget {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 300;
  font-family: 'DM Sans', sans-serif;
}
.chat-toggle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--ink);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(28, 28, 46, .25);
  cursor: pointer;
  position: relative;
  transition: transform .2s;
}
.chat-toggle:hover {
  transform: scale(1.05);
}
.chat-icon {
  font-size: 1.4rem;
}
.chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #E07070;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
}
.chat-box {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 360px;
  max-width: calc(100vw - 48px);
  height: 480px;
  max-height: calc(100vh - 140px);
  background: #121214; /* Forzamos color oscuro de fondo para el contenedor del chat */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.chat-box.open {
  display: flex;
}
.chat-header {
  background: var(--ink);
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-title-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .88rem;
}
.chat-status-dot {
  width: 8px;
  height: 8px;
  background: var(--sage);
  border-radius: 50%;
}
.chat-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, .6);
  font-size: 1.25rem;
  cursor: pointer;
}
.chat-close-btn:hover {
  color: #fff;
}
.chat-body {
  height: 240px;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  background: var(--cream);
}
.chat-msg {
  display: flex;
}
.chat-msg.bot {
  justify-content: flex-start;
}
.chat-msg.user {
  justify-content: flex-end;
}
.chat-bubble {
  max-width: 85%;
  padding: .6rem .85rem;
  border-radius: var(--radius-md);
  font-size: .82rem;
  line-height: 1.5;
}
.chat-msg.bot .chat-bubble {
  background: var(--white);
  color: var(--ink);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}
.chat-msg.user .chat-bubble {
  background: var(--sage-dark);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-footer {
  padding: .75rem;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.chat-opt-btn {
  background: var(--lavender-pale);
  border: 1px solid var(--lavender-light);
  color: var(--ink);
  font-size: .75rem;
  padding: .35rem .65rem;
  border-radius: 100px;
  cursor: pointer;
  transition: all .15s;
}
.chat-opt-btn:hover {
  background: var(--sage-dark);
  color: #fff;
  border-color: var(--sage-dark);
}

/* ===== WHATSAPP FLOAT BUTTON ===== */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 300;
  background: #25d366;
  color: #fff;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 28px rgba(37, 211, 102, .45);
  transition: transform .2s, box-shadow .2s;
}
.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 36px rgba(37, 211, 102, .55);
}

/* ===== SCROLL TOP BUTTON ===== */
.scroll-top {
  position: fixed;
  bottom: 100px;
  right: 28px;
  z-index: 290;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--ink-60);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all .3s;
}
.scroll-top.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.scroll-top:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ===== FOOTER STYLES ===== */
.footer {
  background: var(--ink);
  color: #fff;
  padding: 3rem 2rem 0;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.footer-brand {
  flex: 1;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}
.footer-brand .logo-mark {
  color: var(--sage-light);
  font-size: 1.2rem;
}
.footer-tagline {
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  color: rgba(255, 255, 255, .4);
  font-weight: 400;
  margin-top: .5rem;
}
.footer-links {
  display: flex;
  gap: 3rem;
}
.footer-links div {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.footer-links strong {
  font-size: .82rem;
  color: rgba(255, 255, 255, .4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .25rem;
}
.footer-links a {
  font-size: .88rem;
  color: rgba(255, 255, 255, .65);
  transition: color .2s;
}
.footer-links a:hover {
  color: var(--sage-light);
}
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 0;
  font-size: .78rem;
  color: rgba(255, 255, 255, .3);
}


/* ══════════════════════════════════════════════════════════
   CHATBOT WIDGET — estilos unificados (dark theme)
   ══════════════════════════════════════════════════════════ */
:root {
  --chat-bg: #121214;
  --chat-border: rgba(255, 255, 255, 0.08);
  --chat-accent: #4caf82; /* verde sage para mantener coherencia con la marca */
}

/* Contenedor posicionado */
.chat-widget {
  position: fixed;
  bottom: 28px; /* misma altura que el botón WA */
  left: 28px;
  z-index: 400;
  font-family: 'DM Sans', sans-serif;
}

/* Botón de apertura */
.chat-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink);
  border: 2.5px solid rgba(76, 175, 130, 0.7); /* contorno verde sage */
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 0 rgba(76, 175, 130, 0.5);
  cursor: pointer;
  position: relative;
  animation: chatTogglePulse 2.2s ease-in-out infinite;
  transition: transform .2s;
}
.chat-toggle:hover {
  transform: scale(1.07);
  animation-play-state: paused;
  box-shadow: 0 0 0 6px rgba(76, 175, 130, 0.25);
}
@keyframes chatTogglePulse {
  0%   { box-shadow: 0 0 0 0   rgba(76, 175, 130, 0.55); }
  60%  { box-shadow: 0 0 0 10px rgba(76, 175, 130, 0);   }
  100% { box-shadow: 0 0 0 0   rgba(76, 175, 130, 0);    }
}
.chat-icon { font-size: 1.45rem; }

.chat-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #e07070;
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
}

/* Ventana del chat */
.chat-box {
  position: fixed;
  bottom: 96px;
  left: 24px;
  width: 360px;
  max-width: calc(100vw - 48px);
  height: 480px;
  max-height: calc(100vh - 140px);
  background: var(--chat-bg);
  border: 1px solid var(--chat-border);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .55);
  display: flex;
  flex-direction: column;
  z-index: 399;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
  transition: opacity .28s ease, transform .28s ease;
}
.chat-box.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Cabecera */
.chat-header {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--chat-border);
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.chat-header-info { flex: 1; min-width: 0; }
.chat-header-name  { font-weight: 600; font-size: .92rem; color: #fff; }
.chat-header-status { font-size: .72rem; color: #888; display: flex; align-items: center; gap: 5px; }
.chat-header-status::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4caf82;
}
.chat-close-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  transition: color .15s;
}
.chat-close-btn:hover { color: #fff; }

/* Área de mensajes */
.chat-messages {
  flex: 1;
  padding: 14px 14px 6px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}

/* Burbujas */
.chat-msg {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: .87rem;
  line-height: 1.45;
  animation: chatMsgIn .28s ease;
}
@keyframes chatMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-msg.bot {
  background: rgba(255, 255, 255, 0.08);
  color: #f0f0f0;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.chat-msg.user {
  background: var(--chat-accent);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Botones de opciones (footer del chat) */
.chat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: .75rem;
  border-top: 1px solid var(--chat-border);
  border-radius: 0 0 16px 16px;
}
.chat-opt-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e8e8e8;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-size: .82rem;
  font-family: inherit;
  transition: background .18s, border-color .18s, transform .1s;
  line-height: 1.3;
}
.chat-opt-btn:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: var(--chat-accent);
  color: #fff;
  transform: translateY(-1px);
}
.chat-opt-back {
  width: 100%;
  text-align: center;
  color: #aaa;
  font-size: .78rem;
}

/* ── Portfolio card destacada (tortokiller) ── */
.portfolio-card--featured {
  border-color: var(--sage-dark);
  box-shadow: 0 0 0 2px var(--sage-dark), var(--shadow-hover);
}
.portfolio-card--featured:hover {
  transform: translateY(-6px);
}
.pt-torto {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.portfolio-live-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--sage-dark);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: .02em;
}

/* ── Ciudad en testimonios ── */
.testi-city {
  font-size: .72rem;
  color: var(--ink-30);
  margin-top: 2px;
}
