/* =============================================
   MALAGA — AI Digitalna Agencija
   style.css
   ============================================= */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

:root {
  --bg-primary:    #07070E;
  --bg-secondary:  #0D0D1A;
  --bg-card:       #0F0F1F;
  --color-primary: #5B57E7;
  --color-secondary: #A493FF;
  --color-accent:  #72BEF9;
  --gradient:      linear-gradient(135deg, #A493FF 0%, #5B57E7 50%, #72BEF9 100%);
  --gradient-text: linear-gradient(135deg, #F5F5FF 0%, #A493FF 55%, #72BEF9 100%);
  --text-primary:  #F5F5FF;
  --text-secondary: #9B9BB5;
  --border:        rgba(91, 87, 231, 0.22);
  --border-hover:  rgba(91, 87, 231, 0.55);
  --font:          'Inter', system-ui, -apple-system, sans-serif;
  --container:     1100px;
  --radius:        14px;
  --radius-sm:     8px;
  --transition:    0.3s ease;
  --section-pad:   110px 0;
}

body {
  font-family: var(--font);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: var(--font); }

/* ── Typography ── */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 1.1rem;
  padding: 0.3rem 1rem;
  background: rgba(91, 87, 231, 0.1);
  border: 1px solid rgba(91, 87, 231, 0.22);
  border-radius: 100px;
}

.section-title {
  font-size: clamp(1.9rem, 3.5vw, 2.7rem);
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 580px;
  line-height: 1.7;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.78rem 1.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 10px 35px rgba(91, 87, 231, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-secondary);
  transform: translateY(-2px);
}

/* ── Fade-in animation ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   HEADER
   ============================================= */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.8rem 0;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.35s ease;
}

header.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo img {
  height: 40px;
  object-fit: contain;
}

nav {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}

nav a {
  color: #444;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--transition);
}
nav a:hover { color: var(--color-primary); }

.nav-cta {
  padding: 0.5rem 1.3rem !important;
  background: var(--gradient) !important;
  color: #fff !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
}
.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(91, 87, 231, 0.4);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.3rem;
  z-index: 101;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #222;
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   HERO
   ============================================= */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 130px 0 90px;
  overflow: hidden;
}

/* Glow orbs */
.hero-glow {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(91, 87, 231, 0.16) 0%, transparent 65%);
  pointer-events: none;
}
.hero-glow-2 {
  position: absolute;
  top: 15%;
  right: -8%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(114, 190, 249, 0.09) 0%, transparent 65%);
  pointer-events: none;
}
.hero-glow-3 {
  position: absolute;
  bottom: 10%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(164, 147, 255, 0.08) 0%, transparent 65%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 780px;
  animation: fadeUp 0.85s ease forwards;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-secondary);
  background: rgba(91, 87, 231, 0.1);
  border: 1px solid rgba(91, 87, 231, 0.25);
  border-radius: 100px;
  padding: 0.4rem 1.1rem;
  margin-bottom: 1.8rem;
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--color-secondary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.13;
  margin-bottom: 1.6rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text {
  font-size: 1.12rem;
  color: var(--text-secondary);
  max-width: 530px;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* =============================================
   USLUGE
   ============================================= */
#usluge {
  padding: var(--section-pad);
}

/* Desktop: 3 columns */
.services-wrapper {
  position: relative;
}

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

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: 0 15px 45px rgba(91, 87, 231, 0.22);
}

.service-icon {
  width: 50px;
  height: 50px;
  background: rgba(91, 87, 231, 0.12);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  font-size: 1.5rem;
}

.service-card h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
  line-height: 1.35;
}

.service-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* =============================================
   O NAMA
   ============================================= */
#o-nama {
  padding: var(--section-pad);
  background: linear-gradient(180deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 45%,
    var(--bg-primary) 100%
  );
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3.5rem;
  margin-bottom: 3.5rem;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.about-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 10px 35px rgba(91, 87, 231, 0.18);
}

.about-card h3 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
  line-height: 1.7;
}

.about-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.about-card ul li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.about-card ul li::before {
  content: '';
  width: 5px;
  height: 5px;
  min-width: 5px;
  background: var(--color-primary);
  border-radius: 50%;
  margin-top: 0.48rem;
}

/* Process steps */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 3.5rem;
}

.process-step {
  padding: 1.8rem;
  background: rgba(91, 87, 231, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.process-step:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 28px rgba(91, 87, 231, 0.15);
}

.process-num {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.8rem;
}

.process-step h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.process-step p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* =============================================
   TEHNOLOGIJE
   ============================================= */
#tehnologije {
  padding: var(--section-pad);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 1rem;
  margin-top: 3.5rem;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 1.6rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  text-align: center;
}
.tech-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(91, 87, 231, 0.2);
}

.tech-item img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  opacity: 0.65;
  transition: opacity var(--transition);
}
.tech-item:hover img {
  opacity: 1;
}

.tech-item span {
  font-size: 0.73rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.3;
}

/* =============================================
   KONTAKT
   ============================================= */
#kontakt {
  padding: var(--section-pad);
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.contact-wrapper {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-icon { font-size: 1.4rem; flex-shrink: 0; }

.contact-item h4 {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.contact-item p, .contact-item a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}
.contact-item a:hover { color: var(--color-secondary); }

/* Hours */
.contact-hours {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.contact-hours h4 {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hours-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255,255,255,0.045);
}
.hours-row:last-child { border-bottom: none; }
.hours-row .day { color: var(--text-secondary); }

/* CTA card */
.contact-cta {
  background: rgba(91, 87, 231, 0.07);
  border: 1px solid rgba(91, 87, 231, 0.22);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.contact-cta h3 {
  font-size: 1.6rem;
  line-height: 1.25;
}
.contact-cta p {
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: 0.95rem;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  padding: 2.5rem 0;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-logo img {
  height: 34px;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity var(--transition);
}
.footer-logo:hover img { opacity: 1; }

.footer-info {
  text-align: center;
  font-size: 0.85rem;
  color: #666;
}
.footer-info a {
  color: var(--color-primary);
}
.footer-info a:hover { text-decoration: underline; }

.footer-company {
  font-size: 0.8rem;
  color: #888;
  text-align: right;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  nav {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    z-index: 99;
  }
  nav a { font-size: 1.15rem; }
  nav.open { display: flex; }
  .hamburger { display: flex; }

  .about-grid    { grid-template-columns: 1fr; }
  .process-grid  { grid-template-columns: repeat(2, 1fr); }
  .contact-wrapper { grid-template-columns: 1fr; }

  .footer-inner  { flex-direction: column; text-align: center; }
  .footer-company { text-align: center; }
}

@media (max-width: 640px) {
  :root { --section-pad: 75px 0; }

  h1 { font-size: 2.2rem; }

  /* Services: horizontal slider on mobile */
  .services-wrapper {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .services-wrapper::-webkit-scrollbar { display: none; }
  .services-wrapper .services-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    margin-top: 2.5rem;
    padding-bottom: 0.5rem;
  }
  .services-wrapper .service-card {
    min-width: 260px;
    max-width: 260px;
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  .process-grid  { grid-template-columns: 1fr; }
  .tech-grid     { grid-template-columns: repeat(3, 1fr); }
  .hero-buttons  { flex-direction: column; }
  .contact-cta   { padding: 2rem 1.5rem; }
}

@media (max-width: 400px) {
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
}
