/* ==========================================================
   ANKA Newsletters Module - CSS (CSS Grid Version)
   ========================================================== */

/* Βασικός Περιέκτης */
.anka-newsletters-wrapper {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 60px;
  margin-top: 40px;
  font-family: inherit;
}

/* --- ΕΠΙΚΕΦΑΛΙΔΑ --- */
.nl-main-header {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-bottom: 30px;
  width: 100%;
}

.nl-main-header .nl-header-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: #000;
}

.nl-main-header::before,
.nl-main-header::after {
  content: "";
  height: 8px;
  /* background-color: #4a72c7; */
  background-color: #496645;
}

.nl-main-header::before {
  width: 60px;
}

.nl-main-header::after {
  flex-grow: 1;
}

/* --- 1. HERO SECTION (Το μεγάλο πρόσφατο) --- */
.nl-hero-section {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
}

.nl-hero-info {
  flex: 1 1 40%;
}

/* Κείμενο */
.nl-hero-info p {
  font-size: 1.15rem;
  text-align: justify;
  line-height: 1.8;
  padding-right: 10px;
  margin-bottom: 1.5rem;
  color: #333333;
}

.nl-hero-info p:last-child {
  margin-bottom: 0;
}

/* Η κάρτα Hero (λειτουργεί και ως dFlip trigger) */
.nl-hero-card {
  flex: 1 1 55%;
  aspect-ratio: 16 / 9; /* Διατηρεί αναλογία παρουσίασης / A4 Landscape */
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden;
}

.nl-hero-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* --- 2. CSS GRID (Μικρά τεύχη - Πρώην Swiper) --- */
.nl-grid-container {
  display: grid;
  grid-template-columns: 1fr; /* Κινητά: 1 στήλη */
  gap: 40px;
  margin-top: 30px;
}

/* Tablets (iPad κλπ): 2 στήλες και για τα δύο Layouts */
@media (min-width: 768px) {
  .nl-grid-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
  }
}

/* Desktop: ΕΔΩ ΚΑΝΟΥΜΕ ΤΟΝ ΔΙΑΧΩΡΙΣΜΟ */
@media (min-width: 992px) {
  /* 1. Σελίδα Αρχείου (Archive Mode): 3 μεγάλες κάρτες ανά γραμμή */
  .nl-grid-container.archive-mode {
    grid-template-columns: repeat(3, 1fr);
    gap: 60px; /* Περισσότερος αέρας μεταξύ καρτών */
    margin-bottom: 50px;
    margin-top: 50px;
  }

  /* 2. Αρχική Σελίδα (Teaser Mode): 4 κάρτες ανά γραμμή (3 τεύχη + 1 CTA) */
  .nl-grid-container.teaser-mode {
    grid-template-columns: repeat(4, 1fr);
    gap: 30px; /* Μικρότερο κενό για να χωρέσουν και οι 4 όμορφα */
    margin-bottom: 0;
  }
}

.nl-thumb-card {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 6px;
  /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); */
  box-shadow: 0 0.5rem 1rem #0000006e;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden;
}

.nl-thumb-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* --- 3. DYNAMIC TEXT OVERLAY (HTML πάνω από το WebP) --- */
.nl-overlay-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 0.5fr 1.5fr 1.5fr;
  grid-template-rows: 0.5fr 2fr 0.5fr;
  gap: 0px 0px;
  box-sizing: border-box;
  padding: 2%;
  pointer-events: none;
}

/* Ο Αριθμός Τεύχους (π.χ. 35ο) */
.nl-title-top {
  grid-area: 1 / 1 / 2 / 2;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  /* color: #496645; */
  color: #d9933f;
  font-weight: 900;
  line-height: 1;
}

/* Η Ημερομηνία (π.χ. Ιούνιος 2026) */
.nl-date-bottom {
  grid-area: 3 / 1 / 4 / 3;
  display: flex;
  justify-content: center;
  align-items: center;
  /* color: #3b508d; */
   color: #d9933f;
  font-weight: 800;
  line-height: 1;
}

.nl-hero-card .nl-overlay-text .nl-title-top {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

.nl-hero-card .nl-overlay-text .nl-date-bottom {
  font-size: clamp(1.5rem, 4vw, 1.8rem);
}

.nl-grid-container.teaser-mode .nl-thumb-card .nl-overlay-text .nl-title-top {
  font-size: clamp(0.7rem, 4vw, 0.9rem);
}

.nl-grid-container.teaser-mode .nl-thumb-card .nl-overlay-text .nl-date-bottom {
  font-size: clamp(0.8rem, 4vw, 1rem);
}


.nl-grid-container.archive-mode .nl-thumb-card .nl-overlay-text .nl-title-top {
  font-size: clamp(0.7rem, 4vw, 1.4rem);
}

.nl-grid-container.archive-mode .nl-thumb-card .nl-overlay-text .nl-date-bottom {
  font-size: clamp(1rem, 4vw, 1.3rem);
}


/* --- 4. ΚΟΥΜΠΙ ΠΕΡΙΣΣΟΤΕΡΑ --- */
.nl-readmore-wrapper {
  display: flex;
  justify-content: flex-end; /* Το πάει στα δεξιά */
  align-items: center;
  margin-top: 10px;
  padding-top: 15px;
}

.nl-btn-readmore {
  background: linear-gradient(to bottom, #5b8add, #3b5998);
  color: #ffffff !important;
  padding: 8px 25px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: 1px solid #2d4678;
}

.nl-btn-readmore:hover {
  background: linear-gradient(to bottom, #6997e8, #486bb0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
  .nl-hero-section {
    flex-direction: column;
  }
  .nl-hero-card,
  .nl-hero-info {
    flex: 1 1 100%;
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* 1. Κρύβουμε το Grid στα κινητά */
  .nl-grid-container {
    display: none !important;
  }

  /* 2. Κεντράρουμε το κουμπί και του δίνουμε 100% πλάτος */
  .nl-readmore-wrapper {
    justify-content: center;
  }

  .nl-btn-readmore {
    width: 100%;
    text-align: center;
  }
}

/* =========================================
   NEWSLETTERS: TEASER & ARCHIVE MODES
========================================= */

/* --- Η "Κάρτα-Κουμπί" της Αρχικής (Teaser Mode) --- */
.nl-cta-card {
  text-decoration: none !important;
}

/* Το σκούρο overlay που μπαίνει πάνω από την εικόνα */
.nl-cta-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(240, 240, 240, 0.7);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);

  /* background-color: rgba(0, 0, 0, 0.75);  */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  transition: background-color 0.3s ease;
}

.nl-cta-card:hover .nl-cta-overlay {
  background-color: rgba(240, 240, 240, 0.5);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.nl-cta-icon {
  font-size: 4rem;
  color: #3a473b;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 10px;
}

.nl-cta-text {
  font-size: 1.1rem;
  color: #3a473b;
  font-weight: 600;
  line-height: 1.4;
}

/* --- Κουμπί Mobile (Εκτός Grid) --- */
.nl-mobile-btn-wrapper {
  display: none; /* Κρυφό στο Desktop */
  text-align: center;
  margin-top: 20px;
}

/* --- RESPONSIVE ΔΙΟΡΘΩΣΕΙΣ --- */
@media (max-width: 768px) {
  .nl-main-header {
    gap: 15px;
  }
  .nl-main-header::before {
    width: 30px;
  }
  .nl-main-header .nl-header-title {
    font-size: 1.4rem;
  }

  /* Κρύβουμε το Grid στα κινητά ΜΟΝΟ ΣΤΗΝ ΑΡΧΙΚΗ (Teaser) */
  .nl-grid-container.teaser-mode {
    display: none !important;
  }

  /* Εμφανίζουμε το κλασικό κουμπί */
  .nl-mobile-btn-wrapper {
    display: block;
  }
}

/* --- Σελίδα Αρχείου (Archive Mode): Κρύβουμε από το 7ο τεύχος και μετά --- */
.nl-grid-container.archive-mode .nl-thumb-card:nth-child(n + 7) {
  display: none;
}

/* Container για το JS Button (ίδιο με τα projects) */
.load-more-container {
  text-align: center;
  margin-top: 40px;
  clear: both;
}

/* --- Κουμπί 'Περισσότερα' (Load More JS) --- */
.nl-btn-loadmore {
  color: #496645; /* Το σκούρο πράσινο του LEADER για το κείμενο */
  background-color: transparent;
  border: 1px solid #496645; /* Το ίδιο πράσινο για το περίγραμμα */
  padding: 8px 30px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.nl-btn-loadmore:hover {
  background-color: #496645; /* Γεμίζει πράσινο στο hover */
  color: #ffffff; /* Το κείμενο γίνεται λευκό */
  box-shadow: 0 4px 10px rgba(73, 102, 69, 0.3); /* Πράσινη διακριτική σκιά */
}

/* --- 1.5 SUBSCRIBE BANNER --- */
.nl-subscribe-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* background-color: #f4f6fa;  */
  /* background-color: #f2f6f2;  */
  border-left: 15px solid #d9933f; /* d9933f 496645Σκούρο πράσινο LEADER */
  /* border-left: 10px solid #3861b9; */
  padding: 15px 25px;
  margin-top: 10px;
  border-radius: 15px;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); */
}

.nl-sub-text {
  font-size: 1.1rem;
  /* color: #3b508d; */
  color: #314a2e; /* Πιο βαθύ πράσινο για το κείμενο */
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nl-sub-btn {
  /* background: linear-gradient(to bottom, #5b8add, #3b5998); */
  background: linear-gradient(
    to bottom,
    #628a5c,
    #496645
  ); /* Πράσινο gradient */
  color: #fff !important;
  padding: 8px 25px;
  border-radius: 4px;
  text-decoration: none !important;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.nl-sub-btn:hover {
  transform: translateY(-2px);
  /* box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2); */
  background: linear-gradient(
    to bottom,
    #6a9664,
    #50704c
  ); /* Πιο φωτεινό στο hover */
}

/* Στα κινητά να μπαίνει το κουμπί κάτω από το κείμενο */
@media (max-width: 576px) {
  .nl-subscribe-banner {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
}
