/* ==========================================
   PRISYS SOLUTIONS — styles.css
   Palette: PriSYS Blue #1e8fd4 / Deep Navy #0a1628
   ========================================== */

:root {
  --blue: #1e8fd4;
  --blue-light: #3aa8f0;
  --blue-dark: #1270a8;
  --blue-deep: #0d5a8a;
  --navy: #0a1628;
  --navy-mid: #0e1f3a;
  --navy-light: #142a4f;
  --white: #ffffff;
  --off-white: #f4f8fc;
  --text-main: #0a1628;
  --text-muted: #5a7a99;
  --text-light: #8baabf;
  --border: rgba(30, 143, 212, 0.15);
  --glow: rgba(30, 143, 212, 0.3);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Semantic tokens — light mode */
  --bg-body: #ffffff;
  --bg-section-alt: #f4f8fc;
  --bg-dark-section: #0a1628;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f7fd;
  --text-heading: #0a1628;
  --text-body: #5a7a99;
  --text-nav: #0a1628;
  --nav-bg-scrolled: rgba(255,255,255,0.92);
  --nav-shadow: rgba(10,22,40,0.06);
  --input-bg: #f4f8fc;
  --input-bg-focus: #ffffff;
  --footer-bg: #0a1628;
  --shadow-card: rgba(30,143,212,0.08);
}

/* ── DARK MODE TOKENS ── */
body.dark {
  --bg-body: #060b14;
  --bg-section-alt: #0a1221;
  --bg-dark-section: #040810;
  --bg-card: #0e1729;
  --bg-card-hover: #162440;
  --text-heading: #f0f7ff;
  --text-body: #a5c0d6;
  --text-nav: #e8f4fd;
  --nav-bg-scrolled: rgba(6, 11, 20, 0.95);
  --nav-shadow: rgba(0,0,0,0.5);
  --border: rgba(30, 143, 212, 0.3);
  --input-bg: #0d1626;
  --input-bg-focus: #111d33;
  --footer-bg: #02050a;
  --shadow-card: rgba(0,0,0,0.4);
  --white: #ffffff;
  --off-white: #0a1221;
  --text-main: #f0f7ff;
  --text-muted: #8baabf;
}

/* Specific Dark Mode Adjustments */
body.dark .logo-img, body.dark .footer-logo { filter: brightness(0.95) contrast(1.05); }
body.dark .service-card:hover { box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4); }
body.dark .contact-form { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); }
body.dark .btn-ghost { background: rgba(255, 255, 255, 0.03); }
body.dark .btn-ghost:hover { background: rgba(30, 143, 212, 0.1); }


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg-body);
  color: var(--text-main);
  overflow-x: hidden;
  cursor: none;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

/* CUSTOM CURSOR */
.cursor {
  width: 10px; height: 10px;
  background: var(--blue);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s var(--ease), opacity 0.2s;
}
.cursor-follower {
  width: 32px; height: 32px;
  border: 1.5px solid var(--blue);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.25s var(--ease), opacity 0.2s, width 0.2s, height 0.2s;
  opacity: 0.6;
}
body:hover .cursor { opacity: 1; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 10px; }

/* TYPOGRAPHY */
h1, h2, h3, h4, h5 { font-family: var(--font-display); line-height: 1.1; color: var(--text-heading); }
p { font-family: var(--font-body); line-height: 1.65; color: var(--text-body); }
a { text-decoration: none; color: inherit; transition: color 0.3s var(--ease); }
em { font-style: normal; color: var(--blue); }

/* CONTAINER */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* SECTION BASE */
.section { padding: 6rem 0; position: relative; overflow: hidden; background: var(--bg-body); transition: background 0.4s var(--ease); }

/* REVEAL ANIMATIONS */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* New simple fade reveal for carousels to avoid vertical transform flickering */
.reveal-fade {
  opacity: 0;
  transition: opacity 0.7s var(--ease);
  will-change: opacity;
}
.reveal-fade.visible {
  opacity: 1;
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.35s; }
.delay-4 { transition-delay: 0.5s; }

/* BUTTONS */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  border: none; cursor: none;
  transition: background 0.25s, transform 0.2s var(--ease-bounce), box-shadow 0.25s;
  box-shadow: 0 4px 24px rgba(30,143,212,0.28);
}
.btn-primary:hover {
  background: var(--blue-light);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 32px rgba(30,143,212,0.4);
}
.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.95rem;
  color: var(--text-heading);
  padding: 0.85rem 1.5rem;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  cursor: none;
  transition: border-color 0.25s, color 0.25s, transform 0.2s, background 0.25s;
}
/* Force light appearance for Hero ghost button as Hero is always dark */
.hero .btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}
.hero .btn-ghost:hover {
  border-color: var(--blue-light);
  color: var(--blue-light);
  background: rgba(255, 255, 255, 0.05);
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); background: rgba(30,143,212,0.05); }
.btn-ghost .arrow { transition: transform 0.2s; }
.btn-ghost:hover .arrow { transform: translateX(4px); }

.btn-white {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--white);
  color: var(--blue-dark);
  font-family: var(--font-display);
  font-weight: 700; font-size: 1rem;
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  cursor: none;
  transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.btn-white:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 8px 32px rgba(0,0,0,0.25); }

/* SECTION HEADER */
.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(30,143,212,0.08);
  border: 1px solid rgba(30,143,212,0.2);
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.2rem;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-heading);
  line-height: 1.1;
}

/* ==========================================
   NAV
   ========================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1200;
  padding: 1.2rem 0;
  transition: all 0.4s var(--ease);
}
/* Default state (transparent over dark hero) */
.nav-links a, .theme-toggle, .hamburger span {
  color: #ffffff;
}
.nav-links a:hover { color: var(--blue-light); background: rgba(255,255,255,0.08); }
.hamburger span { background: #ffffff; }

.nav.scrolled {
  padding: 0.8rem 0;
  background: var(--nav-bg-scrolled);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border), 0 4px 20px var(--nav-shadow);
}
.nav.scrolled .nav-links a, 
.nav.scrolled .theme-toggle {
  color: var(--text-nav);
}
.nav.scrolled .hamburger span {
  background: var(--text-nav);
}
.nav.scrolled .nav-links a:hover { 
  color: var(--blue); 
  background: rgba(30,143,212,0.06); 
}

.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; }
.logo-img {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.2s var(--ease-bounce);
}
.logo-img:hover { transform: scale(1.08); }

.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-display); font-weight: 600; font-size: 0.88rem;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  transition: all 0.3s var(--ease);
}
.nav-cta {
  background: var(--blue) !important;
  color: var(--white) !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: 50px !important;
  transition: background 0.3s, transform 0.2s !important;
}
.nav-cta:hover { background: var(--blue-light) !important; transform: translateY(-1px); }

.nav-right {
  display: flex; align-items: center; gap: 0.6rem;
}

.theme-toggle {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  cursor: none;
  transition: all 0.3s var(--ease);
  position: relative; overflow: hidden;
  flex-shrink: 0;
}
.nav.scrolled .theme-toggle {
  background: var(--bg-section-alt);
  border-color: var(--border);
}
.theme-toggle:hover {
  background: rgba(30,143,212,0.1);
  border-color: var(--blue);
  color: var(--blue) !important;
  transform: scale(1.1) rotate(15deg);
}
.theme-toggle svg {
  width: 17px; height: 17px;
  position: absolute;
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}

.icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }
.icon-sun  { opacity: 0; transform: rotate(90deg) scale(0.6); }

body.dark .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.6); }
body.dark .icon-sun  { opacity: 1; transform: rotate(0deg) scale(1); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: rgba(30, 143, 212, 0.1); border: 1px solid var(--border); 
  cursor: none; padding: 10px; border-radius: 8px;
  position: relative; z-index: 1001;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, background 0.3s;
}
.nav.scrolled .hamburger span {
  background: var(--text-nav);
}
.hamburger.active span {
  background: var(--text-nav) !important;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

body.dark .nav-mobile {
  background: rgba(6, 11, 20, 0.85);
}

.nav-mobile.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.nav-mobile a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--text-nav);
  transition: transform 0.3s var(--ease), color 0.3s;
}

.nav-mobile a:hover {
  color: var(--blue);
  transform: scale(1.1);
}

/* ==========================================
   HERO
   ========================================== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 6rem 2rem 3rem;
  position: relative; overflow: hidden;
  background: var(--bg-dark-section);
  transition: background 0.4s var(--ease);
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(30,143,212,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,143,212,0.07) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none;
}
.orb1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(30,143,212,0.25) 0%, transparent 70%);
  top: -200px; left: -100px;
}
.orb2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(13,90,138,0.3) 0%, transparent 70%);
  bottom: -100px; right: 200px;
  animation: orbFloat 8s ease-in-out infinite alternate;
}
.orb3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(58,168,240,0.2) 0%, transparent 70%);
  top: 40%; right: 10%;
  animation: orbFloat 6s ease-in-out 2s infinite alternate;
}
@keyframes orbFloat { from { transform: translateY(0); } to { transform: translateY(-30px); } }

.hero-content {
  position: relative; z-index: 2;
  max-width: 600px;
  flex: 1;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.5rem;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--blue-light);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(58,168,240,0.7); }
  50% { box-shadow: 0 0 0 6px rgba(58,168,240,0); }
}
.hero-title {
  font-size: clamp(3rem, 6vw, 5rem);
  color: var(--white);
  line-height: 1.0;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero-title-accent {
  color: var(--blue-light);
  position: relative;
}
.hero-sub {
  font-size: 1.1rem; line-height: 1.7;
  color: rgba(255,255,255,0.65);
  max-width: 480px;
  margin-bottom: 1.5rem;
}
.hero-actions {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.hero-stats {
  display: flex; align-items: center; gap: 2rem;
  flex-wrap: wrap;
}
.stat { text-align: left; }
.stat-num {
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 800;
  color: var(--white); line-height: 1;
}
.stat-plus { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--blue-light); }
.stat p { font-size: 0.78rem; color: rgba(255,255,255,0.5); margin-top: 0.2rem; }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.12); }

/* HERO LOGO ICON FLIP */
.hero-visual {
  position: relative; z-index: 2; flex: 1;
  display: flex; justify-content: center; align-items: center;
  padding-left: 4rem;
}

.logo-flip-card {
  background-color: transparent;
  width: min(340px, 85vw);
  height: min(340px, 85vw);
  perspective: 1000px;
  animation: floatLogo 8s ease-in-out infinite alternate;
}

.logo-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  cursor: pointer;
}

.logo-flip-card:hover .logo-flip-inner {
  transform: rotateY(180deg);
}

.logo-flip-front, .logo-flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.logo-flip-front {
  background-color: transparent;
}

.hero-logo-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 50px rgba(30, 143, 212, 0.5));
}

.logo-flip-back {
  background: var(--blue);
  color: white;
  transform: rotateY(180deg);
  padding: 2.5rem;
  box-shadow: 0 0 60px rgba(30, 143, 212, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.logo-flip-back p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  color: white;
  margin: 0;
  font-weight: 500;
}

@keyframes floatLogo {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-30px) rotate(5deg); }
}

/* SCROLL INDICATOR */
.scroll-indicator {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  z-index: 5;
}
.scroll-indicator span {
  font-family: var(--font-display); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.3);
}
.scroll-line {
  width: 1px; height: 40px; background: linear-gradient(to bottom, rgba(30,143,212,0.8), transparent);
  animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ==========================================
   SERVICES MODERN
   ========================================== */
.services-modern { background: var(--bg-section-alt); padding: 6rem 0; }

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

.service-modern-card {
  background: var(--bg-card);
  padding: 3.5rem 2.5rem;
  border-radius: 32px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  box-shadow: 0 10px 40px var(--shadow-card);
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.service-modern-card.featured {
  background: var(--navy);
  color: var(--white);
  transform: scale(1.02);
  z-index: 2;
  border-color: rgba(255, 255, 255, 0.05);
}
body.dark .service-modern-card.featured {
  background: var(--bg-card-hover);
}

.service-modern-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 60px var(--shadow-card);
}
.service-modern-card.featured:hover {
  transform: translateY(-12px) scale(1.02);
}

.service-bg-number {
  position: absolute;
  top: -1.5rem;
  right: -1rem;
  font-family: var(--font-display);
  font-size: 9rem;
  font-weight: 800;
  color: var(--blue);
  opacity: 0.07;
  pointer-events: none;
  line-height: 1;
  z-index: 0;
}
.service-modern-card.featured .service-bg-number {
  color: var(--white);
  opacity: 0.12;
}
body.dark .service-bg-number {
  opacity: 0.1;
}
body.dark .service-modern-card.featured .service-bg-number {
  opacity: 0.15;
}

.service-icon-box {
  width: 56px;
  height: 56px;
  background: rgba(30, 143, 212, 0.08);
  color: var(--blue);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}
.service-modern-card.featured .service-icon-box {
  background: rgba(255, 255, 255, 0.1);
  color: var(--blue-light);
}
.service-icon-box svg { width: 28px; height: 28px; }

.service-category {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--blue);
  margin-bottom: 0.8rem;
}
.service-modern-card.featured .service-category {
  color: var(--blue-light);
}

.service-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-heading);
}
.service-modern-card.featured .service-title {
  color: var(--white);
}

.service-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
  margin-bottom: 0;
}
.service-modern-card.featured .service-desc {
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 1024px) {
  .services-modern-grid { grid-template-columns: repeat(2, 1fr); }
  .service-modern-card.featured { transform: none; }
  .service-modern-card.featured:hover { transform: translateY(-12px); }
}

@media (max-width: 768px) {
  .services-modern-grid { grid-template-columns: 1fr; }
}

/* ==========================================
   ABOUT
   ========================================== */
.about {
  background: var(--bg-dark-section);
  overflow: hidden;
  transition: background 0.4s var(--ease);
}
.about-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(30,143,212,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,143,212,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.about-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5rem;
  align-items: center; position: relative; z-index: 2;
}
.about-left .section-tag { background: rgba(30,143,212,0.12); border-color: rgba(30,143,212,0.3); }
.about-left .section-title { color: var(--white); margin-bottom: 1.5rem; }
.about-left p { color: rgba(255,255,255,0.6); margin-bottom: 1rem; }
.about-left p:last-of-type { margin-bottom: 2rem; }

.about-right {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.about-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(30,143,212,0.15);
  border-radius: 14px;
  padding: 1.5rem;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.about-card:hover {
  background: rgba(30,143,212,0.08);
  border-color: rgba(30,143,212,0.35);
  transform: translateY(-4px);
}
.card-1 { margin-top: 2rem; }
.card-3 { margin-top: -2rem; }
.about-card h4 { font-size: 0.95rem; font-weight: 700; color: var(--white); margin-bottom: 0.4rem; }
.about-card p { font-size: 0.83rem; color: rgba(255,255,255,0.5); line-height: 1.5; }

/* Dark mode: ensure correct section separation */
body.dark .about { background: var(--bg-dark-section); }
body.dark .projects { background: var(--bg-body); }
body.dark .services, body.dark .contact { background: var(--bg-section-alt); }

/* ==========================================
   PROJECTS
   ========================================== */
.projects { background: var(--bg-body); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.project-card {
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.project-image-container {
  width: 100%;
  height: 320px;
  position: relative;
  overflow: hidden;
}

.project-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.project-card:hover .project-main-img {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  inset: 0;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top, rgba(10, 22, 40, 0.95) 0%, rgba(10, 22, 40, 0.4) 50%, transparent 100%);
  opacity: 0.9;
  transition: opacity 0.3s;
}

.project-card:hover .project-overlay {
  opacity: 1;
  background: linear-gradient(to top, rgba(10, 22, 40, 0.98) 0%, rgba(10, 22, 40, 0.7) 100%);
}

.project-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--blue-light);
  margin-bottom: 0.8rem;
}

.project-overlay h3 {
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 0.6rem;
}

.project-overlay p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.project-btn {
  background: var(--blue);
  color: var(--white);
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  width: fit-content;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.project-card:hover .project-btn {
  background: var(--blue-light);
  transform: scale(1.05);
}

/* ==========================================
   MODAL DE PROYECTOS
   ========================================== */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.project-modal.open {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 20, 0.9);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: var(--bg-body);
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  border-radius: 24px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.5s var(--ease-bounce);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--navy);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s var(--ease);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.modal-close:hover {
  background: var(--blue);
  transform: rotate(90deg);
  scale: 1.1;
}

.modal-body {
  padding: 3rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.modal-info h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-heading);
}

.modal-info p {
  font-size: 1.1rem;
  color: var(--text-body);
}

.modal-gallery-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 1.5rem 0;
  min-height: 400px;
  overflow: hidden; /* Ensures only one image is visible */
}

.modal-gallery {
  display: flex;
  transition: transform 0.5s var(--ease);
  width: 100%;
  gap: 0;
}

.gallery-item {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
}

.gallery-item img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s;
  will-change: transform;
}

.gallery-item img.zoomed {
  transform: scale(1.5);
  z-index: 10;
  cursor: zoom-out;
  border-color: var(--blue);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--blue);
  color: #ffffff;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s var(--ease);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.gallery-nav:hover {
  background: var(--blue-light);
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev { left: 1rem; }
.gallery-nav.next { right: 1rem; }

.gallery-counter {
  position: absolute;
  bottom: -2.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue-dark);
  color: #ffffff;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .gallery-nav { width: 40px; height: 40px; font-size: 1.5rem; }
  .modal-gallery-container { min-height: 300px; }
  .gallery-item img.zoomed { transform: scale(1.3); }
}

.modal-footer {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  padding: 3rem 0 5rem;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 101;
}

.modal-close-btn {
  padding: 1.2rem 4rem;
  font-size: 1rem;
  font-weight: 700;
  background: var(--blue) !important;
  color: #ffffff !important;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(30, 143, 212, 0.4);
  transition: all 0.3s ease;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(30, 143, 212, 0.6);
  background: var(--blue-light) !important;
}

@media (max-width: 768px) {
  .projects-grid { grid-template-columns: 1fr; }
  .modal-body { padding: 1.5rem; }
  .modal-info h2 { font-size: 1.8rem; }
}

/* ==========================================
   CLIENTS
   ========================================== */
.clients { background: var(--bg-dark-section); transition: background 0.4s var(--ease); padding: 4rem 0; }
.clients .section-title { color: var(--white); }
.clients .section-tag { background: rgba(30,143,212,0.12); border-color: rgba(30,143,212,0.3); }

.clients-carousel-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 3rem 0;
  transform: translate3d(0, 0, 0); 
  -webkit-transform: translate3d(0, 0, 0);
  perspective: 1000px;
  -webkit-perspective: 1000px;
  contain: paint;
  background: var(--bg-dark-section);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}
/* Removed gradients from start and end of carousel */
.clients-carousel-wrapper::before,
.clients-carousel-wrapper::after {
  display: none;
}


.clients-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: trackScroll 40s linear infinite;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}
.clients-track:hover { animation-play-state: paused; }

.client-card {
  flex: 0 0 auto;
  width: 220px;
  height: 110px;
  background: #111d2e;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.3s;
  padding: 1.2rem;
  margin-right: 32px;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  outline: 1px solid transparent;
  background-clip: padding-box;
  -webkit-font-smoothing: antialiased;
  /* Left line with image dependent color */
  border-left: 4px solid var(--card-color, var(--blue));
  /* Matching glow */
  box-shadow: -10px 0 20px -10px var(--card-color, rgba(30, 143, 212, 0.3));
}
.client-card:hover {
  transform: translateY(-5px) translate3d(0, 0, 0);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: -15px 5px 30px -10px var(--card-color, var(--blue)), 0 12px 30px rgba(0, 0, 0, 0.3);
}
.client-logo-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.45;
  filter: grayscale(100%) brightness(1.2);
  transition: opacity 0.3s, filter 0.3s;
}
.client-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.client-card:hover .client-logo-wrapper {
  opacity: 1;
  filter: grayscale(0%) brightness(1);
}
.client-placeholder {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.05em;
}

@keyframes trackScroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-2016px, 0, 0); }
}

/* ==========================================
   CTA BAND
   ========================================== */
.cta-band {
  background: var(--blue);
  position: relative; overflow: hidden; padding: 5rem 2rem;
}
.cta-band-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}
.cta-band-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  flex-wrap: wrap; position: relative; z-index: 2;
}
.cta-band-text h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); color: var(--white); margin-bottom: 0.5rem; }
.cta-band-text p { color: rgba(255,255,255,0.75); font-size: 1.05rem; }

/* ==========================================
   CONTACT
   ========================================== */
.contact { background: var(--bg-section-alt); }
.contact-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 5rem; align-items: start; }
.contact-left .section-title { margin-bottom: 2rem; }
.contact-info { display: flex; flex-direction: column; gap: 1.2rem; }
.contact-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.2rem; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; transition: border-color 0.2s, box-shadow 0.2s, background 0.3s;
}
.contact-item:hover { border-color: rgba(30,143,212,0.3); box-shadow: 0 4px 16px rgba(30,143,212,0.08); }
.contact-item strong { display: block; font-family: var(--font-display); font-size: 0.95rem; color: var(--text-heading); margin-bottom: 0.2rem; }
.contact-item span { font-size: 0.82rem; color: var(--text-muted); }

/* FORM */
.contact-form { background: var(--bg-card); padding: 2.5rem; border-radius: 20px; border: 1px solid var(--border); box-shadow: 0 8px 32px rgba(10,22,40,0.05); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.form-group label { font-family: var(--font-display); font-size: 0.8rem; font-weight: 700; color: var(--text-heading); letter-spacing: 0.04em; }
.form-group input,
.form-group textarea {
  border: 1.5px solid var(--border);
  border-radius: 10px; padding: 0.8rem 1rem;
  font-family: var(--font-body); font-size: 0.9rem; color: var(--text-heading);
  background: var(--input-bg);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.3s, color 0.3s;
  outline: none; resize: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,143,212,0.1);
  background: var(--input-bg-focus);
}
.form-submit { width: 100%; justify-content: center; font-size: 1rem; padding: 1rem; border-radius: 12px; }

/* ==========================================
   FOOTER
   ========================================== */
.footer { background: var(--footer-bg); padding: 1.5rem 0 0.5rem; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.footer-brand { flex: 0 1 250px; }
.footer-brand .footer-logo { width: 48px; height: 48px; border-radius: 50%; margin-bottom: 0.6rem; }
.footer-brand p { font-size: 0.7rem; color: rgba(255,255,255,0.25); line-height: 1.3; margin-bottom: 0; }
.footer-brand p + p { display: none; } /* Hide the duplicate description to save space */

.footer-links {
  display: flex;
  gap: 2.5rem;
  flex: 1;
  justify-content: flex-end;
}
.footer-col h5 {
  font-family: var(--font-display); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.2); margin-bottom: 0.5rem;
}
.footer-col a {
  display: block; font-size: 0.7rem; color: rgba(255,255,255,0.35);
  margin-bottom: 0.25rem; transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  padding: 0.5rem 2rem;
  text-align: center;
}
.footer-bottom p { font-size: 0.6rem; color: rgba(255,255,255,0.12); }

@media (max-width: 768px) {
  .footer-inner { flex-direction: column; gap: 1.5rem; text-align: center; align-items: center; }
  .footer-links { justify-content: center; gap: 1.5rem; width: 100%; }
  .footer-brand { flex: 1; }
}

/* ==========================================
   CONTACT ICON SVG FIX
   ========================================== */
.contact-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(30,143,212,0.08);
  border-radius: 10px;
  color: var(--blue);
}
.contact-icon svg { width: 20px; height: 20px; }

/* ==========================================
   ABOUT CARD ICON SVG FIX
   ========================================== */
.about-card-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(30,143,212,0.12);
  border-radius: 10px;
  color: var(--blue-light);
  margin-bottom: 0.8rem;
}
.about-card-icon svg { width: 22px; height: 22px; }

/* ==========================================
   WHATSAPP FLOTANTE
   ========================================== */
.wa-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px; height: 60px;
  border-radius: 50%;
  cursor: none;
  text-decoration: none;
  transition: transform 0.3s var(--ease-bounce);
}
.wa-float:hover { transform: scale(1.12) translateY(-3px); }

.wa-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  position: relative; z-index: 2;
  filter: drop-shadow(0 6px 20px rgba(37,211,102,0.5));
  transition: filter 0.3s;
}
.wa-float:hover .wa-icon { filter: drop-shadow(0 10px 28px rgba(37,211,102,0.7)); }

/* Ripple animation */
.wa-ripple {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(37,211,102,0.25);
  animation: waRipple 2.5s ease-out infinite;
  z-index: 1;
}
@keyframes waRipple {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Tooltip */
.wa-tooltip {
  position: absolute;
  right: 70px;
  background: var(--bg-dark-section);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition: opacity 0.2s, transform 0.2s, background 0.3s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.wa-tooltip::after {
  content: '';
  position: absolute;
  right: -6px; top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right: none;
  border-left-color: var(--bg-dark-section);
  transition: border-left-color 0.3s;
}
.wa-float:hover .wa-tooltip {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 768px) {
  .wa-float { bottom: 1.5rem; right: 1.5rem; cursor: auto; }
  .wa-tooltip { display: none; }
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
#toastContainer {
  position: fixed; bottom: 2rem; left: 2rem; z-index: 9999;
  display: flex; flex-direction: column; gap: 0.8rem;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 0.8rem;
  min-width: 320px; padding: 1rem 1.2rem;
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  transform: translateX(-120%); opacity: 0;
  transition: transform 0.4s var(--ease-bounce), opacity 0.4s var(--ease);
  pointer-events: all;
}
.toast.visible { transform: translateX(0); opacity: 1; }
.toast-success { border-left: 5px solid #28c840; }
.toast-error { border-left: 5px solid #ff5f57; }
.toast-icon {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}
.toast-success .toast-icon { background: rgba(40, 200, 64, 0.1); color: #28c840; }
.toast-error .toast-icon { background: rgba(255, 95, 87, 0.1); color: #ff5f57; }
.toast-content { font-size: 0.88rem; font-weight: 500; color: var(--text-heading); }

/* Mobile adaptation for toasts */
@media (max-width: 480px) {
  #toastContainer { left: 1rem; right: 1rem; bottom: 1.5rem; }
  .toast { min-width: auto; width: 100%; }
}

@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; gap: 3rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .theme-toggle { cursor: auto; }

.hero {
    flex-direction: column; gap: 2rem; /* Reducimos el gap de 3rem a 2rem */
    padding: 6rem 1.5rem 3rem; /* Reducimos el padding superior */
    text-align: center;
  }
  .hero-visual { padding-left: 0; }
  .logo-flip-card { width: 250px; height: 250px; }
  .logo-flip-back { padding: 1.2rem; }
  .logo-flip-back p { font-size: 0.85rem; line-height: 1.4; }
  .hero-stats { justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-badge { justify-content: center; }

  .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .projects-grid .project-card { height: 400px; }
  .project-image-container { height: 100%; }
  .project-overlay { 
    padding: 1.5rem; 
    background: linear-gradient(to top, rgba(10, 22, 40, 1) 0%, rgba(10, 22, 40, 0.75) 65%, transparent 100%);
  }
  .project-overlay h3 { font-size: 1.4rem; }
  .project-overlay p { font-size: 0.88rem; margin-bottom: 1.2rem; }
  .project-btn { padding: 0.7rem 1.2rem; font-size: 0.8rem; }

  .process-steps { flex-direction: column; gap: 1rem; }
  .process-connector { display: none; }

  .about-right { grid-template-columns: 1fr; }
  .card-1, .card-3 { margin: 0; }

  .contact-inner { grid-template-columns: 1fr; gap: 3rem; }
  .form-row { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

  .cta-band-inner { flex-direction: column; text-align: center; }

  /* Fix carousel logo visibility on mobile */
  .client-logo-wrapper {
    opacity: 1 !important;
    filter: none !important;
  }
  .clients-track {
    animation-duration: 40s;
  }

  .cursor, .cursor-follower { display: none; }
  body { cursor: auto; }
  a, button { cursor: auto !important; }
}

@media (max-width: 480px) {
  .section { padding: 4rem 0; }
  .hero-title { font-size: 2.5rem; }
  .footer-links { grid-template-columns: 1fr; }
  .contact-form { padding: 1.5rem; }
}
