:root {
  --ds-navy: #0A2342;
  --ds-gold: #D4AF37;
  --ds-bg: #0f1220;
  --ds-card: #12162a;
  --ds-white: #fff;
  --ds-muted: #bcc4d0;
  --ds-wa: #25D366;
  --ds-logo-h: 44px;
  --ds-hero-w: 720px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--ds-bg);
  color: var(--ds-white);
  font-family: 'Inter', system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
  scroll-behavior: smooth;
}

a {
  color: var(--ds-gold);
  text-decoration: none;
}

/* ========== BARRA DE REDES SOCIALES FIJA (CÍRCULOS INICIALES) ========== */
.social-sidebar {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1100;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(18, 22, 42, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 50%;
  text-decoration: none;
  color: var(--ds-white);
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.2);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.social-btn i {
  font-size: 1.4rem;
  transition: all 0.3s ease;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.social-btn span {
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
  pointer-events: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding-left: 28px;
  white-space: nowrap;
}

.social-btn:hover {
  width: 130px;
  border-radius: 40px;
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--ds-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
  justify-content: flex-start;
}

.social-btn:hover i {
  position: relative;
  left: 0;
  top: 0;
  transform: none;
  margin-left: 12px;
}

.social-btn:hover span {
  opacity: 1;
  transform: translateX(0);
}

.social-btn.instagram:hover {
  background: linear-gradient(45deg, #f09433, #d62976, #962fbf);
  border-color: transparent;
  color: #fff;
}
.social-btn.facebook:hover {
  background: #1877f2;
  border-color: transparent;
  color: #fff;
}
.social-btn.tiktok:hover {
  background: #000000;
  border-color: #00f2ea;
  color: #00f2ea;
}

@media (max-width: 768px) {
  .social-sidebar {
    left: 12px;
    gap: 8px;
  }
  .social-btn {
    width: 44px;
    height: 44px;
  }
  .social-btn i {
    font-size: 1.2rem;
  }
  .social-btn:hover {
    width: 110px;
  }
  .social-btn span {
    font-size: 0.75rem;
  }
}

/* ========== NAV ========== */
.ds-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(10, 12, 24, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.ds-logo {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ds-logo img {
  height: var(--ds-logo-h);
  width: auto;
  display: block;
  transition: transform 0.2s ease;
}
.ds-logo img:hover {
  transform: scale(1.02);
}

.ds-logo span {
  font-weight: 700;
}

.ds-menu a {
  margin-left: 20px;
  font-weight: 600;
  opacity: 0.85;
  color: var(--ds-white);
  transition: all 0.2s ease;
  position: relative;
}
.ds-menu a:hover {
  opacity: 1;
  color: var(--ds-gold);
}
.ds-menu a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--ds-gold);
  transition: width 0.2s ease;
}
.ds-menu a:hover::after {
  width: 100%;
}

/* ========== LAYOUT GENERAL ========== */
.ds-container {
  max-width: 1200px;
  margin: auto;
  padding: 80px 24px;
}

/* ========== LÍNEAS DORADAS ENTRE BLOQUES ========== */
.ds-hero,
.ds-manifesto,
.ds-tabs-section,
.ds-cards-section,
.ds-tree,
.ds-reviews,
.ds-contact-new {
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}
.ds-contact-new {
  border-bottom: none;
}

/* ========== HERO con canvas Matrix ========== */
.ds-hero {
  position: relative;
  min-height: 85vh;
  display: grid;
  place-items: center;
  text-align: center;
  background: radial-gradient(1200px 500px at 50% 0%, rgba(212, 175, 55, 0.12), transparent);
  padding: 40px 16px;
  overflow: hidden;
}

.hero-matrix-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  opacity: 0.45;
  pointer-events: none;
}

.ds-hero-wrap {
  position: relative;
  z-index: 2;
}

.ds-hero-illustration {
  width: min(92vw, var(--ds-hero-w));
  height: auto;
  display: block;
  margin: 0 auto 24px;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.ds-hero-illustration:hover {
  transform: scale(1.02);
}
.ds-hero h1 {
  font-size: clamp(32px, 6vw, 56px);
  margin: 0.2em 0;
  letter-spacing: -0.02em;
}
.ds-hero p {
  color: var(--ds-muted);
  margin-bottom: 24px;
  font-size: 1.2rem;
}

/* ========== MANIFIESTO, TECNOLOGÍAS, OPINIONES Y CONTACTO con fondo unificado ========== */
.ds-manifesto,
.ds-cards-section,
.ds-reviews,
.ds-contact-new {
  background: linear-gradient(135deg, rgba(10, 35, 66, 0.3), transparent);
  position: relative;
}

/* Detalle decorativo de borde superior e inferior */
.ds-manifesto::before,
.ds-cards-section::before,
.ds-reviews::before,
.ds-contact-new::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
}

.ds-manifesto::after,
.ds-cards-section::after,
.ds-reviews::after,
.ds-contact-new::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
}

/* ========== MANIFIESTO CONTENIDO ========== */
.ds-manifesto-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.ds-manifesto h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--ds-gold);
}
.ds-manifesto-text {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ds-muted);
  margin-bottom: 2rem;
}
.ds-manifesto-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.ds-manifesto-stats div {
  text-align: center;
}
.ds-manifesto-stats strong {
  display: block;
  font-size: 2rem;
  color: var(--ds-gold);
  font-weight: 700;
}
.ds-manifesto-stats span {
  font-size: 0.9rem;
  color: var(--ds-muted);
}

/* ========== BOTÓN UNIFICADO ========== */
.ds-team-btn {
  display: inline-block;
  border: 1.5px solid var(--ds-gold);
  padding: 14px 32px;
  color: var(--ds-white);
  text-decoration: none;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  border-radius: 0;
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: 0.5px;
}
.ds-team-btn:hover {
  background: var(--ds-gold);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.2);
}

/* ========== TABS (BLOQUE 1) ========== */
.ds-tabs-wrapper {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.ds-tabs-content {
  flex: 3;
}
.ds-tabs-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tab-pane {
  display: none;
  animation: fadeUp 0.5s ease;
}
.tab-pane.active {
  display: block;
}
.tab-pane h2 {
  margin-top: 0;
  font-size: 2.2rem;
  margin-bottom: 1rem;
}
.tab-pane p {
  color: var(--ds-muted);
  line-height: 1.6;
}
.tab-btn {
  background: none;
  border: none;
  color: #aaa;
  font-size: 2rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  padding: 0.5rem 0;
}
.tab-btn.active {
  color: var(--ds-gold);
  transform: translateX(8px);
}
.tab-btn:hover:not(.active) {
  color: #ccc;
  transform: translateX(4px);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== CARDS (BLOQUE 2) ========== */
.ds-cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: #1e1e2a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
}
.ds-card-item {
  flex: 1;
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--ds-card);
  transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  font-weight: 600;
  font-size: 1.2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: default;
}
.ds-card-item:hover {
  flex: 2;
  background: rgba(212, 175, 55, 0.08);
  color: var(--ds-gold);
  transform: scale(1.01);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
}

/* ========== ÁRBOL ========== */
.ds-tree .tree-stage {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), transparent);
  padding: 30px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.3s ease;
}
.ds-tree .tree-stage:hover {
  box-shadow: 0 20px 35px -12px rgba(0,0,0,0.5);
}
.tree-img {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}
#tree-svg .leaf {
  cursor: pointer;
}
#tree-svg .leaf .dot {
  fill: var(--ds-gold);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  transition: r 0.2s ease, filter 0.2s;
}
#tree-svg .leaf .ring {
  fill: none;
  stroke: var(--ds-gold);
  stroke-width: 2;
  opacity: 0.6;
  animation: ds-ping 1.8s ease-out infinite;
}
#tree-svg .leaf:hover .dot {
  r: 16;
  filter: brightness(1.2) drop-shadow(0 0 6px var(--ds-gold));
}
@keyframes ds-ping {
  0% { r: 0; opacity: 0.7; }
  70% { opacity: 0.15; }
  100% { r: 28; opacity: 0; }
}
#tree-svg.show-grid {
  background-image: linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ========== OPINIONES SLIDER ========== */
.ds-slider {
  position: relative;
  overflow: hidden;
  min-height: 180px;
}
.ds-slider .slide {
  opacity: 0;
  transition: opacity 0.6s ease;
  position: absolute;
  inset: 0;
  padding: 20px 0;
}
.ds-slider .slide.is-active {
  opacity: 1;
  position: relative;
}
.ds-slider blockquote {
  font-size: clamp(18px, 2.6vw, 24px);
  line-height: 1.5;
  font-style: italic;
}
.ds-slider figcaption {
  color: var(--ds-gold);
  margin-top: 12px;
  font-weight: 500;
}

/* ========== NUEVA SECCIÓN DE CONTACTO (centrada, con imagen de fondo) ========== */
.ds-contact-new {
  padding: 80px 0;
  position: relative;
  background: linear-gradient(135deg, rgba(10, 35, 66, 0.3), transparent);
  background-image: url('https://images.unsplash.com/photo-1516321318423-f06f85e504b3?q=80&w=2070&auto=format');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Overlay oscuro para dar transparencia y que el texto sea legible */
.ds-contact-new::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 12, 24, 0.75);
  z-index: 1;
}

/* Aseguramos que el contenedor y la tarjeta estén por encima del overlay */
.ds-contact-new .ds-container {
  position: relative;
  z-index: 2;
}

/* Mantenemos los bordes decorativos (opcional) */
.ds-contact-new::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.6), transparent);
  z-index: 2;
}

.contact-card {
  max-width: 600px;
  margin: 0 auto;
  background: rgba(18, 22, 42, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 28px;
  padding: 48px 40px;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s;
  position: relative;
  z-index: 3;
}
.contact-card:hover {
  border-color: var(--ds-gold);
  transform: translateY(-5px);
}
.contact-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ds-gold);
  margin-bottom: 12px;
  letter-spacing: 2px;
}
.contact-subtitle {
  color: var(--ds-muted);
  margin-bottom: 32px;
  font-size: 0.95rem;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(10, 12, 24, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 14px;
  color: var(--ds-white);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--ds-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #8892b0;
}
.contact-form button {
  background: transparent;
  border: 1.5px solid var(--ds-gold);
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 8px;
  border-radius: 40px;
}
.contact-form button:hover {
  background: var(--ds-gold);
  color: #000;
  transform: translateY(-2px);
}

/* ========== MODAL CON PANEL IZQUIERDO ========== */
.ds-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 2000;
}
.ds-modal[hidden] {
  display: none;
}
.ds-book {
  position: relative;
  background: var(--ds-card);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  box-shadow: 0 25px 45px -12px black;
  display: flex;
  flex-direction: column;
}
.ds-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 10;
}
.ds-close:hover {
  transform: scale(1.1);
  color: var(--ds-gold);
}
.ds-pages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  height: 100%;
  min-height: 60vh;
}
.ds-pages .page {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}
/* Panel izquierdo personalizado */
.ds-info-panel {
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: transparent;
}
.ds-info-panel h3 {
  color: var(--ds-gold);
  margin-bottom: 16px;
  font-size: 1.8rem;
  font-weight: 600;
  border-left: 3px solid var(--ds-gold);
  padding-left: 16px;
}
.ds-info-panel p {
  color: var(--ds-muted);
  line-height: 1.6;
  font-size: 1rem;
  margin: 0;
  padding: 0 8px;
}
/* Panel derecho (iframe) */
.page.right {
  display: flex;
  flex-direction: column;
}
#ds-iframe {
  width: 100%;
  height: 100%;
  min-height: 60vh;
  border: none;
  border-radius: 20px;
  flex: 1;
}
.ds-iframe-fallback {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,0.7);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  z-index: 5;
}

/* ========== BURBUJA CHAT ========== */
.ds-bubble {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: transparent;
  transition: transform 0.2s;
  z-index: 1000;
}
.ds-bubble:hover {
  transform: scale(1.05);
}
.ds-bubble .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--ds-wa) var(--p, 0%), rgba(255, 255, 255, 0.2) 0 100%);
}
.ds-bubble .dot {
  position: absolute;
  inset: 6px;
  display: grid;
  place-items: center;
  background: var(--ds-wa);
  color: #16181d;
  border-radius: 50%;
  font-size: 24px;
}
.ds-chat {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: 300px;
  max-width: 92vw;
  background: var(--ds-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  z-index: 1000;
}
.ds-chat[hidden] {
  display: none;
}
.ds-chat h3 {
  margin-top: 0;
}
.ds-chat .ds-chat-close {
  position: absolute;
  right: 12px;
  top: 8px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

/* ========== SCROLL EFFECTS (fade-in on scroll) ========== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .ds-container {
    padding: 60px 20px;
  }
  .ds-pages {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .ds-info-panel {
    padding: 20px;
    text-align: center;
  }
  .ds-info-panel h3 {
    border-left: none;
    border-bottom: 2px solid var(--ds-gold);
    padding-left: 0;
    padding-bottom: 8px;
  }
  .contact-card {
    padding: 32px 24px;
  }
}
@media (max-width: 800px) {
  .ds-tabs-wrapper {
    flex-direction: column;
  }
  .ds-tabs-menu {
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
  }
  .tab-btn {
    font-size: 1.4rem;
    text-align: center;
  }
  .tab-btn.active {
    transform: translateY(2px);
  }
  .ds-manifesto-stats {
    gap: 1.5rem;
  }
}
@media (max-width: 700px) {
  .ds-cards-grid {
    flex-direction: column;
  }
  .ds-card-item:hover {
    flex: 1;
  }
}
@media (max-width: 600px) {
  .ds-nav {
    flex-direction: column;
    gap: 10px;
  }
  .ds-menu a {
    margin: 0 12px;
    font-size: 0.9rem;
  }
  .ds-manifesto-stats {
    flex-direction: column;
    gap: 1rem;
  }
  .contact-card h2 {
    font-size: 1.8rem;
  }
}
@media (max-width: 480px) {
  :root {
    --ds-hero-w: 360px;
  }
}