body {
  background-color: #3a3a3d;
  background-image: linear-gradient(#3a3a3d, #2a2a2d);
  background-attachment: fixed;
  color: #F2F2F2;
  font-family: "Times New Roman", Times, serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ----- Header ----- */
header {
  padding: 10px 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.logo-link {
  text-decoration: none;
  color: inherit;
}

.header-container {
  display: flex;
  align-items: center;
  padding: 10px 20px;
}

.oval-image {
  width: 110px;
  height: 110px;
  border-radius: 60%;
  object-fit: cover;
  margin-right: 30px;
}

.title-text {
  font-size: 50px;
  font-weight: bold;
  color: red;
}

.subheader {
  color: #f0f0f0;
  font-size: 16px;
  font-style: italic;
  margin-top: 6px;
  margin-left: 70px;
}

.gif-container {
  display: flex;
  justify-content: center;
}

.gif-container img {
  width: 100%;
  max-width: 160px;
  height: auto;
}

nav {
  justify-self: end;
}

nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0 20px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: color 0.3s ease;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #FFD700;
  border-radius: 2px;
  transition: width 0.3s ease;
}

nav a:hover {
  color: #FFD700;
}

nav a:hover::after {
  width: 100%;
}

.contact-link {
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  padding-left: 20px;
  padding-right: 10px;
}

.contact-link::after {
  left: 20px;
}

.contact-link:hover::after {
  width: calc(100% - 30px);
}

/* ----- Διάταξη ----- */
main {
  flex: 1;
  padding: 30px 40px;
  max-width: 1860px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 2fr) 300px;
  gap: 30px;
  align-items: start;
  margin-right: 130px;
}

.content {
  margin-left: 210px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.sidebar-left {
  position: relative;
  left: 160px;
}

.widget {
  padding: 18px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 2px solid #FFD700;
  border-radius: 8px;
}

.widget h2 {
  margin: 0 0 14px;
  font-size: 24px;
  color: white;
}

.sidebar-left .widget {
  padding: 24px 50px;
  background: transparent;
  border-top: none;
}

.sidebar-left .widget h2 {
  margin: 0 0 20px;
  padding-bottom: 8px;
  border-bottom: 3px solid #FFD700;
  font-size: 27px;
  text-align: center;
  color: #e9d7a6;
}

/* ----- Κατηγορίες ----- */
.cat + .cat {
  margin-top: 24px;
}

.cat-title {
  display: block;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #FFD700;
  text-decoration: none;
  transition: background 0.3s ease;
  cursor: pointer;
}

.cat-title:hover {
  background: rgba(255, 255, 255, 0.2);
}

.school-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Πτυσσόμενα μενού */
.cat.dropdown .cat-title::after {
  content: " \203A";
  display: inline-block;
  float: right;
  transition: transform 0.3s ease;
}

.cat.dropdown .cat-list,
.cat.dropdown .school-columns {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

.cat.dropdown.open .cat-list,
.cat.dropdown.open .school-columns {
  max-height: 300px;
  opacity: 1;
  padding-top: 6px;
}

.cat.dropdown.open .cat-title::after {
  transform: rotate(90deg);
}

@media (hover: hover) {
  .cat.dropdown:hover .cat-list,
  .cat.dropdown:hover .school-columns {
    max-height: 300px;
    opacity: 1;
    padding-top: 6px;
  }

  .cat.dropdown:hover .cat-title::after {
    transform: rotate(90deg);
  }
}

.cat-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cat-list li {
  padding: 8px 2px;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.3);
}

.cat-list li:last-child {
  border-bottom: none;
}

.cat-list a {
  color: white;
  font-size: 18px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.cat-list a:hover {
  color: #FFD700;
  text-decoration: underline;
}

/* ----- Ρητά ----- */
.quote-carousel {
  position: relative;
  margin: 0 0 35px;
  padding: 0px 40px 0;
  color: #3b2a14;
  background:
    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04 0.9' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.32 0 0 0 0 0.15 0 0 0 0.35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #e9d7a6, #d9bf84 55%, #c9a76a);
  border-radius: 6px 14px 8px 16px / 14px 6px 16px 8px;
  box-shadow: inset 0 0 30px rgba(110, 76, 30, 0.45), 0 4px 12px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.quote-carousel::before {
  content: "\201C";
  position: absolute;
  top: -2px;
  left: 14px;
  font-size: 64px;
  line-height: 1;
  color: #8a5a1c;
  opacity: 0.4;
}

.quote-track {
  display: grid;
}

.quote-slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s;
}

.quote-slide.active {
  opacity: 1;
  visibility: visible;
}

.quote-slide blockquote {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: bold;
  font-style: italic;
  line-height: 1.35;
  color: #3b2a14;
}

.quote-slide cite {
  font-size: 14px;
  font-style: normal;
  letter-spacing: 1px;
  color: #7a1f1f;
}

.quote-dots {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 4px;
}

.quote-dots button {
  width: 8px;
  height: 8px;
  padding: 6px;
  background: #8a6a3a;
  background-clip: content-box;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.quote-dots button.active {
  background: #7a1f1f;
  background-clip: content-box;
  transform: scale(1.3);
}

/* ----- Άρθρα ----- */
.post {
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.3);
}

.post-title {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
}

.post-title a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-title a:hover {
  color: #FFD700;
}

.post-meta {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: bold;
  color: #b5b5ba;
}

.post-meta i {
  margin-right: 4px;
}

.post-body {
  display: flow-root;
}

.post-thumb {
  float: left;
  width: 110px;
  height: 90px;
  margin: 4px 18px 6px 0;
  padding: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  object-fit: cover;
}

.post-body p {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: #d8d8dc;
}

.read-more {
  color: #FFD700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}

.read-more:hover {
  text-decoration: underline;
}

/* ----- Σελιδοποίηση ----- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 35px;
}

.pagination a {
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

.pagination a:hover {
  color: #FFD700;
}

.pagination a.current {
  color: #FFD700;
  cursor: default;
}

/* ----- Modal PDF ----- */
.pdf-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}

.pdf-modal-content {
  background-color: #2a2a2d;
  width: 80%;
  max-width: 900px;
  height: 85vh;
  border: 1px solid #4a4a4f;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

.pdf-modal-body {
  flex: 1;
}

.pdf-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

/* ----- Φόρμα επικοινωνίας ----- */
.contact-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 35px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-title {
  margin-top: 0;
  margin-bottom: 25px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 32px;
  color: #FFFFFF;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 15px;
  font-weight: bold;
  color: #e2e2e6;
}

.form-group input,
.form-group textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #F2F2F2;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.form-group textarea {
  min-height: 160px;
  border-color: #b5b5ba;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #FFFFFF;
}

.submit-btn {
  align-self: flex-start;
  padding: 12px 30px;
  background-color: transparent;
  border: 2px solid #b5b5ba;
  border-radius: 6px;
  color: #FFFFFF;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.submit-btn:hover {
  background-color: #b5b5ba;
  border-color: #b5b5ba;
  color: #2a2a2d;
}

/* ----- Ποίημα ----- */
.poem-container {
  padding: 35px 40px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 3px solid #FFD700;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.poem-title {
  margin-top: 0;
  margin-bottom: 25px;
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 32px;
  color: #FFFFFF;
  text-align: left;
}

.poem-text {
  margin: 0;
  font-size: 19px;
  line-height: 1.8;
  color: #e2e2e6;
  white-space: pre-line;
  text-align: left;
}

.poem-footer {
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px dotted rgba(255, 255, 255, 0.2);
  font-size: 16px;
  font-style: italic;
  color: #d0d0d5;
  text-align: left;
}

/* ----- Πλήρες άρθρο ----- */
.full-article {
  padding: 30px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 2px solid #FFD700;
  border-radius: 8px;
}

.full-article h1 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 34px;
  color: #FFFFFF;
}

.full-article .post-meta {
  margin-bottom: 20px;
}

.full-article p {
  margin-bottom: 20px;
  font-size: 18px;
  line-height: 1.7;
  color: #d8d8dc;
  text-align: justify;
}

.article-img {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: 20px auto;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.english-quote {
  margin: 25px 0;
  font-style: italic;
  color: #e9d7a6;
  text-align: justify;
}

.quote-box {
  margin: 25px 10px 25px 0;
  padding: 10px 20px 5px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid #FFD700;
  border-radius: 0 8px 8px 0;
}

.quote-box p {
  font-style: italic;
  color: #e9d7a6;
  text-align: justify;
}

.references {
  margin-top: 35px;
  padding-top: 15px;
  border-top: 1px dotted rgba(255, 255, 255, 0.3);
  font-size: 15px;
  color: #FFFFFF;
  text-align: left;
}

.references ul {
  margin-top: 8px;
  padding-left: 20px;
}

.references li + li {
  margin-top: 5px;
}

.references a {
  color: #FFFFFF;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

.references a:hover {
  color: #FFD700;
}

/* ----- Άρθρο με εικόνες και τύπους (MathJax) ----- */
.article-img-center {
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;
  margin: 25px auto;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.article-img-center.img-1 {
  max-width: 400px;
}

.article-img-center.img-2 {
  max-width: 700px;
  height: 180px;
  object-fit: cover;
}

.full-article .eq {
  text-align: center;
}

.article-list {
  margin-bottom: 20px;
  padding-left: 20px;
  line-height: 1.7;
  color: #d8d8dc;
}

.quote-box-inner {
  padding: 15px 20px;
  background: #cccccc;
  border-radius: 6px;
  font-size: 17px;
  line-height: 1.6;
  color: #000;
}

mjx-container[display="true"] {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

/* ----- Δεξί sidebar ----- */
.sidebar-right {
  font-family: "Open Sans", Arial, sans-serif;
}

.sidebar-right .widget h2 {
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 20px;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cal-title {
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 17px;
  color: #FFD700;
}

.cal-header button {
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.cal-header button:hover {
  background: #FFD700;
  color: #000;
}

.cal-weekdays,
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.cal-weekdays span {
  padding: 4px 0;
  font-size: 12px;
  font-weight: bold;
  color: #aaa;
}

.cal-days span {
  margin: 1px;
  padding: 6px 0;
  font-size: 14px;
  border-radius: 50%;
}

.cal-days span.weekend {
  color: #b5b5ba;
}

.cal-days span.today {
  background: #FFD700;
  color: #000;
  font-weight: bold;
}

.cal-today-btn {
  display: block;
  margin: 10px auto 0;
  padding: 4px 12px;
  background: transparent;
  border: none;
  color: #FFD700;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.cal-today-btn span {
  font-weight: normal;
  opacity: 0.85;
}

.cal-today-btn:hover {
  text-decoration: underline;
}

.links-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.links-list li + li {
  margin-top: 14px;
}

.links-list a {
  color: white;
  font-weight: bold;
  font-size: 16px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.links-list a:hover {
  color: #FFD700;
  text-decoration: underline;
}

.links-list i {
  margin-left: 6px;
  font-size: 11px;
  opacity: 0.7;
}

.links-list small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: #b5b5ba;
}

/* ----- Gallery / Κολλάζ Εικόνων ----- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.gallery-item {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 1;
  transition: transform 0.3s ease, z-index 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-3px) scale(1.02);
  z-index: 10;
  box-shadow: none;
}

.gallery-item img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* ----- Footer ----- */
.footer {
  text-align: center;
  padding: 12px 0;
  background-color: #1f1f23;
}

.footer p {
  margin: 0;
  color: #ff3b3b;
  font-size: 14px;
  font-style: italic;
  letter-spacing: 0.5px;
}

/* ----- Responsive ----- */
@media (max-width: 1500px) {
  .layout {
    grid-template-columns: 300px minmax(0, 1fr) 300px;
  }
  .sidebar-left {
    left: 0;
  }
  .sidebar-left .widget {
    padding: 24px 30px;
  }
  .content {
    margin-left: 30px;
  }
}

@media (max-width: 1300px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    margin-right: 0;
  }
  .content {
    order: 1;
    margin-left: 0;
  }
  .sidebar-left {
    order: 2;
  }
  .sidebar-right {
    order: 3;
  }
  .sidebar {
    max-width: 420px;
  }
}

@media (max-width: 900px) {
  header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px 20px;
  }
  .header-container {
    flex-direction: column;
    text-align: center;
    padding: 10px;
  }
  .oval-image {
    width: 100px;
    height: 100px;
    margin: 0 0 10px;
  }
  .title-text {
    font-size: 36px;
  }
  .subheader {
    margin-left: 0;
  }
  .gif-container img {
    max-width: 120px;
  }
  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 10px;
    justify-self: auto;
  }
  nav a {
    font-size: 16px;
    margin: 0 10px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  main {
    padding: 20px;
  }
  .sidebar {
    max-width: none;
  }
  .quote-carousel {
    padding: 22px 18px 8px;
    margin-bottom: 25px;
  }
  .quote-slide blockquote {
    font-size: 16px;
  }
  .quote-slide cite {
    font-size: 13px;
  }
  .post-title {
    font-size: 23px;
  }
  .post-body p {
    font-size: 17px;
  }
  .post-thumb {
    width: 90px;
    height: 75px;
    margin-right: 14px;
  }
  .pdf-modal-content {
    width: 95%;
    height: 90vh;
  }
  .contact-box {
    padding: 25px;
  }
  .page-title {
    font-size: 27px;
  }
  .poem-container {
    padding: 20px;
  }
  .poem-title {
    font-size: 26px;
  }
  .poem-text {
    font-size: 17px;
  }
  .full-article {
    padding: 20px;
  }
  .full-article h1 {
    font-size: 26px;
  }
  .full-article p {
    font-size: 17px;
  }
}

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

@media (max-width: 480px) {
  .oval-image {
    width: 80px;
    height: 80px;
  }
  .title-text {
    font-size: 28px;
  }
  .subheader {
    font-size: 14px;
  }
  .gif-container img {
    max-width: 100px;
  }
  nav a {
    font-size: 15px;
    margin: 0 8px;
  }
  .contact-link {
    padding-left: 16px;
    padding-right: 8px;
  }
  .sidebar-left .widget {
    padding: 24px 16px;
  }
  .quote-carousel::before {
    font-size: 48px;
    left: 10px;
  }
  .quote-slide blockquote {
    font-size: 15px;
  }
  .post-title {
    font-size: 21px;
  }
  .post-thumb {
    width: 76px;
    height: 64px;
  }
  .contact-box {
    padding: 18px;
  }
  .page-title {
    font-size: 24px;
  }
  .submit-btn {
    align-self: stretch;
  }
  .poem-title {
    font-size: 22px;
  }
  .poem-text {
    font-size: 15px;
  }
  .full-article {
    padding: 16px;
  }
  .full-article h1 {
    font-size: 22px;
  }
  .full-article p {
    font-size: 16px;
  }
  .quote-box {
    margin-right: 0;
    padding: 10px 12px 5px;
  }
}

/* ----- Lightbox (Διορθωμένο στη σωστή θέση) ----- */
body.lightbox-open header,
body.lightbox-open main,
body.lightbox-open footer {
  filter: blur(8px);
  transition: filter 0.3s ease;
}

.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.show {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 85vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  background: transparent;
  border: none;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.8);
}

.lightbox-caption {
  margin-top: 15px;
  color: #b5b5ba;
  font-size: 18px;
  font-family: "Open Sans", Arial, sans-serif;
  font-style: italic;
  text-align: center;
  letter-spacing: 0.5px;
}

.lightbox-close {
  position: absolute;
  top: 25px;
  right: 35px;
  color: #ffffff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  background: none;
  border: none;
  line-height: 1;
  z-index: 2010;
}

.lightbox-close:hover {
  color: #FFD700;
}