/* =========================================================
   HERO DA PÁGINA DE CURSOS
   ========================================================= */
.courses-hero {
  padding: 6rem 0 5rem;
  background: linear-gradient(135deg, var(--primary, #0a2540) 0%, var(--accent, #1a4d7a) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.courses-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(201, 169, 97, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
  pointer-events: none;
}

.courses-hero__content {
  position: relative;
  max-width: 800px;
}

.courses-hero__kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--secondary, #c9a961);
  margin-bottom: 1.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(201, 169, 97, 0.12);
  border: 1px solid rgba(201, 169, 97, 0.25);
  border-radius: 100px;
}

.courses-hero__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin: 0 0 1.5rem;
}

.courses-hero__title em {
  color: var(--secondary, #c9a961);
  font-style: italic;
}

.courses-hero__text {
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  max-width: 650px;
}

/* =========================================================
   SECÇÃO DOS CURSOS (Layout Editorial Horizontal)
   ========================================================= */
.courses-showcase {
  padding: 6rem 0;
  background: var(--light, #f8f9fa);
}

.course-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(10, 37, 64, 0.06);
  margin-bottom: 4rem;
  border: 1px solid rgba(10, 37, 64, 0.04);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.course-feature:last-child {
  margin-bottom: 0;
}

.course-feature:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 60px rgba(10, 37, 64, 0.12);
}

/* Inverter a ordem para o segundo curso (imagem à direita) */
.course-feature--reverse {
  direction: rtl; /* Truque elegante para inverter colunas no grid */
}
.course-feature--reverse > * {
  direction: ltr; /* Restaura a direção do texto */
}

/* Lado da Imagem */
.course-feature__media {
  position: relative;
  min-height: 450px;
  overflow: hidden;
}

.course-feature__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.course-feature:hover .course-feature__media img {
  transform: scale(1.06);
}

.course-feature__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 37, 64, 0.4) 100%);
  pointer-events: none;
}

/* Lado do Conteúdo */
.course-feature__content {
  padding: 4rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.course-feature__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.course-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: rgba(201, 169, 97, 0.12);
  color: var(--secondary-dark, #a88a42);
  border-radius: 100px;
  border: 1px solid rgba(201, 169, 97, 0.2);
}

.course-feature__code {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray, #6c757d);
  letter-spacing: 1px;
}

.course-feature__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  color: var(--primary, #0a2540);
  margin: 0 0 1.25rem;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.course-feature__description {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--dark, #212529);
  margin: 0 0 2rem;
}

/* Lista de detalhes */
.course-feature__details {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.course-feature__details li {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--gray, #6c757d);
}

.course-feature__details li svg {
  width: 20px;
  height: 20px;
  color: var(--secondary, #c9a961);
  flex-shrink: 0;
}

.course-feature__details li strong {
  color: var(--primary, #0a2540);
  font-weight: 600;
}


/* =========================================================
   SECÇÃO: POR QUE ESCOLHER?
   ========================================================= */
.courses-why {
  padding: 5rem 0;
  background: var(--white);
  border-top: 1px solid rgba(10, 37, 64, 0.06);
}

.courses-why__header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.courses-why__header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--primary, #0a2540);
  margin: 0.75rem 0 0;
}

.courses-why__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.why-item {
  text-align: center;
  padding: 2rem;
  border-radius: 16px;
  transition: background-color 0.3s ease;
}

.why-item:hover {
  background: var(--light, #f8f9fa);
}

.why-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 37, 64, 0.04);
  border-radius: 50%;
  color: var(--primary, #0a2540);
  transition: all 0.3s ease;
}

.why-icon svg {
  width: 28px;
  height: 28px;
}

.why-item:hover .why-icon {
  background: var(--secondary, #c9a961);
  color: var(--white);
  transform: translateY(-4px);
}

.why-item h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--primary, #0a2540);
  margin: 0 0 0.75rem;
}

.why-item p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--gray, #6c757d);
  margin: 0;
}

/* =========================================================
   CTA FINAL
   ========================================================= */
.courses-cta {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--primary, #0a2540) 0%, var(--accent, #1a4d7a) 100%);
  color: var(--white);
  text-align: center;
}

.cta__content {
  max-width: 700px;
  margin: 0 auto;
}

.cta__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  margin: 0 0 1rem;
  letter-spacing: -0.5px;
}

.cta__text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 2.5rem;
}

.cta__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================================
   RESPONSIVIDADE
   ========================================================= */
@media (max-width: 992px) {
  .course-feature,
  .course-feature--reverse {
    grid-template-columns: 1fr;
    direction: ltr; /* Remove a inversão em mobile */
  }
  
  .course-feature__media {
    min-height: 300px;
  }
  
  .course-feature__content {
    padding: 2.5rem 2rem;
  }
  
  .courses-why__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .courses-hero {
    padding: 4rem 0 3.5rem;
  }
  
  .courses-showcase {
    padding: 4rem 0;
  }
  
  .course-feature {
    margin-bottom: 2.5rem;
    border-radius: 16px;
  }
  
  .course-feature__actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  
  .course-feature__actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .cta__actions {
    flex-direction: column;
  }
  
  .cta__actions .btn {
    width: 100%;
  }
}
/* =========================================================
   PAGE LOADER (Ecrã de Carregamento)
   ========================================================= */

.page-loader {
    position: fixed;
    inset: 0;
    /* Fundo semitransparente */
    background: rgba(3, 35, 64, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Logo/imagem de carregamento */
.page-loader::before {
    content: "";
    width: 100px;
    height: 100px;
    background-image: url("../img/ucc1.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 20px;
    border-radius: 50%;
}

/* Estado quando a página termina de carregar */
.page-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Círculo de processamento */
.loader-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--secondary, #c9a961);
    border-radius: 50%;

    animation: loader-spin 0.8s linear infinite;
}

@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}