:root{
  --bd:#171D28;
  --blue:#0C4DA2;
  --deep:#041D3C;
  --card:#fff;
  --radius:14px;
  --shadow:0 10px 24px rgba(0,0,0,.12);
}

/* ===== GRID ===== */
.naujienos-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:30px;
  margin:40px 0;
}

@media (max-width: 900px){
  .naujienos-grid{
    grid-template-columns:1fr;
    gap:18px;
    margin:18px 0;
  }
}

/* ===== BASE CARD ===== */
.naujienos-item{
  background:var(--card);
  border:1px solid var(--bd);
  border-radius:var(--radius);
  padding:24px;
  transition:transform .25s ease, box-shadow .25s ease;
}

.naujienos-item:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow);
}

@media (max-width: 900px){
  .naujienos-item{ padding:16px; border-radius:12px; }
}

/* ===== FEATURED = PHOTO2 LAYOUT (image left, text right, button bottom) ===== */
.naujienos-item-featured{
  grid-column: 1 / -1;
  display:grid;
  grid-template-columns: minmax(0,.95fr) minmax(0,1.05fr);
  gap:26px;
  align-items:stretch;
  position:relative;
  overflow:visible; /* allow orbit dots */
}

/* Left image box */
.naujienos-featured-media{
  display:block;
  border-radius:12px;
  overflow:hidden;
  border:1px solid var(--bd);
  background:#0b1530;
  /* controls height so the first block DOES NOT take over the page */
  aspect-ratio: 4 / 3;
}

.naujienos-featured-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Right content */
.naujienos-featured-body{
  display:flex;
  flex-direction:column;
  gap:14px;
  min-width:0;
}

.naujienos-title{
  font-family:Inter,system-ui,Segoe UI,Roboto,Arial,sans-serif;
  text-transform:uppercase;
  font-weight:700;
  letter-spacing:.04em;
  color:#000;
  line-height:1.2;
  margin:0;
  font-size:1.4rem;
}

.naujienos-title a,
.naujienos-title a:hover,
.naujienos-title a:focus,
.naujienos-title a:visited{
  color:inherit;
  font-weight:700;
  text-decoration:none !important;
}

.naujienos-item-featured .naujienos-title{
  font-size:1.65rem;
}

.naujienos-excerpt{
  font-family:Archivo,system-ui,Arial,sans-serif;
  color:#000;
  font-weight:300;
  line-height:1.6;
  margin:0;
  font-size:1rem;

  /* no line-clamp -> no weird clipping */
  display:block;
  overflow:visible;
}
/* Push CTA to bottom like your sketch */
.naujienos-item-featured .val-news-cta{
  margin-top:auto;
  align-self:flex-start;
}

/* Mobile: stack (image on top, text below, button full width) */
@media (max-width: 900px){
  .naujienos-item-featured{
    grid-column: auto;
    grid-template-columns:1fr;
    gap:14px;
  }
  .naujienos-featured-media{
    aspect-ratio: 16 / 9;
  }
  .naujienos-item-featured .val-news-cta{
    width:100%;
    align-self:stretch;
  }
  .naujienos-item-featured .naujienos-title{ font-size:1.2rem; }
.naujienos-excerpt{
  font-size:.98rem;
  display:block;
  overflow:visible;
}
}

/* ===== NORMAL (non-featured) cards ===== */
.naujienos-image{
  display:block;
  width:100%;
  border-radius:12px;
  overflow:hidden;
  border:1px solid var(--bd);
  background:#0b1530;
  aspect-ratio: 16 / 10;
  margin-bottom:16px;
}
.naujienos-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.naujienos-content{ display:block; }
.naujienos-item:not(.naujienos-item-featured) .naujienos-title{ font-size:1.1rem; }

/* ===== CTA BUTTON (taken from your form behavior) ===== */
.val-news-cta{
  --wedge: 170px;
  --h: 44px;

  position:relative;
  display:flex;
  align-items:center;
  justify-content:flex-start;

  height:var(--h);
  border-radius:10px;
  overflow:hidden;

  text-decoration:none;
  background: linear-gradient(180deg, var(--blue) 0%, var(--deep) 100%);
  padding-left:34px;
  padding-right: calc(var(--wedge) + 16px);

  border:0;
  cursor:pointer;
}

/* text */
.val-news-cta-text{
  color:#fff;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size:14px;
  line-height:1;
  position:relative;
  z-index:2;
}

/* White wedge slides OUT on hover (so blue fills full button) */
.val-news-cta::after{
  content:"";
  position:absolute;
  top:0; right:0;
  width:var(--wedge);
  height:100%;
  background:#fff;
  clip-path: polygon(30% 0,100% 0,100% 100%,0 100%);
  z-index:1;
  transform: translateX(0);
  transition: transform .35s ease;
}

.val-news-cta:hover::after,
.val-news-cta:focus-visible::after{
  transform: translateX(calc(var(--wedge) + 10px));
}

/* right arrow holder */
.val-news-cta-right{
  position:absolute;
  top:0; right:0;
  width:var(--wedge);
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:2;
  transition: transform .35s ease;
}

.val-news-cta-right img{
  width:26px;
  height:26px;
  display:block;
  opacity:.85;
  transition: filter .35s ease, opacity .35s ease, transform .35s ease;
}

/* arrow reacts */
.val-news-cta:hover .val-news-cta-right{ transform: translateX(6px); }
.val-news-cta:hover .val-news-cta-right img{
  opacity:1;
  filter: invert(1);
  transform: translateX(2px);
}

.val-news-cta:focus-visible{
  outline: 3px solid rgba(12,77,162,.35);
  outline-offset: 3px;
}

/* mini version for normal cards */
.val-news-cta--mini{
  --wedge: 120px;
  --h: 40px;
  padding-left:18px;
  border-radius:8px;
}
.val-news-cta--mini .val-news-cta-text{ font-size:12px; }
.val-news-cta--mini .val-news-cta-right img{ width:20px; height:20px; }

/* ===== ORBIT DOTS (featured only) ===== */
.naujienos-item-featured{ position:relative; }

.val-orbit{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:9;
}

.val-orbit-dot{
  position:absolute;
  transform: translate(-50%, -50%);
}

.val-orbit-dot--big{
  width:35px;
  height:35px;
  border-radius:50%;
  background:var(--blue);
}

.val-orbit-dot--small{
  width:20px;
  height:20px;
  border-radius:50%;
  background:#cfd5de;
}

@media (max-width: 900px){
  .val-orbit-dot--big{ width:18px; height:18px; }
  .val-orbit-dot--small{ width:12px; height:12px; }
}

/* =========================
   FIX: stop mid-word breaking
   ========================= */
.naujienos-grid .naujienos-excerpt{
  word-break: normal !important;          /* kill break-all */
  overflow-wrap: break-word !important;  /* only break if absolutely needed */
  hyphens: auto;                          /* nicer breaks if browser supports LT */
}

/* =========================================
   FIX #1: Images always cover their box
   (prevents "empty band" under the image)
   ========================================= */
.naujienos-featured-media,
.naujienos-image{
  position:relative;
}

/* Force WP/theme img rules not to fight us */
.naujienos-featured-media img,
.naujienos-image img{
  position:absolute;
  inset:0;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  object-fit:cover;
  display:block;
}
/* =========================================
   FIX #2: No mid-word breaks
   ========================================= */
.naujienos-title,
.naujienos-excerpt{
  word-break: normal !important;
  overflow-wrap: normal !important; /* don't break inside words */
  hyphens: none !important;         /* prevents weird hyphenation splits */
}

/* Safety: on very tiny screens, allow breaking only if absolutely needed */
@media (max-width: 420px){
  .naujienos-excerpt{
    overflow-wrap: break-word !important;
  }
}
/* =========================================
   FIX #3A: Featured CTA pinned to bottom
   ========================================= */
.naujienos-featured-body{
  height:100%;
  align-self:stretch;
}

.naujienos-item-featured .val-news-cta{
  margin-top:auto; /* keep at bottom */
}
/* =========================================
   FIX #3B: Normal cards CTA pinned to bottom
   ========================================= */
.naujienos-item:not(.naujienos-item-featured){
  display:flex;
  flex-direction:column;
}

/* content area grows, CTA can stick to bottom */
.naujienos-content{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
}

.naujienos-item:not(.naujienos-item-featured) .val-news-cta{
  margin-top:auto;
  align-self:flex-start;
}

@media (max-width: 900px){
  .naujienos-item:not(.naujienos-item-featured) .val-news-cta{
    width:100%;
    align-self:stretch;
  }
}
/* Make CTA sit closer to the bottom edge */
.naujienos-item{
  padding: 24px 24px 16px; /* was 24px all around */
}

@media (max-width: 900px){
  .naujienos-item{
    padding: 16px 16px 12px; /* was 16px all around */
  }
}
/* =========================================
   ValovIT News Grid – CTA colors (global)
   Default: #0c4da2
   Hover:   #005a87
   ========================================= */

:root{
  --val-news-btn: #0c4da2;
  --val-news-btn-hover: #005a87;
}

/* override gradient -> solid color */
.val-news-cta{
  background: var(--val-news-btn) !important;
  transition: background-color .25s ease, transform .35s ease;
}

/* hover + keyboard focus */
.val-news-cta:hover,
.val-news-cta:focus-visible{
  background: var(--val-news-btn-hover) !important;
}


/* =========================================
   ValovIT News Grid – Pagination
   ========================================= */

.val-news-pagination{
  width:100%;
  display:flex;
  justify-content:center;
  margin:34px 0 10px;
}

.val-news-pagination ul{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  list-style:none;
  margin:0;
  padding:0;
}

.val-news-pagination li{
  margin:0;
  padding:0;
}

.val-news-pagination a,
.val-news-pagination span{
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--bd);
  border-radius:10px;
  background:#fff;
  color:#000;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size:14px;
  font-weight:600;
  line-height:1;
  text-decoration:none !important;
  transition:
    background-color .25s ease,
    color .25s ease,
    border-color .25s ease,
    transform .25s ease;
}

.val-news-pagination a:hover,
.val-news-pagination a:focus-visible{
  background:var(--val-news-btn-hover, #005a87);
  border-color:var(--val-news-btn-hover, #005a87);
  color:#fff;
  transform:translateY(-2px);
}

.val-news-pagination .current{
  background:var(--val-news-btn, #0c4da2);
  border-color:var(--val-news-btn, #0c4da2);
  color:#fff;
}

.val-news-pagination .prev,
.val-news-pagination .next{
  font-size:24px;
  font-weight:400;
  padding-bottom:3px;
}

@media (max-width: 900px){
  .val-news-pagination{
    margin:26px 0 4px;
  }

  .val-news-pagination ul{
    gap:6px;
  }

  .val-news-pagination a,
  .val-news-pagination span{
    width:38px;
    height:38px;
    border-radius:9px;
    font-size:13px;
  }
}

/* =========================================
   ValovIT News Grid – CTA green color
   ========================================= */

:root{
  --val-news-btn: #5fab0b;
  --val-news-btn-hover: #4f9308;
}

.val-news-cta{
  background: #5fab0b !important;
}

.val-news-cta:hover,
.val-news-cta:focus-visible{
  background: #4f9308 !important;
}

/* Remove theme underline from news CTA buttons */
.val-news-cta,
.val-news-cta:hover,
.val-news-cta:focus,
.val-news-cta:focus-visible,
.val-news-cta:active,
.val-news-cta:visited,
.val-news-cta *,
.val-news-cta:hover *,
.val-news-cta:focus *,
.val-news-cta:focus-visible *{
  text-decoration: none !important;
}

/* =========================
   HOMEPAGE FEATURED SHORTCODE
   ========================= */
:root{
  --val-news-blue:#0c4da2;
  --val-news-blue-hover:#005a87;
  --val-news-text:#0b1d3a;
  --val-news-shadow-lg:0 24px 60px rgba(11,29,58,.10);
}

.val-news-home{
  display:grid;
  grid-template-columns:minmax(0, 1.45fr) minmax(320px, .9fr);
  gap:28px;
  align-items:stretch;
  margin:40px 0;
}

.val-news-home__featured{
  position:relative;
  min-height:680px;
  border-radius:28px;
  overflow:visible;
  background:transparent !important;
  border:0 !important;
  outline:0 !important;
  box-shadow:var(--val-news-shadow-lg);
  isolation:isolate;
}

.val-news-home__featured::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(180deg, rgba(8,20,47,.24) 0%, rgba(8,20,47,.34) 38%, rgba(8,20,47,.78) 100%);
  z-index:2;
  pointer-events:none;
}

.val-news-home__featured-bg{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  transform:none !important;
  border-radius:inherit;
  border:0 !important;
  outline:0 !important;
  z-index:1;
}

.val-news-home__featured-overlay{
  display:none !important;
}

.val-news-home__orbit{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:4;
}

.val-news-home__orbit-dot{
  position:absolute;
  transform:translate(-50%, -50%);
  border-radius:50%;
}

.val-news-home__orbit-dot--big{
  width:32px;
  height:32px;
  background:var(--val-news-blue);
  box-shadow:0 0 0 10px rgba(12,77,162,.12);
}

.val-news-home__orbit-dot--small{
  width:18px;
  height:18px;
  background:#cfd5de;
  box-shadow:0 0 0 8px rgba(207,213,222,.18);
}

.val-news-home__featured-inner{
  position:relative;
  z-index:3;
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:clamp(26px, 3vw, 42px);
  width:100%;
  max-width:700px;
  min-width:0;
  box-sizing:border-box;
}

.val-news-home__featured-meta{
  display:inline-flex;
  align-self:flex-start;
  margin-bottom:16px;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  backdrop-filter:blur(10px);
  color:#fff;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.val-news-home__featured-title{
  margin:0 0 14px;
  width:100%;
  max-width:100%;
  min-width:0;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size:clamp(28px, 3vw, 48px);
  line-height:1.08;
  font-weight:700;
  display:block;
  overflow:visible !important;
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  hyphens:none !important;
}

.val-news-home__featured-title a{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  color:#fff;
  text-decoration:none;
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  hyphens:none !important;
}

.val-news-home__featured-title a,
.val-news-home__featured-title a:visited,
.val-news-home__featured-title a:hover,
.val-news-home__featured-title a:focus,
.val-news-home__featured-title a:active{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  color:#fff !important;
  text-decoration:none;
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  hyphens:none !important;
}

.val-news-home__featured-title a:hover,
.val-news-home__featured-title a:focus{
  color:#fff !important;
  opacity:.92;
}

.val-news-home__featured-excerpt{
  max-width:58ch;
  min-width:0;
  color:rgba(255,255,255,.92);
  font-family:Archivo, Inter, system-ui, Arial, sans-serif;
  font-size:16px;
  line-height:1.65;
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  hyphens:none !important;
  color:#fff;
}

.val-news-home__featured-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:24px;
}

.val-news-home__btn,
.val-news-home__ghost{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:0 22px;
  border-radius:999px;
  text-decoration:none;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size:14px;
  font-weight:700;
  transition:transform .18s ease, opacity .18s ease, background .18s ease, border-color .18s ease;
}

.val-news-home__btn,
.val-news-home__btn:visited,
.val-news-home__btn:hover,
.val-news-home__btn:focus{
  color:#fff !important;
}

.val-news-home__ghost,
.val-news-home__ghost:visited,
.val-news-home__ghost:hover,
.val-news-home__ghost:focus{
  color:#fff !important;
}

.val-news-home__btn{
  background:var(--val-news-blue);
}

.val-news-home__ghost{
  border:1px solid rgba(255,255,255,.36);
  background:rgba(255,255,255,.06);
  backdrop-filter:blur(6px);
}

.val-news-home__btn:hover,
.val-news-home__ghost:hover{
  transform:translateY(-1px);
}

.val-news-home__side{
  display:flex;
  flex-direction:column;
  padding:28px;
  border-radius:28px;
  background:#fff;
  box-shadow:var(--val-news-shadow-lg);
}

.val-news-home__side-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.val-news-home__side-title{
  margin:0;
  color:var(--val-news-text);
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size:clamp(26px, 2vw, 38px);
  line-height:1.05;
  font-weight:700;
}

.val-news-home__side-link{
  color:var(--val-news-blue);
  text-decoration:none;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size:14px;
  font-weight:700;
  white-space:nowrap;
}

.val-news-home__list{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.val-news-home__item{
  display:grid;
  grid-template-columns:132px minmax(0, 1fr);
  gap:16px;
  align-items:center;
  padding:14px 0;
  border-top:1px solid rgba(11,29,58,.08);
}

.val-news-home__item:first-child{
  border-top:0;
  padding-top:0;
}

.val-news-home__item-thumb{
  display:block;
  border-radius:18px;
  overflow:hidden;
  background:#eef3fa;
  aspect-ratio:1.15 / 1;
}

.val-news-home__item-thumb img,
.val-news-home__item-thumb-fallback{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.val-news-home__item-thumb-fallback{
  background:linear-gradient(135deg, #dce7f7 0%, #eef3fa 100%);
}

.val-news-home__item-body{
  min-width:0;
}

.val-news-home__item-date{
  display:inline-flex;
  align-self:flex-start;
  margin-bottom:10px;
  padding:5px 10px;
  border-radius:999px;
  background:#f3f6fb;
  color:#7b8ca8;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size:11px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.val-news-home__item-title{
  margin:0 0 12px;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size:24px;
  line-height:1.2;
  font-weight:700;
  word-break:normal !important;
  overflow-wrap:normal !important;
  hyphens:none !important;
}

.val-news-home__item-title a{
  color:var(--val-news-text);
  text-decoration:none;
  word-break:normal !important;
  overflow-wrap:normal !important;
  hyphens:none !important;
}

.val-news-home__item-read{
  color:var(--val-news-blue);
  text-decoration:none;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size:14px;
  font-weight:700;
}

@media (max-width: 1200px){
  .val-news-home{
    grid-template-columns:1fr;
  }

  .val-news-home__featured{
    min-height:600px;
  }

  .val-news-home__featured-inner{
    max-width:100%;
  }

  .val-news-home__item-title{
    font-size:21px;
  }
}

@media (max-width: 767px){
  .val-news-home{
    gap:18px;
    margin:18px 0;
  }

  .val-news-home__featured{
    min-height:500px;
    border-radius:22px;
  }

  .val-news-home__side{
    padding:20px;
    border-radius:22px;
  }

  .val-news-home__featured-inner{
    padding:22px;
    max-width:100%;
  }

  .val-news-home__featured-title{
    font-size:clamp(26px, 7vw, 40px);
    line-height:1.08;
  }

  .val-news-home__featured-excerpt{
    font-size:16px;
    line-height:1.65;
  }

  .val-news-home__side-head{
    align-items:flex-start;
    flex-direction:column;
    margin-bottom:10px;
  }

  .val-news-home__item{
    grid-template-columns:96px minmax(0, 1fr);
    gap:14px;
  }

  .val-news-home__item-title{
    font-size:18px;
  }

  .val-news-home__orbit-dot--big{
    width:24px;
    height:24px;
  }

  .val-news-home__orbit-dot--small{
    width:14px;
    height:14px;
  }
}
