.rounders{
	border-radius:20px!important;
}
/*CAPTION*/
.machine-image figcaption,
.machine-image .wp-caption-text,
.machine-image .image-caption,
.wp-caption-text{
  margin-top:8px;
  font-size:16px;
  line-height:1.5;
  font-style:italic;
  color:#303030;
  font-weight:500;
  text-align:center;
}
/* =====================================================
   HERO ROOT
===================================================== */

.optimized-hero{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 560px;
  width: 100%;

  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;

  overflow: hidden;
}


/* =====================================================
   HERO DARK OVERLAY
===================================================== */

.optimized-hero::before{
  content:"";
  position:absolute;
  inset:0;

  background: rgba(0,0,0,0.45);

  z-index:1;
}


/* =====================================================
   HERO INNER WRAP
===================================================== */

.optimized-hero__inner{
  position:relative;
  z-index:1;
  text-align:center;
  padding:20px;
}



/* =====================================================
   TEXT PANEL — HARD FIX
===================================================== */

.optimized-hero__textpanel{

  position:relative;
  z-index:2;

  display:inline-block;

  background-color: #000000;
  opacity: 0.7;

  padding: 15px 20px;

  border-radius: 16px;

  max-width: 900px;
  margin: 0 auto 35px auto;

  text-align:center;

  box-sizing:border-box;
}


/* =====================================================
   TITLE
===================================================== */

.optimized-hero__title{
  font-family:'Raleway', sans-serif;
  font-weight:600;

  font-size:56px;
  line-height:1.15;

  color:#ffffff;

  margin:0 0 18px 0;
}


/* =====================================================
   SUBTITLE
===================================================== */

.optimized-hero__subtitle{
  font-family:'Raleway', sans-serif;
  font-weight:400;

  font-size:20px;
  line-height:1.6;

  color:#ffffff;

  margin:0;
}



/* =====================================================
   CTA
===================================================== */

.optimized-hero__cta{
  display:flex;
  justify-content:center;
  gap:18px;
}



/* BUTTONS */

.btn{
  padding:14px 28px;
  border-radius:10px;
  text-decoration:none;
}

.btn--primary{
  background:#ffffff;
  color:#000;
 font-weight:700;
font-size:20px;
    text-decoration: none !important;
}

.btn--secondary{
  background:#167bac;
  color:#fff;
   font-weight:700;
font-size:20px;
    text-decoration: none !important;
}
.btn--secondary:hover{
	color:#e1e1e1;
}


/* =====================================================
   MAIN CONTENT
===================================================== */

.optimized-content {

  padding-top: 100px;
  padding-bottom: 50px;

  font-family: 'Raleway', sans-serif;
  font-size:20px;
}


/* CONTENT TYPOGRAPHY */

.optimized-content h2 {
  font-size: 32px;
  margin-bottom: 25px;
}

.optimized-content p {
  line-height: 1.8;
  margin-bottom: 18px;
}


/* =====================================================
   FAQ SECTION
===================================================== */

.optimized-faq {

  padding: 0px 0;
}

.optimized-faq h2 {
  text-align: center;
  margin-bottom: 50px;
}


.faq-item {
  margin-bottom: 30px;
}


.faq-question {
  font-size: 20px;
  font-weight: 600;
}


.faq-answer {
  margin-top: 10px;
  line-height: 1.7;
}


/* =====================================================
   FINAL CTA
===================================================== */

.optimized-final-cta {

  background: #f7f7f7;
  padding: 100px 0;
  margin-top: 70px;

  text-align: center;
}

.optimized-final-cta h2 {
  margin-bottom: 20px;
}

.optimized-final-cta p {
  margin-bottom: 25px;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
}


/* =====================================================
   RESPONSIVE HERO HEIGHTS
===================================================== */

/* Desktop XL */
@media (min-width: 1400px) {
  .optimized-hero {
    min-height: 680px;
  }
}


/* Desktop */
@media (max-width: 1399px) {
  .optimized-hero {
    min-height: 560px;
  }
}


/* Tablet */
@media (max-width: 1024px) {

  .optimized-hero {
    min-height: 480px;
  }

  .optimized-hero__title {
    font-size: 40px;
  }
}


/* Mobile */
@media (max-width: 768px) {

  .optimized-hero {
    min-height: 420px;
  }

  .optimized-hero__textpanel {
    padding: 25px 22px;
  }

  .optimized-hero__title {
    font-size: 28px;
  }

  .optimized-hero__subtitle {
    font-size: 16px;
  }

  .optimized-hero__cta {
    flex-direction: column;
  }
}
/* =====================================================
   RESTORE LIST STYLES (ordered lists)
===================================================== */

.page-template-optimized-page .optimized-content ol {
  list-style: decimal;
  padding-left: 22px;
  margin: 18px 0;
  font-weight:600;
}

.page-template-optimized-page .optimized-content ol li {
  margin-bottom: 8px;
}

/* =====================================================
   TABLE OF CONTENTS – FINAL
   Optimized spacing + readability + hover UX
===================================================== */

.toc-section {

  /* Background & stil ostaje */
  background: #f7f7f7;
  padding: 28px 32px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);

  /* KLJUČNO — širina */
  display: inline-block;
  width: auto;
  max-width: 100%;

  /* Poravnanje */
  margin-top: 20px;
  margin-bottom: 30px;

}


/* Ali da se lomi na mobile */

@media (max-width: 768px) {

  .toc-section {
    display: block;
    width: 100%;
    white-space: normal;
  }

}

/* Naslov sekcije */

.toc-section h2 {
  font-size: 24px;
  margin-bottom: 18px;
  color: #000;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
}

/* Lista */

.toc-list {
  white-space: normal;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Stavke */

.toc-list li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  line-height: 1.5;
}

.toc-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Link */

.toc-list a {
  display: inline-block;
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;
  color: #167bac;
  transition: all 0.25s ease;
  position: relative;
  padding-left: 18px;
  font-family: 'Raleway', sans-serif;
}

/* Arrow indikator */

.toc-list a::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 18px;
  color: #167bac;
  transition: transform 0.25s ease;
}

/* Hover */

.toc-list a:hover {
  color: #0e5f86;
}

.toc-list a:hover::before {
  transform: translateX(4px);
}



/* =====================================================
   HERO → TOC SPACING FIX
===================================================== */

.optimized-hero {
  margin-bottom: 0 !important;
}

.optimized-content {
  padding-top: 30px;
}



/* =====================================================
   MOBILE OPTIMIZATION
===================================================== */

@media (max-width: 768px) {

  .toc-section {
    padding: 22px 20px;
    margin-top: 15px;
    margin-bottom: 25px;
  }

  .toc-section h2 {
    font-size: 20px;
  }

  .toc-list a {
    font-size: 16px;
  }

}


/* =====================================================
   POVEZANE USLUGE / SIMILAR CONTENT
===================================================== */

.related-services {
  background: #ffffff;
  padding-top: 0px;
  padding-bottom: 40px;
  border-radius: 14px;
  margin: 10px 0;
}

.related-services h2 {
  margin-bottom: 25px;
  font-size: 26px;
  color: #000;
}
/* Centriranje teksta u related karticama */

.related-services li {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.related-services a {
  width: 100%;
  text-align: center;
}
/* GRID layout */

.related-services ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

/* ITEM BOX */

.related-services li {
  background: #f7f7f7;
  padding: 18px 22px;
  border-radius: 10px;
  transition: all 0.25s ease;
  border: 1px solid rgba(0,0,0,0.05);
}

.related-services li:hover {
  background: #167bac;
  transform: translateY(-3px);
}

/* LINK */

.related-services a {
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;
  color: #000;
  display: block;
  transition: color 0.25s ease;
}

.related-services li:hover a {
  color: #ffffff;
}



/* =====================================================
   MOBILE SPACING FIX
===================================================== */

@media (max-width: 768px) {

  .toc-section,
  .related-services {
    padding: 25px 20px;
  }

  .toc-list a,
  .related-services a {
    font-size: 16px;
  }

}
/* =====================================================
   GLOBAL MOBILE OVERFLOW FIX
   Images + Tables + FAQ + Content
===================================================== */

/* --- GLOBAL CONTAINER SAFETY --- */

.optimized-content,
.optimized-content * {
  box-sizing: border-box;
  max-width: 100%;
}


/* =====================================================
   IMAGES FIX
===================================================== */

/* Sve slike */

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

/* Gutenberg / WP figure */

.optimized-content figure {
  max-width: 100%;
  margin: 0 auto 25px;
}

.optimized-content figure img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Side-by-side columns fix */

.wp-block-columns {
  flex-wrap: wrap !important;
}

.wp-block-column {
  flex-basis: 100% !important;
  max-width: 100% !important;
}

/* =====================================================
   TABLES FIX (Machine specs)
===================================================== */

.optimized-content table {
  width: 100%;
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}

/* =====================================================
   FAQ FIX
===================================================== */

.optimized-faq {
  max-width: 100%;
  overflow: hidden;
}

.faq-list {
  width: 100%;
}

.faq-item {
  width: 100%;
  max-width: 100%;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 10px;
  background: #f7f7f7;
  box-sizing: border-box;
}

/* Question */

.faq-question {
  font-size: 18px;
  margin-bottom: 10px;
}

/* Answer */

.faq-answer {
  font-size: 16px;
  line-height: 1.6;
}

/* =====================================================
   MOBILE HARD FIX
===================================================== */

@media (max-width: 768px) {

  /* Content padding */

  .optimized-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  /* Images spacing */

  .optimized-content img {
    margin-bottom: 20px;
  }

  /* FAQ padding mobile */

  .faq-item {
    padding: 16px;
  }

}

/* =========================================
   CONTENT LIST OVERRIDE (EDM + SEO pages)
========================================= */

.optimized-content ul,
.optimized-content ol {
    margin: 1.2rem 0 1.6rem 1.6rem;
    padding-left: 1.2rem;
}

.optimized-content ul li,
.optimized-content ol li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    font-size: 20px;
    font-family: 'Raleway', sans-serif;
}

.page-template-optimized-page .optimized-content ol li{
	margin: 1.2rem 1.6rem;
    padding-left: 1.2rem;
}

/* Remove overly tight global resets 
.optimized-content ul li:last-child,
.optimized-content ol li:last-child {
    margin-bottom: 0;
}

/* Nested lists (ako se pojave) 
.optimized-content ul ul,
.optimized-content ol ol {
    margin-top: 0.6rem;
    margin-bottom: 0.8rem;
}

/* TOC specific – da ostane kompaktan 
.toc-list li {
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

/* Related services lista
.related-services ul {
    margin: 1rem 0 1.4rem 1.4rem;
}

.related-services ul li {
    margin-bottom: 0.6rem;
    line-height: 1.6;
}*/
/* =========================================
   BREADCRUMBS
========================================= */

.optimized-breadcrumbs {
    padding: 30px 0 10px;
}

.breadcrumbs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
	text-wrap:normal;
    gap: 8px;
    font-size: 14px;
    font-family: 'Raleway', sans-serif;
	padding-left:20px;
}

.breadcrumbs-list li {
    color:#167BAC;
}

.breadcrumbs-list li a {
    text-decoration: none;
    color:#167BAC;
	font-size:16px;
    transition: 0.2s ease;
}

.breadcrumbs-list li a:hover {
    text-decoration: underline;
}

.breadcrumbs-list li::after {
    content: "›";
    margin: 0 6px;
    color: #999;
}

.breadcrumbs-list li:last-child::after {
    content: "";
}

.breadcrumbs-list .current {
    font-weight: 600;
    color: #222;
}
/* =====================================================
   MACHINE BLOCKS
===================================================== */

.machine-block{
  display:grid;
  grid-template-columns: 2fr 2fr;
  gap:60px;
  align-items:start;
  margin:70px 0 40px 0;
}

.machine-text{
  min-width:0;
}

.machine-image{
  align-self:center;
  text-align:center;
}

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

/* =====================================================
   MACHINE SPECS TABLE
===================================================== */

.machine-specs{
  width:100%;
  border-collapse:collapse;
  margin-top:20px;
  font-size:15px;
}

.machine-specs tr{
  border-bottom:1px solid rgba(0,0,0,0.08);
}

.machine-specs tr:nth-child(odd){
  background:#f5f5f5;
}

.machine-specs tr:nth-child(even){
  background:#ffffff;
}

.machine-specs td{
  border:1px solid #e3e3e3;
  padding:10px 14px;
}

.machine-specs td:first-child{
  font-weight:600;
  color:#333;
  width:45%;
}

.machine-specs td:last-child{
  color:#555;
  text-align:right;
  font-weight:600;
}

/* =====================================================
   MOBILE
===================================================== */

@media (max-width:900px){

  .machine-block{
    grid-template-columns:1fr;
    gap:30px;
  }

  .machine-image{
    order:2;
  }

  .machine-text{
    order:1;
  }

  .machine-image img{
    width:100%;
    max-width:100%;
    height:auto;
  }

}

@media (max-width:768px){

  .machine-block{
    gap:24px;
    margin:50px 0;
  }

  .machine-image figcaption,
  .machine-image .wp-caption-text,
  .machine-image .image-caption{
    font-size:13px;
    margin-top:6px;
  }
	
  .machine-specs-wrap{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  .machine-specs{
    width:max-content;
    min-width:100%;
    table-layout:auto;
    font-size:14px;
  }

	.machine-specs td{
	  padding:8px 10px;
	  white-space:nowrap;
	}

  .machine-specs td:first-child,
  .machine-specs td:last-child{
    width:auto;
  }
}
/* =====================================================
   MACHINE IMAGE MOBILE OVERFLOW FIX
===================================================== */

.machine-block,
.machine-text,
.machine-image {
  min-width: 0;
}

.machine-image {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.machine-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.machine-image figure {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.machine-image figcaption,
.machine-image .wp-caption-text,
.machine-image .image-caption {
  max-width: 100%;
  padding-left: 8px;
  padding-right: 8px;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .machine-block {
    grid-template-columns: 1fr;
    gap: 30px;
    overflow: hidden;
  }

  .machine-image {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
  }

  .machine-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}
.rel-links{
	color:#167BAC;
}
/* =====================================================
   MACHINE THUMBNAILS – 3 COLUMNS
===================================================== */

.machine-thumbs{
  margin:25px 0 10px;
}

.machine-thumbs + p{
  margin-top:0;
}
.machine-thumbs-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:24px;
}
.machine-park-link{
  margin-top:10px;
}

.machine-park-link a{
  text-decoration:none;
}
.machine-thumb{
  text-align:center;
}

.machine-thumb img{
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  border-radius:16px;
}

.machine-thumb-caption{
  margin-top:10px;
  font-size:14px;
  line-height:1.5;
  font-style:italic;
  color:#303030;
}
.machine-thumbs + p:empty,
.machine-thumbs + p:empty + p:empty{
  display:none;
  margin:0;
  padding:0;
}
@media (max-width:900px){
  .machine-thumbs-grid{
    grid-template-columns:1fr;
    gap:20px;
  }
}
.machine-thumbs-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:24px;
  align-items:stretch;
}

.machine-thumb{
  display:flex;
  flex-direction:column;
  height:100%;
}

.machine-thumb img{
  width:100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display:block;
  border-radius:16px;
}

.machine-thumb-caption{
  margin-top:10px;
}
.machine-thumb-caption{
  min-height:48px;
}

/* =====================================================
   MACHINE THUMBNAILS – 1 COLUMN MOBILE OVERRIDE
===================================================== */

@media (max-width: 768px) {

  .machine-thumbs-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .machine-thumb {
    width: 100% !important;
    max-width: 100% !important;
  }

  .machine-thumb img,
  .machine-thumb .wp-caption,
  .machine-thumb .wp-caption img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  .machine-thumb-caption,
  .machine-thumb .wp-caption-text {
    text-align: center;
  }
}
/* =====================================================
   MOBILE HERO OFFSET FIX
   Prevent hero content from going under fixed header
===================================================== */

@media (max-width:420px){

  .optimized-hero{
    padding-top:82px !important;
    box-sizing:border-box;
  }

  .optimized-hero__inner{
    padding-top:20px !important;
  }

}