/*
Theme Name: Rovespieros
Theme URI: https://www.rovespieros.gr
Author: Demetrio Hondros
Author URI: https://www.rovespieros.gr
Description: Custom theme για το περιοδικό ΡΟΒΕΣΠΙΕΡΟΣ
Version: 3.2
License: GNU GPL v2+
Text Domain: rovespieros
*/
/* ========== 🧱 Variables ================== */
:root {
  /* 🎨 Colors */
  --meta-color: #666;
  --link-color: #002266;
  --color-yellow: #ff9900;
  --color-red: #ba0000;
  --color-blue-dark: #2c3753;
  --color-blue-hover: #0077aa;
  --header-bg-default: rgba(0, 0, 0, 0.5);
  --header-bg-shrink: rgba(0, 0, 0, 0.9);

  /* ✍️ Typography */
  --font-body: 'Noto Sans', sans-serif;
  --font-size-title: clamp(1.5rem, 2vw, 1.8rem);
  --font-size-meta: clamp(0.8rem, 1.5vw, 1.05rem);

  /* 🔁 Layout,  Header, Logo, Search */
  --container-max-width: 1200px;
  --logo-width-desktop: 150px;
  --logo-width-mobile: 100px;
  --search-size: 30px;
  --search-expanded-width: 160px;

  /* 🖼️ Media & Thumbnails */
  --slide-max-height: 250px;
  --slider-height: 550px;
  --secondary-thumb-height: 140px;
  
  --thumb-height-large: 175px;
  --thumb-height-medium: 100px;
  --thumb-height-small: 90px;
  --thumbs-slider-max-height: 100px;
  --main-slider-slide-height: 50vw;
  --tertiary-thumb-height: 100px;

 /* Box Shadows  */
  --box-shadow-strong: 8px 8px 15px rgba(0, 0, 0, 0.8);
  --box-shadow-dark: 0 4px 8px rgba(0,0,0,0.4);
  --box-shadow-light: 0 2px 4px rgba(0,0,0,0.1);

/* ========= Special Case: body ============= */
body.single,
body.page {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}
/* body.archive,
body.search,
body.category,
body.tag,
body.author {
  background-color: #000;
}*/
/* ========== 🔁 Reset & Base ================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: transparent;
  font-family: var(--font-body);
  line-height: 1.6;
  color: #111;
  width: 100%;
}
a {
  color: var(--link-color);
  text-decoration: none !important;
}
a:hover {
  text-decoration: none;
}
h1 a,
h2 a,
h3 a {
  color: var(--link-color);
}

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

.thumb img {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* ========== ⚠️ NO-JS-Warning ================ */
.no-js-warning {
  background: #c00;
  color: #fff;
  text-align: center;
  padding: 1rem;
  font-weight: bold;
}
/* ========🔄 Περιγραφή =========*/
.logo-overlay {
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 2px 6px;
  font-size: 0.85rem;
  font-weight: 500; 
  white-space: nowrap;
  border-radius: 4px;
  pointer-events: none;
}
/* ========🔄 Loader για Infinite Scroll =========*/

.infinite-loader {
  text-align: center;
  padding: 2rem;
  color: #fff;
  font-weight: bold;
  display: none;
}

/* ========Back to top =========*/
.scroll-to-top {
  position: fixed;
  bottom: 1rem;
  right: 0;
  width: 60px;
  height: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}
.scroll-to-top svg {
  width: 60px;
  height: auto;
  transition: width 0.3s ease;
}
.scroll-to-top.show {
  opacity: 0.8;
  visibility: visible;
  pointer-events: auto;
}
.scroll-to-top:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* ========== 📐 Layout ======================= */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

main {
  width: 100%;
}

.site-main,
.single-post,
.post-listing {
  max-width: 900px;
  margin: 0 auto;
}

/* ======== 🔙 Κουμπί επιστροφής ============== */
.go-back-wrapper {
  text-align: center;
  margin-top: 2rem;
}

.go-back-btn {
  background-color: var(--color-blue-dark);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  margin-bottom: 0;
  transition: background-color 0.3s ease;
}

.go-back-btn:hover {
  background-color: var(--color-red);
}

/* ========== 🖼️ Featured Image ============== */
.post-thumbnail img {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  max-height: 550px;
  object-fit: cover;
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: var(--box-shadow-light);
}

/* 📸 Το container που "κρατά" την εικόνα και το overlay */
.overlay-wrapper {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

/* 🖼️ Το link που περιέχει την εικόνα και το overlay */
.thumbnail-link {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}

/*  Η ίδια η εικόνα */
.thumbnail-link img {
  height: auto;
  border: 5px solid #111;
  border-radius: 4px;
  box-shadow: var(--box-shadow-light);
}

/* ========== 📄 Single Post View ============ */
.single-post {
  background: #fff;
  padding: 2rem;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: #000;
}

/* ======= ✍️ Επικεφαλίδες άρθρων & σελίδων μέσα στο περιεχόμενο ======= */
.single-post .entry-content h1,
.page .entry-content h1 {
  font-size: clamp(1.6rem, 2.5vw, 1.8rem);
}
.single-post .entry-content h2,
.page .entry-content h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.6rem);
}
.single-post .entry-content h3,
.page .entry-content h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.4rem);
}
.single-post .entry-content h1,
.single-post .entry-content h2,
.single-post .entry-content h3,
.page .entry-content h1,
.page .entry-content h2,
.page .entry-content h3 {
  text-align: center;
  color: #000;
  font-weight: bold;
  margin: 1.8rem 0 0.8rem;
  line-height: 1.4;
  padding: 0;
}

/* 📚 Πλήρης στοίχιση σε παραγράφους και blockquote */
.single-post .entry-content p,
.page .entry-content p,
.single-post .entry-content blockquote,
.page .entry-content blockquote {
  text-align: justify;
  text-justify: inter-word;
}
/* 🆕 Απόσταση μεταξύ παραγράφων */
.single-post .entry-content p,
.page .entry-content p {
  margin-bottom: 1.5rem; 
}
/* ❌ Αφαίρεση bold και italic από απλό περιεχόμενο */
.single-post .entry-content strong,
.single-post .entry-content b,
.single-post .entry-content em,
.single-post .entry-content i,
.page .entry-content strong,
.page .entry-content b,
.page .entry-content em,
.page .entry-content i {
  font-weight: normal;
  font-style: normal;
  color: #000;
}

/* ✅ Εξαίρεση: τα blockquote να κρατάνε τα πλάγια */
.single-post .entry-content blockquote em,
.page .entry-content blockquote em,
.single-post .entry-content blockquote i {
  font-style: italic;
}

/* 📝 Blockquotes Styling για άρθρα και σελίδες */
.single-post blockquote,
.page blockquote {
  border-left: 4px solid var(--color-blue-dark); 
  background: #f9f9f9;
  padding: 0 1.5rem;
  margin: 1rem auto;
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.8;
  color: #333;
  position: relative;
}

/* Αν θες να τονίσεις τον συγγραφέα του quote */
.single-post blockquote cite,
.page blockquote cite {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
  font-style: normal;
  text-align: right;
  color: #333;
}

/* 🔥 Σύνδεσμοι - Links */
.single-post .entry-content a,
.page .entry-content a {
  color: var(--link-color); 
  font-weight: bold;    
  text-decoration: none;
  transition: all 0.2s ease;
}
.single-post .entry-content a:hover,
.page .entry-content a:hover {
  color: var(--color-red);              
}

/* 🎨 Ενοποίηση χρώματος για inline στοιχεία */
.single-post .entry-content,
.page .entry-content {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #000;
  padding: 0 1.3rem
}

.single-post .entry-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;  
  font-size: 1rem;
  color: var(--meta-color);
  font-weight: bold;
  font-style: italic;
  text-align: center;
  margin-top: 1rem;
}
.single-post .entry-meta .byline {
  display: none; /* ⛔ Απόκρυψη συγγραφέα */
}
.single-post .post-tags {
  text-align: center;
}

.single-post .post-tags a {
  display: inline-block;
  background: var(--color-blue-dark);
  color: #fff;
  padding: 0.2rem 0.4rem;
  margin-bottom: 0.2rem;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: background 0.3s ease;
}

.single-post .post-tags a:hover {
  background: var(--color-red);
}
/* 📸 Εικόνες μέσα σε άρθρα και σελίδες */
.single-post .entry-content img,
.page .entry-content img,
.single-post .wp-caption img,
.page .wp-caption img,
.single-post figure.wp-block-image img,
.page figure.wp-block-image img {
  display: block;
  margin: 0 auto;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  float: none !important;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

/* 📦 Wrapper: figure και wp-caption */
.single-post .wp-caption,
.page .wp-caption,
.single-post figure.wp-caption,
.page figure.wp-caption {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden;
  margin: 1rem auto;
  text-align: center;
  display: block;
}

/* 📝 Λεζάντες εικόνων */
.single-post .wp-caption .wp-caption-text,
.page .wp-caption .wp-caption-text,
.single-post figure figcaption,
.page figure figcaption {
  font-size: 0.9rem;
  font-weight: bold;
  color: #555;
  margin-top: 0.3rem;
  text-align: center;
  line-height: 1.4;
}

/* Hover zoom effect */
.entry-content figure:hover img {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

/* 🎥 Κεντράρισμα & responsive για ενσωματωμένα βίντεο */
.single-post .entry-content iframe,
.single-post .entry-content video,
.single-post .entry-content .wp-block-embed,
.single-post .entry-content .wp-block-embed__wrapper {
  display: block;
  max-width: 100%;
  margin: 0 auto; /* κάθετο κενό + κεντράρισμα */
}

.single-post .entry-content iframe,
.single-post .entry-content video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: none;
}
/* ================🔳 Article Grid ==================*/
.archive-page .container {
  background-color: #fff;
}
.archive-title,
.page-title {
  background: var(--color-blue-dark); 
  color: #fff; 
  text-align: center;
  font-size: 1.5rem;
  padding: 0.7rem 0; 
  font-weight: bold; 
  margin: 0.5rem -1rem;
}

/*  Wrapper για τα posts */
.post-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

/* 🔲 Κάθε post */
.article-card {
  background-color: #eee;
  border-radius: 4px;
  padding: 0.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: filter 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}

/* 🔗 Ολόκληρη κάρτα clickable */
.article-card-link {
  text-decoration: none;
  display: block;
  padding: 0 1rem 1rem;
}
/* 🖼️ Εικόνα */
.article-thumb img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 5/3; 
  border: 2px solid #111; 
  box-shadow: 0 4px 8px rgba(0,0,0,0.3); 
  border-radius: 6px;
}
/* 📝 Τίτλος */
h2.article-title {
  font-size: 1rem;
  line-height: 1.3;
  margin: 0.5rem 0;
  text-align: center; 
}
h2.article-title a {
  text-decoration: none !important; 
}
/* 🕓 Μεταδεδομένα */
.article-meta {
  font-size: 0.85rem;
  color: var(--meta-color);
  text-align: center; 
}
/* ========== 🧩 Magazine Blocks ============== */
.title-center,
.title-side,
.title-tertiary {
  word-break: break-word;
  hyphens: auto;
}
.primary-article,
.secondary-article,
.tertiary-article,
.asym-primary,
.secondary-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Προσθήκη hover effect σε όλα */
.article-card:hover,
.primary-article:hover,
.secondary-article:hover,
.tertiary-article:hover,
.asym-primary:hover,
.secondary-item:hover {
  transform: scale(1.03);
  box-shadow: var(--box-shadow-dark);
}
/* ========== 🧱 2-Columns-Magazine ============ */
.double-category-block {
  margin: 2rem 0;
}
.double-category-block .two-columns { 
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1rem;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.category-title.category-link {
  display: block;
  padding: 0.5rem;
  background-color: var(--color-blue-dark);
  color: #fff !important;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 2rem;
  transition: all 0.2s ease;

}
.category-title.category-link:hover {
  color: var(--color-red) !important;
}
.category-column {
  background: #111;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow-y: hidden;
  position: relative;
  margin-top: 0;
}
/* Πρώτο άρθρο */
.category-column .primary-article {
  margin: 0 auto;
  width: 100%;
  border: none;
  margin-bottom: 3rem;
}
.primary-article .thumb.large-thumb {
  position: relative;
  height: 0;
  padding-top: 50%;
  overflow: visible !important; 
  border-radius: 6px;
  width: 100%;
  margin: 0;
  border: none;
}
.primary-article .thumb.large-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 5px solid var(--color-yellow);
  border-radius: 6px;
}
.primary-article .overlay-content {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
  color: #fff;
  z-index: 2;
}
.primary-article .overlay-title {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  margin: 0;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.primary-article .overlay-content .post-date-overlay {
  bottom:10px;
}
/* Δευτερεύοντα άρθρα */
.secondary-articles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem; /* Αύξηση απόστασης από πρώτο άρθρο */
}
.secondary-article {
  background: #111;
  padding: 0;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.secondary-article a {
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
  border: none;
}
.secondary-article .thumb.small-thumb {
  width: 100%;
  height: auto;
  overflow: visible !important;
  border-radius: 6px;
  position: relative;
  margin-bottom: 0.3rem;
  border: 2px solid #fff;
}
.secondary-article .thumb.small-thumb img {
  height: 120px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 6px;
}
.secondary-article .title-side {
  font-size: clamp(0.95rem, 2.3vw, 1.1rem);
  color: #eee;
  line-height: 1.4;
  font-weight: 700;
  text-align: center;
  margin-top: 0.7rem; /* Αύξηση απόστασης από την εικόνα */
}
/* Τριτεύοντα άρθρα */
.tertiary-articles {
  margin-top: 1.5rem;
}
.tertiary-articles .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.4rem;
}
.tertiary-article {
  background: #111;
  padding: 0.6rem;
  border-radius: 8px;
  transition: transform 0.2s ease, background 0.2s ease;
  position: relative;
}
.tertiary-article a {
  text-decoration: none;
  color: inherit;
  display: block;
}
.tertiary-article .thumb.xsmall-thumb {
  width: 100%;
  height: auto;
  overflow: visible !important; 
  border-radius: 6px;
  margin-bottom: 0.5rem;
  position: relative;
  border: 1px solid #fff;
}
.tertiary-article .thumb.xsmall-thumb img {
  height: 70px;
  border-radius: 6px;
}
.tertiary-article .title-tertiary {
  font-size: 0.95rem;
  color: #eee;
  line-height: 1.4;
  text-align: center;
  border: none;
}
/* Κοινό στυλ για το overlay της ημερομηνίας */
.post-date-overlay {
  background-color: rgba(0, 0, 0, 0.6);
  position: absolute;
  bottom: 0;
  right: 5px;
  color: #fff;
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
  padding: 2px 6px;
  font-size: 0.7rem;
}

/* Διαφοροποίηση για τα τριτεύοντα άρθρα */
.tertiary-article .post-date-overlay {
  font-size: 0.7rem;
  padding: 2px 5px;
}

/* ========== 🧩 Asymmetrical Feature Block ========== */
.asymmetrical-feature-block {
  margin: 2rem auto;
  padding: 1rem;
  background: #111;
  border-radius: 12px;
}

/*  Κύριο πλέγμα: Πρώτο άρθρο (40%) + Δευτερεύοντα (60%) */
.asymmetrical-grid {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 1rem;
  align-items: start;
}

/* 🔹 Τίτλος κατηγορίας */
.asymmetrical-feature-block .category-header {
  grid-column: 1 / -1;
  text-align: center;
  padding-right: 1rem; /*Να μην ξεφεύγει δεξιά*/
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.asymmetrical-feature-block .category-title {
  font-size: 1.1rem;
  font-weight: bold;
  display: block;
  background-color: var(--color-blue-dark);
  color: #fff;
  border-radius: 6px;
  margin-bottom: 0;
  text-decoration: none;
}

/* 🔷 Πρώτο άρθρο (μεγάλη εικόνα με overlay) */
.asym-primary .large-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 10px solid var(--color-yellow);
}

.asym-primary .large-thumb img {
  height: 450px;
}

.asym-primary .overlay-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
  color: #fff;
  z-index: 1;
}

.asym-primary .overlay-title {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  font-weight: bold;
  margin: 0;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.6);
}

.asym-primary .post-date-overlay {
  font-size: 0.8rem;
  margin-top: 0.3rem;
  color: #ccc;
}

/* 🔸 Δευτερεύοντα άρθρα (2x2 grid) */
.asym-secondary-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
  padding-right: 1rem;
}

.secondary-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.secondary-item .small-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.secondary-item .small-thumb img {
  height: 150px;
}
.secondary-item .title-side {
  font-size: clamp(0.9rem, 2.3vw, 1.1rem);
  font-weight: bold;
  line-height: 1.4;
  color: #fff;
  text-align: center;
  margin-bottom: 1.5rem;
}

.secondary-item .post-date-overlay {
  position: absolute;
  bottom: 0.3rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
}
/* ==========  🔁  Reverse - Asymmetrical Feature Block ========== */
.asymmetrical-feature-block.reverse .asymmetrical-grid {
  grid-template-columns: 60% 40%;
  gap: 0;
}
.asymmetrical-feature-block.reverse .asym-primary {
  order: 2;
}
.asymmetrical-feature-block.reverse .asym-secondary-wrapper {
  order: 1;
}
.asymmetrical-feature-block .category-header {
  padding-right: 0.5rem;
}

/* ==============  🧱  Magazine Grid Block 🧱===================== */
.magazine-grid-block {
  background: var(--color-blue-dark);
  border-radius: 12px;
  padding: 0 1rem 2rem;
  margin: 2rem 0;
}
.magazine-grid-block  .category-header {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.magazine-grid-block  .category-header .category-title.category-link {
  background-color: var(--color-blue-dark);
  margin: 0;
}

.magazine-grid-block .grid-articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
  gap:  clamp(0.5rem, 2.3vw, 1.5rem);
}

.magazine-grid-block .grid-articles.single-row {
  grid-template-rows: auto;
  grid-auto-rows: 1fr;
  max-height: 100%; /* προαιρετικό */
  overflow: hidden;
}

.magazine-grid-block .article-card {
  text-align: center;
  background: var(--color-blue-dark);
  padding: 0;
}

.magazine-grid-block .article-card .thumb {
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  border: 2px solid #ccc;
}
.magazine-grid-block .article-card .thumb img {
  height: 130px;
}
.magazine-grid-block .article-card .title-center {
 font-size: clamp(0.9rem, 2.3vw, 1.1rem);
  font-weight: 700;
  margin-top: 0.5rem;
  color: #ddd;
}

.magazine-grid-block .article-card .date-center {
  font-size: 0.85rem;
  color: #aaa;
  margin-top: 0.2rem;
}
.magazine-grid-block  .category-icon svg,
.category-icon {
  display: inline-block;
  vertical-align: bottom;
  width: 1.7em;
  height: 1.7em;
  margin-right: 0.2rem;
}

