:root {
  --bg-dark: #090d16;
  --bg-card: rgba(17, 24, 39, 0.55);
  --bg-card-hover: rgba(26, 36, 57, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(59, 130, 246, 0.35);
  --accent-primary: #3b82f6;
  --accent-primary-rgb: 59, 130, 246;
  --accent-secondary: #06b6d4;
  --accent-secondary-rgb: 6, 182, 212;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-white: #ffffff;
  
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.25);
  --shadow-glow-cyan: 0 0 25px rgba(6, 182, 212, 0.25);
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden; /* Avoid body-level window scrollbars entirely */
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  position: relative;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* Film Grain Overlay */
.film-grain {
  position: fixed;
  inset: -100%;
  width: 300%;
  height: 300%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.02;
  mix-blend-mode: overlay;
}

@keyframes grain {
  0%, 100% { transform:translate(0, 0); }
  10% { transform:translate(-5%, -10%); }
  20% { transform:translate(-15%, 5%); }
  30% { transform:translate(7%, -25%); }
  40% { transform:translate(-5%, 25%); }
  50% { transform:translate(-15%, 10%); }
  60% { transform:translate(15%, 0); }
  70% { transform:translate(0, 15%); }
  80% { transform:translate(3%, 35%); }
  90% { transform:translate(-10%, 10%); }
}

.animate-grain {
  animation: grain 8s steps(10) infinite;
}

/* Ambient Glow Background Blobs */
body::before,
body::after {
  content: '';
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-primary-rgb), 0.12) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  filter: blur(60px);
  pointer-events: none;
}

body::before {
  top: 5%;
  left: -150px;
}

body::after {
  top: 45%;
  right: -150px;
  background: radial-gradient(circle, rgba(var(--accent-secondary-rgb), 0.10) 0%, rgba(0, 0, 0, 0) 70%);
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-white);
}

p {
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* Layout container */
.container {
  width: 95%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Floating Capsule Navbar */
header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 1600px;
  height: 70px;
  background: rgba(9, 13, 22, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 35px;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

header:hover {
  border-color: rgba(var(--accent-primary-rgb), 0.2);
  box-shadow: var(--shadow-glow);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 30px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.logo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  box-shadow: 0 0 8px var(--accent-secondary);
  display: inline-block;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  padding: 5px 0;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

nav a:hover, nav a.active {
  color: var(--text-white);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: var(--transition);
}

nav a:hover::after, nav a.active::after {
  width: 100%;
}

/* Highlighted Profile tab styled in a glowing blue accent */
nav a.nav-destacado-perfil,
nav a.nav-destacado-servicios {
  color: #22d3ee;
  border: 1px solid rgba(34, 211, 238, 0.35);
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.05);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.1);
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.3);
  transition: var(--transition);
  white-space: nowrap;
}

nav a.nav-destacado-perfil:hover,
nav a.nav-destacado-perfil.active,
nav a.nav-destacado-servicios:hover,
nav a.nav-destacado-servicios.active {
  background: rgba(34, 211, 238, 0.2);
  border-color: #22d3ee;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.3);
}

/* Remove default underline animation for the highlighted custom styled link */
nav a.nav-destacado-perfil::after,
nav a.nav-destacado-servicios::after {
  display: none !important;
}

/* Mobile Nav Burger */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1100;
}

.mobile-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-white);
  margin: 5px 0;
  transition: var(--transition);
}

/* Main Content Box (Higher specificity to win over container resets) */
main.container {
  margin-top: 7rem !important; /* Space below header */
  height: calc(100vh - 12rem); /* Dynamic SPA height calculation (minus header + footer heights) */
  overflow: hidden; /* Prevent container level scrolling */
  display: flex;
  flex-direction: column;
}

#sections-wrapper {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Tab-based Layout Engine */
.tab-content {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  padding-top: 0.5rem;
  padding-bottom: 2rem;
  height: 100%;
  overflow-y: auto; /* Enable scrollbars ONLY on active tab contents */
  overflow-x: hidden;
  padding-right: 0.5rem; /* Avoid scrollbar overlapping content */
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-content.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Custom modern scrollbars for tabs contents */
.tab-content::-webkit-scrollbar {
  width: 6px;
}

.tab-content::-webkit-scrollbar-track {
  background: transparent;
}

.tab-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.35);
}

/* Title Area for Tabs */
.section-title-area {
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-left: 3px solid var(--accent-secondary);
  padding-left: 1.5rem;
}

.section-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--accent-secondary);
  font-weight: 700;
  font-family: var(--font-mono);
}

.section-title {
  font-size: 2.25rem;
  color: var(--text-white);
}

/* SUB-TAB ROUTER SYSTEM */
.subtabs-container {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
}

.subtab-btn {
  background: none;
  border: none;
  padding: 0.75rem 0.5rem;
  font-size: 0.88rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

.subtab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transform: scaleX(0);
  transition: var(--transition);
}

.subtab-btn:hover {
  color: var(--text-white);
}

.subtab-btn.active {
  color: var(--text-white);
}

.subtab-btn.active::after {
  transform: scaleX(1);
}

.subtab-content {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.subtab-content.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* TAB 1: PRESENTACIÓN (Hero) */
.hero-grid {
  display: grid;
  grid-template-columns: 1.8fr 2fr;
  gap: 4.5rem;
  align-items: center;
  padding: 0.5rem 0;
}

.profile-card {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 2.5rem 2rem;
  text-align: center;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.profile-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.profile-img-container {
  width: 250px;
  height: 250px;
  margin: 0 auto 1.25rem auto;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.55);
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 2.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-white);
}

.profile-title {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-secondary);
  font-weight: 700;
  margin-bottom: 2rem;
}

.profile-meta {
  font-size: 1rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.meta-item svg {
  color: var(--accent-primary);
  width: 14px;
  height: 14px;
}

.hero-intro h1 {
  margin-bottom: 2rem;
}

.hero-stacked-title {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hero-stacked-title span {
  display: block;
  font-size: 4.2rem;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
}

.hero-intro .bio-text {
  font-size: 1.3rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 2.5rem;
  text-align: justify;
}

.social-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
  border-radius: 30px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.social-btn:hover {
  transform: translateY(-3px);
}

/* Brand Colors for Social Buttons */
.social-btn.linkedin {
  border-color: rgba(10, 102, 194, 0.3);
  background: rgba(10, 102, 194, 0.05);
  color: #70b5f9;
}
.social-btn.linkedin:hover {
  background: #0a66c2;
  color: #fff !important;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(10, 102, 194, 0.4);
}

.social-btn.github {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
  color: #f3f4f6;
}
.social-btn.github:hover {
  background: #24292e;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.social-btn.orcid {
  border-color: rgba(166, 206, 57, 0.3);
  background: rgba(166, 206, 57, 0.05);
  color: #bce545;
}
.social-btn.orcid:hover {
  background: #a6ce39;
  color: #fff !important;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(166, 206, 57, 0.4);
}

.social-btn.instagram {
  border-color: rgba(220, 39, 67, 0.3);
  background: rgba(220, 39, 67, 0.05);
  color: #ff6b8b;
}
.social-btn.instagram:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #fff !important;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(220, 39, 67, 0.4);
}

/* Biography Text highlights (BIM, IoT, Arquitecto Técnico) */
.bio-text strong {
  color: var(--accent-secondary);
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.1);
  font-family: var(--font-display);
}

.social-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* TAB 2: PERFIL PROFESIONAL (Full timeline sub-tabs) */
.full-timeline-box {
  width: 100%;
  border: 1px solid var(--border-color);
  padding: 3rem 2.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.timeline-v {
  position: relative;
}

.timeline-v::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
}

.timeline-item {
  position: relative;
  padding-left: 2.25rem;
  margin-bottom: 2.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-secondary);
  border: 2px solid var(--bg-dark);
  box-shadow: 0 0 8px var(--accent-secondary);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-secondary);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Outstanding year period badge styling */
.timeline-date-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.9rem; /* Larger font size */
  font-weight: 700;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: #22d3ee;
  margin-bottom: 0.65rem;
  letter-spacing: 0.03em;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.05);
}

.formacion-date-badge {
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.25);
  color: #c084fc;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.05);
}

.cert-date-badge {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.05);
}

.curso-date-badge {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.05);
}

.merito-date-badge {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.05);
}

.timeline-role {
  font-size: 1.45rem; /* Larger font size */
  margin-bottom: 0.3rem;
  color: var(--text-white);
  line-height: 1.25;
}

.timeline-org {
  font-size: 1.05rem; /* Larger font size */
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.timeline-org a {
  color: var(--accent-primary);
}

.timeline-org a:hover {
  text-decoration: underline;
}

.timeline-desc {
  font-size: 1rem; /* Larger font size */
  color: var(--text-muted);
  line-height: 1.6;
  text-align: justify;
}

/* TAB 3: PUBLICACIONES (Sub-tabs) */
.research-grid-full {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
}

.research-card,
.research-profiles-card {
  border: 1px solid var(--border-color);
  padding: 2.5rem 2rem;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.research-card .highlight-box {
  background-color: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--accent-secondary);
  padding: 1.5rem;
  border-radius: 0 12px 12px 0;
  margin-bottom: 1.5rem;
}

.research-card .highlight-box p {
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--text-white);
  font-weight: 500;
}

.research-card .detail-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  text-align: justify;
}

.academic-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.academic-link-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.01);
  border-radius: 10px;
  transition: var(--transition);
}

.academic-link-card:hover {
  border-color: var(--accent-secondary);
  background-color: var(--bg-card-hover);
  box-shadow: var(--shadow-glow-cyan);
  padding-left: 1.5rem;
}

.academic-link-card span {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-white);
}

.academic-link-card svg {
  color: var(--accent-secondary);
}

.papers-full-container {
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

.column-header {
  font-size: 1.3rem;
  color: var(--text-white);
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

.publications-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.pub-row {
  display: grid;
  grid-template-columns: minmax(75px, max-content) 1fr;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.01);
  border-radius: 14px;
  align-items: flex-start;
  transition: var(--transition);
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}

.pub-row:hover {
  border-color: rgba(var(--accent-primary-rgb), 0.2);
  background-color: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
}

.pub-year {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--accent-primary);
  font-weight: 800;
  text-align: center;
  line-height: 1;
  padding-top: 0.25rem;
}

/* Outstanding year badge for publications */
.pub-year-highlighted {
  font-family: var(--font-display);
  font-size: 1.35rem; /* Larger font size */
  color: var(--text-white) !important;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(6, 182, 212, 0.4);
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
  min-width: 60px;
}

.pub-type {
  font-size: 0.78rem; /* Larger font size */
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--accent-secondary);
  margin-bottom: 0.35rem;
  display: block;
}

.pub-title-area {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.pub-title {
  font-size: 1.22rem; /* Larger font size */
  line-height: 1.45;
  color: var(--text-white);
  word-break: break-word;
  overflow-wrap: break-word;
  font-weight: 600;
  transition: var(--transition);
}

.pub-title:hover {
  color: var(--accent-primary);
}

.pub-venue {
  font-size: 0.95rem; /* Larger font size */
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.pub-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--accent-primary);
}

.pub-link-btn:hover {
  color: var(--text-white);
}

/* TAB 4: DESARROLLO (Full Grid Cards) */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  background-color: rgba(255, 255, 255, 0.01);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: auto;
  border-radius: 12px;
  transition: var(--transition);
}

.project-card:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.project-name {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
  line-height: 1.2;
  color: var(--text-white);
}

.project-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  text-align: justify;
  margin-bottom: 0.75rem;
}

.project-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 0.15rem 0.5rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--accent-secondary);
}

.project-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-link-main {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent-secondary);
}

.project-link-main:hover {
  color: var(--text-white);
}

.github-stars {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.github-stars svg {
  width: 12px;
  height: 12px;
  fill: #eab308;
}

/* TAB 5: CONTACTO */
.contacto-card {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  padding: 2rem 2.5rem;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  margin: 0.5rem 0;
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
}

.contacto-header {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-secondary);
  margin-bottom: 1.25rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.contacto-detail {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-main);
  font-family: var(--font-display);
}

.email-copy-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

#contacto-email-text {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  color: var(--text-white);
  font-weight: 500;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  border-radius: 6px;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover {
  background-color: var(--accent-primary);
  color: var(--text-white);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.copy-msg {
  display: none;
  color: #10b981; /* Emerald success */
  font-size: 0.8rem;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-weight: 600;
}

.contacto-social-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.contacto-social-links .social-btn {
  width: 100%;
  justify-content: center;
  border-radius: 8px;
  padding: 0.6rem 0.5rem;
  font-size: 0.75rem;
  height: 42px;
  letter-spacing: 0.08em;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 1.25rem 0;
  background: rgba(9, 13, 22, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-white);
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

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

/* GitHub Stats Dashboard */
.github-stats-dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stats-card {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  padding: 1.5rem 1rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stats-card:hover {
  border-color: rgba(var(--accent-secondary-rgb), 0.25);
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-2px);
}

.stats-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

.stats-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-white);
  background: linear-gradient(135deg, var(--text-white), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Featured Project Card Banner */
.featured-project-card {
  border: 1px solid rgba(var(--accent-primary-rgb), 0.25);
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.7) 0%, rgba(9, 13, 22, 0.95) 100%);
  padding: 2.25rem 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.featured-project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
}

.featured-badge {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.15em;
}

.featured-header-info {
  margin-top: 0.5rem;
  max-width: calc(100% - 150px);
}

.featured-title {
  font-size: 1.75rem;
  color: var(--text-white);
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
}

.featured-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: justify;
}

/* Featured GitHub Live Stats */
.featured-stats {
  display: flex;
  gap: 2.5rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 0;
  margin: 0.5rem 0;
}

.featured-stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.featured-stat-icon {
  font-size: 1.15rem;
}

.featured-stat-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1;
}

.featured-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
  margin-left: 0.25rem;
}

/* Featured Download Links Grid */
.featured-download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  width: 100%;
  margin-top: 0.5rem;
}

.download-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  transition: var(--transition);
  text-align: center;
}

.download-link-btn:hover {
  background: rgba(var(--accent-secondary-rgb), 0.1);
  border-color: var(--accent-secondary);
  color: var(--text-white);
  transform: translateY(-2px);
}

.download-link-btn.primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-color: transparent;
  color: var(--text-white);
  box-shadow: var(--shadow-glow);
}

.download-link-btn.primary:hover {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

.featured-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.45);
  color: var(--text-white);
}

/* Contact Form controls */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-group input,
.form-group textarea {
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.01);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-primary);
  outline: none;
  background: rgba(59, 130, 246, 0.04);
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.submit-btn {
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  text-align: center;
}

.whatsapp-btn {
  background: #25d366;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}

.whatsapp-btn:hover {
  background: #128c7e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

.telegram-btn {
  background: #0088cc;
  box-shadow: 0 4px 15px rgba(0, 136, 204, 0.2);
}

.telegram-btn:hover {
  background: #006699;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.35);
}

.whatsapp-direct-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.3);
  border-radius: 12px;
  color: #25d366;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
}

.whatsapp-direct-btn:hover {
  background: #25d366;
  color: var(--text-white);
  border-color: transparent;
  box-shadow: 0 0 25px rgba(37, 211, 102, 0.35);
  transform: translateY(-2px);
}

.form-status-msg {
  display: none;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  margin-top: 0.5rem;
}

.form-status-msg.sending {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  display: block;
}

.form-status-msg.success {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: block;
}

.form-status-msg.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
  display: block;
}

.form-status-msg.error {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
  display: block;
}

/* NEMO IoT Dashboard styles */
.nemo-card {
  border: 1px solid rgba(var(--accent-primary-rgb), 0.25);
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.7) 0%, rgba(9, 13, 22, 0.95) 100%);
  padding: 2.25rem 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nemo-badge-pulse {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.15em;
  animation: nemo-pulse 2s infinite ease-in-out;
}

@keyframes nemo-pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.nemo-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-top: 0.5rem;
}

.nemo-title {
  font-size: 1.75rem;
  color: var(--text-white);
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
}

.nemo-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 85%;
}

.nemo-recommendation {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.4;
  transition: var(--transition);
}

.nemo-recommendation.rec-optimal {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
}

.nemo-recommendation.rec-warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #fde68a;
}

.nemo-recommendation.rec-danger {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.nemo-rec-icon {
  font-size: 1.1rem;
}

.nemo-metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 0.5rem 0;
}

.nemo-metric-box {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: var(--transition);
}

.nemo-metric-box:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-2px);
}

.nemo-metric-header {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.nemo-metric-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.2;
}

.nemo-unit {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.nemo-metric-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.nemo-metric-progress {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.8s ease;
}

.nemo-controls {
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.nemo-controls-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-white);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.nemo-btn-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.nemo-btn {
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.nemo-btn:hover {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.05);
  color: var(--text-white);
}

.nemo-btn.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-color: transparent;
  color: var(--text-white);
  box-shadow: var(--shadow-glow-cyan);
}

#nemo-btn-co2:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}
/* NEMO 3D Twin iframe wrapper */
.nemo-card-iframe-container {
  border: 1px solid rgba(var(--accent-primary-rgb), 0.25);
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.7) 0%, rgba(9, 13, 22, 0.95) 100%);
  padding: 2.25rem 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nemo-iframe-wrapper {
  width: 100%;
  height: 500px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #0f0c29;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.nemo-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.nemo-metrics-row-layout {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  width: 100%;
}

/* Responsive Grid and elements */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    text-align: center;
  }
  .hero-intro h1 {
    font-size: 2.75rem;
  }
  .profile-card {
    max-width: 400px;
    margin: 0 auto;
  }
  .social-links {
    justify-content: center;
  }
  .research-grid-full,
  .contacto-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .contacto-card {
    padding: 2rem;
  }
  .nemo-metrics-row-layout {
    grid-template-columns: repeat(3, 1fr);
  }
  .nemo-iframe-wrapper {
    height: 400px;
  }
}

@media (max-width: 768px) {
  header {
    border-radius: 0;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 60px;
    border-top: none;
    border-left: none;
    border-right: none;
  }
  .nav-container {
    padding: 0 20px;
  }
  .nav-container nav {
    display: none;
  }
  .nav-container nav.active {
    display: block;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background-color: rgba(9, 13, 22, 0.98);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem;
    z-index: 999;
  }
  .nav-container nav.active ul {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }
  .mobile-nav-toggle {
    display: block;
  }

  /* ── LAYOUT FIXES ── */
  main.container {
    margin-top: 5rem !important;
    padding: 0 1rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0.5rem 0;
  }
  .profile-card {
    max-width: 100%;
    padding: 2rem 1.25rem;
  }
  .profile-img-container {
    width: 110px;
    height: 110px;
  }
  .hero-intro h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  .hero-stacked-title span {
    font-size: clamp(1.8rem, 6.8vw, 2.5rem) !important;
    line-height: 1.15 !important;
  }
  .tab-content {
    padding-bottom: 5.5rem !important;
  }
  .hero-intro .bio-text {
    font-size: 1rem;
    margin-bottom: 1.75rem;
  }
  .social-links {
    justify-content: flex-start;
    gap: 0.65rem;
  }
  .social-btn {
    font-size: 0.78rem;
    padding: 0.55rem 0.9rem;
  }

  /* ── TYPOGRAPHY ── */
  .section-title {
    font-size: 1.65rem;
  }

  /* ── CONTACT ── */
  #contacto-email-text {
    font-size: 1rem;
    word-break: break-all;
  }

  /* ── GITHUB ── */
  .github-stats-dashboard {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  /* ── FEATURED / PROYECTOS ── */
  .featured-project-card {
    padding: 1.25rem;
  }
  .featured-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  .featured-info {
    max-width: 100%;
  }
  .featured-actions {
    align-items: flex-start;
    width: 100%;
  }
  .featured-btn {
    width: 100%;
    justify-content: center;
  }

  /* ── FORMS ── */
  .form-actions {
    grid-template-columns: 1fr;
  }

  /* ── NEMO IoT DASHBOARD ── */
  .nemo-iframe-wrapper {
    height: 300px;
  }
  .nemo-metrics-row-layout {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }
  .nemo-card-iframe-container {
    padding: 1.25rem;
  }

  /* ── SUBTABS ── */
  .subtabs-container {
    gap: 0.75rem;
    flex-wrap: wrap;
  }
  .subtab-btn {
    font-size: 0.8rem;
    padding: 0.6rem 0.4rem;
  }

  /* ── SKILLS CAPSULES ── */
  .skills-capsules-container {
    padding: 1rem;
    gap: 0.5rem;
  }
  .skill-capsule {
    font-size: 0.7rem;
    padding: 0.35rem 0.65rem;
  }
}

  /* ── Extra-small screens (≤ 480px) ── */
@media (max-width: 480px) {
  .hero-intro h1 {
    font-size: 1.6rem;
  }
  .hero-stacked-title span {
    font-size: clamp(1.55rem, 6.4vw, 1.95rem) !important;
    line-height: 1.15 !important;
  }
  .ai-fixed-actions-bar {
    gap: 4px !important;
    padding: 8px 6px !important;
  }
  .ai-fixed-btn {
    padding: 7px 4px !important;
    font-size: 0.68rem !important;
    letter-spacing: 0 !important;
  }
  .email-copy-box {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  #contacto-email-text {
    font-size: 1.05rem;
    word-break: break-all;
  }
  .profile-name {
    font-size: 1.3rem;
  }
  .section-title {
    font-size: 1.4rem;
  }
  .github-stats-dashboard {
    grid-template-columns: 1fr;
  }
  .nemo-metrics-row-layout {
    grid-template-columns: 1fr;
  }
  .nemo-iframe-wrapper {
    height: 260px;
  }
  .container {
    width: 95%;
    padding: 0 0.75rem;
  }
  .social-btn span {
    display: none; /* Ocultar texto, solo icono en pantallas muy pequeñas */
  }
}

/* Global text justification for professional feel */
body, p, li, .timeline-desc, .project-desc, .featured-desc, .contacto-detail, .bio-text, .nemo-subtitle {
  text-align: justify;
  text-justify: inter-word;
}

/* Redesigned Minimalist Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 0.6rem 0; /* Extremely low padding */
  background: rgba(9, 13, 22, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: auto;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-white);
}

.footer-copyright {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Grey SVG icons in footer */
.footer-social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.01);
  color: var(--text-muted) !important;
  transition: var(--transition);
}

.footer-social-icon-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.footer-social-icon-btn:hover {
  color: var(--text-white) !important;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

/* Aptitudes Sub-tab Layout Styles */
.aptitudes-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
  width: 100%;
}

.aptitude-category-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.aptitude-category-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-secondary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  font-family: var(--font-display);
}

.aptitude-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.aptitude-tag-item {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  transition: var(--transition);
}

.aptitude-tag-item:hover {
  background: rgba(var(--accent-primary-rgb), 0.1);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Skills Capsules Active Filter badge style */
.skill-capsule.active-filter {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: var(--text-white) !important;
  border-color: transparent !important;
  box-shadow: 0 0 12px rgba(var(--accent-secondary-rgb), 0.4);
}

/* Skills Capsules Styles */
.skills-capsules-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.skill-capsule {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  transition: var(--transition);
  cursor: default;
}

.skill-capsule:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.06);
}

/* Language Capsule Colors */
.skill-python {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.07);
  color: #60a5fa;
}
.skill-js {
  border-color: rgba(234, 179, 8, 0.35);
  background: rgba(234, 179, 8, 0.07);
  color: #facc15;
}
.skill-sql {
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.07);
  color: #c084fc;
}
.skill-cpp {
  border-color: rgba(14, 116, 144, 0.35);
  background: rgba(14, 116, 144, 0.07);
  color: #22d3ee;
}
.skill-bim {
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.07);
  color: #22d3ee;
}
.skill-bc3 {
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.07);
  color: #fb923c;
}
.skill-iot {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.07);
  color: #34d399;
}
.skill-firebase {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.07);
  color: #fbbf24;
}
.skill-cloudflare {
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.07);
  color: #f97316;
}
.skill-git {
  border-color: rgba(244, 63, 94, 0.35);
  background: rgba(244, 63, 94, 0.07);
  color: #fb7185;
}
.skill-print3d {
  border-color: rgba(236, 72, 153, 0.35);
  background: rgba(236, 72, 153, 0.07);
  color: #f472b6;
}

/* Video Category Capsule Colors */
.video-capsule-software {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.07);
  color: #60a5fa;
}
.video-capsule-software:hover {
  border-color: #60a5fa !important;
  color: #60a5fa !important;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}
.video-capsule-software.active-filter {
  background: #60a5fa !important;
  color: #0f172a !important;
  border-color: #60a5fa !important;
}

.video-capsule-hardware {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.07);
  color: #f87171;
}
.video-capsule-hardware:hover {
  border-color: #f87171 !important;
  color: #f87171 !important;
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.3);
}
.video-capsule-hardware.active-filter {
  background: #f87171 !important;
  color: #0f172a !important;
  border-color: #f87171 !important;
}

.video-capsule-print3d {
  border-color: rgba(236, 72, 153, 0.35);
  background: rgba(236, 72, 153, 0.07);
  color: #f472b6;
}
.video-capsule-print3d:hover {
  border-color: #f472b6 !important;
  color: #f472b6 !important;
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.3);
}
.video-capsule-print3d.active-filter {
  background: #f472b6 !important;
  color: #0f172a !important;
  border-color: #f472b6 !important;
}

.video-capsule-others {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.07);
  color: #94a3b8;
}
.video-capsule-others:hover {
  border-color: #94a3b8 !important;
  color: #94a3b8 !important;
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.3);
}
.video-capsule-others.active-filter {
  background: #94a3b8 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

/* Projects Dashboard Card Interactive Styling */
.dashboard-nav-card:hover {
  border-color: rgba(59, 130, 246, 0.45) !important;
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  background-color: var(--bg-card-hover) !important;
}

.dashboard-nav-card:hover span {
  color: var(--text-white) !important;
  transform: translateX(3px);
}

.dashboard-nav-card span {
  transition: var(--transition);
}

/* PhD Medals/Badges Interactive Hover */
.phd-badge:hover {
  transform: scale(1.03) translateY(-2px);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.15);
  border-color: var(--accent-secondary) !important;
  background: rgba(6, 182, 212, 0.12) !important;
}

/* Academic Links Colorized Hovers & Active States */
.academic-link-card {
  transition: var(--transition);
}

.academic-link-card .acad-icon-wrapper svg {
  width: 100%;
  height: 100%;
}

.academic-link-card.acad-orcid:hover {
  border-color: #a6ce39;
  color: #a6ce39;
  box-shadow: 0 0 15px rgba(166, 206, 57, 0.2);
  background: rgba(166, 206, 57, 0.03);
}

.academic-link-card.acad-scholar:hover {
  border-color: #4285f4;
  color: #4285f4;
  box-shadow: 0 0 15px rgba(66, 133, 244, 0.2);
  background: rgba(66, 133, 244, 0.03);
}

.academic-link-card.acad-dialnet:hover {
  border-color: #c50616;
  color: #c50616;
  box-shadow: 0 0 15px rgba(197, 6, 22, 0.2);
  background: rgba(197, 6, 22, 0.03);
}

.academic-link-card.acad-udc:hover {
  border-color: #0084c5;
  color: #0084c5;
  box-shadow: 0 0 15px rgba(0, 132, 197, 0.2);
  background: rgba(0, 132, 197, 0.03);
}

.academic-link-card.acad-riarte:hover {
  border-color: #06b6d4;
  color: #06b6d4;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
  background: rgba(6, 182, 212, 0.03);
}

/* 3D Design Subtab Styles */
.design3d-header-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .design3d-header-panel {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
  }
  .setup-specs-wrapper {
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
  }
}

.setup-specs-wrapper {
  border-left: 1px solid var(--border-color);
  padding-left: 2.5rem;
}

.setup-spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.setup-spec-item:last-child {
  border-bottom: none;
}

.setup-spec-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.setup-spec-value {
  font-size: 0.9rem;
  color: var(--text-white);
  font-weight: 600;
  text-align: right;
}

/* Sketchfab Card Lazy Load Interactive styles */
.sketchfab-placeholder-container {
  width: 100%;
  height: 240px;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.sketchfab-placeholder-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: var(--transition);
  opacity: 0.9;
}

.sketchfab-placeholder-container:hover .sketchfab-placeholder-overlay {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(0px);
  opacity: 1;
}

.sketchfab-play-btn {
  width: 56px;
  height: 56px;
  background: var(--accent-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
  transition: var(--transition);
}

.sketchfab-placeholder-container:hover .sketchfab-play-btn {
  transform: scale(1.15);
  background: #ec4899;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.5);
}

/* Lightbox Modal Styles */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 30, 0.9);
  backdrop-filter: blur(12px);
  z-index: 100100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content-wrapper {
  max-width: 90%;
  max-height: 85%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox-modal.active .lightbox-image {
  transform: scale(1);
}

.lightbox-caption-panel {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--text-white);
}

.lightbox-caption-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.lightbox-caption-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.lightbox-close-btn {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 1.8rem;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0.7;
}

.lightbox-close-btn:hover {
  opacity: 1;
  color: #ef4444;
  transform: scale(1.1);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text-white);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10010;
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent-secondary);
}

.lightbox-nav-prev {
  left: -4rem;
}

.lightbox-nav-next {
  right: -4rem;
}

@media (max-width: 992px) {
  .lightbox-nav-prev {
    left: 1rem;
    background: rgba(10, 15, 30, 0.6);
  }
  .lightbox-nav-next {
    right: 1rem;
    background: rgba(10, 15, 30, 0.6);
  }
}

/* Interactive Software Medals Style */
.software-medal-badge {
  transition: all 0.3s ease !important;
}

.software-medal-badge:hover {
  border-color: var(--hover-color) !important;
  color: var(--hover-color) !important;
  background: rgba(255, 255, 255, 0.02) !important;
  box-shadow: 0 0 12px var(--hover-color);
  transform: translateY(-2px);
}

.software-medal-badge svg {
  transition: transform 0.3s ease;
}

.software-medal-badge:hover svg {
  transform: scale(1.15) rotate(5deg);
}

/* RD Quote Badge hover interaction */
#rd-quote-badge:hover {
  border-color: var(--accent-secondary) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.1);
}

#rd-quote-badge:hover .rd-quote-text {
  color: var(--text-white) !important;
}

#rd-quote-badge:hover .rd-quote-avatar {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.4) !important;
}

/* ── CAPTURAS Y GALERÍAS ENRIQUECIDAS ── */
.capturas-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (max-width: 1024px) {
  .capturas-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .capturas-gallery-grid {
    grid-template-columns: 1fr;
  }
}

.capturas-gallery-grid .project-card {
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.3s ease;
  position: relative;
}

.capturas-gallery-grid .project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-secondary) !important;
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.15);
}

.capturas-card-img-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

.capturas-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.capturas-gallery-grid .project-card:hover .capturas-card-img {
  transform: scale(1.08);
}

/* Lightbox Enriquecido (Modal con Doble Columna) */
.capturas-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 30, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.capturas-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.capturas-lightbox-container {
  width: 92%;
  max-width: 1100px;
  height: 85%;
  max-height: 750px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-columns: 2.2fr 0.8fr;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.capturas-lightbox.active .capturas-lightbox-container {
  transform: scale(1);
}

/* Columna Izquierda: Imagen Principal y Detalles */
.capturas-lightbox-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.3);
}

.capturas-lightbox-media-wrapper {
  position: relative;
  width: 100%;
  height: 420px;
  background: #090e17;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.capturas-lightbox-media-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease-in-out;
}

.capturas-lightbox-details {
  padding: 2rem;
}

.capturas-lightbox-title {
  color: var(--text-white);
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.capturas-lightbox-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.capturas-lightbox-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.capturas-lightbox-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-white);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  transition: var(--transition);
}

.capturas-lightbox-link-btn:hover {
  background: var(--accent-secondary);
  color: #0f172a;
  border-color: var(--accent-secondary);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25);
  transform: translateY(-2px);
}

/* Columna Derecha: Carrusel Lateral de Miniaturas */
.capturas-lightbox-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(15, 23, 42, 0.55);
  overflow: hidden;
}

.capturas-lightbox-sidebar-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.capturas-lightbox-sidebar-header h4 {
  color: var(--text-white);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.capturas-lightbox-thumbnails {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.capturas-thumb-item {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0.6;
  background: #090e17;
  flex-shrink: 0;
}

/* Custom styled thin scrollbar for thumbnails */
.capturas-lightbox-thumbnails::-webkit-scrollbar {
  width: 6px;
}
.capturas-lightbox-thumbnails::-webkit-scrollbar-track {
  background: transparent;
}
.capturas-lightbox-thumbnails::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
.capturas-lightbox-thumbnails::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

.capturas-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.capturas-thumb-item:hover {
  opacity: 0.9;
  border-color: rgba(255, 255, 255, 0.3);
}

.capturas-thumb-item.active {
  opacity: 1;
  border-color: var(--accent-secondary);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

/* Botón de Cierre del Modal */
.capturas-lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10020;
  transition: var(--transition);
  font-size: 1.1rem;
}

.capturas-lightbox-close:hover {
  background: #ef4444;
  color: var(--text-white);
  border-color: #ef4444;
  transform: scale(1.08);
}

/* Adaptación Responsiva para Pantallas Medianas y Móviles */
@media (max-width: 850px) {
  .capturas-lightbox-container {
    grid-template-columns: 1fr;
    grid-template-rows: 1.3fr 0.7fr;
    height: 92%;
    max-height: none;
  }
  
  .capturas-lightbox-main {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .capturas-lightbox-media-wrapper {
    height: 280px;
  }
  
  .capturas-lightbox-sidebar {
    flex-direction: row;
    height: 100%;
    overflow: hidden;
  }
  
  .capturas-lightbox-sidebar-header {
    display: none;
  }
  
  .capturas-lightbox-thumbnails {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem;
    gap: 0.75rem;
    height: 100%;
    align-items: center;
  }
  
  .capturas-thumb-item {
    width: 100px;
    height: 60px;
    flex-shrink: 0;
  }
}

.capturas-btn-3d:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.6);
}

.projects-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

.services-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

.profile-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (max-width: 1100px) {
  .services-dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .projects-dashboard-grid,
  .services-dashboard-grid,
  .profile-dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .dashboard-nav-card {
    min-height: auto !important;
    padding: 1.5rem 1.25rem !important;
  }
}

@media (max-width: 600px) {
  .projects-dashboard-grid,
  .services-dashboard-grid,
  .profile-dashboard-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .rd-header-dashboard-panel {
    flex-direction: column;
  }
  #rd-quote-badge, #rd-stats-badge {
    border-radius: 24px !important;
    width: 100% !important;
    flex: none !important;
  }
  #rd-stats-badge {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
    padding: 1.25rem 1.5rem !important;
  }
  #rd-micro-stats-strip {
    width: 100%;
    justify-content: space-between;
  }
}

.dashboard-nav-card {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  padding: 1.2rem 1.4rem;
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 145px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.dashboard-nav-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-secondary);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.15);
}

.dashboard-nav-icon {
  font-size: 1.65rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.dashboard-nav-title {
  color: var(--text-white);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.dashboard-nav-desc {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dashboard-nav-link {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
  transition: var(--transition);
}

.dashboard-nav-card:hover .dashboard-nav-link {
  filter: brightness(1.2);
  transform: translateX(3px);
}


/* =============================================================================
   🤖 ASESOR VIRTUAL IA CONTECH (jmcaamanog) - ESTILOS FLOTANTES
   ============================================================================= */

.ai-widget-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  font-family: var(--font-main, 'Inter', sans-serif);
}

/* Disparador Flotante (Silueta PNG pura con Drop-Shadow Glow, SIN círculos) */
.ai-launcher-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  outline: none;
  display: block;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}

.ai-launcher-avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-launcher-avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(6, 182, 212, 0.5)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
  transition: filter 0.25s ease, transform 0.25s ease;
}

.ai-launcher-btn:hover .ai-launcher-avatar {
  transform: scale(1.08) translateY(-3px);
  filter: drop-shadow(0 10px 22px rgba(6, 182, 212, 0.8)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
}

.ai-launcher-btn:active .ai-launcher-avatar {
  transform: scale(0.95);
}

/* Punto indicador de estado "Online" */
.ai-online-pulse {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  background-color: #10b981;
  border: 2px solid #090e1a;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: ai-pulse-anim 2s infinite ease-in-out;
}

@keyframes ai-pulse-anim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Bocadillo / Speech Bubble de Saludo Flotante */
.ai-greeting-bubble {
  position: absolute;
  bottom: 84px;
  right: 0;
  width: 290px;
  background: rgba(13, 20, 38, 0.95);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 15px rgba(6, 182, 212, 0.15);
  animation: aiBubblePop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
}

@keyframes aiBubblePop {
  0% { opacity: 0; transform: translateY(12px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-greeting-content {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}

.ai-greeting-emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.ai-greeting-text {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #e2e8f0;
}

.ai-greeting-text strong {
  color: #38bdf8;
}

.ai-greeting-close {
  position: absolute;
  top: 4px;
  right: 6px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}

.ai-greeting-close:hover {
  color: #ffffff;
}

.ai-greeting-arrow {
  position: absolute;
  bottom: -7px;
  right: 28px;
  width: 14px;
  height: 14px;
  background: rgba(13, 20, 38, 0.95);
  border-right: 1px solid rgba(56, 189, 248, 0.35);
  border-bottom: 1px solid rgba(56, 189, 248, 0.35);
  transform: rotate(45deg);
}

/* Ventana de Chat Glassmorphic */
.ai-chat-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 470px;
  max-width: calc(100vw - 32px);
  height: 570px;
  max-height: calc(100vh - 120px);
  background: rgba(9, 14, 28, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 18px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.65), 0 0 25px rgba(6, 182, 212, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100000;
  animation: aiWindowOpen 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), height 0.35s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.35s, max-height 0.35s, bottom 0.35s, right 0.35s, border-radius 0.35s;
}

/* Modo Expandido: Ocupa la mitad derecha de la pantalla en PC / Pantalla completa en móvil */
.ai-chat-window.ai-expanded {
  width: 50vw;
  min-width: 480px;
  max-width: calc(100vw - 32px);
  height: calc(100vh - 120px);
  max-height: calc(100vh - 120px);
  bottom: 96px;
  right: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 35px rgba(6, 182, 212, 0.35);
  border: 1px solid rgba(56, 189, 248, 0.45);
}

@media (max-width: 768px) {
  .ai-chat-window.ai-expanded {
    width: calc(100vw - 20px) !important;
    min-width: unset !important;
    height: calc(100vh - 40px) !important;
    max-height: calc(100vh - 40px) !important;
    bottom: 12px !important;
    right: 10px !important;
    border-radius: 14px !important;
  }
}

@keyframes aiWindowOpen {
  0% { opacity: 0; transform: translateY(20px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header del Chat */
.ai-chat-header {
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.ai-chat-header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-header-avatar-wrap {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-header-avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.ai-header-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.ai-header-status {
  font-size: 0.7rem;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.ai-status-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px #10b981;
}

.ai-chat-header-actions {
  display: flex;
  gap: 6px;
}

.ai-header-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.ai-header-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.4);
}

.ai-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Historial de Mensajes */
.ai-chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #080d1a;
}

.ai-msg {
  display: flex;
  gap: 8px;
  max-width: 90%;
  animation: aiMsgFade 0.25s ease-out;
}

@keyframes aiMsgFade {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

.ai-msg-bot {
  align-self: flex-start;
}

.ai-msg-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-msg-avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.4));
}

.ai-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.83rem;
  line-height: 1.5;
  word-break: break-word;
}

.ai-msg-bot .ai-msg-bubble {
  background: #111e38;
  border: 1px solid #1e3a66;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.35);
  border-top-left-radius: 2px;
}

.ai-msg-bubble,
.ai-msg-bubble p,
.ai-msg-bubble li,
.ai-msg-bubble td {
  color: #ffffff !important;
}

.ai-msg-user .ai-msg-bubble {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-top-right-radius: 2px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.ai-bubble-greeting {
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.ai-msg-bubble p {
  margin: 0 0 6px 0;
}
.ai-msg-bubble p:last-child {
  margin-bottom: 0;
}

.ai-msg-bubble strong {
  color: #38bdf8;
}

.ai-msg-bubble a {
  color: #7dd3fc;
  text-decoration: underline;
}

.ai-msg-bubble ul, .ai-msg-bubble ol {
  margin: 4px 0 6px 16px;
  padding: 0;
}

/* Indicador de escritura "Pensando..." */
.ai-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
}

.ai-typing-dot {
  width: 6px;
  height: 6px;
  background: #38bdf8;
  border-radius: 50%;
  animation: aiTypingBounce 1.3s infinite ease-in-out;
}
.ai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiTypingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* Quick Chips */
.ai-quick-chips-wrapper {
  padding: 10px 14px;
  background: #0d162c;
  border-top: 1px solid rgba(56, 189, 248, 0.15);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  align-items: center;
  overflow: visible;
  flex-shrink: 0;
}

.ai-chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #93c5fd;
  padding: 4px 9px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.ai-chip-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Footer / Input */
.ai-chat-footer {
  padding: 10px 12px;
  background: #090e1a;
  border-top: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

#ai-chat-input {
  flex: 1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: #111e38;
  border: 1px solid #1e3a66;
  border-radius: 10px;
  color: #f8fafc;
  font-size: 0.88rem;
  padding: 10px 14px;
  resize: none;
  font-family: inherit;
  line-height: 1.4;
  height: 42px;
  max-height: 42px;
  outline: none;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

#ai-chat-input:focus {
  border-color: #38bdf8;
}

#ai-chat-input::placeholder {
  color: #64748b;
}

.ai-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  border: none;
  color: #ffffff;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.ai-send-btn:hover {
  transform: scale(1.05);
  opacity: 0.95;
}

.ai-send-btn:active {
  transform: scale(0.95);
}

.ai-send-btn:disabled {
  background: #475569;
  cursor: not-allowed;
  transform: none;
}

/* Responsivo para móviles */
@media screen and (max-width: 480px) {
  .ai-widget-container {
    bottom: 16px;
    right: 16px;
  }

  .ai-launcher-avatar-wrap {
    width: 64px;
    height: 64px;
  }

  .ai-chat-window {
    bottom: 84px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    height: 80vh;
    max-height: 520px;
    border-radius: 14px;
  }

  .ai-greeting-bubble {
    width: 260px;
    right: 0;
    bottom: 76px;
  }
}


/* 🤖 Pestaña IA Destacada en Navbar / Brand Group */
.nav-destacado-ia,
a.nav-destacado-ia {
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.55) !important;
  padding: 0.32rem 0.95rem !important;
  border-radius: 20px !important;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(99, 102, 241, 0.22)) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35), inset 0 0 12px rgba(129, 140, 248, 0.2) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
  overflow: hidden !important;
  line-height: 1.2 !important;
}

.nav-destacado-ia::before,
a.nav-destacado-ia::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.3) 50%, transparent 60%);
  transform: rotate(25deg);
  animation: navIaSheen 3.5s infinite ease-in-out;
  pointer-events: none;
}

@keyframes navIaSheen {
  0% { transform: translateX(-100%) rotate(25deg); }
  35%, 100% { transform: translateX(100%) rotate(25deg); }
}

.nav-destacado-ia:hover,
.nav-destacado-ia.active,
a.nav-destacado-ia:hover,
a.nav-destacado-ia.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.45), rgba(99, 102, 241, 0.45)) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.7), 0 0 40px rgba(129, 140, 248, 0.4) !important;
  transform: translateY(-1px) !important;
}

.nav-destacado-ia::after,
a.nav-destacado-ia::after {
  display: none !important;
}

.nav-ia-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-ia-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.7));
}

/* =========================================================================
   🤖 ESTILOS SECCIÓN FULL IA TAB (#tab-ia)
   ========================================================================= */
#tab-ia.active {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  width: 100% !important;
  overflow: visible !important;
}

.full-ia-container {
  width: 100%;
  max-width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 0 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-sizing: border-box;
  overflow: visible !important;
}

/* Hero Centrado Compacto con Halo Desvanecido sin Cortes */
.full-ia-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.4rem 0 0.1rem 0;
  flex-shrink: 0;
  overflow: visible;
  position: relative;
  z-index: 5;
}

.full-ia-avatar-wrap {
  position: relative;
  width: 75px;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.1rem;
  overflow: visible;
}

.full-ia-avatar-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.5) 0%, rgba(129, 140, 248, 0.25) 45%, transparent 70%);
  border-radius: 50%;
  filter: blur(14px);
  animation: fullIaPulse 3s infinite alternate ease-in-out;
  pointer-events: none;
  z-index: 1;
}

@keyframes fullIaPulse {
  0% { transform: scale(0.92); opacity: 0.6; }
  100% { transform: scale(1.1); opacity: 1; }
}

.full-ia-avatar {
  width: 65px;
  height: 65px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 6px 18px rgba(56, 189, 248, 0.5));
  transition: transform 0.3s ease;
}

.full-ia-avatar:hover {
  transform: scale(1.06) rotate(2deg);
}

.full-ia-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.full-ia-gradient-name {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.full-ia-tagline {
  font-size: 1.05rem;
  color: #94a3b8;
  margin: 0;
}

.full-ia-subtitle {
  font-size: 1.2rem;
  color: #bae6fd;
  max-width: 860px;
  line-height: 1.6;
  margin: 0.4rem auto 0 auto;
  font-weight: 500;
}

/* Conexiones Oficiales Badges */
.full-ia-connections {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 0.5rem;
}

.full-ia-conn-item {
  font-size: 0.78rem;
  font-weight: 600;
  color: #93c5fd;
  background: rgba(30, 58, 138, 0.3);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.full-ia-conn-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 5px #38bdf8;
}

/* Quick Chips */
.full-ia-chips-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 950px;
  margin-top: 0.8rem;
}

.full-ia-chip {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #bae6fd;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.full-ia-chip:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(129, 140, 248, 0.25));
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.3);
}

/* Tarjeta Principal de Chat */
.full-ia-chat-card {
  flex: 1;
  min-height: 0;
  width: 100%;
  background: rgba(9, 14, 28, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 30px rgba(56, 189, 248, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.full-ia-chat-header {
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.full-ia-chat-header-text-prompt {
  font-size: 0.96rem;
  color: #7dd3fc;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.full-ia-chat-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.full-ia-status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.full-ia-header-text {
  font-size: 0.84rem;
  font-weight: 600;
  color: #94a3b8;
}

.full-ia-tool-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.full-ia-tool-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}

/* Feed de Mensajes */
.full-ia-messages-body {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(5, 8, 18, 0.4);
}

.full-ia-messages-body::-webkit-scrollbar {
  width: 6px;
}
.full-ia-messages-body::-webkit-scrollbar-track {
  background: transparent;
}
.full-ia-messages-body::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.25);
  border-radius: 10px;
}

/* Barra de Botones de Acción */
.full-ia-fixed-actions {
  position: static !important;
  background: rgba(13, 22, 44, 0.95);
  border-top: 1px solid rgba(56, 189, 248, 0.2);
  padding: 10px 18px;
}

/* Formulario de Entrada */
.full-ia-input-form {
  padding: 14px 18px;
  background: #090e1a;
  border-top: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  gap: 10px;
  align-items: center;
}

.full-ia-textarea {
  flex: 1;
  background: #111e38;
  border: 1px solid #1e3a66;
  border-radius: 12px;
  color: #f8fafc;
  font-size: 0.92rem;
  padding: 12px 16px;
  resize: none;
  font-family: inherit;
  line-height: 1.4;
  height: 48px;
  max-height: 48px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.full-ia-textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

.full-ia-textarea::placeholder {
  color: #64748b;
}

.full-ia-send-button {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  border: none;
  color: #ffffff;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transition: all 0.2s ease;
}

.full-ia-send-button:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
}

.full-ia-send-button:active {
  transform: scale(0.96);
}

.full-ia-send-button:disabled {
  background: #475569;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media screen and (max-width: 768px) {
  .full-ia-title {
    font-size: 1.75rem;
  }
  .full-ia-subtitle {
    font-size: 1.05rem;
  }
  .full-ia-avatar-wrap {
    width: 95px;
    height: 95px;
  }
  .full-ia-avatar {
    width: 85px;
    height: 85px;
  }
  .full-ia-messages-body {
    min-height: 340px;
    max-height: 460px;
    padding: 14px;
  }
}

/* =========================================================================
   🔘 BARRA DE ACCIONES FIJAS (INFORME PDF, WHATSAPP, LLAMAR, CONTACTO)
   ========================================================================= */
.ai-fixed-actions-bar {
  display: flex !important;
  gap: 8px !important;
  padding: 10px 14px !important;
  background: rgba(15, 23, 42, 0.95) !important;
  border-top: 1px solid rgba(56, 189, 248, 0.2) !important;
  flex-shrink: 0 !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

@media (max-width: 600px) {
  .ai-fixed-actions-bar {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    padding: 8px 10px !important;
  }
  .ai-fixed-btn {
    width: 100% !important;
    padding: 8px 6px !important;
    font-size: 0.72rem !important;
    text-align: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
  .full-ia-avatar-wrap {
    overflow: hidden !important;
    border-radius: 50% !important;
  }
  .full-ia-chat-card {
    max-width: 100% !important;
    overflow: hidden !important;
  }
}

.ai-fixed-btn {
  flex: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 9px 10px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em !important;
  border-radius: 9px !important;
  text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #cbd5e1 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  white-space: nowrap !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
  line-height: 1.2 !important;
  outline: none !important;
}

/* Botón PDF */
.ai-fixed-btn.ai-btn-pdf,
#ai-fixed-btn-pdf,
#full-ai-btn-pdf {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.35), rgba(124, 58, 237, 0.35)) !important;
  border-color: rgba(124, 58, 237, 0.5) !important;
  color: #e0e7ff !important;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25) !important;
}
.ai-fixed-btn.ai-btn-pdf:hover,
#ai-fixed-btn-pdf:hover,
#full-ai-btn-pdf:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  border-color: #a78bfa !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.55) !important;
  transform: translateY(-2px) !important;
}

/* Botón WhatsApp */
.ai-fixed-btn.ai-btn-wa,
#ai-fixed-btn-wa,
#full-ai-btn-wa {
  background: linear-gradient(135deg, rgba(21, 128, 61, 0.35), rgba(34, 197, 94, 0.35)) !important;
  border-color: rgba(34, 197, 94, 0.5) !important;
  color: #dcfce7 !important;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25) !important;
}
.ai-fixed-btn.ai-btn-wa:hover,
#ai-fixed-btn-wa:hover,
#full-ai-btn-wa:hover {
  background: linear-gradient(135deg, #15803d, #22c55e) !important;
  border-color: #4ade80 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.55) !important;
  transform: translateY(-2px) !important;
}

/* Botón Llamar */
.ai-fixed-btn.ai-btn-call,
#full-ai-btn-call {
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.3), rgba(236, 72, 153, 0.3)) !important;
  border-color: rgba(236, 72, 153, 0.5) !important;
  color: #fce7f3 !important;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.25) !important;
}
.ai-fixed-btn.ai-btn-call:hover,
#full-ai-btn-call:hover {
  background: linear-gradient(135deg, #c026d3, #db2777) !important;
  border-color: #f472b6 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.55) !important;
  transform: translateY(-2px) !important;
}

/* Botón Contacto */
.ai-fixed-btn.ai-btn-contact,
#ai-fixed-btn-contact,
#full-ai-btn-contact {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.35), rgba(37, 99, 235, 0.35)) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  color: #e0f2fe !important;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.25) !important;
}
.ai-fixed-btn.ai-btn-contact:hover,
#ai-fixed-btn-contact:hover,
#full-ai-btn-contact:hover {
  background: linear-gradient(135deg, #0284c7, #2563eb) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.55) !important;
  transform: translateY(-2px) !important;
}

.ai-fixed-btn:active {
  transform: scale(0.96) !important;
}


/* Ocultar widget flotante cuando se está en la pestaña IA */
.ai-widget-container.ai-hidden-on-ia {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(0.5) translateY(30px) !important;
  transition: opacity 0.35s ease, transform 0.35s ease !important;
}

.ai-avatar-flying-clone {
  will-change: transform, left, top, width, height;
}

/* =========================================================================
   ✨ EXPERIENCIAS CONTECH UX & MICROANIMACIONES AVANZADAS EN EL CHAT
   ========================================================================= */

/* 1. Botón Copiar Dictamen con Micro-Feedback */
.ai-msg-bubble {
  position: relative;
}

.ai-msg-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #94a3b8;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-2px);
  transition: all 0.2s ease;
  z-index: 5;
}

.ai-msg-bubble:hover .ai-msg-copy-btn {
  opacity: 1;
  transform: translateY(0);
}

.ai-msg-copy-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
}

.ai-msg-copy-btn.copied {
  opacity: 1 !important;
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* 2. Cursor de Escritura Fluida (Typewriter Stream) */
.ai-stream-cursor {
  display: inline-block;
  color: #38bdf8;
  font-weight: 900;
  margin-left: 2px;
  animation: aiCursorBlink 0.7s infinite;
  text-shadow: 0 0 8px #38bdf8;
}

@keyframes aiCursorBlink {
  0%, 100% { opacity: 1; transform: scaleY(1.1); }
  50% { opacity: 0; transform: scaleY(0.8); }
}

/* 3. Tarjeta Glassmorphic Cartográfica de Catastro */
.ai-catastro-hero-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 58, 138, 0.35));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 0 15px rgba(56, 189, 248, 0.1);
}

.ai-catastro-hero-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 8px rgba(56, 189, 248, 0.5));
}

.ai-catastro-hero-info {
  flex: 1;
  min-width: 0;
}

.ai-catastro-hero-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #38bdf8;
  line-height: 1.25;
}

.ai-catastro-hero-meta {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: 3px;
  line-height: 1.35;
}

.ai-catastro-hero-meta code {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  padding: 1px 4px;
  border-radius: 4px;
  font-family: monospace;
}

.ai-catastro-hero-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 5px 10px;
  border-radius: 8px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.ai-catastro-hero-link:hover {
  background: rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  color: #ffffff !important;
}

/* 4. Escala Energética CEE Gráfica y Badges 3D (A-G) */
.ai-energy-scale-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
  margin-left: 8px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 58, 138, 0.4));
  padding: 3px 8px;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), inset 0 0 8px rgba(56, 189, 248, 0.15);
}

.ai-energy-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 4px;
  color: #ffffff;
  opacity: 0.28;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.pill-a { background: #16a34a; }
.pill-b { background: #22c55e; }
.pill-c { background: #a3e635; color: #022c22; }
.pill-d { background: #eab308; color: #422006; }
.pill-e { background: #f97316; }
.pill-f { background: #ef4444; }
.pill-g { background: #b91c1c; }

.ai-energy-pill.active-rating {
  opacity: 1 !important;
  transform: scale(1.42);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.95), 0 3px 8px rgba(0, 0, 0, 0.7);
  border: 1.5px solid #ffffff;
  z-index: 5;
  font-weight: 900;
  animation: energyPulse 2s infinite alternate ease-in-out;
}

@keyframes energyPulse {
  0% { transform: scale(1.35); box-shadow: 0 0 8px rgba(255, 255, 255, 0.7); }
  100% { transform: scale(1.48); box-shadow: 0 0 16px rgba(255, 255, 255, 1); }
}

/* 5. Chips Contextuales de Preguntas Frecuentes */
.ai-msg-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(56, 189, 248, 0.18);
}

.ai-followup-chip {
  background: rgba(30, 58, 138, 0.25);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-followup-chip:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}

.ai-followup-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
/* 6. Listas Ordenadas y Numeradas ConTech */
.ai-msg-bubble ol,
.ai-numbered-list {
  margin: 12px 0 12px 22px !important;
  padding: 0 !important;
  list-style-type: decimal !important;
}

.ai-msg-bubble ol li,
.ai-numbered-list li {
  margin-bottom: 14px !important;
  line-height: 1.55 !important;
  color: #ffffff !important;
}

.ai-msg-bubble ol li::marker,
.ai-numbered-list li::marker {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}

.ai-msg-bubble ul,
.ai-bullet-list {
  margin: 10px 0 10px 20px !important;
  padding: 0 !important;
  list-style-type: disc !important;
}

.ai-msg-bubble ul li,
.ai-bullet-list li {
  margin-bottom: 8px !important;
  color: #ffffff !important;
}

.ai-msg-bubble ul li::marker,
.ai-bullet-list li::marker {
  color: #38bdf8 !important;
}

.ai-list-desc {
  margin-top: 5px !important;
  color: #f1f5f9 !important;
  font-size: 0.84rem !important;
  line-height: 1.55 !important;
}
/* =============================================================================
   🏢 COMPONENTES CONTECH AVANZADOS: ACORDEÓN, DIAGRAMA DE EDIFICIO Y SIMULADOR FISCAL
   ============================================================================= */

/* 1. Acordeón Interactivo de Tablas */
.ai-table-accordion {
  margin: 12px 0;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(15, 23, 42, 0.55);
  overflow: hidden;
  transition: all 0.25s ease;
}

.ai-table-accordion[open] {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 16px rgba(2, 6, 23, 0.4);
}

.ai-table-accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background 0.2s ease;
}

.ai-table-accordion-summary::-webkit-details-marker {
  display: none;
}

.ai-table-accordion-summary:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #ffffff;
}

.ai-accordion-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 2px 8px;
  border-radius: 9999px;
  letter-spacing: 0.5px;
}

/* 2. Diagrama Esquemático del Edificio */
.ai-building-schematic-card {
  margin: 14px 0;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
}

.ai-building-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-building-icon {
  font-size: 1.4rem;
}

.ai-building-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #38bdf8;
}

.ai-building-subtitle {
  font-size: 0.73rem;
  color: #94a3b8;
}

.ai-building-tower {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-building-floor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  font-size: 0.75rem;
  color: #cbd5e1;
  transition: all 0.2s ease;
}

.ai-building-floor:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
}

.ai-floor-num {
  font-family: monospace;
  font-weight: 700;
  color: #94a3b8;
  min-width: 62px;
  text-align: center;
  white-space: nowrap;
  font-size: 0.78rem;
  padding: 0 4px;
}

.ai-floor-label {
  flex: 1;
  text-align: left;
  padding-left: 8px;
}

.ai-floor-active {
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.4), rgba(56, 189, 248, 0.2)) !important;
  border: 1.5px solid #38bdf8 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
  transform: scale(1.02);
}

.ai-floor-active .ai-floor-num {
  color: #38bdf8 !important;
}

.ai-floor-badge {
  font-size: 0.65rem;
  background: #0284c7;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.4px;
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 4px #38bdf8; }
  50% { box-shadow: 0 0 12px #38bdf8; }
}

/* 3. Simulador Fiscal Inmobiliario */
.ai-fiscal-card {
  margin: 12px 0;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
}

.ai-fiscal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-fiscal-icon {
  font-size: 1.3rem;
}

.ai-fiscal-title {
  font-weight: 700;
  font-size: 0.86rem;
  color: #fbbf24;
}

.ai-fiscal-subtitle {
  font-size: 0.72rem;
  color: #94a3b8;
}

.ai-fiscal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.ai-fiscal-item {
  background: rgba(30, 41, 59, 0.6);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.ai-fiscal-item.ai-fiscal-highlight {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
}

.ai-fiscal-label {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-bottom: 2px;
}

.ai-fiscal-val {
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff;
}

.ai-fiscal-highlight .ai-fiscal-val {
  color: #34d399;
}

.ai-fiscal-badge {
  font-size: 0.64rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.2);
  padding: 1px 5px;
  border-radius: 4px;
  margin-top: 3px;
  display: inline-block;
}

.ai-fiscal-sub {
  font-size: 0.63rem;
  color: #cbd5e1;
  margin-top: 2px;
}

.ai-catastro-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
/* 4. Tarjeta Due Diligence Territorial & Radón */
.ai-due-diligence-card {
  margin: 12px 0;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(147, 51, 234, 0.35);
  border-radius: 10px;
}

.ai-dd-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-dd-icon {
  font-size: 1.3rem;
}

.ai-dd-title {
  font-weight: 700;
  font-size: 0.86rem;
  color: #c084fc;
}

.ai-dd-subtitle {
  font-size: 0.72rem;
  color: #94a3b8;
}

.ai-dd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 8px;
}

.ai-dd-item {
  background: rgba(30, 41, 59, 0.6);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
}

.ai-dd-item.ai-dd-radon {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

.ai-dd-item.ai-dd-safe {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
}

.ai-dd-item-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 2px;
}

.ai-dd-item-status {
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
}

.ai-dd-radon .ai-dd-item-status {
  color: #f87171;
}

.ai-dd-safe .ai-dd-item-status {
  color: #34d399;
}

.ai-dd-item-desc {
  font-size: 0.63rem;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.3;
}
/* =============================================================================
   📊 CUADRÍCULA DASHBOARD HERO EN 3 COLUMNAS (CATASTRO, DIAGRAMA, FISCALIDAD)
   ============================================================================= */
.ai-hero-dashboard {
  display: grid;
  grid-template-columns: 1fr 1.05fr 1fr;
  gap: 12px;
  margin: 12px 0 16px 0;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .ai-hero-dashboard {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.ai-hero-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(2, 6, 23, 0.4);
  box-sizing: border-box;
}

.ai-hero-card-catastro {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.65) 100%);
}

.ai-hero-card-diagram {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.ai-hero-card-diagram .ai-building-schematic-card {
  margin: 0 !important;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ai-hero-card-fiscal {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.65) 100%);
  gap: 10px;
}

.ai-hero-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}

.ai-hero-card-icon {
  font-size: 1.35rem;
}

.ai-hero-card-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ai-hero-card-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: #38bdf8;
}

.ai-hero-card-fiscal .ai-hero-card-title {
  color: #fbbf24;
}

.ai-hero-card-subtitle {
  font-size: 0.7rem;
  color: #94a3b8;
}

.ai-hero-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.ai-hero-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-hero-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ai-hero-field-label {
  font-size: 0.66rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.ai-hero-field-val {
  font-size: 0.78rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.35;
}

.ai-hero-dir {
  color: #ffffff;
  font-weight: 700;
}

.ai-hero-rc {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 3px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.76rem;
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: inline-block;
  word-break: break-all;
}

.ai-hero-card-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-hero-wms-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.35), rgba(56, 189, 248, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #ffffff !important;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 7px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.ai-hero-wms-btn:hover {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

/* Simulador Fiscal en Columna 3 */
.ai-fiscal-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-fiscal-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-fiscal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 0.73rem;
}

.ai-fiscal-row-accent {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
}

.ai-fiscal-lbl {
  color: #cbd5e1;
  font-weight: 600;
}

.ai-fiscal-num {
  font-weight: 800;
  font-size: 0.82rem;
  color: #ffffff;
  font-family: monospace;
}

.ai-fiscal-num-accent {
  color: #34d399;
}

.ai-fiscal-saving {
  font-size: 0.63rem;
  font-weight: 700;
  color: #10b981;
}

.ai-fiscal-desc {
  font-size: 0.61rem;
  color: #94a3b8;
}