/* Hide screen reader text visually */
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}

.post-header-section{
    background-image: url('/wp-content/themes/sante-reproductive/img/bg-articles.png');
    background-position: center;
    background-size: cover;
}

/* ============================================= */
/* Back Button                                */
/* ============================================= */
.back-to-articles-container {
    /*background-color: #F8F0E7;*/
    padding-top: 120px;
    padding-bottom: 15px;
    margin-bottom:-2px;
}

.back-to-articles-container .container {
    padding-bottom: 15px;
}

.back-to-articles-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.back-to-articles-link:hover {
    transform: translateX(-2px);
}

.back-to-articles-link img {
    width: 36px;
    height: 36px;
}

.back-to-articles-link img:hover {
    background-color: var(--color-blue);
    border-radius:50%;
}


/* ============================================= */
/* Single Post Header Section                 */
/* ============================================= */
.single-post-header {
    /*background-color: #F8F0E7;*/
    padding: 40px 0;
    padding-top:0;
    margin-bottom: 40px;
}

.single-post-header .container{
    padding-top:0;
}

.single-header-content {
    max-width: 1088px;
}

.single-header-meta {
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight:600;
}

.post-date {
    
}

.single-header-title {
    font-size: 55px; 
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 15px;
}

.single-header-excerpt {
    font-size: 22px; 
    margin-left: auto;
    margin-right: auto;
}

.single-header-excerpt p:last-child {
    margin-bottom: 0;
}


.single-header-thumbnail {
    margin-top: 30px;
    margin-left: auto;
    margin-right: auto;
}

.single-header-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 37px;
    object-fit: cover;
    max-height: 600px;
    max-width: 1364px;
}


/* ============================================= */
/* Main Content Area                          */
/* ============================================= */
.entry-content-container {
    padding-top: 20px;
    padding-bottom: 40px;
}

.entry-content {
    /*max-width: 1226px;*/
}

/* Basic Content Styling (add more as needed or rely on theme) */
.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {

}
.entry-content h2 {  }
.entry-content h3 {  }
.entry-content h4 {  }


.entry-content ul,
.entry-content ol {
    
}
.entry-content li {
   
}

.entry-content a {
   font-weight:bold;
}

.entry-content blockquote {
    
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 37px;
}
/* Image alignment classes */
.entry-content .alignleft { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.entry-content .alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }


.page-links {
    /*clear: both;
    margin: 2em 0;
    text-align: center;*/
}
.page-links a,
.page-links > span {
    /*display: inline-block;
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;*/
}
.page-links > span {
    /*background-color: #eee;
    color: #777;*/
}


/* ============================================= */
/* Related Posts Section                      */
/* ============================================= */
.related-posts-section {
    
}

.related-posts-title {
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font-secondary);
    margin-bottom: 15px;
    text-align: left;
    padding-bottom: 15px;
    text-transform: uppercase;
    border-bottom: 1px solid #101822;
}


.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
    margin-bottom: 25px;
}

.related-articles-grid .article-item {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-top: 15px;
    margin:0;
}

.related-articles-grid .article-item:hover {
    transform: translateY(-4px);
    cursor: pointer;
}

.related-articles-grid .article-thumbnail {
    width: 100%;
    max-height: 320px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 34px;
}

.related-articles-grid .article-thumbnail a {
    width: 100%;
}

.related-articles-grid .article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.related-articles-grid .article-content {
    padding: 15px 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-articles-grid .article-title {
    color: var(--color-black);
    text-decoration: none;
    font-family: var(--font-secondary);
    font-size: 25px;
    font-weight: 500;
    margin-bottom: 8px;
}

.related-articles-grid .article-title a {
    color: var(--color-black);
}

.related-articles-grid .article-excerpt {
    font-size: 18px;
    margin-top: 5px;
}


/* ============================================= */
/* Responsive Adjustments                     */
/* ============================================= */

@media (max-width: 992px) {
    /* Tablet Adjustments */
    .single-header-title { font-size: 32px; }
    .single-header-excerpt { font-size: 20px; }
    .related-articles-grid.article-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
    /* Mobile Adjustments */
    .single-post-header { }
    .single-post-header .container { }
    .single-header-content { }
    .single-header-title { font-size: 28px; }
    .single-header-thumbnail { margin-top: 20px; }

    .entry-content-container { padding-top: 10px; padding-bottom: 30px; }

    .related-posts-section { padding-top: 30px; padding-bottom: 30px; margin-top: 30px; }
    .related-posts-title { font-size: 20px; margin-bottom: 20px; }
    .related-articles-grid.article-grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 600px) {
    /* Further Mobile Adjustments */
    .single-header-title { font-size: 24px; }
    .related-articles-grid .article-title { font-size: 20px; }
}




/* Contenu telechargeable */
.contenu_telechargeable .telechargement_boutons{
    display:flex;
    gap: 20px;
    margin-top: 50px;
    flex-wrap: wrap;
}



/* Carrousel */
.sociaux-section{
    /*background-image: url('/wp-content/themes/sante-reproductive/img/bg-social.png');
    background-size: cover;*/
}

.sociaux-section .special-text {
    display: unset;
}

.sociaux-slider-container {
    position: relative;
    max-width: 1360px;
    margin: 0 auto;
    padding-bottom: 45px;
    display: flex;
    align-items: center;
}

.sociaux-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.sociaux-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.2, 0, 0.15, 1);
    will-change: transform;
    touch-action: pan-y;
    user-select: none;
}

.sociaux-track.drag-active {
    cursor: grabbing !important;
}

.social-item {
    flex: 0 0 calc(20% - 20px);
    margin: 0 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 200px;
    transition: transform 0.25s ease;
    user-drag: none;
    -webkit-user-drag: none;

    /* Force GPU to prepare the element */
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);

    cursor: pointer;
}

.social-item img {
    max-width: 100%;
    height: auto;
    user-drag: none;
    -webkit-user-drag: none;
}

.drag-active .social-item {
    transform: scale(0.98);
}
  
.drag-active .social-item.active {
    transform: scale(1);
}

.slider-arrow {
    width: fit-content;
    height: auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.3s;
}

/*.slider-arrow:hover {
    background: var(--color-black);
}*/

.prev-arrow {
    margin-right: 15px;
}

.next-arrow {
    margin-left: 15px;
}

.prev-arrow-social{
    left: -70px;
    position: relative;
}

.next-arrow-social{
    right: -70px;
    position: relative;
}

.slider-dots {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  gap: 8px;
}

.slider-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background-color: #ccc;
  transition: all 0.3s ease;
  cursor: pointer;
}

.slider-dots button.active {
  width: 16px;
  height: 16px;
  background-color: #333;
}




/* Popup overlay */
.popup-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0,0,0,0.8);

    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
}

.popup-box {
    width: fit-content;
    max-width:80%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    margin: auto;
}

/* Image inside popup */
.popup-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 80vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 8px;

    aspect-ratio: auto;
    width: 100%;
    height: auto;
}

/* Close button */
.popup-close {
    position: absolute;
    top: 150px;
    right: 150px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;

    background-image: url('/wp-content/themes/sante-reproductive/img/popup-x.svg');
    width: 51px;
    height: 51px;
}

.popup-close:hover {
    color: #bbb;
}

@media screen and (max-width: 1600px) {
    .prev-arrow-social {
        left: -10px;
        position: relative;
    }

    .next-arrow-social {
        right: -10px;
        position: relative;
    }
}

@media screen and (max-width: 776px) {
    .popup-close {
        right: 50px;
    }
}