/* Diaconesti cache-bust 20261024e */
:root {
  --menu-text-color: #773e09;
  --menu-bg: #f4e4bc;
  --accent-burgundy: #C00000;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Lemonada', cursive;
  overflow-x: hidden;
  font-size: 18.4px;
}

/* Hamburger Menu */
.hamburger {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  z-index: 1000;
  cursor: pointer;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background: var(--menu-text-color);
}

/* Side Menu */
.side-menu {
  position: fixed;
  right: -300px;
  top: 0;
  width: 300px;
  height: 100vh;
  background: url('https://manastireadiaconesti.ro/attached_assets/fundal-pt-telefon.jpg') no-repeat center center;
  background-color: var(--menu-bg);
  background-size: cover;
  z-index: 999;
  padding: 10px 15px;
  overflow-y: auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Lemonada', cursive;
  font-weight: 700;
  font-style: italic;
}

.side-menu.active {
  right: 0;
}

/* Submenu styles */
.has-submenu {
  position: relative;
}

.submenu {
  display: none !important;
  padding-left: 15px;
  margin: 2px 0 6px;
  flex: none !important;
  overflow: visible !important;
}

.has-submenu:hover > .submenu,
.has-submenu.submenu-open > .submenu {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.submenu li {
  margin: 2px 0 !important;
  min-height: 20px;
  height: auto !important;
  line-height: 1.35;
}

.submenu li a {
  font-size: 13.8px !important;
  color: #8B4513 !important;
  display: block;
  height: auto !important;
  padding: 3px 24px 3px 0;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

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

.menu-header {
  text-align: center;
  margin: 5px 0;
}

.menu-logo {
  width: 100%;
  max-width: 160px;
}

.side-menu ul {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.side-menu ul li {
  margin: 3px 0;
  position: relative;
}

.side-menu ul li a {
  color: var(--menu-text-color);
  text-decoration: none;
  font-size: 16.1px;
  font-family: inherit;
  font-weight: inherit;
  font-style: inherit;
  transition: all 0.3s ease;
  display: block;
  padding: 2px 0;
  position: relative; /* Added to position the plus sign */
}


.side-menu {
  position: fixed;
  right: -300px;
  background-position: center;
}

.side-menu ul li a:hover {
  text-decoration: underline;
}

/* Pages */
.slideshow-container {
  width: 100%;
  max-width: 1000px;
  position: relative;
  margin: auto;
}

.slideshow-block {
  width: 100%;
  margin: 30px auto;
}

.slideshow-shortcode,
.slideshow-error {
  margin: 24px 0;
  padding: 14px;
  border: 1px dashed #b98a57;
  border-radius: 10px;
  background: rgba(255, 248, 232, 0.8);
  color: var(--menu-text-color);
  text-align: center;
  text-indent: 0 !important;
}

.slides {
  display: none;
  text-align: center;
  transition: opacity 0.5s ease-in-out;
  opacity: 0;
  animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* First slide visible by default */
.slideshow-container .slides:first-child {
  display: block;
}

.slideshow-container .slides img {
  transition: opacity 0.5s ease-in-out;
  opacity: 1; /* Make images visible immediately */
}

/* Loading animation removed */

/* Slide transition styles */
.slides.active {
  opacity: 1;
}

.slides img {
  max-width: 100%;
  height: 500px; /*Added to force same height*/
  object-fit: cover; /*Added for better image scaling*/
}

.slides img {
  max-width: 100%;
  height: 500px; /*Added to force same height*/
  object-fit: cover; /*Added for better image scaling*/
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  margin-top: 0;
  transform: translateY(-50%);
  color: var(--accent-burgundy);
  font-weight: bold;
  font-size: 24px;
  transition: 0.6s ease;
  border-radius: 50%;
  user-select: none;
  background-color: rgba(244, 228, 188, 0.9);
  box-shadow: 0 2px 10px rgba(90, 74, 44, 0.28);
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

.prev:hover, .next:hover {
  color: var(--accent-burgundy);
}

.text {
  color: var(--menu-text-color);
  font-size: 17.25px;
  padding: 8px 12px;
  width: 100%;
  text-align: center;
  font-style: italic;
}

.dot-container {
  text-align: center;
  padding: 20px;
}

.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 0 2px;
  background-color: #e4d5ad; /* Color matching the beige background */
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.active, .dot:hover {
  background-color: var(--menu-text-color); /* Keep this the same */
}

.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .4} 
  to {opacity: 1}
}

.page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: none;
  background: url('https://manastireadiaconesti.ro/attached_assets/fundal-deschis.jpg') no-repeat center center fixed;
  background-size: cover;
  padding: 50px;
  overflow-y: auto;
  z-index: 10;
}

.main-logo {
  display: block;
  width: calc(100% + 20px);
  max-width: calc(100% + 20px);
  height: auto;
  margin: 0 -10px 40px;
}

.page.active {
  display: block;
}

.content {
  width: 90vw;
  max-width: calc(100vw - 20px);
  margin: 0 auto;
  padding: 0 10px;
}

h1 {
  color: black;
  margin-bottom: 20px;
  text-align: center;
}

.content p {
  color: black;
  line-height: 2;
  text-align: justify;
  text-indent: 0 !important;
  font-size: 18.4px;
}

.history-title {
  color: var(--menu-text-color);
  font-size: 1.5em;
  margin-bottom: 30px;
  text-align: center;
}

.history-image {
  float: right;
  max-width: 600px;
  margin: 0 0 20px 20px;
}

.creation-title {
  color: var(--accent-burgundy);
  font-size: 1em;
  margin: 40px 0;
  clear: both;
}

p[style*="text-align: center"] {
  color: var(--menu-text-color);
  font-size: 0.9rem;
  text-indent: 0;
}

.content a {
  color: var(--accent-burgundy);
  text-decoration: none;
}

.content a:hover {
  text-decoration: underline;
}

.centered-image {
  display: block;
  max-width: 100%;
  margin: 40px auto;
  clear: both;
}

.image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 40px 0;
}

.image-grid figure {
  text-align: center;
}

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

.image-grid figcaption, figcaption.image-grid {
  margin-top: 0;
  color: var(--menu-text-color);
  font-size: 0.9em;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
}

.centered-title {
  color: #773e09;
  font-size: 1em;
  text-align: center;
  margin: 20px 0;
}

.saint-paul-layout {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr);
  gap: 30px;
  margin: 40px 0;
  align-items: stretch;
}

.saint-paul-image {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.saint-paul-image .saint-image {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  object-fit: contain;
  object-position: center top;
}

.saint-paul-text {
  min-width: 0;
}

.saint-image {
  display: block;
  max-width: 100%;
  height: auto;
  width: min(500px, 100%);
  margin: 24px auto;
}

.tropar, .glas {
  background-color: transparent;
  padding: 20px;
  border-radius: 8px;
  box-shadow: none;
  font-size: 16.1px;
  line-height: 1.6;
}

.tropar h3, .glas h3 {
  color: #773e09;
  margin-bottom: 10px;
}

.tropar h4, .glas h4 {
  color: #773e09;
  font-style: italic;
  margin-bottom: 15px;
}

.tropar p, .glas p {
  text-indent: 0;
  line-height: 1.6;
  text-align: left;
}

.canonization {
  text-align: center;
  margin-top: 30px;
  color: #773e09;
  font-style: italic;
}

@media (max-width: 768px) {
  .saint-paul-layout {
    grid-template-columns: 1fr;
  }

  .saint-paul-image .saint-image {
    width: min(500px, 100%);
    height: auto;
    margin: 0 auto;
  }
}


/* Accordion Styles */
.accordion {
  width: 100%;
  margin: 20px 0;
}

.accordion-section {
  margin-bottom: 5px;
}

.accordion-header {
  background: #773e09;
  color: #fff;
  padding: 15px;
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1.2em;
  transition: background-color 0.3s ease;
}

.accordion-header:hover {
  background: #8b4a0d;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: transparent;
  font-size: 18.4px;
  padding: 20px;
  line-height: 1.8;
}

.accordion-content.active {
  max-height: none;
  padding: 20px 0;
}

.active-section .accordion-content {
  margin-top: -10px;
}

.active-section .accordion-header {
  background: #8b4a0d;
}

.accordion-header {
  background: #773e09;
  color: #fff;
  padding: 15px;
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1.2em;
  font-family: 'Lemonada', cursive;
  transition: background-color 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .side-menu {
    width: 300px;
    right: -300px;
  }
}

.contact-info {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
}

.contact-info h2,
.contact-info h3 {
  color: #333;
  margin-bottom: 1rem;
}

.contact-info p {
  margin: 10px 0;
  line-height: 1.6;
  font-size: 18.4px;
}

.map-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
}

.map-container iframe {
  width: 100%;
  border-radius: 5px;
}

.has-submenu > a::after {
  content: " +";
  font-weight: bold;
  position: absolute; /* Added to position the plus sign */
  right: 10px; /* Adjust as needed */
  top: 50%;
  transform: translateY(-50%); /* Vertically center the plus sign */
}

/* Home Gallery */
.home-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 40px;
}

.gallery-item {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  padding: 60px 30px 30px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h3 {
  font-family: 'Lemonada', cursive;
  font-size: 1.8rem;
  text-align: center;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

@media (min-width: 768px) {
  .home-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item {
    height: 50vh;
  }
}

@media (min-width: 1200px) {
  .home-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-item {
    height: 33.33vh;
  }
}

/* Subsection Links */
.subsection-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
  gap: 30px;
  margin-top: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.subsection-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  height: 360px;
  min-width: 280px;
  overflow: hidden;
}

.subsection-item:not(.invisible-spacer) {
  background: rgba(244, 228, 188, 0.82);
  border-radius: 12px;
  padding: 10px 14px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.subsection-item:not(.invisible-spacer):hover {
  transform: translateY(-5px);
  background: rgba(244, 228, 188, 0.96);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.subsection-item img {
  width: 100%;
  height: 225px;
  object-fit: contain;
  object-position: center top;
  border-radius: 8px;
  margin-bottom: 8px;
  flex-shrink: 0;
  background: transparent;
}

.subsection-item h3 {
  font-family: 'Lemonada', cursive;
  font-size: 1.2rem;
  color: #83603b;
  box-sizing: border-box;
  width: 100%;
  min-height: 92px;
  margin: 0;
  padding: 8px 10px;
  line-height: 1.3;
  text-align: center;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 228, 188, 0.98);
  border-radius: 8px;
}

/* Hide descriptive paragraphs */
.subsection-item p {
  display: none;
}

/* Invisible spacer for grid alignment */
.invisible-spacer {
  visibility: hidden;
  pointer-events: none;
}

.invisible-spacer * {
  display: none !important;
}

/* Subsection item without image */
.subsection-item-no-image {
  justify-content: center;
  background: rgba(119, 62, 9, 0.15);
  border: 2px solid var(--menu-text-color);
}

.subsection-item-no-image:hover {
  background: rgba(119, 62, 9, 0.25);
  border-color: #8b4a0d;
}

.subsection-item-no-image h3 {
  font-size: 1.5rem;
  margin: 0;
}

/* Saint Pages Classic Layout */
.saint-icon {
  max-width: 400px;
  margin: 30px auto 40px auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.saint-tropars {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin: 40px 0;
}

.tropar-section {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 10px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tropar-section h3 {
  font-family: 'Lemonada', cursive;
  color: var(--menu-text-color);
  font-size: 1.4rem;
  margin-bottom: 10px;
  text-align: center;
}

.tropar-section h4 {
  color: var(--menu-text-color);
  font-size: 1.1rem;
  margin-bottom: 5px;
  text-align: center;
  font-style: italic;
}

.greek-text {
  text-align: center;
  font-style: italic;
  color: var(--menu-text-color);
  opacity: 0.8;
  margin-bottom: 20px;
}

.tropar-section p {
  color: var(--menu-text-color);
  line-height: 1.8;
  font-size: 1.1rem;
  text-align: center;
  margin: 0;
}

@media (min-width: 768px) {
  .saint-tropars {
    flex-direction: row;
    gap: 30px;
  }

  .tropar-section {
    flex: 1;
  }
}

/* Saint Pages Centered Layout for Tropars */
.saint-tropars-centered {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin: 40px 0;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.tropar-left, .tropar-right {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 10px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tropar-left h3, .tropar-right h3 {
  font-family: 'Lemonada', cursive;
  color: var(--menu-text-color);
  font-size: 1.4rem;
  margin-bottom: 10px;
  text-align: center;
}

.tropar-left h4, .tropar-right h4 {
  color: var(--menu-text-color);
  font-size: 1.1rem;
  margin-bottom: 5px;
  text-align: center;
  font-style: italic;
}

.tropar-left p, .tropar-right p {
  color: var(--menu-text-color);
  line-height: 1.8;
  font-size: 1.1rem;
  text-align: center;
  margin: 0 0 15px 0;
}

.tropar-left .greek-text, .tropar-right .greek-text {
  text-align: center;
  font-style: italic;
  color: var(--menu-text-color);
  opacity: 0.8;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .saint-tropars-centered {
    flex-direction: column;
    gap: 30px;
  }
}

/* Homepage specific styling - force three columns */
#home .subsection-links {
  grid-template-columns: repeat(3, 1fr);
  max-width: 1200px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  #home .subsection-links {
    grid-template-columns: 1fr;
  }

  .invisible-spacer {
    display: none !important;
  }

  .page {
    padding: 20px;
  }

  /* Ocrotitori: reduc spațiul între pictograme la cel puțin 1cm pe telefon */
  #ocrotitori-main .subsection-links {
    gap: 1cm;
  }
}

/* Make logos clickable for homepage navigation */
.main-logo {
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.main-logo:hover {
  transform: scale(1.05);
  opacity: 0.8;
}

/* Book citation styling */
.book-citation {
  width: 100%;
  padding: 0;
  text-align: right !important;
  margin-top: 30px;
  margin-bottom: 30px;
  text-indent: 0 !important;
  font-style: italic;
  font-weight: 400 !important;
}

.book-citation * {
  font-style: inherit;
  font-weight: 400 !important;
}

.book-citation a {
  font-family: 'Lemonada', cursive;
  font-weight: 300;
  font-style: italic;
  color: var(--menu-text-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.book-citation a:hover {
  color: #8b4a0d;
  text-decoration: underline;
}
