/* Light cream surface override */
body {
  background: var(--color-bg) !important;
}
body :where(h1,h2,h3,h4,h5,h6,p,li,small,span,a) {
  color: var(--color-text-dark) !important;
}
/* Integracija AI stranica - Moderni dizajn s Apple estetikom */

/* Smooth scroll koristi globalni html { scroll-behavior } iz main.css */

/* Intersection Observer animacije */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Container */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  overflow-x: hidden;
}

/* Hero sekcija */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: flex-start; /* usklađeno s Usluge */
  padding: 100px 20px 40px; /* identično kao Usluge */
  background: transparent;
  position: relative;
  overflow: hidden;
}

/* Pomakni grafike za +80px (samo subpage) */
.brain-container,
.ai-visualization,
.team-illustration {
  margin-top: 80px;
  color: var(--color-accent-3); /* force accent visuals */
}

/* Accentize AI visualization */
.ai-visualization .node { background: currentColor; }
.ai-visualization .connection { background: currentColor; opacity: .35; }

/* Replace old neural network with canvas orbital */
.ai-visualization .neural-network { display: none !important; }
.ai-visualization {
  display: grid;
  place-items: center;
}
.ai-visualization canvas#industry-orbital {
  width: 320px;
  height: 320px;
  max-width: 100%;
  display: block;
}

/* Uskladi pozicije grafika kao na Usluge */
.services-illustration { width: 300px; height: 300px; position: relative; will-change: transform; }
.services-illustration .service-icon { --base-y: 80px; }
.service-1 { top: 20%; left: 20%; --float-x: 12px; --float-y: -18px; --float-rot: 1deg; --float-dur: 11s; }
.service-2 { top: 50%; right: 20%; transform: translateY(-50%); --float-x: -14px; --float-y: -12px; --float-rot: -1deg; --float-dur: 9s; }
.service-3 { bottom: 20%; left: 30%; --float-x: 11px; --float-y: -20px; --float-rot: 1.5deg; --float-dur: 10.5s; }

/* Floating background shapes (preuzeto s homepage) */
.hero-background { position: absolute; inset: 0; z-index: 1; }
.bg-shape { position: absolute; width: 300px; height: 300px; border-radius: 50%; opacity: 0.1; animation: float 6s ease-in-out infinite; }
.bg-orb { position: absolute; width: 220px; height: 220px; border-radius: 50%; opacity: 0.15; filter: blur(2px); }
.orb-a { left: 18%; top: 25%; background: var(--hero-orb-1); }
.orb-b { right: 12%; bottom: 18%; background: var(--hero-orb-2); }
.bg-shape-left { background: transparent; top: 10%; left: -150px; animation-delay: 0s; }
.bg-shape-right { background: transparent; bottom: 10%; right: -150px; animation-delay: 3s; }

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  pointer-events: none;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  z-index: 2;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-red-10);
  border: 1px solid var(--accent-red-30);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-accent-warm);
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 24px;
  color: var(--color-text-dark);
}

.gradient-text {
  color: var(--color-accent-3) !important;
}

.hero-description {
  font-size: 20px;
  line-height: 1.6;
  color: var(--color-text-dark);
  margin: 0 0 40px;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* AI Vizualizacija */
.ai-visualization {
  width: 300px;
  height: 300px;
  position: relative;
}

.neural-network {
  width: 100%;
  height: 100%;
  position: relative;
}

.node {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--color-bg);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.node-1 { top: 20%; left: 20%; animation-delay: 0s; }
.node-2 { top: 20%; right: 20%; animation-delay: 0.5s; }
.node-3 { top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: 1s; }
.node-4 { bottom: 20%; left: 20%; animation-delay: 1.5s; }
.node-5 { bottom: 20%; right: 20%; animation-delay: 2s; }

.connection {
  position: absolute;
  height: 2px;
  background: var(--color-bg);
  animation: flow 3s infinite;
}

.connection-1 {
  top: 30%;
  left: 30%;
  width: 40%;
  transform: rotate(45deg);
  animation-delay: 0s;
}

.connection-2 {
  top: 30%;
  right: 30%;
  width: 40%;
  transform: rotate(-45deg);
  animation-delay: 0.5s;
}

.connection-3 {
  bottom: 30%;
  left: 30%;
  width: 40%;
  transform: rotate(-45deg);
  animation-delay: 1s;
}

.connection-4 {
  bottom: 30%;
  right: 30%;
  width: 40%;
  transform: rotate(45deg);
  animation-delay: 1.5s;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 1; }
}

@keyframes flow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Dugmad */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 22px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.btn-primary {
  background: var(--color-bg) !important;
  color: var(--color-text) !important;
  box-shadow: 0 4px 15px var(--accent-red-30) !important;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-red-30);
}

.btn-secondary {
  background: var(--overlay-white-10);
  color: var(--color-text);
  border: 1px solid var(--overlay-white-20);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--overlay-white-20);
  transform: translateY(-2px);
}

.btn-large {
  padding: 16px 32px;
  font-size: 18px;
}

/* Sekcije */
.services-section,
.process-section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: clamp(36px, 6vw, 48px);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 16px;
}

.section-header p {
  font-size: 20px;
  color: var(--color-text);
  margin: 0;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
  margin-top: 60px;
}

.service-card {
  background: var(--overlay-white-05);
  border: 1px solid var(--overlay-white-10);
  border-radius: 24px;
  padding: 32px;
  backdrop-filter: blur(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-red-30), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-red-30);
  box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 60px;
  height: 60px;
  background: var(--color-bg) !important;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 24px;
  color: var(--color-text) !important;
}

.service-card h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 16px;
}

.service-card p {
  color: var(--color-text);
  line-height: 1.6;
  margin: 0 0 24px;
}

.service-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-features li {
  color: var(--color-text);
  padding: 8px 0;
  position: relative;
  padding-left: 24px;
}

.service-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent-warm);
  font-weight: bold;
}

/* Process Steps */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.step-number {
  width: 60px;
  height: 60px;
  background: transparent;
  border: 2px solid var(--color-accent-3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-accent-3);
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.step-content h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 12px;
}

.step-content p {
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
}

/* CTA sekcija */
.cta-section {
  background: var(--color-bg);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, var(--accent-red-20) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-content h2 {
  font-size: clamp(36px, 6vw, 48px);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 16px;
}

.cta-content p {
  font-size: 20px;
  color: var(--color-text);
  margin: 0 0 40px;
}

/* Ako se doda svijetla sekcija na ovoj stranici */
/* Redoslijed: zelena → žuta → narančasta */
.services-section { background: var(--color-bg); }
.process-section { background: var(--color-bg); }
.services-section :where(h1,h2,h3,h4,h5,h6,p,li,small,span,a),
.process-section :where(h1,h2,h3,h4,h5,h6,p,li,small,span,a) { color: var(--color-text-dark) !important; }

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Industries (simple explanations) */
.industries-section { background: var(--color-bg); padding: 80px 0; position: relative; overflow: hidden; }
.industries-section .section-header { text-align: center; margin-bottom: 60px; }
.industries-section .section-header h2 { color: var(--color-text); margin: 0 0 16px; font-size: clamp(32px, 5vw, 44px); font-weight: 700; }
.industries-section .section-header p { color: var(--color-text); opacity: 0.85; margin: 0; }
.industries-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; position: relative; z-index: 1; }
.industry-card { padding: 24px; border-radius: 20px; background: rgba(var(--pastel-teal-rgb), 0.05); border: 2px solid rgba(var(--pastel-teal-rgb), 0.2); transition: all 0.3s var(--ease-out-expo); }
.industry-card:hover { transform: translateY(-6px); border-color: var(--color-accent-3); background: rgba(var(--pastel-teal-rgb), 0.08); box-shadow: 0 10px 24px rgba(var(--pastel-teal-rgb), 0.25); }
.industry-card h3 { margin: 0 0 12px; font-size: 20px; font-weight: 600; color: var(--color-text-dark); }
.industry-card p { margin: 0; color: var(--color-text-dark); opacity: 0.9; line-height: 1.65; font-size: 15px; }

/* Floating accent orbs behind the cards */
.industries-section::before {
  content: '';
  position: absolute;
  inset: -10% -5% -10% -5%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 900px 640px at 15% 30%, rgba(var(--pastel-teal-rgb), 0.26), transparent 62%),
    radial-gradient(ellipse 820px 560px at 85% 35%, rgba(var(--blue-munsell-rgb), 0.22), transparent 64%),
    radial-gradient(ellipse 1100px 760px at 50% 82%, rgba(var(--deep-blue-rgb), 0.2), transparent 66%);
  /* Avoid blur to reduce repaint flicker during scroll */
  filter: none;
  animation: industriesOrbs 14s ease-in-out infinite;
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: paint;
}

@keyframes industriesOrbs {
  0%, 100% { opacity: 0.95; }
  50% { opacity: 1; }
}

/* Pause industries orbs during fast scroll to avoid flicker */
body.is-fast-scroll .industries-section::before { animation-play-state: paused; }

/* ===== COMPREHENSIVE RESPONSIVE DESIGN ===== */

/* Tablet Landscape */
@media (max-width: 1200px) {
  .container {
    padding: 0 24px;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
  }
  
  .process-steps {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 36px;
  }
  
  .industries-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
  }
}

/* Tablet Portrait */
@media (max-width: 968px) {
  .hero-section {
    padding: 80px 20px 40px;
    flex-direction: column;
    text-align: center;
  }
  
  .hero-content {
    max-width: 100%;
    margin-bottom: 40px;
  }
  
  .hero-title {
    font-size: clamp(42px, 7vw, 64px);
  }
  
  .hero-description {
    font-size: clamp(18px, 2.2vw, 20px);
    max-width: 100%;
    margin: 0 auto 36px;
  }
  
  .hero-visual {
    margin-top: 40px;
    width: 100%;
  }
  
  .ai-visualization {
    width: 280px;
    height: 280px;
    margin: 0 auto;
  }
  
  .ai-visualization canvas#industry-orbital {
    width: 280px;
    height: 280px;
  }
  
  .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .services-section,
  .process-section,
  .industries-section {
    padding: 70px 20px;
  }
  
  .section-header {
    margin-bottom: 48px;
  }
  
  .section-header h2 {
    font-size: clamp(32px, 5vw, 44px);
  }
  
  .section-header p {
    font-size: clamp(17px, 2vw, 19px);
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .process-steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .industries-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Mobile Landscape & Large Phones */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  
  .hero-section {
    padding: 70px 16px 40px;
    min-height: auto;
  }
  
  .hero-title {
    font-size: clamp(36px, 6vw, 56px);
    margin-bottom: 20px;
  }
  
  .hero-description {
    font-size: clamp(17px, 2vw, 19px);
    margin-bottom: 32px;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: 14px;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
    max-width: 400px;
  }
  
  .hero-visual {
    margin-top: 32px;
  }
  
  .ai-visualization {
    width: 240px;
    height: 240px;
  }
  
  .ai-visualization canvas#industry-orbital {
    width: 240px;
    height: 240px;
  }
  
  .services-section,
  .process-section,
  .industries-section {
    padding: 60px 0;
  }
  
  .section-header {
    margin-bottom: 40px;
  }
  
  .section-header h2 {
    font-size: clamp(32px, 5vw, 44px);
  }
  
  .section-header p {
    font-size: clamp(17px, 2vw, 19px);
  }
  
  .services-grid {
    gap: 20px;
  }
  
  .service-card {
    padding: 28px 24px;
  }
  
  .service-icon {
    width: 54px;
    height: 54px;
    font-size: 22px;
    margin-bottom: 20px;
  }
  
  .service-card h3 {
    font-size: clamp(20px, 2.6vw, 24px);
  }
  
  .service-card p {
    font-size: clamp(15px, 1.9vw, 16px);
  }
  
  .service-features li {
    font-size: clamp(14px, 1.8vw, 15px);
  }
  
  .process-steps {
    gap: 28px;
  }
  
  .step-number {
    width: 54px;
    height: 54px;
    font-size: 22px;
    margin-bottom: 20px;
  }
  
  .step-content h3 {
    font-size: clamp(18px, 2.4vw, 20px);
  }
  
  .step-content p {
    font-size: clamp(15px, 1.9vw, 16px);
  }
  
  .industries-grid {
    gap: 18px;
  }
  
  .industry-card {
    padding: 22px;
  }
  
  .industry-card h3 {
    font-size: clamp(18px, 2.4vw, 20px);
  }
  
  .industry-card p {
    font-size: clamp(14px, 1.8vw, 15px);
  }
  
  .cta-section {
    padding: 60px 16px;
  }
  
  .cta-content h2 {
    font-size: clamp(32px, 4.5vw, 44px);
  }
  
  .cta-content p {
    font-size: clamp(17px, 2vw, 19px);
  }
  
  .cta-actions {
    flex-direction: column;
    gap: 14px;
    width: 100%;
  }
  
  .cta-actions .btn {
    width: 100%;
    max-width: 400px;
  }
}

/* Mobile Portrait */
@media (max-width: 480px) {
  .hero-section {
    padding: 60px 12px 32px;
  }
  
  .hero-title {
    font-size: clamp(32px, 5vw, 48px);
  }
  
  .hero-description {
    font-size: clamp(16px, 1.9vw, 18px);
  }
  
  .hero-actions .btn {
    max-width: 100%;
  }
  
  .ai-visualization {
    width: 200px;
    height: 200px;
  }
  
  .ai-visualization canvas#industry-orbital {
    width: 200px;
    height: 200px;
  }
  
  .services-section,
  .process-section,
  .industries-section {
    padding: 50px 0;
  }
  
  .section-header {
    margin-bottom: 32px;
  }
  
  .section-header h2 {
    font-size: clamp(28px, 4.5vw, 40px);
  }
  
  .service-card {
    padding: 24px 20px;
  }
  
  .service-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
    margin-bottom: 16px;
  }
  
  .service-card h3 {
    font-size: clamp(18px, 2.4vw, 22px);
  }
  
  .service-card p {
    font-size: clamp(14px, 1.8vw, 15px);
  }
  
  .step-number {
    width: 48px;
    height: 48px;
    font-size: 20px;
    margin-bottom: 16px;
  }
  
  .step-content h3 {
    font-size: clamp(16px, 2.2vw, 18px);
  }
  
  .step-content p {
    font-size: clamp(14px, 1.8vw, 15px);
  }
  
  .industry-card {
    padding: 20px;
  }
  
  .industry-card h3 {
    font-size: clamp(17px, 2.3vw, 19px);
  }
  
  .industry-card p {
    font-size: clamp(13px, 1.7vw, 14px);
  }
  
  .cta-section {
    padding: 50px 12px;
  }
  
  .cta-content h2 {
    font-size: clamp(28px, 4vw, 40px);
  }
  
  .cta-actions .btn {
    max-width: 100%;
  }
}

/* Extra Small Phones */
@media (max-width: 360px) {
  .hero-section {
    padding: 50px 10px 28px;
  }
  
  .service-card {
    padding: 20px 16px;
  }
  
  .step-number {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  
  .industry-card {
    padding: 18px;
  }
  
  .cta-section {
    padding: 40px 10px;
  }
}
