/* ============================================
   CodificAr Dev - Redesign 2026
   Design System: Dark Premium Tech
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --bg-primary: #09090B;
  --bg-elevated: #18181B;
  --bg-subtle: #27272A;
  --bg-input: #1E1E22;
  --border: #3F3F46;
  --border-light: #27272A;
  --text-primary: #FAFAFA;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
  --accent: #6366F1;
  --accent-hover: #818CF8;
  --accent-gradient: linear-gradient(135deg, #6366F1, #8B5CF6);
  --accent-glow: rgba(99, 102, 241, 0.15);
  --cyan: #22D3EE;
  --cyan-glow: rgba(34, 211, 238, 0.15);
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-padding: clamp(4rem, 8vw, 8rem);
  --container-max: 1200px;
  --container-padding: clamp(1.25rem, 4vw, 2rem);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

ul {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container-wide {
  max-width: 1400px;
}

/* --- Section --- */
.section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--accent-gradient);
  margin: 1.5rem auto 0;
  border-radius: var(--radius-full);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition);
  background: transparent;
}

.nav.scrolled {
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo:hover {
  opacity: 0.85;
}

.nav-logo img {
  height: 36px;
  width: auto;
}

.nav.scrolled .nav-logo img {
  height: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width var(--transition);
  border-radius: var(--radius-full);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-lg);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.nav-dropdown-menu a:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.nav-dropdown-menu a::after {
  display: none;
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition);
  border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.825rem;
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--accent-glow);
  color: var(--accent-hover);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.badge-cyan {
  background: var(--cyan-glow);
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.2);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 5rem;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero h1 .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 100%);
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* --- Stats Bar --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin: 4rem 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- Partners Carousel --- */
.partners-section {
  padding: 2.5rem 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
  position: relative;
}

.partners-section::before,
.partners-section::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.partners-section::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-elevated), transparent);
}

.partners-section::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-elevated), transparent);
}

.partners-track {
  display: flex;
  width: max-content;
}

.partners-track:hover .partners-group {
  animation-play-state: paused;
}

.partners-group {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding-right: 3rem;
  flex-shrink: 0;
  animation: scroll-left 20s linear infinite;
  will-change: transform;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.partner-logo {
  height: 65px;
  width: auto;
  max-width: none;
  object-fit: contain;
  opacity: 0.6;
  filter: grayscale(100%) brightness(1.5);
  transition: opacity 0.3s, filter 0.3s;
  flex-shrink: 0;
}

.partner-logo:hover {
  opacity: 1;
  filter: grayscale(0%) brightness(1);
}

/* --- Cards --- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

.card-icon.cyan {
  background: var(--cyan-glow);
  color: var(--cyan);
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.7;
}

.card-features {
  margin-top: 1.25rem;
}

.card-features li {
  padding: 0.4rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-features li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* --- Projects --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.project-card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.project-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-body {
  padding: 1.75rem;
}

.project-body h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.project-body h3 a {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-body h3 a:hover {
  color: var(--accent);
}

.project-body p {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.7;
}

/* --- Team --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.team-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

.team-card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
}

.team-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.25rem;
  border: 2px solid var(--border);
  transition: border-color var(--transition);
}

.team-card:hover .team-avatar {
  border-color: var(--accent);
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%);
  transition: filter var(--transition);
}

.team-card:hover .team-avatar img {
  filter: grayscale(0%);
}

.team-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.team-role {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.team-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.team-social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.team-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  transition: all var(--transition);
  font-size: 0.9rem;
}

.team-social a:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}

/* --- Contact Section --- */
.contact-section {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-item-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--accent-glow);
  color: var(--accent);
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-item p,
.contact-item a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.contact-item a:hover {
  color: var(--accent);
}

.contact-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
}

.contact-social a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  transition: all var(--transition);
  font-size: 1.1rem;
}

.contact-social a:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}

/* --- Form --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all var(--transition);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-error {
  color: var(--error);
  font-size: 0.8rem;
  margin-top: 0.375rem;
}

.form-success {
  color: var(--success);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* --- Footer --- */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-light);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.footer h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-contact i {
  color: var(--accent);
  width: 16px;
}

.footer-contact a {
  color: var(--text-secondary);
}

.footer-contact a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* --- Footer Credit --- */
.footer-credit {
  text-align: center;
  padding: 1rem 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-light);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-credit p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
}

.footer-credit .fa-heart {
  color: #e74c3c;
}

.footer-credit a {
  display: inline-flex;
  align-items: center;
}

.footer-credit-logo {
  height: 20px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.footer-credit-logo:hover {
  opacity: 1;
}

/* --- About Text --- */
.about-text {
  max-width: 800px;
  margin: 0 auto;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--accent);
  color: white;
}

/* --- Tech Grid --- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.tech-item:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.tech-item i {
  font-size: 2rem;
  color: var(--accent);
}

.tech-item span {
  font-weight: 600;
  font-size: 0.95rem;
}

/* --- Page Hero (sub-pages) --- */
.page-hero {
  padding: 10rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

.page-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.page-hero p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: var(--section-padding) 0;
  position: relative;
}

.cta-section h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* --- Value Cards (Mision/Vision/Valores) --- */
.value-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  height: 100%;
  transition: all var(--transition);
}

.value-card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
}

.value-card-icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.value-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.value-card ul li {
  margin-bottom: 1rem;
  text-align: left;
}

.value-card ul li strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.value-card ul li span {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* --- Privacy / Docs Layout --- */
.doc-layout {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.doc-layout h3 {
  font-size: 1.4rem;
  margin: 2.5rem 0 1rem;
  color: var(--text-primary);
}

.doc-layout p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.doc-layout ul {
  margin-bottom: 1.5rem;
}

.doc-layout ul li {
  color: var(--text-secondary);
  padding: 0.35rem 0;
  font-size: 0.925rem;
}

.doc-layout ul li a {
  color: var(--accent);
}

.doc-layout ul li a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* --- Error Pages --- */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-code {
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.error-page h2 {
  font-size: 1.5rem;
  margin: 1rem 0;
}

.error-page p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* --- Scroll to Top --- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 900;
  font-size: 1rem;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* --- reCAPTCHA --- */
.grecaptcha-badge {
  visibility: hidden !important;
}

.recaptcha-notice {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.4;
}

.recaptcha-notice a {
  color: var(--text-secondary);
  text-decoration: underline;
}

/* --- Novedades / Blog --- */
.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.news-filter-btn {
  padding: 0.4rem 1.1rem;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
}

.news-filter-btn:hover,
.news-filter-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.news-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.news-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s;
}

.news-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
}

.news-card-img {
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.news-card:hover .news-card-img img {
  transform: scale(1.04);
}

.news-card-img-placeholder {
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2.5rem;
}

.news-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.news-cat-badge {
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.news-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.news-date i {
  margin-right: 0.25rem;
}

.news-card h3 {
  font-size: 1rem;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.news-card h3 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.news-card h3 a:hover {
  color: var(--accent-primary);
}

.news-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-read-more {
  font-size: 0.85rem;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  transition: gap 0.2s;
}

.news-read-more:hover {
  gap: 0.6rem;
}

.news-pagination {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
}

.news-pag-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.news-pag-btn:hover,
.news-pag-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.news-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
}

.news-empty i {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  color: var(--border-medium);
}

.news-empty h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* --- Post individual --- */
.post-article {
  padding: 3rem 0;
}

.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

.post-breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}

.post-breadcrumb a:hover {
  color: var(--accent-primary);
}

.post-breadcrumb span:first-of-type {
  color: var(--text-muted);
}

.post-header {
  max-width: 800px;
  margin-bottom: 2rem;
}

.post-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.post-lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.post-meta i {
  margin-right: 0.3rem;
}

.post-featured-img {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
}

.post-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-content {
  max-width: 800px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.post-content h2, .post-content h3 {
  color: var(--text-primary);
  margin: 2rem 0 1rem;
}

.post-content p { margin-bottom: 1.25rem; }
.post-content ul, .post-content ol { margin: 0 0 1.25rem 1.5rem; }
.post-content li { margin-bottom: 0.4rem; }
.post-content blockquote {
  border-left: 3px solid var(--accent-primary);
  padding: 0.75rem 1.25rem;
  background: var(--bg-elevated);
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}
.post-content pre, .post-content code {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875em;
}
.post-content code { padding: 0.15em 0.4em; }
.post-content pre { padding: 1rem 1.25rem; overflow-x: auto; margin-bottom: 1.25rem; }
.post-content pre code { border: none; padding: 0; background: none; }
.post-content a { color: var(--accent-primary); }
.post-content img { max-width: 100%; border-radius: 8px; margin: 1rem 0; }

.post-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-light);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: opacity 0.2s, transform 0.2s;
}

.share-btn:hover { opacity: 0.85; transform: scale(1.1); }
.share-btn.whatsapp { background: #25d366; }
.share-btn.linkedin  { background: #0077b5; }
.share-btn.twitter   { background: #000; }

@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
  .news-grid, .news-grid-3 { grid-template-columns: 1fr; }
}

/* --- Fade In Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* --- Demos Page --- */
.demos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.demo-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}

.demo-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.demo-card-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.demo-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.demo-card-category {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.demo-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.demo-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.demo-card:hover .demo-card-image img {
  transform: scale(1.05);
}

/* Demo Viewer */
.demo-viewer {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.95);
  backdrop-filter: blur(8px);
  z-index: 9999;
  opacity: 0;
  transition: opacity var(--transition);
}

.demo-viewer.active {
  opacity: 1;
}

.demo-viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-light);
}

.demo-viewer-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.demo-viewer-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-size: 1.25rem;
}

.demo-viewer-close:hover {
  background: var(--accent);
}

.demo-viewer-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 2rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.demo-viewer-devices {
  display: flex;
  gap: 0.5rem;
}

.device-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.device-btn:hover,
.device-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.demo-viewer-iframe {
  width: 100%;
  height: calc(100vh - 120px);
  border: none;
}

.variant-btn {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  transition: all var(--transition);
}

.variant-btn:hover,
.variant-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* --- Logo Reveal Overlay --- */
#logo-reveal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  pointer-events: none;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Capacitaciones --- */
.training-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.training-card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.training-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.training-card p {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.training-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.training-topic {
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  border-radius: var(--radius-full);
  background: var(--accent-glow);
  color: var(--accent-hover);
  border: 1px solid rgba(99, 102, 241, 0.15);
  font-weight: 500;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media screen and (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .demos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile landscape */
@media screen and (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-elevated);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 0;
    transition: right var(--transition);
    border-left: 1px solid var(--border);
    z-index: 1000;
    overflow-y: auto;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    padding: 0.75rem 0;
    font-size: 1rem;
    width: 100%;
    border-bottom: 1px solid var(--border-light);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none !important;
    opacity: 1;
    visibility: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 0 1rem;
    min-width: auto;
    width: 100%;
    left: auto;
  }

  .nav-dropdown:hover .nav-dropdown-menu {
    transform: none !important;
  }

  .nav-dropdown-menu a {
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    padding: 0.65rem 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .nav-overlay.visible {
    display: block;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .demos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .demo-viewer-toolbar {
    padding: 0.75rem 1rem;
  }
}

/* Mobile portrait */
@media screen and (max-width: 480px) {
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .demos-grid {
    grid-template-columns: 1fr;
  }

  .demo-card-image {
    height: 160px;
  }

  .btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 0.9rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }
}

/* --- Utility: hidden honeypot --- */
.honeypot {
  display: none !important;
  opacity: 0 !important;
  height: 0 !important;
  position: absolute !important;
  left: -9999px !important;
}
