/* Light cream surface override: uskladi tekst s KODEKKO headingom */
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;
}

/* Hero sekcija je svijetla (krem) – tamni tekst */
.hero-section,
.hero-section :where(h1,h2,h3,h4,h5,h6,p,li,small,span,a) {
  color: var(--color-text-dark) !important;
}

/* Implementation sekcija je također tamna → bijeli tekst */
.implementation-section,
.implementation-section :where(h1,h2,h3,h4,h5,h6,p,li,small,span,a) {
  color: var(--color-text) !important;
}
/* AI Agenti 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;
  will-change: transform;
}

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

/* 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: transparent;
  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 Ilustracija */
.ai-illustration {
  width: 300px;
  height: 300px;
  position: relative;
}

.brain-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.brain-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  background: currentColor;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 2s infinite;
  z-index: 3;
}

.neural-path {
  position: absolute;
  height: 3px;
  background: currentColor;
  border-radius: 2px;
  animation: flow 3s infinite;
  z-index: 2;
}

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

.path-2 {
  top: 60%;
  right: 20%;
  width: 60%;
  transform: rotate(-45deg);
  animation-delay: 1s;
  z-index: 1; /* iza ostalih elemenata */
}

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

.data-point {
  position: absolute;
  width: 12px;
  height: 12px;
  background: currentColor;
  border-radius: 50%;
  animation: float 2s infinite;
}

.point-1 { top: 20%; left: 30%; animation-delay: 0s; }
.point-2 { top: 40%; right: 20%; animation-delay: 0.5s; }
.point-3 { bottom: 40%; left: 20%; animation-delay: 1s; }
.point-4 { bottom: 20%; right: 30%; animation-delay: 1.5s; }

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

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

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* 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 */
.agents-section,
.benefits-section,
.implementation-section {
  padding: 80px 0;
}

/* Boje po redu: zelena → žuta → narančasta → zelena (ponavlja se) */
.agents-section { background: var(--color-bg); }
.benefits-section { background: var(--color-bg); }

/* Kontrast na svijetlim sekcijama (zelena/žuta) */
.agents-section :where(h1,h2,h3,h4,h5,h6,p,li,small,span,a),
.benefits-section :where(h1,h2,h3,h4,h5,h6,p,li,small,span,a) {
  color: var(--color-text-dark) !important;
}

.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;
}

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

.agent-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.6s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  will-change: transform, box-shadow;
}

.agent-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;
}

.agent-card:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: var(--accent-red-30);
  box-shadow: 
    var(--shadow-deep),
    0 0 0 1px var(--accent-red-20),
    inset 0 1px 0 var(--overlay-white-10);
}

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

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

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

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

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

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

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

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

.benefit-item {
  text-align: center;
  padding: 32px 24px;
  background: var(--overlay-white-03);
  border: 1px solid var(--overlay-white-10);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.benefit-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent-red-30);
}

.benefit-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--color-accent-3);
  margin-bottom: 16px;
}

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

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

/* Implementation sekcija */
.implementation-section {
  background: var(--color-bg);
}

.implementation-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.implementation-text h2 {
  font-size: clamp(32px, 5vw, 42px);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 16px;
}

.implementation-text > p {
  font-size: 18px;
  color: var(--color-text);
  margin: 0 0 40px;
  line-height: 1.6;
}

.implementation-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.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);
  flex-shrink: 0;
}

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

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

/* Code Block */
.code-block {
  background: rgba(var(--pastel-teal-rgb), 0.08);
  border: 2px solid var(--color-accent-3);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(var(--pastel-teal-rgb), 0.3), 
              0 0 0 1px rgba(var(--pastel-teal-rgb), 0.1);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  background: rgba(var(--pastel-teal-rgb), 0.12);
  border-bottom: 2px solid var(--color-accent-3);
}

.code-dots {
  display: flex;
  gap: 8px;
}

.code-dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.code-dots span:nth-child(1) { background: #FF5F56; }
.code-dots span:nth-child(2) { background: #FFBD2E; }
.code-dots span:nth-child(3) { background: #27C93F; }

.code-title {
  color: var(--color-text-dark);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.code-content {
  padding: 28px 24px;
  overflow: visible;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(var(--deep-blue-rgb), 0.05);
}

.code-content pre {
  margin: 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-dark);
  font-weight: 500;
}

.code-content code {
  color: var(--color-text-dark);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 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;
}

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

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

/* Tablet Landscape */
@media (max-width: 1200px) {
  .container {
    padding: 0 24px;
  }
  
  .hero-section {
    padding: 90px 24px 40px;
  }
  
  .agents-grid,
  .benefits-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
  }
  
  .implementation-content {
    gap: 50px;
  }
}

/* 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-illustration {
    width: 280px;
    height: 280px;
    margin: 0 auto;
  }
  
  .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .agents-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .benefits-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
  }
  
  .implementation-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .code-block {
    order: -1;
  }
}

/* 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-illustration {
    width: 240px;
    height: 240px;
  }
  
  .brain-core {
    width: 60px;
    height: 60px;
  }
  
  .agents-section,
  .benefits-section,
  .implementation-section {
    padding: 60px 0;
  }
  
  .section-header {
    margin-bottom: 48px;
  }
  
  .section-header h2 {
    font-size: clamp(32px, 5vw, 44px);
  }
  
  .section-header p {
    font-size: clamp(17px, 2vw, 19px);
  }
  
  .agents-grid {
    gap: 20px;
  }
  
  .agent-card {
    padding: 28px 24px;
  }
  
  .agent-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 20px;
  }
  
  .agent-card h3 {
    font-size: clamp(20px, 2.6vw, 24px);
  }
  
  .agent-card p {
    font-size: clamp(15px, 1.9vw, 16px);
  }
  
  .agent-features li {
    font-size: clamp(14px, 1.8vw, 15px);
    padding: 6px 0;
  }
  
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .benefit-item {
    padding: 28px 20px;
  }
  
  .benefit-number {
    font-size: clamp(40px, 5.5vw, 48px);
  }
  
  .benefit-item h3 {
    font-size: clamp(18px, 2.4vw, 20px);
  }
  
  .benefit-item p {
    font-size: clamp(14px, 1.8vw, 16px);
  }
  
  .implementation-text h2 {
    font-size: clamp(28px, 4vw, 38px);
  }
  
  .implementation-text > p {
    font-size: clamp(16px, 2vw, 18px);
  }
  
  .step {
    gap: 14px;
  }
  
  .step-number {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  .step-content h3 {
    font-size: clamp(16px, 2.2vw, 18px);
  }
  
  .step-content p {
    font-size: clamp(14px, 1.8vw, 16px);
  }
  
  .code-block {
    border-radius: 14px;
  }
  
  .code-header {
    padding: 16px 20px;
  }
  
  .code-content {
    padding: 24px 20px;
  }
  
  .code-content pre {
    font-size: 13px;
    line-height: 1.6;
  }
  
  .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-illustration {
    width: 200px;
    height: 200px;
  }
  
  .brain-core {
    width: 50px;
    height: 50px;
  }
  
  .agents-section,
  .benefits-section,
  .implementation-section {
    padding: 50px 0;
  }
  
  .section-header {
    margin-bottom: 40px;
  }
  
  .section-header h2 {
    font-size: clamp(28px, 4.5vw, 40px);
  }
  
  .agent-card {
    padding: 24px 20px;
  }
  
  .agent-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
  }
  
  .agent-card h3 {
    font-size: clamp(18px, 2.4vw, 22px);
  }
  
  .agent-card p {
    font-size: clamp(14px, 1.8vw, 15px);
  }
  
  .benefit-item {
    padding: 24px 18px;
  }
  
  .benefit-number {
    font-size: clamp(36px, 5vw, 44px);
  }
  
  .step-number {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  
  .code-header {
    padding: 14px 18px;
  }
  
  .code-content {
    padding: 20px 18px;
  }
  
  .code-content pre {
    font-size: 12px;
  }
  
  .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;
  }
  
  .agent-card {
    padding: 20px 16px;
  }
  
  .benefit-item {
    padding: 20px 16px;
  }
  
  .step-number {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .cta-section {
    padding: 40px 10px;
  }
}
