/* ============================================================
   ZHT Developments - Modern Tech Redesign
   ============================================================
   Rediseño visual puro: añade paleta tech, glassmorphism,
   fondo 3D, microinteracciones y animaciones de scroll.
   No modifica estructura HTML ni contenido de texto.
   ============================================================ */

:root {
  --tech-primary: #667eea;
  --tech-secondary: #764ba2;
  --tech-accent: #f5576c;
  --tech-cyan: #00f2ff;
  --tech-purple: #9d4edd;
  --tech-dark: #0a0a12;
  --tech-dark-2: #12121f;
  --tech-light: #f8f9ff;
  --tech-text: #1e1e2f;
  --tech-muted: #6c6c8a;
  --tech-glass: rgba(255, 255, 255, 0.08);
  --tech-border: rgba(102, 126, 234, 0.18);
  --tech-radius: 22px;
  --tech-radius-sm: 12px;
  --tech-transition: 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Canvas 3D de fondo */
#three-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  pointer-events: none;
  opacity: 0.7;
}

body::before {
  z-index: -2;
}

body {
  background: linear-gradient(180deg, #f8f9ff 0%, #eef1ff 100%);
}

body.dark-mode {
  background: linear-gradient(180deg, #0a0a12 0%, #12121f 100%);
}

/* --- Header / Hero --- */
.header {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.header::before {
  background: linear-gradient(
    160deg,
    rgba(10, 10, 18, 0.92) 0%,
    rgba(18, 18, 31, 0.82) 40%,
    rgba(118, 75, 162, 0.35) 100%
  );
  z-index: 1;
}

.header::after {
  background: radial-gradient(circle, rgba(0, 242, 255, 0.12) 0%, transparent 70%);
  animation: headerGlow 8s ease-in-out infinite;
}

@keyframes headerGlow {
  0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.4; }
  50% { transform: scale(1.25) translate(-40px, -30px); opacity: 0.9; }
}

.header-content {
  padding-left: 24px;
  z-index: 3;
}

.header-content::before {
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--tech-cyan), var(--tech-primary), var(--tech-secondary));
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.5);
}

.header-subtitle {
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.8);
}

.header-title {
  background: linear-gradient(135deg, #00f2ff 0%, #667eea 40%, #764ba2 70%, #f5576c 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 8s ease infinite;
  letter-spacing: -3px;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.header-mono {
  color: rgba(0, 242, 255, 0.75);
  letter-spacing: 8px;
  text-shadow: 0 0 20px rgba(0, 242, 255, 0.25);
}

/* --- Scroll indicator --- */
.scroll-indicator .mouse {
  border-color: rgba(0, 242, 255, 0.5);
}
.scroll-indicator .mouse::after {
  background: var(--tech-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 255, 0.8);
}

/* --- Navbar Glassmorphism --- */
.navbar {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border-bottom: 1px solid rgba(102, 126, 234, 0.12) !important;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1) !important;
}

.navbar.scrolled,
body.dark-mode .navbar.scrolled {
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: 0 8px 40px rgba(31, 38, 135, 0.15) !important;
  padding: 6px 0 !important;
}

.nav-link {
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  padding: 8px 18px !important;
}

.nav-link::after {
  height: 2px;
  background: linear-gradient(90deg, var(--tech-cyan), var(--tech-primary));
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(0, 242, 255, 0.6);
}

.nav-link:hover {
  color: var(--tech-primary) !important;
  text-shadow: 0 0 18px rgba(102, 126, 234, 0.5);
}

.brand-img {
  filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.4));
}

/* --- About Section --- */
.about-section {
  padding: 100px 0;
  background: transparent;
}

.about-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--tech-border);
  border-radius: var(--tech-radius);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.08);
  transition: var(--tech-transition);
  transform-style: preserve-3d;
}

.about-card::before {
  height: 3px;
  background: linear-gradient(90deg, var(--tech-cyan), var(--tech-primary), var(--tech-secondary));
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}

.about-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 24px 60px rgba(102, 126, 234, 0.18),
              inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.about-card h3 {
  color: var(--tech-text);
}

.about-card h3::after {
  width: 50px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--tech-primary), var(--tech-cyan));
}

.about-card h5 {
  background: linear-gradient(135deg, var(--tech-primary), var(--tech-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.social-link {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--tech-border);
}

.social-link:hover {
  background: linear-gradient(135deg, var(--tech-primary), var(--tech-secondary));
  transform: translateY(-4px) scale(1.12);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.about-card .icon-lg {
  color: var(--tech-primary);
  text-shadow: 0 0 12px rgba(102, 126, 234, 0.3);
}

/* --- Stats Section --- */
.section.bg-dark {
  background: linear-gradient(135deg, #0b0b14 0%, #161626 100%) !important;
  position: relative;
  overflow: hidden;
}

.section.bg-dark::before {
  background-image:
    radial-gradient(circle at 25% 30%, rgba(0, 242, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 70%, rgba(118, 75, 162, 0.12) 0%, transparent 50%);
}

.section.bg-dark .col-md-6.col-lg-3 {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin: 10px 0;
  transition: var(--tech-transition);
}

.section.bg-dark .col-md-6.col-lg-3:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border-color: rgba(0, 242, 255, 0.2);
}

.font40 {
  background: linear-gradient(135deg, var(--tech-cyan) 0%, var(--tech-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  text-shadow: 0 0 25px rgba(0, 242, 255, 0.25);
}

.icon-xl {
  color: var(--tech-cyan) !important;
  filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.4));
}

/* --- Featured Card --- */
.featured-card {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
  border-radius: var(--tech-radius);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 80px rgba(102, 126, 234, 0.25),
              inset 0 0 60px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: var(--tech-transition);
}

.featured-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 35px 90px rgba(102, 126, 234, 0.35),
              inset 0 0 80px rgba(255, 255, 255, 0.12);
}

.featured-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.featured-title {
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
}

.featured-btn {
  background: rgba(255, 255, 255, 0.95);
  color: var(--tech-primary);
  border: 1px solid rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
}

.featured-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: 0.6s;
}

.featured-btn:hover::before {
  left: 100%;
}

.floating-app {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* --- Apps Section --- */
#blog {
  background: transparent;
  padding: 100px 0;
}

#blog h2 {
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--tech-text);
}

#blog h2::after {
  width: 80px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--tech-primary), var(--tech-cyan));
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.5);
}

.blog-card,
.video-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--tech-border);
  border-radius: var(--tech-radius);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.08);
  transition: var(--tech-transition);
  overflow: hidden;
}

.blog-card:hover,
.video-card:hover {
  transform: translateY(-10px) scale(1.01);
  box-shadow: 0 30px 70px rgba(102, 126, 234, 0.18),
              0 0 0 1px rgba(0, 242, 255, 0.15);
}

.blog-card .img-holder {
  border-radius: var(--tech-radius-sm);
  margin: 16px;
  overflow: hidden;
}

.blog-card .img-holder img {
  border-radius: var(--tech-radius-sm);
}

.app-badge .badge {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-success {
  background: linear-gradient(135deg, #00d084 0%, #00b894 100%) !important;
}

.badge-info {
  background: linear-gradient(135deg, var(--tech-primary) 0%, var(--tech-cyan) 100%) !important;
}

.blog-card .title {
  color: var(--tech-text);
}

.blog-card:hover .title {
  color: var(--tech-primary);
  text-shadow: 0 0 15px rgba(102, 126, 234, 0.3);
}

.read-more {
  background: linear-gradient(135deg, var(--tech-primary) 0%, var(--tech-secondary) 100%);
  border: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.read-more::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: 0.6s;
  z-index: -1;
}

.read-more:hover::before {
  left: 100%;
}

.read-more:hover {
  transform: translateX(5px) scale(1.02);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

/* --- Video Cards --- */
.video-card {
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-8px) scale(1.01);
}

.play-button {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 6px rgba(0, 242, 255, 0.2);
  transition: var(--tech-transition);
}

.play-button i {
  color: var(--tech-accent);
  text-shadow: 0 0 10px rgba(245, 87, 108, 0.4);
}

.video-card:hover .play-button {
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 0 0 12px rgba(0, 242, 255, 0.3);
}

/* --- Contact Section --- */
.contact {
  background: transparent;
  padding: 100px 0;
}

.contact .map img {
  opacity: 0.18;
  filter: grayscale(100%) contrast(120%);
}

.contact-form-card,
.contact-info-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--tech-border);
  border-radius: var(--tech-radius);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}

.contact-form-card:hover,
.contact-info-card:hover {
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
}

.form-control {
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(102, 126, 234, 0.12);
  border-radius: var(--tech-radius-sm);
}

.form-control:focus {
  border-color: var(--tech-primary);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12), 0 0 20px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--tech-primary) 0%, var(--tech-secondary) 100%) !important;
  border-radius: 50px !important;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35) !important;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: 0.6s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5) !important;
}

.contact-info-card .row {
  background: rgba(102, 126, 234, 0.05);
  border-radius: var(--tech-radius-sm);
  border: 1px solid var(--tech-border);
}

.contact-info-card .row:hover {
  background: rgba(102, 126, 234, 0.1);
  transform: translateX(8px);
}

.contact-info-card .icon-md {
  color: var(--tech-primary) !important;
  filter: drop-shadow(0 0 6px rgba(102, 126, 234, 0.4));
}

/* --- Footer --- */
.footer-counter {
  background: linear-gradient(135deg, #0a0a12 0%, #161626 100%) !important;
  position: relative;
}

.footer-counter::before {
  height: 4px;
  background: linear-gradient(90deg, var(--tech-cyan), var(--tech-primary), var(--tech-secondary));
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
}

.visit-counter-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 242, 255, 0.2);
  backdrop-filter: blur(10px);
}

.visit-counter-badge:hover {
  background: rgba(0, 242, 255, 0.08);
  box-shadow: 0 8px 30px rgba(0, 242, 255, 0.15);
}

/* --- Scroll to top --- */
.scroll-to-top {
  background: linear-gradient(135deg, var(--tech-primary), var(--tech-secondary));
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.scroll-to-top:hover {
  transform: translateY(-5px) scale(1.08);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
}

/* --- Dark Mode Toggle --- */
.dark-mode-toggle {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  border: 1px solid var(--tech-border);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.12);
}

.dark-mode-toggle:hover {
  background: linear-gradient(135deg, var(--tech-primary), var(--tech-secondary));
}

/* --- Language selector --- */
.language-selector {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid var(--tech-border);
  border-radius: 50px;
  padding: 4px;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}

.lang-btn {
  border: none;
  background: transparent;
  border-radius: 50px;
  padding: 8px 16px;
  font-weight: 600;
  transition: var(--tech-transition);
}

.lang-btn.active,
.lang-btn:hover {
  background: linear-gradient(135deg, var(--tech-primary), var(--tech-secondary));
  color: #fff;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* --- Buttons ripple --- */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* --- Scroll reveal initial state --- */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
}

/* --- Dark Mode overrides --- */
body.dark-mode .about-card,
body.dark-mode .blog-card,
body.dark-mode .video-card,
body.dark-mode .contact-form-card,
body.dark-mode .contact-info-card {
  background: rgba(30, 30, 46, 0.65);
  border-color: rgba(102, 126, 234, 0.2);
}

body.dark-mode .navbar {
  background: rgba(18, 18, 31, 0.78) !important;
  border-bottom-color: rgba(102, 126, 234, 0.2) !important;
}

body.dark-mode .navbar.scrolled {
  background: rgba(18, 18, 31, 0.9) !important;
}

body.dark-mode .form-control {
  background: rgba(18, 18, 31, 0.5);
  color: #e0e0e8;
}

body.dark-mode #blog h2,
body.dark-mode .about-card h3,
body.dark-mode .contact-title,
body.dark-mode .contact-info-card h6 {
  color: #e0e0e8;
}

body.dark-mode .dark-mode-toggle {
  background: rgba(18, 18, 31, 0.75);
  color: #f0e68c;
}

body.dark-mode .language-selector {
  background: rgba(18, 18, 31, 0.7);
}

body.dark-mode .read-more,
body.dark-mode .btn-primary {
  color: #fff !important;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Responsive tweaks --- */
@media (max-width: 991.98px) {
  .header-content {
    padding-left: 16px;
  }
  .about-card,
  .blog-card,
  .video-card,
  .contact-form-card,
  .contact-info-card {
    margin-bottom: 24px;
  }
}
