/*
 Theme Name: Astra Child
 Template: astra
*/

/* =========================================================
   TABLE DES MATIÈRES
   =========================================================
   1. Reset & Base
   2. Typographie
   3. Boutons & Liens
   4. Header & Footer
   5. Section One (Open Badges & Formations)
      5.1 Open Badges
      5.2 Open Badges Carousel
      5.3 Formations
   6. Section Two (Carousel)
   7. Gestion-Ressources & FAQ
   8. Sessions & Badges Management
   9. Tables
   10. Ressource Perso
   11. Media Queries & Responsive
   ========================================================= */

/* =========================================================
   1. Reset & Base
   ========================================================= */
/* Parent styles import */
@import url("../astra/style.css");

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: #8aafd6;
  font-family: Arial, sans-serif;
  color: #333;
}

#page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#content,
.site-content,
.ast-container {
  flex: 1;
}

#site-content,
.site-content {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  box-sizing: border-box;
}

/* =========================================================
   2. Typographie
   ========================================================= */
h1 { color: #005950 !important; }   /* deep, warm brown-gold */
h2 { color: #7D5C37 !important; }   /* mid-tone bronze-gold */
h3 { color: #A4824E !important; }   /* muted gold-tan */

h4, h5, h6 {
  margin: 0 0 1rem;
  color: #9E792E !important;
}

p {
  margin: 0 0 1rem;
  line-height: 1.4;
}

/* =========================================================
   3. Boutons & Liens
   ========================================================= */
a {
  color: #003F7D;   /* rich navy blue */
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #00509E;   /* brighter blue on hover */
}

/* Primary buttons (filled gold) */
button,
.btn {
  background-color: #D2AD66;
  color: #ffffff;
  border: 1px solid #BA9E4C;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

button:hover,
.btn:hover {
  background-color: #997934;
  border-color: #85672F;
}

/* Secondary buttons (filled blue) */
.btn-secondary {
  background-color: #0073AA;
  color: #ffffff;
  border: 1px solid #005F8D;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  background-color: #005F8D;
  border-color: #00476B;
}

/* =========================================================
   4. Header & Footer
   ========================================================= */
/* Common styles for header and footer */
#page header#masthead,
.site-primary-header-wrap.ast-builder-grid-row-container,
footer.site-footer,
#colophon,
.site-primary-footer-wrap,
.ast-builder-footer-grid-columns {
  background-color: #6B6F83 !important;
  color: #D2AD66 !important;
}

/* Ensure inner grids inherit background */
.ast-builder-grid-row-container-inner {
  background: none !important;
  padding: 0 !important;
  width: 100% !important;
}

/* Header styling */
#page header#masthead {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 75px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  z-index: 999;
}

/* Footer styling */
footer.site-footer {
  position: static !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0;
  margin-top: auto !important;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  box-shadow: none;
  overflow: visible;
  height: auto;
  z-index: 1000;
}

/* Footer internal flex layout */
.ast-builder-footer-grid-columns.site-primary-footer-inner-wrap.ast-builder-grid-row {
  display: flex !important;
  flex: 1 1 auto !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box;
}

/* Primary footer builder section */
.site-primary-footer-wrap.ast-builder-grid-row-container[data-section="section-primary-footer-builder"] {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  height: 6vh !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
}

.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .ast-builder-grid-row {
    max-width: none !important; /* This removes the maximum width constraint */
    width: 100% !important;     /* Ensures it takes the full available width */
    margin-left: 0 !important;   /* Removes auto margin to prevent centering */
    margin-right: 0 !important;  /* Removes auto margin to prevent centering */
}


/* Header and footer links styling */
#page header#masthead a,
#page header#masthead button,
.site-primary-header-wrap a,
.site-primary-header-wrap button,
footer.site-footer a,
footer.site-footer button,
#colophon a,
#colophon button,
.site-primary-footer-wrap a,
.site-primary-footer-wrap button,
.ast-builder-footer-grid-columns a,
.ast-builder-footer-grid-columns button {
  color: inherit !important;
  background: none !important;
  text-decoration: none !important;
}

#page header#masthead a:hover,
#page header#masthead button:hover,
.site-primary-header-wrap a:hover,
.site-primary-header-wrap button:hover,
footer.site-footer a:hover,
footer.site-footer button:hover,
#colophon a:hover,
#colophon button:hover,
.site-primary-footer-wrap a:hover,
.site-primary-footer-wrap button:hover,
.ast-builder-footer-grid-columns a:hover,
.ast-builder-footer-grid-columns button:hover {
  background-color: #B9C6DA !important;
  color: #997934 !important;
}

#ast-mobile-header > div.ast-main-header-wrap.main-header-bar-wrap > div {
  background-color: #6B6F83 !important;
  color: #D2AD66 !important;
  border-radius: 15px !important;
  border: 1px solid #D2AD66 !important; /* Added a 1px solid border with the existing text/icon color */
}

@media (max-width: 768px) { /* Adjust this breakpoint if your mobile menu activates at a different width */
  /* Target the SVG icon and set its fill color */
  .ast-mobile-svg.ast-menu2-svg {
    fill: #D2AD66 !important; /* Your desired golden color for the SVG icon */
  }
}

@media (max-width: 768px) { /* Adjust this breakpoint if your mobile menu activates at a different width */
  .ast-mobile-header-content.content-align-flex-start  {
    padding-top: 70px !important;
    margin-top: 70px !important;/* Start with this value and adjust as needed */
    /*
      - Increase this value if the first menu item is still hidden.
      - Decrease if there's too much empty space at the top.
      - The goal is to make sure the first menu item appears clearly below your header.
    */
  }
}


/* =========================================================
   5. Section One (Open Badges & Formations)
   ========================================================= */
.section-one {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 20px 0;
}

/* 5.1 Open Badges */
.open-badges-content {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: flex-start;
  gap: 40px;
  text-align: left;
  background: url("https://www.messavoirs.fr/wp-content/uploads/2025/04/background-design.png") center/cover no-repeat;
  flex-wrap: wrap;
}

.open-badges-text {
  position: absolute;
  bottom: 5px;
  left: 20px;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
}

.open-badges-text h2,
.open-badges-text h3 {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #9E792E;
}

.open-badges-text h5 {
  font-size: 1rem;
  line-height: 1.2;
  margin-top: 1rem;
  max-width: 50ch;
}

/* 5.2 Open Badges Carousel */
.open-badges-carousel {
  position: absolute;
  max-width: 100%;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.rotating-carousel {
  perspective: 1000px;
  width: 100%;
  max-width: 300px;
  margin: 0;
  position: relative;
  height: 100%;
  display: block;
}

.rotating-carousel .carousel {
  position: relative;
  width: 100%;
  height: 100%;
  padding-top: 66.66%;  /* 3:2 aspect ratio */
  transform-style: preserve-3d;
  animation: spin-cube 12s infinite linear;
}

.rotating-carousel .face-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.rotating-carousel .face-container .face {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.rotating-carousel .face-container .face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rotating-carousel .face-container .caption {
  position: absolute;
  bottom: -1.8rem;
  left: 50%;
  transform: translateX(-50%);
  background: #f0e2b6;
  border: 1px solid #d4b17a;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-family: serif;
  color: #000;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.2);
  white-space: nowrap;
}

/* Position faces at 120° intervals */
.rotating-carousel .face-container:nth-child(1) {
  transform: rotateY(0deg) translateZ(150px);
}

.rotating-carousel .face-container:nth-child(2) {
  transform: rotateY(120deg) translateZ(150px);
}

.rotating-carousel .face-container:nth-child(3) {
  transform: rotateY(240deg) translateZ(150px);
}

@keyframes spin-cube {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(-360deg); }
}

/* 5.3 Formations */
.formations-content {
  display: flex;
  width: 100%;
  background-color: #8aafd6;
  padding: 10px;
  box-sizing: border-box;
}

.formations-illustration {
  flex: 0 0 auto;
  max-width: 608px;
  max-height: 406px;
  padding: 20px;
  overflow: hidden;
}

.formations-illustration img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.formations-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-bottom: 10px;
}

.formation-intro {
  margin-bottom: 2rem;
  text-align: center;
}

.formation-intro h2,
.formation-intro h3 {
  font-size: 1.8rem;
  color: #9E792E;
  margin-bottom: 0.5rem;
}

.formation-intro p {
  font-size: 1rem;
  color: #333;
}

.formation-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  width: 100%;
}

.formation-cards .card {
  flex: 1 1 0;
  min-width: 260px;
  background: #f8f8f8;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.formation-cards .card .formation-cards-button {
  margin-top: auto;
}

.formation-cards .card h3 {
  font-size: 1.2rem;
  color: #353535;
  margin-top: 0;
}

.formation-cards .card p {
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0.5rem 0 1rem;
}

.formation-cards .card .btn {
  padding: 8px 16px;
  background-color: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  text-align: center;
}

/* =========================================================
   6. Section Two (Carousel)
   ========================================================= */
.section-two {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  text-align: center;
  background-color: #8aafd6;
  position: relative;
  z-index: 2;
}

.section-two h1,
.section-two h2,
.section-two h3 {
  margin-bottom: 20px;
  color: #9E792E;
}

.custom-carousel-container {
  width: 100%;
  overflow: hidden;
  margin-top: 20px;
  position: relative;
  flex-grow: 1;
  display: flex;
  align-items: center;
}

.custom-carousel {
  width: 100%;
  perspective: 1000px;
}

.carousel-track {
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
  transition: transform 0.6s ease-in-out;
}

.carousel-slide {
  position: absolute;
  top: 50%;
  width: 25%;
  opacity: 0.6;
  transform: translate(-50%,-50%) scale(0.8);
  transition: all 0.8s cubic-bezier(0.4,0,0.2,1);
}

.carousel-slide.prev {
  left: 15%;
  transform: translate(-50%,-50%) scale(0.75) rotateY(-20deg);
}

.carousel-slide.active {
  left: 50%;
  width: 40%;
  transform: translate(-50%,-50%) scale(1.2);
  opacity: 1;
  z-index: 2;
}

.carousel-slide.next {
  left: 85%;
  transform: translate(-50%,-50%) scale(0.75) rotateY(20deg);
}

.carousel-item-content {
  background: #f8f8f8;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.carousel-item-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 15px;
}

.carousel-item-content h3 {
  font-size: 1.2rem;
  color: #353535;
  margin: 0 0 10px;
}

.carousel-item-content p {
  max-width: 70%;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 auto 1rem;
}

.read-more-button {
  margin-top: auto;
  padding: 8px 16px;
  font-size: 0.9rem;
  background-color: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

.carousel-arrows {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  transform: translateY(-50%);
  /* Changed pointer-events from none to all to allow clicks on arrows */
  pointer-events: all;
  z-index: 3; /* Increased z-index to ensure arrows are above content */
}

.carousel-prev, .carousel-next {
  pointer-events: all;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: #0073aa;
  padding: 12px;
  border-radius: 50%;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  font-size: 1.2rem;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: #0073aa;
  color: #fff;
  transform: scale(1.1);
}

.fixed-carousel {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 80%;
  max-width: 1200px;
}

/* =========================================================
   7. Gestion-Ressources & FAQ
   ========================================================= */
.other-resources .resource-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -20px 40px;
}

.other-resources .grid-item {
  flex: 0 1 calc(33.333% - 40px);
  margin: 0 20px 40px;
  padding: 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
}

.other-resources .featured-image {
  margin-bottom: 10px;
  border-radius: 6px;
  overflow: hidden;
}

.other-resources .featured-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16/9;
}

.simple-list-section {
  margin-top: 40px;
  padding: 20px;
}

.simple-list-section h2 {
  margin: 0 0 20px;
}

.simple-list-section ul {
  list-style: none;
  padding: 0;
}

.simple-list-section li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #ccc;
}

.simple-list-section li:last-child {
  border-bottom: none;
}



/* Page templates styling */
body.page-template-gestion-des-ressources .entry-header,
body.page-template-page-gestion-des-ressources .entry-header,
body.page-template-gestion-des-ressources .entry-content,
body.page-template-page-gestion-des-ressources .entry-content {
  max-width: 90%;
  margin: 0 auto;
  padding: 10px 10px;
}

body.page-template-gestion-des-ressources .entry-header h1,
body.page-template-gestion-des-ressources .entry-header h2,
body.page-template-page-gestion-des-ressources .entry-header h1,
body.page-template-page-gestion-des-ressources .entry-header h2,
body.page-template .entry-header h1:first-of-type,
body.page-template .entry-header h2:first-of-type {
  margin: 10px 10px;
}

.gestion-ressources table.wp-list-table {
  max-width: 90%;
  margin: 0 auto 2rem;
}

body.page-template-gestion-des-ressources .add-button,
body.page-template-page-gestion-des-ressources .add-button,
.add-button {
  display: inline-block;
  margin: 0 1.5rem 2rem;
}

/* Single Ressource styles */
.single-ressource .entry-header,
.single-ressource .byline {
  display: none;
}

.single-ressource .entry-footer {
  margin-top: 2rem;
}

.single-ressource .publication-date {
  text-align: right;
  color: #777;
  font-size: 0.9rem;
}

/* =========================================================
   8. Sessions & Badges Management
   ========================================================= */
/* Spacer for fixed header */
.gestion-sessions-page > div:first-child {
  height: 125px;
}

/* Creation box */
.session-create {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

/* Integrated search forms */
.search-participant-form,
.badge-users-list form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.search-participant-form input,
.badge-users-list input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.search-participant-form button,
.badge-users-list button {
  padding: 0.5rem 1rem;
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: background 0.2s;
}

.search-participant-form button:hover,
.badge-users-list button:hover {
  background: #005f8d;
}

.search-info {
  font-size: 0.9rem;
  color: #777;
  text-align: center;
  margin-bottom: 1rem;
}

/* =========================================================
   9. Tables
   ========================================================= */
table[class$="-table"],
table.wp-list-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: #fafafa;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  font-family: "Segoe UI", Roboto, sans-serif;
}

table[class$="-table"] thead,
table.wp-list-table thead {
  background: #f0f4f8;
}

table[class$="-table"] thead th,
table.wp-list-table thead th {
  padding: 12px 16px;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #e0e4e8;
  text-align: left;
}

table[class$="-table"] tbody tr,
table.wp-list-table tbody tr {
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

table[class$="-table"] tbody tr:nth-child(even),
table.wp-list-table tbody tr:nth-child(even) {
  background: #f9fbfc;
}

table[class$="-table"] tbody tr:hover,
table.wp-list-table tbody tr:hover {
  background: #f0f8ff;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

table[class$="-table"] th,
table.wp-list-table th,
table[class$="-table"] td,
table.wp-list-table td {
  padding: 12px 16px;
  vertical-align: middle;
  color: #444;
}

table[class$="-table"] .button,
table.wp-list-table .button {
  background: #0073aa;
  color: #fff !important;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: background 0.2s, transform 0.2s;
}

table[class$="-table"] .button:hover,
table.wp-list-table .button:hover {
  background: #005f8d;
  transform: translateY(-1px);
}

/* =========================================================
   10. Ressource Perso
   ========================================================= */
/* Container styling for Pinned, FAQ & Open Badges */
.pinned-resources,
.faq-resources,
.open-badges-section {
  width: 80%;
  max-width: 80%;
  margin: 0 auto 40px;
  background-color: #FFD6B7;   /* secondary peach accent */
  padding: 40px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Grid layout for all three lists */
.pinned-list,
.faq-list,
.badge-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

/* Individual "cards" */
.pinned-list li,
.faq-list li,
.badge-list li {
  background: #f8f8f8;
  padding: 20px;
  border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Links inside cards */
.pinned-list li a,
.faq-list li a,
.badge-list li a {
  color: #005950;
  font-weight: 600;
  text-decoration: none;
}

/* Hover lift effect */
.pinned-list li:hover,
.faq-list li:hover,
.badge-list li:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

/* Section headings */
.pinned-resources h2,
.faq-resources h2,
.open-badges-section h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #7D5C37;
}

/* FAQ intro paragraph styling */
.open-badges-section .open-badges-intro {
  margin-bottom: 1.5rem;
  font-style: italic;
  color: #333;
}

/* =========================================================
   11. Media Queries & Responsive
   ========================================================= */
@media (max-width: 768px) {
  /* Add top margin to main content to prevent header overlap */
  #main.site-main {
    margin-top: 90px; /* Adjust based on header height, 75px fixed header + some spacing */
  }

  /* Tables responsiveness */
  table[class$="-table"],
  table.wp-list-table {
    display: block;
    overflow-x: auto;
  }

  table[class$="-table"] th,
  table.wp-list-table th,
  table[class$="-table"] td,
  table.wp-list-table td {
    padding: 8px 12px;
    white-space: nowrap;
  }

  .fixed-carousel {
    top: 20px;
    width: 95%;
  }

  /* Section 1: Open Badges and Formations - Mobile adjustments */
  .open-badges-content {
    background-image: none; /* Deactivate background image for phone screens */
    flex-direction: column; /* Stack content vertically */
    align-items: center; /* Center items */
    min-height: auto; /* Remove minimum height for smaller screens */
    padding: 20px 10px; /* Adjust padding */
    gap: 20px;
  }

  .open-badges-text {
    position: static; /* Remove absolute positioning */
    max-width: 100%; /* Allow text to take full width */
    text-align: center; /* Center text */
    padding: 0 10px; /* Add some horizontal padding */
    bottom: auto;
    left: auto;
    color: #333; /* Change text color for better readability on plain background */
  }

  .open-badges-text h2,
  .open-badges-text h3 {
    font-size: 1.5rem; /* Adjust font size */
    color: #7D5C37; /* Revert color for better contrast */
  }

  .open-badges-text h5 {
    font-size: 0.9rem; /* Adjust font size */
    margin-top: 0.5rem;
  }

  .open-badges-carousel {
    display: none; /* Deactivate cube carousel for phone screens */
  }

  /* Formations content layout for mobile */
  .formations-content {
    flex-direction: column; /* Make it a column layout */
    padding: 10px; /* Adjust padding */
  }

  .formations-illustration {
    max-width: 100%; /* Make illustration fit the screen width */
    padding: 10px; /* Adjust padding */
  }

  .formations-illustration img {
    width: 100%; /* Ensure image fills its container */
    height: auto; /* Maintain aspect ratio */
  }

  .formations-details {
    padding: 10px; /* Adjust padding */
  }

  .formation-cards {
    flex-direction: column; /* Stack cards vertically */
    gap: 1rem; /* Adjust gap between cards */
  }

  .formation-cards .card {
    min-width: unset; /* Remove minimum width constraint */
    width: 100%; /* Make cards take full width */
  }

  /* Section Two (Carousel) - Mobile adjustments for arrows */
  .carousel-arrows {
    padding: 0 10px; /* Reduce padding for arrows on smaller screens */
    z-index: 3; /* Ensure arrows are above content */
  }

  .carousel-prev, .carousel-next {
    width: 35px; /* Slightly smaller arrows */
    height: 35px;
    font-size: 1rem; /* Adjust font size of arrow icon */
  }

  /* Hide prev and next slides on mobile */
  .carousel-slide.prev,
  .carousel-slide.next {
    display: none;
  }

  /* Ensure active slide is centered and full width on mobile */
  .carousel-slide.active {
    left: 50%; /* Center the active slide */
    width: 90%; /* Increase width for better visibility on mobile */
    transform: translate(-50%,-50%) scale(1); /* Reset rotation and scale to 1 */
    opacity: 1; /* Ensure active slide is fully visible */
  }
}

@media (max-width: 600px) {
  .formations-content .formation-cards .card {
    flex: 1 0 100%;
  }
}

/* Further adjustments for very small screens */
@media (max-width: 480px) {
  #page header#masthead {
    height: 60px; /* Slightly smaller header */
    padding: 0.5rem 1rem;
  }

  footer.site-footer {
    height: auto;
    padding: 0.5rem 1rem;
  }

  .section-one, .section-two {
    padding: 20px 10px;
  }

  .open-badges-text h2 {
    font-size: 1.3rem;
  }

  .open-badges-text h5 {
    font-size: 0.85rem;
  }

  .carousel-item-content h3 {
    font-size: 1rem;
  }

  .carousel-item-content p {
    font-size: 0.8rem;
    max-width: 90%;
  }

  .read-more-button {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}