/* -----------------------------------------------
   Blog Page Styles
   Visual language: space / dark glassmorphism
   Matches: services-technology, about-us, team
   ----------------------------------------------- */

/* -----------------------------------------------
   HERO SECTION — planet layout (reuses homepage classes)
   ----------------------------------------------- */

/* Override: sekcija mora imati height:100vh kao position:relative parent
   za apsolutno pozicionirane planete (isto kao fullpage wrapper na s2-custom) */
.blog-hero-section.homepage {
  height: 100vh;
  min-height: 600px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Content column — desna polovica, iznad planeta */
.blog-hero__content {
  position: relative;
  z-index: 2;
  width: 55% !important;
}

@media (max-width: 1250px) {
  .blog-hero__content {
    width: 100% !important;
    padding-top: 40px;
  }
}

/* Eyebrow badge */
.blog-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(243, 146, 34, 0.1);
  border: 1px solid rgba(243, 146, 34, 0.3);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 24px;
}

.blog-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f39222;
  animation: blog-pulse 2s ease-in-out infinite;
}

@keyframes blog-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.blog-eyebrow-text {
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f39222;
}

.blog-hero__title {
  font-family: "Montserrat", sans-serif;
  font-size: 2.500vw !important;
  font-weight: 700;
  line-height: 1.2em !important;
  margin: 20px 0;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  -webkit-background-clip: unset;
  background-clip: unset;
}

@media (max-width: 1920px) {
  .blog-hero__title {
    font-size: 64px !important;
    line-height: 1.2em !important;
  }
}

.blog-hero__title-gradient {
  background: linear-gradient(135deg, #fff 0%, #4cc9f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-hero__subtitle {
  font-family: "Montserrat", sans-serif;
  font-size: 2.083vw !important;
  font-weight: 200;
  line-height: 1.2em !important;
  margin: 20px 0 36px;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  display: inline-block;
  max-width: 100%;
}

@media (max-width: 1920px) {
  .blog-hero__subtitle {
    font-size: 2.5rem !important;
    line-height: 1.2em !important;
  }
}

@media (max-width: 1440px) {
  .blog-hero__subtitle {
    font-size: 1.8125rem !important;
    line-height: 1.03448em !important;
  }
}

/* Category chips */
.blog-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
}

.blog-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 32px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8;
  -webkit-background-clip: unset;
  background-clip: unset;
  font-family: "Montserrat", sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  text-decoration: none;
  transition: all 0.4s ease;
  cursor: pointer;
}

.blog-chip:hover,
.blog-chip--active {
  border-color: #f39222;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  background: rgba(243, 146, 34, 0.1);
  box-shadow:
    0 0 15px rgba(243, 146, 34, 0.15),
    inset 0 0 15px rgba(243, 146, 34, 0.05);
  transform: translateY(-2px);
}

.blog-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f39222;
  flex-shrink: 0;
  transition: box-shadow 0.4s ease;
}

.blog-chip:hover .blog-chip-dot,
.blog-chip--active .blog-chip-dot {
  box-shadow: 0 0 8px rgba(246, 147, 32, 0.6);
}

.blog-chip-text {
  white-space: nowrap;
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

.blog-chip:hover .blog-chip-text,
.blog-chip--active .blog-chip-text {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* -----------------------------------------------
   BLOG POSTS SECTION
   ----------------------------------------------- */
.blog-posts {
  background:
    radial-gradient(
      1200px 600px at 20% 10%,
      rgba(0, 170, 255, 0.18),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at 70% 30%,
      rgba(122, 92, 255, 0.14),
      transparent 60%
    ),
    radial-gradient(
      1100px 700px at 40% 80%,
      rgba(0, 255, 198, 0.12),
      transparent 60%
    ),
    linear-gradient(180deg, #070b1640, #050713);
  padding: 80px 0 120px;
}

.blog-posts__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* -----------------------------------------------
   BLOG GRID
   ----------------------------------------------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

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

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

/* -----------------------------------------------
   BLOG CARD
   ----------------------------------------------- */
.blog-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(30, 39, 86, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition:
    transform 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-8px);
  border-color: rgba(243, 146, 34, 0.3);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(243, 146, 34, 0.08);
}

/* Overlay link covers entire card */
.blog-card__overlay-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* -----------------------------------------------
   CARD IMAGE
   ----------------------------------------------- */
.blog-card__image {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* All cards: same image height */
.blog-card__image {
  height: 220px;
}

.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.5s ease,
    filter 0.5s ease;
  filter: grayscale(20%);
}

.blog-card:hover .blog-card__image img {
  transform: scale(1.06);
  filter: grayscale(0%);
}

.blog-card__image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 40%,
    rgba(7, 11, 22, 0.7) 100%
  );
}

/* Placeholder when no thumbnail */
.blog-card__image--placeholder {
  background: linear-gradient(
    135deg,
    rgba(30, 39, 86, 0.8),
    rgba(13, 21, 53, 0.9)
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card__placeholder-icon {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.1);
}

/* -----------------------------------------------
   CARD BODY
   ----------------------------------------------- */
.blog-card__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Meta row: category + date */
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.blog-card__category {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(243, 146, 34, 0.15);
  border: 1px solid rgba(243, 146, 34, 0.3);
  color: #f39222;
  -webkit-text-fill-color: #f39222;
  -webkit-background-clip: unset;
  background-clip: unset;
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-card__date {
  font-family: "Hind", sans-serif;
  font-size: 0.8rem;
  color: #64748b;
  -webkit-text-fill-color: #64748b;
}

/* Title */
.blog-card__title {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 700;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  -webkit-background-clip: unset;
  background-clip: unset;
  line-height: 1.3;
  margin-bottom: 14px;
  transition: color 0.3s ease;
}

.blog-card:hover .blog-card__title {
  color: #f39222;
  -webkit-text-fill-color: #f39222;
}

/* Excerpt */
.blog-card__excerpt {
  font-family: "Hind", sans-serif;
  font-size: 0.9rem;
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8;
  line-height: 1.65;
  margin-bottom: 24px;
  flex: 1;
}

/* Footer: author + read more */
.blog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.blog-card__author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.blog-card__author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.blog-card__author-initials {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f69320, #e4b50d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Montserrat", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

.blog-card__author-name {
  font-family: "Hind", sans-serif;
  font-size: 0.82rem;
  color: #64748b;
  -webkit-text-fill-color: #64748b;
}

.blog-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #f39222;
  -webkit-text-fill-color: #f39222;
  -webkit-background-clip: unset;
  background-clip: unset;
  background: none !important;
  padding: 0 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: gap 0.3s ease;
  white-space: nowrap;
}

.blog-card__read-more:hover,
.blog-card__read-more:focus {
  background: none !important;
  color: #f39222;
  -webkit-text-fill-color: #f39222;
}

.blog-card:hover .blog-card__read-more {
  gap: 10px;
}

/* -----------------------------------------------
   PAGINATION
   ----------------------------------------------- */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 64px;
}

.blog-pagination__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f69320, #e4b50d);
  color: #ffffff;
  font-family: "Montserrat", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(243, 146, 34, 0.25);
}

.blog-pagination__btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(243, 146, 34, 0.4);
}

.blog-pagination__btn--prev {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  box-shadow: none;
}

.blog-pagination__btn--prev:hover {
  border-color: rgba(243, 146, 34, 0.4);
  color: #f39222;
  background: rgba(243, 146, 34, 0.08);
  box-shadow: none;
}

/* -----------------------------------------------
   EMPTY STATE
   ----------------------------------------------- */
.blog-empty {
  text-align: center;
  padding: 100px 20px;
}

.blog-empty__icon {
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.blog-empty__title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.blog-empty__text {
  font-family: "Hind", sans-serif;
  font-size: 1rem;
  color: #64748b;
}

/* ===============================================
   RESPONSIVE — Large Desktop (1441px+)
   =============================================== */
@media (min-width: 1441px) {
  .blog-hero__title {
    font-size: 64px !important;
  }
  .blog-hero__subtitle {
    font-size: 2.5rem;
  }
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

/* ===============================================
   RESPONSIVE — Desktop (1251–1440px)
   =============================================== */
@media (max-width: 1440px) {
  .blog-hero-section.homepage {
    height: 65vh;
  }
  .blog-hero__content {
    align-self: center;
    margin-top: -15%;
  }
  .blog-hero-section .homepage__img--jupiter {
    left: 5% !important;
  }
  .blog-hero__title {
    font-size: 56px;
  }
  .blog-hero__subtitle {
    font-size: 1.8125rem;
    line-height: 1.2em;
  }
}

/* ===============================================
   RESPONSIVE — Laptop (1025–1250px)
   =============================================== */
@media (max-width: 1250px) {
  .blog-hero__content {
    width: 100% !important;
    padding-top: 40px;
  }
  .blog-hero__title {
    font-size: 48px;
  }
  .blog-hero__subtitle {
    font-size: 1.6rem;
  }
  .blog-hero__chips {
    gap: 8px;
  }
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .blog-posts {
    padding: 60px 0 100px;
  }
}

/* ===============================================
   RESPONSIVE — Tablet (768–1024px)
   Isti layout kao desktop — planeti lijevo, sadržaj desno
   =============================================== */
@media (max-width: 1024px) {
  .blog-hero-section.homepage {
    height: 55vh;
    min-height: 400px;
    align-items: center;
  }
  /* Guramo planete lijevo na 1024px da ne idu ispod teksta */
  .blog-hero-section .homepage__img--jupiter {
    left: -5% !important;
  }
  .blog-hero-section .homepage__img--mercury {
    left: 18% !important;
  }
  /* Override app.css koji na max-width:1250px sužava container na 700px */
  .blog-hero-section .homepage__container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 24px !important;
  }
  /* Override app.css koji postavlja content-container na 50% */
  .blog-hero-section .homepage__content-container {
    width: 55% !important;
    /*padding-left: 12% !important;*/
    margin-top: 5%;

  }
  .blog-hero__content {
    width: 100% !important;
    align-self: center;
    margin-top: -15%;
  }
  /* Spuštamo planete niže */
  .blog-hero-section .homepage__images-container {
    margin-top: 40%;
    margin-left: 10%;
    
  }
  .blog-hero__title {
    font-size: 38px;
  }
  .blog-hero__subtitle {
    font-size: 1.25rem;
    margin-bottom: 24px;
  }
  .blog-hero__eyebrow {
    margin-bottom: 14px;
  }
  .blog-hero__chips {
    gap: 8px;
  }
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .blog-posts {
    padding: 60px 0 80px;
  }
  .blog-card__body {
    padding: 20px;
  }
  .blog-pagination {
    margin-top: 48px;
    flex-wrap: wrap;
  }
}

/* ===============================================
   RESPONSIVE — Tablet S (768px)
   Override global flex-direction:column — zadrži horizontalni layout
   =============================================== */
@media (max-width: 768px) {
  .blog-hero-section.homepage {
    height: auto;
    min-height: 480px;
  }
  /* Override global app.css koji na 768px stavlja flex-direction:column */
  .blog-hero-section .homepage__container {
    max-width: 100% !important;
    width: 100% !important;
    flex-direction: row !important;
    height: 100% !important;
    padding: 0 16px !important;
  }
  /* Planeti lijevo */
  .blog-hero-section .homepage__images-container {
    width: 45% !important;
    position: relative !important;
    min-height: 250px;
    margin-top: 60px;
  }
  .blog-hero-section .homepage__img--jupiter {
    left: -5% !important;
  }
  .blog-hero-section .homepage__img--mercury {
    left: 15% !important;
  }
  /* Tekst desno */
  .blog-hero-section .homepage__content-container {
    width: 55% !important;
    padding-left: 16px !important;
  }
  .blog-hero__content {
    width: 100% !important;
    align-self: center;
    margin-top: 0;
    padding-top: 80px;
  }
  .blog-hero__title {
    font-size: 28px !important;
    margin: 8px 0;
  }
  .blog-hero__subtitle {
    font-size: 1rem !important;
    line-height: 1.3em !important;
    margin: 8px 0 16px;
  }
  .blog-hero__eyebrow {
    margin-bottom: 10px;
  }
  .blog-hero__chips {
    gap: 6px;
  }
  .blog-chip {
    height: 28px;
    padding: 0 10px;
    font-size: 0.6rem;
  }
}

/* ===============================================
   RESPONSIVE — Mobile L (481–767px)
   =============================================== */
@media (max-width: 767px) {
  .blog-hero-section.homepage {
    height: auto;
    min-height: 0;
    padding: 90px 0 40px;
  }
  .blog-hero__content {
    width: 100% !important;
    padding-top: 20px;
  }
  .blog-hero__title {
    font-size: 32px;
    margin: 12px 0;
  }
  .blog-hero__subtitle {
    font-size: 1.1rem;
    line-height: 1.4em;
    margin: 12px 0 20px;
  }
  .blog-hero__eyebrow {
    margin-bottom: 12px;
    padding: 5px 12px;
  }
  .blog-eyebrow-text {
    font-size: 0.65rem;
  }
  .blog-hero__chips {
    gap: 6px;
  }
  .blog-chip {
    height: 28px;
    padding: 0 12px;
    font-size: 0.6rem;
  }
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .blog-posts {
    padding: 40px 0 60px;
  }
  .blog-posts__container {
    padding: 0 16px;
  }
  .blog-card__image {
    height: 200px;
  }
  .blog-card__body {
    padding: 18px;
  }
  .blog-card__title {
    font-size: 1rem;
  }
  .blog-card__footer {
    padding-top: 14px;
  }
  .blog-pagination {
    margin-top: 36px;
    gap: 10px;
  }
  .blog-pagination__btn {
    padding: 11px 20px;
    font-size: 0.78rem;
  }
  .blog-empty {
    padding: 60px 16px;
  }
  .blog-empty__title {
    font-size: 1.4rem;
  }
}

/* ===============================================
   RESPONSIVE — Mobile S (max 480px)
   Vertikalni layout: planeti gore (djelomično), tekst puni ekran
   =============================================== */
@media (max-width: 480px) {
  .blog-hero-section.homepage {
    height: auto;
    min-height: 0;
    padding-bottom: 40px;
    overflow: hidden;
  }
  /* Vertikalni layout — planeti gore, tekst ispod */
  .blog-hero-section .homepage__container {
    flex-direction: column !important;
    padding: 0 !important;
    height: auto !important;
  }
  /* Planeti — smanjeni kontejner, samo djelomično vidljivi gore */
  .blog-hero-section .homepage__images-container {
    width: 100% !important;
    min-height: 0 !important;
    height: 220px !important;
    margin-top: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    margin-left: 0;
  }
  .blog-hero-section .homepage__img--jupiter {
    width: 58vw !important;
    height: 58vw !important;
    left: -5% !important;
    top: 0 !important;
    transform: rotate(45deg) !important;
  }
  .blog-hero-section .homepage__img--mercury {
    width: 30vw !important;
    height: 30vw !important;
    left: 52% !important;
    top: 5% !important;
    bottom: unset !important;
    transform: none !important;
  }
  /* Tekst — puna širina s paddingom */
  .blog-hero-section .homepage__content-container.blog-hero__content {
    width: 100% !important;
    padding: 0 !important;
    margin-top: 0 !important;
    align-self: auto;
  }
  .blog-hero-section .blog-hero__eyebrow {
    margin-left: 24px !important;
  }
  .blog-hero__title {
    font-size: 26px !important;
    margin: 8px 0 8px 24px !important;
  }
  .blog-hero__subtitle {
    font-size: 1rem !important;
    line-height: 1.4em !important;
    margin: 8px 24px 16px 24px !important;
  }
  .blog-hero-section .blog-hero__chips {
    padding: 0 24px !important;
  }
  .blog-chip {
    height: 26px;
    padding: 0 10px;
    font-size: 0.55rem;
    letter-spacing: 0.8px;
  }
  .blog-card__image {
    height: 180px;
  }
  .blog-card__body {
    padding: 14px;
  }
  .blog-card__author-name {
    display: none;
  }
  .blog-pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .blog-pagination__btn {
    justify-content: center;
    padding: 12px 16px;
  }
}
