/* ============================================
   IT SERVIS BEOGRAD - Unified Design System
   Mobile-First, Clean & Professional
   ============================================ */

/* CSS Variables */
:root {
  --primary: #0f172a;
  --secondary: #2563eb;
  --accent: #1d4ed8;
  --text: #1e293b;
  --text-light: #64748b;
  --bg: #ffffff;
  --bg-light: #f8fafc;
  --border: #e2e8f0;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

/* Container */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
  margin-bottom: 1rem;
}

h1 {
  font-size: 2rem;
  font-weight: 800;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

strong {
  font-weight: 600;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

/* ============================================
   HEADER - Mobile First
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.brand-logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  text-decoration: none;
}

.brand-logo span {
  color: var(--secondary);
}

.brand-logo:hover {
  text-decoration: none;
}

/* Mobile Menu Toggle - Visible on mobile */
.mobile-menu-toggle {
  display: flex;
  width: 44px;
  height: 44px;
  background: var(--bg);
  border: 2px solid var(--secondary);
  border-radius: 6px;
  font-size: 1.5rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: var(--bg-light);
}

/* Desktop Navigation - Hidden on mobile */
.main-nav {
  display: none;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  padding: 0;
  margin: 0;
}

.main-nav a {
  color: var(--primary);
  font-weight: 500;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--secondary);
  border-bottom-color: var(--secondary);
  text-decoration: none;
}

/* Mobile Menu - Hidden by default */
.main-nav.open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.main-nav.open ul {
  flex-direction: column;
  gap: 0;
}

.main-nav.open li {
  border-bottom: 1px solid var(--border);
}

.main-nav.open a {
  display: block;
  padding: 1rem 1.5rem;
  border-bottom: none;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 40vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  padding: 3rem 0;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.75) 100%);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 750px;
}

.hero h1 {
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero p {
  color: #e2e8f0;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-cta .btn {
  width: 100%;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  padding: 0.875rem 1.875rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-primary {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--secondary);
  border-color: var(--secondary);
}

.btn-outline:hover {
  background: var(--secondary);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.hero .btn-outline {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.hero .btn-outline:hover {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
  text-decoration: none;
}

.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 3.5rem 0;
}

.bg-light {
  background: var(--bg-light);
}

.text-center {
  text-align: center;
}

.text-center h2 {
  margin-bottom: 2.5rem;
}

/* ============================================
   GRID
   ============================================ */
.grid {
  display: grid;
  gap: 3rem;
}

.grid-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.align-items-center {
  align-items: center;
}

/* ============================================
   SERVICES GRID
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card-box:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.card-content h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--primary);
  font-size: 1.25rem;
}

.card-content ul {
  margin: 0;
  padding-left: 1.5rem;
}

.card-content ul li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--secondary);
}

.service-card h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.service-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-card-btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ============================================
   FEATURE LIST
   ============================================ */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.feature-list li {
  padding-left: 2rem;
  position: relative;
  margin-bottom: 1.25rem;
  line-height: 1.8;
  font-size: 1.05rem;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: bold;
  font-size: 1.2rem;
}

/* ============================================
   IMAGE BOX
   ============================================ */
.img-box {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.img-box img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   INFO BOX
   ============================================ */
.info-box {
  background: var(--bg-light);
  padding: 2rem;
  border-left: 4px solid var(--secondary);
  margin: 2.5rem 0;
  border-radius: 6px;
  line-height: 1.8;
}

.info-box strong {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--primary);
  font-size: 1.1rem;
}

/* ============================================
   PRICE LIST
   ============================================ */
.price-category {
  margin-bottom: 4rem;
}

.price-category h2 {
  border-bottom: 3px solid var(--secondary);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  color: var(--primary);
}

.price-list {
  list-style: none;
  padding: 0;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.price-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.price-item:last-child {
  border-bottom: none;
}

.price-item:hover {
  background: var(--bg-light);
}

.price-value {
  font-weight: 700;
  color: var(--secondary);
  white-space: nowrap;
  align-self: flex-end;
  font-size: 1.1rem;
}

.intro-text {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 2.5rem;
  text-align: center;
}

/* ============================================
   BLOG GRID
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.article-card,
.blog-card {
  background: var(--bg);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover,
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.blog-card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card-thumb {
  display: block;
  margin: -2rem -2rem 1rem;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}

.blog-card-thumb img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}

.blog-card h2,
.blog-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.blog-card h2 a,
.blog-card h3 a {
  color: var(--primary);
  text-decoration: none;
}

.blog-card h2 a:hover,
.blog-card h3 a:hover {
  color: var(--secondary);
}

.blog-card-excerpt {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.blog-card-link {
  display: inline-block;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  background: var(--secondary);
  padding: 0.625rem 1rem;
  border-radius: 8px;
}

.blog-card-link:hover {
  background: var(--accent);
  color: #fff;
}

.post-content,
.blog-post-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.7;
}

.post-content p,
.post-content li,
.blog-post-content p,
.blog-post-content li {
  line-height: 1.7;
}

.post-content h2,
.blog-post-content h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-content h3,
.blog-post-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.post-image {
  margin: 1.5rem 0 2rem;
}

.post-image img {
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.post-cta {
  margin-top: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-light);
}

.post-cta p:last-child {
  margin-bottom: 0;
}

/* ============================================
   BLOG INDEX REDESIGN
   ============================================ */
.blog-category-section {
  margin-top: 60px;
}

.blog-filter-bar {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-filter-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.blog-filter-btn.is-active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.blog-category-title {
  margin-bottom: 1.25rem;
}

.blog-category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.blog-index-card {
  background: var(--bg);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.blog-index-card.is-hidden {
  opacity: 0;
  transform: translateY(6px);
  display: none;
}

.blog-index-thumb-link {
  display: block;
}

.blog-index-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 240px;
  object-fit: cover;
  display: block;
}

.blog-index-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

.blog-index-content h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.35;
  min-height: 2.7em;
}

.blog-index-content h2 a {
  color: var(--primary);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-index-excerpt {
  margin: 0;
  color: var(--text-light);
  flex-grow: 1;
}

.blog-index-readmore {
  align-self: flex-start;
  display: inline-block;
  background: var(--secondary);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  font-weight: 600;
}

.blog-index-readmore:hover {
  background: var(--accent);
}

.blog-pagination {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.blog-page-info {
  min-width: 110px;
  text-align: center;
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-form {
  background: var(--bg-light);
  padding: 2.5rem;
  border-radius: 10px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.875rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

.contact-form textarea {
  height: 120px;
  resize: vertical;
}

.contact-form button {
  width: 100%;
  margin-top: 1rem;
}

.form-message {
  margin-top: 1rem;
  padding: 0.875rem;
  border-radius: 6px;
  display: none;
}

.form-message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.form-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

.contact-phone,
.contact-email {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--secondary);
  text-decoration: none;
}

.contact-phone:hover,
.contact-email:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ============================================
   FAQ
   ============================================ */
.faq-list {
  margin-top: 2rem;
}

.faq-item {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--primary);
  color: #cbd5e1;
  padding: 4rem 0 2rem;
  margin-top: 5rem;
  width: 100%;
  overflow: hidden;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-grid h4 {
  color: #fff;
  margin-bottom: 1.25rem;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 0.875rem;
}

.footer-grid a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-grid a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-logo {
  color: #fff !important;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid #1e293b;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.text-muted {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ============================================
   RESPONSIVE - TABLET & DESKTOP
   ============================================ */
@media (min-width: 601px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .price-item {
    flex-direction: row;
    align-items: center;
  }

  .price-value {
    align-self: auto;
  }
}

@media (min-width: 769px) {
  /* Hide mobile menu toggle */
  .mobile-menu-toggle {
    display: none;
  }

  /* Show desktop navigation */
  .main-nav {
    display: block;
    position: static;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  .main-nav ul {
    flex-direction: row;
    gap: 2rem;
  }

  .main-nav li {
    border-bottom: none;
  }

  .main-nav a {
    padding: 0.5rem 0;
    display: inline-block;
  }

  /* Hero adjustments */
  .hero {
    min-height: 45vh;
    padding: 4rem 0;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero p {
    font-size: 1.2rem;
  }

  .hero-cta {
    flex-direction: row;
  }

  .hero-cta .btn {
    width: auto;
  }

  /* Grid adjustments */
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .blog-category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .section {
    padding: 5rem 0;
  }

  /* Typography */
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
  border-radius: 2px;
}
