/* =============================================
   eGasilec – style.css
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Inter:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #f5f4f1;
  --white:      #ffffff;
  --red:        #d42020;
  --red-dark:   #a51818;
  --red-light:  #fdf0f0;
  --ink:        #111111;
  --muted:      #666666;
  --hint:       #999999;
  --border:     #e4e2dd;
  --border-red: rgba(212, 32, 32, 0.25);
  --sans:       'Rajdhani', sans-serif;
  --body:       'Inter', sans-serif;
  --radius:     6px;
  --gutter:     clamp(1.5rem, 5vw, 5rem);
}

html { scroll-behavior: smooth; }
body { font-family: var(--body); background: var(--bg); color: var(--ink); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* =============================================
   NAVIGACIJA
   ============================================= */
.nav {
  background: var(--white);
  border-bottom: 2px solid var(--red);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }

.logo img {
  height: 56px;
  width: 56px;
  object-fit: cover;
  border-radius: 50%;
}

.logo-text { font-family: var(--sans); font-size: 22px; font-weight: 700; letter-spacing: .5px; color: var(--ink); }
.logo-text span { color: var(--red); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 72px;
  z-index: 99;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  padding: .7rem var(--gutter);
  border-bottom: 1px solid var(--border);
  transition: color .15s, background .15s;
}
.mobile-menu a:hover { color: var(--red); background: var(--red-light); }

/* =============================================
   HERO
   ============================================= */
.hero {
  background: var(--white);
  padding: 3.5rem var(--gutter);
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
}

.hero-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--sans);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .5px;
  text-transform: uppercase;
  max-width: 700px;
  margin: 0 auto .9rem;
}

.hero-title span { color: var(--red); }

.hero-sub {
  font-size: 15px;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.75;
}

.hero-search {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 11px 16px;
  font-size: 14px;
  font-family: var(--body);
  background: transparent;
  color: var(--ink);
}

.hero-search input::placeholder { color: var(--hint); }

.hero-search button {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 11px 22px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--sans);
  cursor: pointer;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: background .15s;
}
.hero-search button:hover { background: var(--red-dark); }

/* =============================================
   SKUPNI ELEMENTI
   ============================================= */
.section-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::before {
  content: '';
  width: 4px;
  height: 14px;
  background: var(--red);
  border-radius: 1px;
  flex-shrink: 0;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.card-tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 2px;
  margin-bottom: .5rem;
}

.tag-org { background: #e8f0fd; color: #1a5cb5; }
.tag-dig { background: #e6f9ee; color: #1a7a45; }
.tag-web { background: #fef8e4; color: #96660a; }
.tag-ops { background: var(--red-light); color: var(--red-dark); }

/* =============================================
   BLOG KARTICA – enoten sistem za vse kartice
   ============================================= */
.blog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}

.blog-card > a {
  display: block;
  height: 100%;
}

.blog-card:hover {
  border-color: var(--red);
  box-shadow: 0 4px 20px rgba(212,32,32,.09);
  transform: translateY(-2px);
}

/* Slika — fiksno razmerje 16:9, object-fit cover */
.blog-card-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg);
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}

.blog-card:hover .blog-card-img img { transform: scale(1.03); }

/* Placeholder ko ni slike */
.img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a0000, #8a0000, #c01010);
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-placeholder span {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}

/* Telo kartice */
.blog-card-body { padding: 1rem 1.2rem 1.3rem; }

.blog-card-naslov {
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .4rem;
  letter-spacing: .1px;
  color: var(--ink);
}

/* Velikost naslova glede na tip kartice */
.card-md .blog-card-naslov { font-size: 1.15rem; }
.card-sm .blog-card-naslov { font-size: 1rem; }

.blog-card-excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: .5rem;

  /* Omeji na 2 vrstici */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta { font-size: 11px; color: var(--hint); }

/* =============================================
   FEATURED – 3 enake kartice
   ============================================= */
.featured { padding: 2.5rem var(--gutter); }

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

/* =============================================
   KATEGORIJE
   ============================================= */
.categories {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem var(--gutter);
}

.cat-inner { display: flex; gap: .7rem; flex-wrap: wrap; }

.cat-pill {
  padding: 6px 15px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s;
  color: var(--muted);
  background: var(--white);
}

.cat-pill:hover { border-color: var(--red); color: var(--red); }
.cat-pill.active { background: var(--red); border-color: var(--red); color: #fff; }

/* =============================================
   NAJNOVEJŠI ČLANKI – 3 stolpci
   ============================================= */
.latest { padding: 2rem var(--gutter); }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 1.5rem var(--gutter);
}

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

.footer-logo { font-family: var(--sans); font-size: 15px; font-weight: 700; color: var(--ink); }
.footer-logo span { color: var(--red); }
.footer-copy { font-size: 12px; color: var(--hint); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .featured-grid,
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  /* hamburger skrijen dokler ni meni implementiran */
  .nav-hamburger { display: none; }
  .hero-title { font-size: 2rem; }
  .featured-grid,
  .articles-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}
