/* ==========================================================================
   1. GLOBAL SETTINGS & MODERN CSS RESET
   ========================================================================== */
:root {
  --primary-color: #000000;
  --secondary-color: #f8f8f8;
  --accent-color: #0a2bd7;
  --text-light: #f8f8f8;
  --text-dark: #333;
  --text-muted: #646464;
  --font-family: "Manrope", sans-serif;
  font-size: 62.5%;
}

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

html,
body {
  height: 100%;
}

body {
  background-color: var(--secondary-color);
  font-family: var(--font-family);
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  /* Offset content from the fixed header */
  padding-top: 6.4rem;
}

body.no-scroll {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

.wrapper {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 2.4rem;
}

.section-padding {
  padding-block: 6.4rem;
}

.section-title {
  font-size: 2.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4.8rem;
}

/* ==========================================================================
   2. HEADER
   ========================================================================== */
.site-header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #e0e0e0;
  padding-block: 1.6rem;
}

.site-header .wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header img {
  height: 5rem;
}

.site-header a {
  text-decoration: none;
  color: var(--primary-color);
}

.site-logo h1 {
  font-size: 2.4rem;
  font-weight: 500;
}

.site-logo .bolder {
  font-size: 3.2rem;
  font-weight: 800;
}

.desktop-nav,
.desktop-button {
  display: none;
}

/* ==========================================================================
   3. HAMBURGER & MOBILE MENU
   ========================================================================== */
.hamburger-menu {
  cursor: pointer;
  z-index: 1001;
}

.hamburger-menu .bar {
  display: block;
  width: 2.5rem;
  height: 0.3rem;
  background-color: var(--primary-color);
  margin: 0.5rem 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, var(--accent-color), #4e6bff);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
}

.mobile-nav.active {
  transform: translateX(0);
}

.hamburger-menu.active {
  position: fixed;
  top: 3rem;
  right: 2.4rem;
}
.hamburger-menu.active .bar {
  background-color: var(--text-dark);
}
.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav ul {
  list-style: none;
  text-align: center;
}
.mobile-nav ul li {
  margin: 2.4rem 0;
}
.mobile-nav ul a {
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
}
.mobile-button {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--text-light);
  border-radius: 5rem;
  padding: 1.2rem 2.4rem;
  font-size: 1.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

/* ==========================================================================
   4. MAIN CONTENT & COMPONENTS
   ========================================================================== */
.hero .hero-text h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.6rem;
  background-image: linear-gradient(to right, #007df9, #00c2ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .hero-text p {
  font-size: 1.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   CLEAN CAROUSEL STYLES
   ========================================================================== */
.courses-carousel-section {
  background: #fff; /* A clean background for the section */
}

.carousel-container {
  position: relative;
}

.courses-gallery-wrapper {
  overflow-x: auto;
  /* Enables smooth scrolling via JS and native-like snapping */
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  /* Hide the scrollbar for a clean look */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.courses-gallery-wrapper::-webkit-scrollbar {
  display: none;
}

.courses-gallery {
  display: flex;
  gap: 1.6rem;
}

/* --- REPLACEMENT START --- */
.course-card {
  flex: 0 0 85%; /* Mobile carousel sizing */
  scroll-snap-align: start;
  height: 40rem;
  border-radius: 2.4rem;
  padding: 2.4rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--text-light);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  position: relative; /* Anchor for the pseudo-element */
  overflow: hidden; /* Contains the zooming background */
  z-index: 1; /* Establishes a stacking context for content */
  cursor: pointer;
  background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8));
}

/* The ::before pseudo-element holds the background image and gradient */
.course-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: -1; /* Place it behind the card content */
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth zoom */
}

/* The zoom-in effect on hover */
.course-card:hover::before {
  transform: scale(1.05);
}

/* --- Assigning the specific background images --- */
.course-card.pericia::before {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8)),
    url("/images/course-backgrounds/pericia.jpg");
}
.course-card.pericia-geral::before {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8)),
    url("/images/course-backgrounds/pericia-todas-areas.jpg");
}
.course-card.gestao::before {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8)),
    url("/images/course-backgrounds/gestao.jpg");
}
.course-card.patologias::before {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8)),
    url("/images/course-backgrounds/patologias.jpg");
}
.course-card.autocad::before {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8)),
    url("/images/course-backgrounds/Autocad.jpg");
}
.course-card.regularizacao::before {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8)),
    url("/images/course-backgrounds/regularizacao.jpg");
}
.course-card.construsmart::before {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8)),
    url("/images/course-backgrounds/combos/construsmart.png");
}
.course-card.expert::before {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8)),
    url("/images/course-backgrounds/combos/expert.png");
}
.course-card.base-solida::before {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8)),
    url("/images/course-backgrounds/combos/base-solida.png");
}
.course-card.obra-total::before {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8)),
    url("/images/course-backgrounds/combos/obra-total.png");
}
.course-card.diagnostico-avancado::before {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8)),
    url("/images/course-backgrounds/combos/diagnostico-avancado.png");
}
.course-card.peritopro::before {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8)),
    url("/images/course-backgrounds/combos/peritopro.png");
}
.course-card.mao-na-obra::before {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8)),
    url("/images/course-backgrounds/combos/mao-na-obra.png");
}
.course-card.free::before {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8)),
    url("/images/course-backgrounds/gratis/free.png");
}

.course-card .card-content {
  /* Ensure content is rendered on top of the pseudo-element */
  position: relative;
  z-index: 1;
}

.course-card .card-content h3 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 1.6rem;
  line-height: 1.3;
}

.course-card .card-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 1.6rem;
  font-weight: 600;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.course-card:hover {
  cursor: pointer;
}

/* Navigation Buttons */
.carousel-nav {
  display: none; /* Hidden on mobile where touch-scrolling is standard */
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--text-dark);
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  width: 4.8rem;
  height: 4.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.carousel-button:hover {
  background-color: var(--accent-color);
  color: var(--text-light);
  border-color: var(--accent-color);
}

#benefits .benefit-grid {
  display: grid;
  gap: 2.4rem;
}

.benefit-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  padding: 3.2rem 2.4rem;
  border-radius: 2.4rem;
  text-align: left;
}

.benefit-card h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.profile-card {
  background: var(--secondary-color);
  border-radius: 2.4rem;
  overflow: hidden;
  margin-bottom: 2.4rem;
  text-align: left;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.profile-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.profile-card .text-infos {
  padding: 2.4rem;
}

.profile-card .text-infos h3 {
  font-size: 2.2rem;
}

.profile-card .text-infos .role {
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 1.6rem;
}

/* ==========================================================================
   X. TESTIMONIALS SECTION
   ========================================================================== */
#testimonials {
  background-color: #ffffff; /* Using white for contrast */
}

.testimonial-grid {
  display: grid;
  gap: 2.4rem;
}

.testimonial-card {
  background: var(--secondary-color);
  border: 1px solid #e0e0e0;
  padding: 3.2rem 2.4rem;
  border-radius: 2.4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* NEW: Consistent min-height for visual stability on mobile/small screens */
  min-height: 28rem;
  transition: all 0.3s ease;
}

.testimonial-card img {
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 2.4rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.testimonial-card p {
  font-size: 1.6rem;
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: 2.4rem;
}

.testimonial-card .student-info h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-dark);
}

.testimonial-card .student-info .course {
  color: var(--accent-color);
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0;
}

@media (min-width: 769px) {
  /* Bento Grid Layout */
  #testimonials .testimonial-grid {
    /* Mude para 2 colunas no desktop */
    grid-template-columns: repeat(2, 1fr);
    /* Garante que as linhas tenham uma altura mínima para o efeito Bento */
    grid-auto-rows: minmax(25rem, auto);
  }

  /* Card 1 (Angélica Simões) - Ocupa as 2 colunas na linha de cima */
  .testimonial-grid > .testimonial-card:nth-child(1) {
    grid-column: 1 / span 2;
    /* Torna o card maior para o visual de banner */
    min-height: 34rem;
  }

  /* Os Cards 2 e 3 (Ricardo e Ana Paula) ocupam 1fr cada na segunda linha, 
     heredando o min-height de 25rem, garantindo o alinhamento visual. */
  .testimonial-grid > .testimonial-card:nth-child(2),
  .testimonial-grid > .testimonial-card:nth-child(3) {
    min-height: 25rem;
  }

  /* ... outros estilos desktop ... */
}

/* ==========================================================================
   X. CONTACT SECTION
   ========================================================================== */
.contact-grid {
  display: grid;
  gap: 4.8rem;
}

.contact-info h3 {
  font-size: 2.4rem;
  margin-bottom: 1.6rem;
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 3.2rem;
}

.contact-details {
  margin-bottom: 3.2rem;
}

.contact-details .detail-item {
  display: flex;
  gap: 1.6rem;
  margin-bottom: 1.6rem;
}

.contact-details .detail-item .material-symbols-outlined {
  color: var(--accent-color);
}

.contact-details .detail-item a,
.contact-details .detail-item p {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 1.6rem;
  font-weight: 600;
}

.contact-details .detail-item a:hover {
  text-decoration: underline;
}

.contact-socials {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.contact-socials .social-link {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.contact-socials .social-link:hover {
  color: var(--accent-color);
}

.contact-form .form-group {
  margin-bottom: 2.4rem;
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1.2rem 1.6rem;
  border-radius: 1.2rem;
  border: 1px solid #e0e0e0;
  font-family: var(--font-family);
  font-size: 1.6rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(10, 43, 215, 0.2);
}

.contact-form textarea {
  resize: vertical;
}

.contact-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  width: 100%;
  height: 4.8rem;
  border-radius: 5rem;
  border: 1px solid var(--accent-color);
  background: var(--accent-color);
  color: var(--text-light);
  font-size: 1.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-submit-button:hover {
  background: #0822a7; /* A slightly darker blue for hover */
  border-color: #0822a7;
}

.consultant-button {
  display: inline-block;
  margin-top: 2.4rem;
  padding: 1rem 2.4rem;
  border: 2px solid var(--accent-color);
  border-radius: 5rem;
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.consultant-button:hover {
  background-color: var(--accent-color);
  color: var(--text-light);
  transform: translateY(-2px);
}

.process-grid {
  display: grid;
  gap: 2.4rem;
}

.process-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  padding: 3.2rem 2.4rem;
  border-radius: 2.4rem;
  text-align: center;
}

.process-card .material-symbols-outlined {
  font-size: 4.8rem;
  color: var(--accent-color);
  margin-bottom: 1.6rem;
  display: block;
  transform: scale(1.1);
}

.process-card h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.topics-grid {
  display: grid;
  gap: 2.4rem;
}

/* ==========================================================================
   X. CALL TO ACTION (CTA) SECTION
   ========================================================================== */
#cta {
  background: var(--accent-color);
  color: var(--text-light);
}

.cta-content {
  text-align: center;
  max-width: 650px;
  margin-inline: auto;
}

.cta-content h2 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1.6rem;
}

.cta-content p {
  font-size: 1.8rem;
  margin-bottom: 3.2rem;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  height: 5.6rem;
  line-height: 5.6rem;
  padding-inline: 4.8rem;
  border-radius: 5rem;
  background: var(--text-light);
  color: var(--accent-color);
  font-size: 1.8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   COURSES PAGE STYLES
   ========================================================================== */
.courses-grid {
  display: grid;
  gap: 2.4rem;
  /* Start with a single column on mobile */
  grid-template-columns: 1fr;
}

/* ==========================================================================
   PROJECTS PAGE STYLES (with Image Carousel)
   ========================================================================== */
.projects-grid {
  display: grid;
  gap: 3.2rem;
}

.project-card {
  background: var(--secondary-color);
  border-radius: 2.4rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

/* --- KEY ARCHITECTURAL CHANGE (START) --- */
.project-carousel-wrapper {
  position: relative; /* Anchor for absolutely positioned children */
  aspect-ratio: 16 / 10;
  width: 100%;
}

.project-image-carousel {
  /* Take the carousel out of the document flow to bypass the WebKit bug */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  display: flex; /* Flexbox is safe to use here now its dimensions are absolute */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.project-image-carousel::-webkit-scrollbar {
  display: none;
}

.project-image-carousel img {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  scroll-snap-align: center;
  object-fit: cover;
}
/* --- KEY ARCHITECTURAL CHANGE (END) --- */

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 4rem;
  height: 4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease, background-color 0.3s ease;
}
.project-carousel-wrapper:hover .carousel-btn,
.project-carousel-wrapper:focus-within .carousel-btn {
  opacity: 1;
}
.carousel-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
}
.carousel-btn.prev {
  left: 1.6rem;
}
.carousel-btn.next {
  right: 1.6rem;
}
.carousel-btn.hidden {
  opacity: 0 !important;
  pointer-events: none;
}

.carousel-pagination {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.8rem;
  z-index: 10;
}

.pagination-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  transition: background-color 0.3s ease;
}

.pagination-dot.active {
  background-color: #ffffff;
}

.project-info {
  padding: 2.4rem;
}
.project-info h3 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.project-info p:first-of-type {
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 1.6rem;
}
.project-info p:last-of-type {
  color: var(--text-muted);
}

/* ==========================================================================
   ABOUT PAGE STYLES
   ========================================================================== */
.story-wrapper {
  display: grid;
  gap: 3.2rem;
  align-items: center;
}

.story-image img {
  border-radius: 2.4rem;
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.story-content p {
  color: var(--text-muted);
  font-size: 1.8rem;
  margin-bottom: 2.4rem;
}

/* ==========================================================================
   X. FAQ SECTION
   ========================================================================== */
.faq-container {
  max-width: 800px;
  margin-inline: auto;
  display: grid;
  gap: 1.6rem;
}

.faq-item {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 1.6rem;
  transition: background-color 0.3s ease;
}

.faq-item.active {
  background-color: var(--secondary-color);
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 2rem 2.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-dark);
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  /* Modern approach for smooth height transition */
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
}

.faq-item.active .faq-answer {
  grid-template-rows: 1fr;
}

/* This inner div prevents content jumping during the animation */
.faq-answer > div {
  overflow: hidden;
}

.faq-answer p {
  padding: 0 2.4rem 2.4rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ==========================================================================
   5. FOOTER
   ========================================================================== */
.site-footer {
  background: #1c1c1c;
  color: var(--text-light);
  text-align: center;
}

.site-footer .wrapper {
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
}

.footer-company h2 {
  font-size: 3.2rem;
  font-weight: 500;
}

.footer-company .bolder {
  font-weight: 800;
}

.footer-institutional p {
  font-size: 1.4rem;
  color: #aaa;
}
.footer-institutional a {
  color: var(--text-light);
  text-decoration: none;
}
.footer-institutional a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   6. DESKTOP STYLES (min-width: 769px)
   ========================================================================== */
@media (min-width: 769px) {
  .section-title {
    font-size: 3.2rem;
  }

  .hamburger-menu {
    display: none;
  }

  .header-actions {
    display: flex;
    align-items: center;
  }

  .desktop-nav {
    display: block;
    margin-right: 2.4rem;
  }

  .desktop-nav ul {
    display: flex;
    gap: 2.4rem;
    list-style: none;
  }

  .desktop-nav a {
    position: relative;
    padding-bottom: 0.4rem;
    transition: color 0.3s ease;
  }

  .desktop-nav a:hover {
    color: var(--accent-color);
  }

  .desktop-nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
  }

  .desktop-nav a:hover::after {
    transform: scaleX(1);
  }

  .desktop-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    height: 4rem;
    width: 15rem;
    border-radius: 5rem;
    border: 1px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .desktop-button:hover {
    background: var(--accent-color);
    color: var(--text-light);
    border-color: var(--accent-color);
  }

  .hero .hero-text h1 {
    font-size: 4.8rem;
  }

  .courses-gallery-wrapper {
    cursor: default;
    /* This removes the scrollbar visibility on desktop for a cleaner look, */
    /* but the JS scrolling functionality will still work. */
    overflow: hidden;
  }

  .courses-gallery-wrapper {
    cursor: default;
  }

  .course-card {
    flex-basis: calc((100% - 3.2rem) / 3);
  }

  .carousel-nav {
    display: block;
  }

  .carousel-button.prev {
    left: -2.4rem;
  }

  .carousel-button.next {
    right: -2.4rem;
  }

  #benefits .benefit-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .profile-card {
    display: flex;
    align-items: center;
    max-height: 38rem;
  }

  .profile-card.reverse {
    flex-direction: row-reverse;
  }

  .profile-card img {
    width: 38rem;
    height: 38rem;
    flex-shrink: 0;
  }
  .profile-card .text-infos {
    padding: 4.8rem;
  }

  #testimonials .testimonial-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  #contact .contact-grid {
    grid-template-columns: 1fr 1.2fr; /* Give slightly more space to the form */
    align-items: flex-start;
  }

  .contact-submit-button {
    width: auto;
    padding-inline: 4.8rem;
  }

  .process-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-content h2 {
    font-size: 3.2rem;
  }

  .courses-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .story-wrapper {
    grid-template-columns: 1fr 1.5fr; /* Give more space to the text */
    gap: 6.4rem;
  }

  .site-footer .wrapper {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  .footer-institutional {
    text-align: right;
  }
}
