/* ============================================
   J-SISTEM d.o.o. — Main Stylesheet
   Bootstrap 5 custom overrides
   ============================================ */

:root {
  --brand-red: #e00000;
  --brand-red-hover: #b00000;
  --dark: #1a1a1a;
  --panel-bg: rgba(255, 255, 255, 0.88);
  --panel-bg-solid: #ffffff;
  --text-dark: #333;
  --text-muted: #666;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.18);
  --radius: 12px;
}

/* ---------- Base ---------- */

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: var(--text-dark);
  background-image: url('/jsistem2016/img/DSC_4024_02.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center top;
  background-color: #c0c0c0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: var(--text-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- Navbar ---------- */

.navbar {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s ease;
  padding: 0.5rem 0;
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.92);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.brand-text {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--brand-red) !important;
}

.brand-suffix {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: normal;
}

.navbar .nav-link {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 0.5rem 0.85rem !important;
  transition: color 0.2s;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--brand-red) !important;
}

/* ---------- Hero ---------- */

.hero-section {
  min-height: 100vh;
  padding-top: 90px;
  padding-bottom: 3rem;
  display: flex;
  align-items: center;
}

.hero-panel {
  background: var(--panel-bg);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.hero-title {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  color: var(--brand-red);
  font-weight: bold;
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  line-height: 1.1;
}

.hero-subtitle {
  font-family: 'Montserrat', sans-serif;
  color: var(--dark);
  font-weight: 500;
  margin-top: 0.25rem;
}

.hero-services {
  color: #284343;
  line-height: 1.8;
}

/* Hero image slideshow */
.hero-slideshow {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 400 / 430;
  max-height: 460px;
  box-shadow: var(--shadow);
}

.hero-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: crossfade 20s infinite;
}

.hero-slideshow img:nth-child(1) { animation-delay: 0s; }
.hero-slideshow img:nth-child(2) { animation-delay: 4s; }
.hero-slideshow img:nth-child(3) { animation-delay: 8s; }
.hero-slideshow img:nth-child(4) { animation-delay: 12s; }
.hero-slideshow img:nth-child(5) { animation-delay: 16s; }

@keyframes crossfade {
  0%   { opacity: 0; }
  5%   { opacity: 1; }
  20%  { opacity: 1; }
  25%  { opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Sections ---------- */

section {
  padding: 4rem 0;
}

.section-anchor {
  scroll-margin-top: 80px;
}

/* ---------- Service Cards ---------- */

.service-card {
  background: var(--panel-bg);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}


.service-card .card-header {
  background: var(--brand-red);
  color: #fff;
  border: none;
  padding: 1rem 1.25rem;
}

.service-card .card-header h3 {
  color: #fff;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 400;
}

.service-card .card-body {
  padding: 1.5rem;
}

.service-card .card-body img {
  border-radius: 8px;
}

.service-card ul {
  padding-left: 1.25rem;
  margin-top: 0.75rem;
}

.service-card li {
  margin-bottom: 0.35rem;
}

/* ---------- Contact ---------- */

.contact-panel {
  background: var(--panel-bg);
  border-radius: var(--radius);
  padding: 3rem;
  box-shadow: var(--shadow);
}

.contact-brand {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  color: var(--brand-red);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: bold;
}

.contact-info i {
  color: var(--brand-red);
  width: 24px;
}

.contact-info a {
  color: var(--text-dark);
  text-decoration: none;
}

.contact-info a:hover {
  color: var(--brand-red);
}

/* ---------- Footer ---------- */

footer {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.7);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.875rem;
}

footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

footer a:hover {
  color: #fff;
}

/* ---------- Scroll animations ---------- */

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }

/* ---------- Back to top ---------- */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, background 0.2s;
  z-index: 1000;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--brand-red-hover);
  color: #fff;
}

/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
  .hero-section {
    min-height: auto;
    padding-top: 100px;
  }

  .hero-slideshow {
    margin-top: 2rem;
    max-height: 350px;
  }

  .hero-panel {
    padding: 1.5rem;
  }

  section {
    padding: 3rem 0;
  }
}

@media (max-width: 575.98px) {
  .hero-title {
    font-size: 2rem;
  }

  .contact-panel {
    padding: 1.5rem;
  }

  .service-card .card-body {
    padding: 1rem;
  }
}
