/* ============================================================
   ProRisco Academy — CSS Principal
   Paleta: Azul escuro #1a2b5e | Dourado #e8a020 | Branco
   ============================================================ */

:root {
  --navy:       #1a2b5e;
  --navy-dark:  #111e45;
  --navy-mid:   #243370;
  --gold:       #e8a020;
  --gold-dark:  #c88a10;
  --gold-light: #f5c050;
  --white:      #ffffff;
  --gray-light: #f8f9fa;
  --gray:       #6c757d;
  --text:       #333344;
  --transition: all .3s ease;
}

/* --- Base --- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  font-size: .875rem;
  color: var(--text);
  background: #fff;
  padding-top: 0;  /* controlado por margin-top no conteúdo */
}

/* --- Utilitários de cor --- */
.text-gold      { color: var(--gold) !important; }
.bg-navy        { background-color: var(--navy) !important; }
.bg-dark-navy   { background-color: var(--navy-dark) !important; }
.bg-gold-dark   { background-color: var(--navy) !important; }

/* --- Espaçamentos reduzidos globalmente --- */
.py-5  { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
.py-4  { padding-top: 1.75rem !important; padding-bottom: 1.75rem !important; }
.mb-5  { margin-bottom: 2rem !important; }
.mb-4  { margin-bottom: 1.25rem !important; }
.mt-5  { margin-top: 2rem !important; }
.g-5   { --bs-gutter-x: 1.5rem !important; --bs-gutter-y: 1.5rem !important; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
h5 { font-size: .9rem; }
h6 { font-size: .8rem; }
p  { font-size: .875rem; line-height: 1.65; margin-bottom: .65rem; }
small, .small { font-size: .78rem; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar-prorisco {
  background: var(--navy);
  padding: .5rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
  transition: var(--transition);
  min-height: 54px;
}
.navbar-prorisco.scrolled {
  padding: .35rem 0;
  background: rgba(26,43,94,.97);
}
.navbar-prorisco .nav-link {
  color: rgba(255,255,255,.85) !important;
  font-size: .78rem;
  font-weight: 500;
  padding: .45rem .45rem !important;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}
.navbar-prorisco .nav-link::after {
  content: '';
  position: absolute; bottom: 0; left: .45rem; right: .45rem;
  height: 2px; background: var(--gold);
  transform: scaleX(0);
  transition: transform .3s ease;
}
.navbar-prorisco .nav-link:hover,
.navbar-prorisco .nav-link.active { color: var(--gold) !important; }
.navbar-prorisco .nav-link:hover::after,
.navbar-prorisco .nav-link.active::after { transform: scaleX(1); }
.navbar-toggler { border-color: var(--gold); }
.navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23e8a020' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); }

/* Logo */
.logo-icon {
  width: 36px; height: 36px;
  background: var(--gold);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-icon-sm { width: 30px; height: 30px; border-radius: 6px; }
.logo-p { font-size: 1.2rem; font-weight: 900; color: var(--navy); line-height: 1; }
.logo-p-lg { font-size: 2.5rem; font-weight: 900; color: var(--navy); }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-size: .85rem; font-weight: 800; color: var(--white); letter-spacing: 1px; white-space: nowrap; }
.logo-sub  { font-size: .45rem; color: var(--gold); letter-spacing: .5px; white-space: nowrap; }

/* Botões navbar */
.btn-gold {
  background: var(--gold); color: var(--navy) !important;
  border: 2px solid var(--gold);
  font-weight: 700; border-radius: 6px;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff !important; }
.btn-outline-gold {
  background: transparent; color: var(--gold) !important;
  border: 2px solid var(--gold);
  font-weight: 600; border-radius: 6px;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-outline-gold:hover { background: var(--gold); color: var(--navy) !important; }
.btn-outline-white {
  background: transparent; color: #fff !important;
  border: 2px solid rgba(255,255,255,.7);
  font-weight: 600; border-radius: 6px;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-outline-white:hover { background: rgba(255,255,255,.15); }

/* Botões específicos do navbar — compactos */
.btn-nav {
  font-size: .78rem !important;
  padding: .35rem .85rem !important;
  white-space: nowrap;
  line-height: 1.4;
}
/* Link de texto simples no navbar (sem fundo) — ex: "Área do Aluno", nome do
   utilizador. O navbar tem fundo navy, por isso precisa de cor clara, não navy. */
.btn-nav-plain { color: rgba(255,255,255,.85) !important; }
.btn-nav-plain:hover { color: var(--gold) !important; }

/* ============================================================
   HERO — começa imediatamente após o navbar
   ============================================================ */
.hero-section {
  position: relative;
  min-height: calc(100vh - 54px);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--navy-dark);
}

/* O carousel ocupa toda a secção */
#heroCarousel,
#heroCarousel .carousel-inner,
#heroCarousel .carousel-item {
  height: 100%;
}
.carousel-item { background: var(--navy-dark); }

/* Altura mínima dos slides */
.min-vh-slides {
  min-height: calc(100vh - 54px);
  padding: 4rem 0 2rem;
}

/* Indicadores */
.carousel-indicators [data-bs-target] {
  width: 28px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,.5); border: none;
  transition: all .3s ease;
}
.carousel-indicators .active {
  background: var(--gold); width: 40px;
}

/* Controlos prev/next */
.carousel-control-prev, .carousel-control-next {
  width: 48px; opacity: 1;
}
.hero-ctrl-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(232,160,32,.25);
  border: 2px solid rgba(232,160,32,.5);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: .85rem;
  transition: var(--transition);
}
.carousel-control-prev:hover .hero-ctrl-btn,
.carousel-control-next:hover .hero-ctrl-btn {
  background: var(--gold); color: var(--navy); border-color: var(--gold);
}

/* Conteúdo do hero (por cima do carousel) */
.hero-content {
  position: relative; z-index: 2;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .35;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(26,43,94,.9) 0%, rgba(17,30,69,.6) 100%);
}
.hero-content { position: relative; z-index: 2; }
.hero-title {
  font-size: clamp(1.3rem, 2.8vw, 2.2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.hero-title .text-gold { color: var(--gold); }
/* Cada linha do título em bloco separado */
.hero-title-line {
  display: block;
  color: #fff;
  line-height: 1.2;
}
.hero-title-line.text-gold { color: var(--gold); }
.hero-subtitle {
  font-size: .85rem; color: rgba(255,255,255,.8); line-height: 1.6;
}
.btn-hero { padding: .5rem 1.4rem; font-size: .82rem; }
.hero-badge-box {
  background: rgba(232,160,32,.1);
  border: 1px solid rgba(232,160,32,.3);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  backdrop-filter: blur(8px);
}
.hero-badge-text {
  color: var(--gold-light);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 .2rem;
}
.hero-logo-circle {
  width: 48px; height: 48px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: .5rem auto 0;
}

/* ============================================================
   SERVICES BAR (ícones)
   ============================================================ */
.services-bar { border-top: 3px solid var(--gold); }
.service-icon-item {
  display: flex; flex-direction: column; align-items: center;
  text-decoration: none; color: rgba(255,255,255,.8);
  transition: var(--transition);
  padding: .35rem;
  border-radius: 6px;
}
.service-icon-item:hover { color: var(--gold); background: rgba(255,255,255,.05); }
.service-icon-circle {
  width: 40px; height: 40px;
  background: rgba(232,160,32,.15);
  border: 1px solid rgba(232,160,32,.3);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--gold);
  margin-bottom: .3rem;
  transition: var(--transition);
}
.service-icon-item:hover .service-icon-circle { background: var(--gold); color: var(--navy); }
.service-icon-label { font-size: .58rem; font-weight: 600; text-align: center; text-transform: uppercase; letter-spacing: .3px; }

/* ============================================================
   ESTATÍSTICAS
   ============================================================ */
.stat-item { padding: 1rem; }
.stat-icon { font-size: 1.5rem; color: var(--gold); opacity: .8; }
.stat-number {
  font-size: 2.2rem; font-weight: 900;
  color: var(--gold); line-height: 1; margin: .15rem 0;
}
.stat-label { font-size: .75rem; color: rgba(255,255,255,.7); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
  font-size: 1.25rem; font-weight: 800;
  color: var(--navy); text-transform: uppercase;
  letter-spacing: 1px; position: relative; display: inline-block;
}
.section-title::after {
  content: ''; display: block; height: 3px; width: 50px;
  background: var(--gold); margin: .35rem auto 0; border-radius: 2px;
}

/* ============================================================
   TESTEMUNHOS
   ============================================================ */
.testimonials-section { background: var(--gray-light); }
.testimonial-card {
  background: #fff; border-radius: 10px; padding: 1.25rem;
  box-shadow: 0 3px 15px rgba(0,0,0,.07);
  border-bottom: 3px solid var(--gold); transition: var(--transition);
}
.testimonial-card:hover { transform: translateY(-3px); box-shadow: 0 6px 22px rgba(0,0,0,.1); }
.testimonial-text { font-size: .82rem; line-height: 1.65; color: #555; font-style: italic; }
.testimonial-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.testimonial-avatar-default {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--navy); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}

/* ============================================================
   PARCEIROS (marquee)
   ============================================================ */
.partners-section { border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.partners-track {
  display: flex; gap: 3rem; align-items: center;
  overflow: hidden;
  animation: marquee 30s linear infinite;
  white-space: nowrap;
}
.partners-track:hover { animation-play-state: paused; }
.partner-item { flex-shrink: 0; opacity: .85; transition: var(--transition); }
.partner-item:hover { opacity: 1; }
.partner-item img { height: 45px; object-fit: contain; transition: var(--transition); }
.partner-name-text { font-weight: 700; color: var(--navy); font-size: .9rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   BOTTOM GRID (Cursos / Proposta / Mapa / Soluções)
   ============================================================ */
.bottom-grid-section { background: #f4f6fb; }
.bottom-card {
  background: #fff; border-radius: 10px; padding: 1.1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.bottom-card-dark { background: var(--navy); color: #fff; }
.bottom-card-title {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--navy);
  border-bottom: 2px solid var(--gold);
  padding-bottom: .4rem; margin-bottom: .75rem;
}
.bottom-card-dark .bottom-card-title { color: #fff; }
.course-list { margin: 0; }
.course-list-item {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .4rem 0; border-bottom: 1px solid #f0f0f0;
}
.course-list-item:last-child { border-bottom: none; }
.course-date-badge {
  background: var(--navy); color: #fff;
  border-radius: 5px; padding: .25rem .4rem;
  text-align: center; min-width: 34px; flex-shrink: 0; line-height: 1.1;
}
.course-date-badge .day { display: block; font-size: .82rem; font-weight: 800; color: var(--gold); }
.course-date-badge .mon { display: block; font-size: .55rem; text-transform: uppercase; color: rgba(255,255,255,.7); }
.course-list-title { font-size: .75rem; font-weight: 600; color: var(--navy); text-decoration: none; }
.course-list-title:hover { color: var(--gold); }
.proposta-form .form-control { border-radius: 5px; font-size: .78rem; padding: .3rem .6rem; }
.proposta-form .form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 .15rem rgba(232,160,32,.25); }
.map-container { border-radius: 7px; overflow: hidden; border: 1px solid #e9ecef; }
.solution-item { color: rgba(255,255,255,.85); margin-bottom: .45rem; font-size: .8rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer-prorisco { background: var(--navy-dark); }
.footer-top { padding: 2.5rem 0 1.5rem; }
.footer-title {
  font-size: .7rem; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--gold);
  border-bottom: 1px solid rgba(255,255,255,.1);
  padding-bottom: .4rem; margin-bottom: .75rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li, .footer-links a {
  color: rgba(255,255,255,.6); font-size: .78rem;
  margin-bottom: .35rem; text-decoration: none;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--gold); padding-left: 3px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: .9rem 0;
}
.social-btn {
  width: 30px; height: 30px; border-radius: 6px;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-decoration: none; font-size: .78rem;
  transition: var(--transition);
}
.social-btn:hover { background: var(--gold); color: var(--navy); }
.footer-cta-box {
  background: var(--navy-mid); border-radius: 8px;
  padding: 1rem; border-left: 3px solid var(--gold);
}
.footer-cta-box p { font-size: .8rem; line-height: 1.4; margin-bottom: .4rem; }

/* ============================================================
   CURSOS PAGE
   ============================================================ */
.curso-card {
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.07); transition: var(--transition);
  border: 1px solid #eee; height: 100%; display: flex; flex-direction: column;
}
.curso-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.curso-card-img { height: 150px; object-fit: cover; width: 100%; }
.curso-card-img-placeholder {
  height: 150px; background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: var(--gold);
}
.curso-card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.curso-cat-badge {
  display: inline-block; padding: .15rem .55rem;
  border-radius: 20px; font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: .6rem;
}
.curso-card-title { font-size: .88rem; font-weight: 700; color: var(--navy); margin-bottom: .4rem; }
.curso-card-meta { font-size: .72rem; color: var(--gray); margin-bottom: .6rem; }
.curso-card-meta i { color: var(--gold); margin-right: .25rem; }
.curso-card-footer { margin-top: auto; padding-top: .75rem; border-top: 1px solid #f0f0f0; }
.curso-card-price { font-size: .95rem; font-weight: 800; color: var(--navy); margin-bottom: .5rem; }
.curso-card-price small { font-size: .68rem; font-weight: 500; color: var(--gray); }
.curso-vagas-wrap { margin-bottom: .6rem; }
.curso-vagas-bar { height: 5px; border-radius: 4px; background: #eef0f3; overflow: hidden; }
.curso-vagas-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--navy)); border-radius: 4px; }
.curso-vagas-label { display: block; font-size: .68rem; color: var(--gray); margin-top: .3rem; }
.curso-vagas-label.quase-esgotado { color: #c0392b; font-weight: 600; }

/* ============================================================
   PORTFÓLIO PAGE
   ============================================================ */
.portfolio-filter .btn {
  border-radius: 20px; font-size: .75rem; font-weight: 600;
  transition: var(--transition); padding: .3rem .85rem;
}
.portfolio-filter .btn.active,
.portfolio-filter .btn:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.portfolio-item { position: relative; overflow: hidden; border-radius: 8px; cursor: pointer; }
.portfolio-item img { width: 100%; height: 220px; object-fit: cover; transition: transform .4s ease; }
.portfolio-item:hover img { transform: scale(1.05); }
.portfolio-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26,43,94,.92) 0%, rgba(26,43,94,.55) 45%, transparent 75%);
  transition: var(--transition);
  display: flex; flex-direction: column;
  justify-content: flex-end; padding: 1rem;
}
.portfolio-item:hover .portfolio-overlay {
  background: linear-gradient(to top, rgba(26,43,94,.96) 0%, rgba(26,43,94,.78) 55%, rgba(26,43,94,.18) 100%);
}
.portfolio-overlay h5 { color: #fff; font-weight: 700; margin-bottom: .2rem; font-size: .85rem; }
.portfolio-overlay p  { color: var(--gold-light); font-size: .75rem; margin: 0; }
.portfolio-overlay .btn { opacity: 0; transform: translateY(6px); transition: var(--transition); }
.portfolio-item:hover .portfolio-overlay .btn { opacity: 1; transform: translateY(0); }
.portfolio-img-placeholder {
  height: 220px; background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--gold);
}

/* ============================================================
   BLOG PAGE
   ============================================================ */
.blog-card {
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.07); transition: var(--transition);
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.blog-card-img { height: 160px; object-fit: cover; width: 100%; }
.blog-card-img-placeholder {
  height: 160px; background: var(--navy);
  display: flex; align-items: center; justify-content: center;
}
.blog-card-body { padding: 1rem; }
.blog-card-title { font-size: .85rem; font-weight: 700; color: var(--navy); margin-bottom: .35rem; }
.blog-card-title a { text-decoration: none; color: inherit; }
.blog-card-title a:hover { color: var(--gold); }
.blog-meta { font-size: .7rem; color: var(--gray); }

/* Page hero (páginas internas) — também empurra para baixo do navbar */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-mid) 100%);
  padding: 2.5rem 0 1.75rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; top: -50%; right: -10%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(232,160,32,.12) 0%, transparent 70%);
  border-radius: 50%;
}
.page-hero h1 { font-weight: 800; font-size: 1.5rem; text-transform: uppercase; margin-bottom: .25rem; }
.page-hero p  { font-size: .82rem; margin-bottom: 0; }
.page-hero .breadcrumb-item { font-size: .78rem; }
.page-hero .breadcrumb-item a { color: var(--gold); text-decoration: none; }
.page-hero .breadcrumb-item.active { color: rgba(255,255,255,.65); }
.breadcrumb { margin-bottom: .4rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* navbar altura exacta = ~54px; usamos CSS var para evitar repetição */
:root { --navbar-h: 54px; }

/* Empurra qualquer secção inicial para baixo do navbar */
.hero-section  { margin-top: var(--navbar-h); }
.page-hero     { margin-top: var(--navbar-h); }

@media (max-width: 1399px) {
  .navbar-prorisco .nav-link { font-size: .72rem; padding: .4rem .32rem !important; }
  .btn-nav { font-size: .72rem !important; padding: .28rem .55rem !important; }
  .logo-name { font-size: .78rem; }
  .logo-sub  { display: none; }
}

@media (max-width: 1199px) {
  /* Hambúrguer — menu vertical */
  .navbar-collapse {
    background: var(--navy-dark);
    padding: .75rem 1rem 1rem;
    border-radius: 0 0 8px 8px;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .navbar-prorisco .nav-link { padding: .5rem .65rem !important; font-size: .85rem; }
  .navbar-prorisco .nav-link::after { display: none; }
  .btn-nav {
    font-size: .85rem !important;
    padding: .45rem 1rem !important;
    width: 100%;
    display: block;
    text-align: center;
    margin-top: .35rem;
  }
}

@media (max-width: 991px) {
  .hero-title { font-size: clamp(1.4rem, 5vw, 2.2rem); }
  .stat-number { font-size: 1.8rem; }
  .sobre-stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
  :root { --navbar-h: 50px; }
  .min-vh-slides { min-height: 75vh; padding: 2.5rem 0 1.5rem; }
  .hero-section { min-height: 75vh; }
  .partners-track { gap: 1.5rem; }
  .section-title { font-size: 1.1rem; }
  .sobre-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { padding: 1.75rem 0 1rem; }
  .stat-number { font-size: 1.6rem; }
  .page-hero h1 { font-size: 1.25rem; }
  .bottom-card { padding: .85rem; }
  .carousel-indicators { bottom: .5rem; }
}
