/*-- -------------------------- -->
<---          Blog Post         -->
<--- -------------------------- -*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
    #blog-post {
        padding: var(--sectionPadding);
        /* Account for fixed navigation header */
        padding-top: 10rem;
        background-color: #f7f7f7;
        position: relative;
        z-index: 1;
    }
    #blog-post .cs-container {
        width: 100%;
        max-width: 44rem;
        margin: auto;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }
    #blog-post .blog-content {
        width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    #blog-post .blog-title {
        font-size: clamp(2rem, 5vw, 3rem);
        font-weight: 700;
        line-height: 1.2em;
        margin: 0;
        color: var(--headerColor);
        max-width: 30ch;
    }
    #blog-post .blog-subtitle {
        font-size: 1.125rem;
        font-weight: 400;
        font-style: italic;
        color: var(--bodyTextColor);
        margin: 0.5rem 0 0 0;
        opacity: 0.8;
    }
    #blog-post .blog-image-container {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    #blog-post .blog-picture {
        width: 100%;
        max-width: 630px;
        height: clamp(15rem, 35vw, 18.75rem);
        border-radius: 1.5rem;
        overflow: hidden;
        display: block;
        position: relative;
    }
    #blog-post .blog-picture img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        top: 0;
        left: 0;
    }
    #blog-post .blog-text {
        width: 100%;
        max-width: 50ch;
        text-align: left;
    }
    #blog-post .blog-text p {
        font-size: 1.125rem;
        line-height: 1.6em;
        margin: 0 0 1.5rem 0;
        color: var(--bodyTextColor);
    }
    /* Quill alignment classes */
    #blog-post .blog-text .ql-align-center {
        text-align: center;
    }
    #blog-post .blog-text .ql-align-right {
        text-align: right;
    }
    #blog-post .blog-text .ql-align-justify {
        text-align: justify;
    }
    #blog-post .blog-text h2 {
        font-size: 1.75rem;
        font-weight: 700;
        line-height: 1.3em;
        margin: 2.5rem 0 1rem 0;
        color: var(--headerColor);
    }
    #blog-post .blog-text h3 {
        font-size: 1.5rem;
        font-weight: 700;
        line-height: 1.3em;
        margin: 2rem 0 1rem 0;
        color: var(--headerColor);
    }
    #blog-post .blog-text ul {
        margin: 1.5rem 0;
        padding-left: 1.5rem;
    }
    #blog-post .blog-text li {
        font-size: 1.125rem;
        line-height: 1.6em;
        margin-bottom: 0.75rem;
        color: var(--bodyTextColor);
    }
    #blog-post .blog-text blockquote {
        margin: 2rem 0;
        padding: 1.5rem 2rem;
        background-color: rgba(0, 0, 0, 0.05);
        border-left: 4px solid var(--primary);
        border-radius: 0.5rem;
        font-style: italic;
    }
    #blog-post .blog-text blockquote p {
        margin: 0;
        font-size: 1.125rem;
        line-height: 1.6em;
    }
    #blog-post .blog-text hr {
        margin: 2.5rem 0;
        border: none;
        height: 1px;
        background-color: rgba(0, 0, 0, 0.1);
    }
  }
  
  /* Tablet - 768px */
  @media only screen and (min-width: 48rem) {
    #blog-post .blog-text {
        max-width: 65ch;
    }
  }
  
  /* Desktop - 1024px */
  @media only screen and (min-width: 64rem) {
    #blog-post .cs-container {
        max-width: 80rem;
    }
    #blog-post .blog-content {
        gap: 3rem;
    }
    #blog-post .blog-text {
        max-width: 80ch;
    }
  }
  
  /* Large Desktop - 1300px */
  @media only screen and (min-width: 81.25rem) {
    #blog-post .blog-text {
        max-width: 90ch;
    }
  }
  
  /* Dark Mode */
  @media only screen and (min-width: 0rem) {
    body.dark-mode #blog-post {
        background-color: rgba(0, 0, 0, 0.2);
    }
    body.dark-mode #blog-post .blog-title,
    body.dark-mode #blog-post .blog-subtitle,
    body.dark-mode #blog-post .blog-text p,
    body.dark-mode #blog-post .blog-text h2,
    body.dark-mode #blog-post .blog-text h3,
    body.dark-mode #blog-post .blog-text li {
        color: var(--bodyTextColorWhite);
    }
    body.dark-mode #blog-post .blog-text blockquote {
        background-color: rgba(255, 255, 255, 0.1);
        border-left-color: var(--secondary);
    }
    body.dark-mode #blog-post .blog-text hr {
        background-color: rgba(255, 255, 255, 0.2);
    }
  }
   
  
  .blog-gallery {
    margin-top: 3rem;
    text-align: center;
  }
  
  .blog-gallery h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--heading-color, #222);
  }
  
  .gallery-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .gallery-grid picture {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
  }
  
  .gallery-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform .4s ease, filter .4s ease;
  }
  
  .gallery-grid img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
  }
  

  /* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.lightbox-content {
    margin: auto;
    display: block;
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    image-orientation: from-image;
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 9001;
}

.close-lightbox:hover {
    color: #bbb;
}

/* Lightbox Navigation Arrows */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 9001;
    padding: 16px;
    user-select: none;
    transition: color 0.3s ease;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: #bbb;
}

/* Hide arrows on mobile */
@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 12px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
}

.gallery-image {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.05);
}
       

                                                             

/*-- -------------------------- -->
<---          Gallery           -->
<--- -------------------------- -*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
    #gallery-1449 {
      padding: var(--sectionPadding);
    }
    #gallery-1449 .cs-container {
      width: 100%;
      max-width: 80rem;
      margin: auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      /* 48px - 64px */
      gap: clamp(3rem, 6vw, 4rem);
      position: relative;
      z-index: 1;
    }
    #gallery-1449 .cs-content {
      text-align: center;
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1.5rem;
    }
    #gallery-1449 .cs-title {
      margin: 0;
    }
    #gallery-1449 .cs-button-group {
      margin: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-wrap: wrap;
      row-gap: 1rem;
      /* 20px - 32px */
      column-gap: clamp(1.25rem, 2vw, 2rem);
    }
    #gallery-1449 .cs-button {
      font-size: 1rem;
      line-height: 1.5em;
      color: var(--bodyTextColor);
      background-color: transparent;
      border: none;
      position: relative;
      z-index: 1;
      transition: color 0.3s;
    }
    #gallery-1449 .cs-button:before {
      content: '';
      width: 100%;
      height: 4px;
      background: var(--primary);
      opacity: 0;
      border-radius: 4px 4px 0 0;
      position: absolute;
      display: block;
      bottom: 0;
      left: 0;
      transition: opacity 0.3s, bottom 0.3s;
    }
    #gallery-1449 .cs-button:hover {
      color: var(--primary);
      cursor: pointer;
    }
    #gallery-1449 .cs-button:hover:before {
      opacity: 1;
      bottom: -0.625rem;
    }
    #gallery-1449 .cs-button.cs-active {
      color: var(--primary);
    }
    #gallery-1449 .cs-button.cs-active:before {
      opacity: 1;
      bottom: -0.625rem;
    }
    #gallery-1449 .cs-gallery-wrapper {
      width: 100%;
      position: relative;
      z-index: 1;
    }
    #gallery-1449 .cs-gallery {
      width: 100%;
      padding: 0;
      margin: 0;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(19.0625rem, 1fr));
      /* 16px - 20px */
      gap: clamp(1rem, 1.5vw, 1.25rem);
      position: relative;
      perspective: 700px;
      transform-style: preserve-3d;
      transition: transform 0.7s, opacity 0.3s, visibility 0.5s, top 0.3s, left 0.3s;
      /* makes the transfrom scaling orgin the top left corner, dictates the direction by which the scale transforms animate towards */
      transform-origin: left top;
    }
    #gallery-1449 .cs-gallery.cs-hidden {
      /* by using visibility:hidden instead of display:none, we can see the animations from the opacity and transforms, display:none won't render animations. */
      visibility: hidden;
      /* prevents the mouse from interacting with it */
      pointer-events: none;
      /* hidden galleries have a 0 opacity, and we animate the opacity to 1 when they become active */
      opacity: 0;
      /* this top and left value help control the animation, by setting it to position absolute and left 0, the gallery won't fly off screen to the left, it will stop its position to be at the left edge of the .cs-container (left: 0). Same for the top:0 value, the gallery won't go past that posiiton when it animates */
      top: 0;
      left: 0;
      position: absolute;
      /* prevents the hidden galleries from overflowing the section, and makes a nice animations to transition to and from */
      transform: scaleY(0) scaleX(0);
    }
    #gallery-1449 .cs-gallery.cs-hidden .cs-image {
      /* when gallery is hidden, add these styles to the cs-image to animate from when cs-hidden is removed from the .cs-gallery */
      transform: translateY(2.1875rem) rotateX(90deg);
      opacity: 0;
    }
    #gallery-1449 .cs-image {
      /* 260px - 360px */
      min-height: clamp(16.25rem, 60vw, 20rem);
      border-radius: 1rem;
      /* clips the image corners */
      overflow: hidden;
      display: block;
      position: relative;
      /* when .cs-hidden is removed from the .cs-gallery, reset these values and animate between their hidden styles */
      transform: translateY(0rem) rotateX(0);
      opacity: 1;
      transition: opacity 0.6s, transform 0.6s;
    }
    #gallery-1449 .cs-image:nth-of-type(1) {
      /* the transition delays change at desktop */
      /* these delays stagger the reveal of each image so they all go one after the other and not all at once */
      transition-delay: 0.1s;
    }
    #gallery-1449 .cs-image:nth-of-type(2) {
      transition-delay: 0.2s;
    }
    #gallery-1449 .cs-image:nth-of-type(3) {
      transition-delay: 0.3s;
    }
    #gallery-1449 .cs-image:nth-of-type(4) {
      transition-delay: 0.4s;
    }
    #gallery-1449 .cs-image:nth-of-type(5) {
      transition-delay: 0.5s;
    }
    #gallery-1449 .cs-image:nth-of-type(6) {
      transition-delay: 0.6s;
    }
    #gallery-1449 .cs-image:nth-of-type(7) {
      transition-delay: 0.7s;
    }
    #gallery-1449 .cs-image:nth-of-type(8) {
      transition-delay: 0.8s;
    }
    #gallery-1449 .cs-image img {
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      width: 100%;
      /* makes it act like a background image */
      object-fit: cover;
    }
  }
  /* Tablet - 768px */
  @media only screen and (min-width: 48rem) {
    #gallery-1449 .cs-content {
      text-align: left;
      flex-direction: row;
      justify-content: space-between;
      align-items: flex-end;
    }
    #gallery-1449 .cs-button {
      margin-bottom: 0.625rem;
    }
  }
  /* Dark Mode */
  @media only screen and (min-width: 0rem) {
    body.dark-mode #gallery-1449 .cs-title {
      color: var(--bodyTextColorWhite);
    }
  }
                                  
  /* Nav rămâne peste conținutul paginii, dar sub lightbox */
#cs-navigation { z-index: 1000; }

/* Lightbox full-screen, peste tot */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;               /* ascuns implicit */
  place-items: center;
  background: rgba(0,0,0,.88);
  z-index: 99999;              /* MAI MARE decât nav */
  padding: 1rem;
}
.lightbox.open { display: grid; }

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  image-orientation: from-image;
}

/* Când e deschis lightbox-ul, blochează scroll-ul (evită efecte nav) */
body.lb-open { overflow: hidden; }

/* Dacă nav încă iese deasupra, forțează în jos DOAR cât timp e open */
body.lb-open #cs-navigation { z-index: 0; }

/* Footer stays behind lightbox when open */
body.lb-open #cs-footer-1862 {
    position: relative;
    z-index: 0;
}


