/* ==========================================================================
   FFA — Estilos da área de Cursos (mobile-first)
   ========================================================================== */
.courses-wrap { --ffa: #ffbf00; }

/* Toolbar / filtros */
.courses-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.courses-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.courses-filters a { display: inline-block; padding: 6px 14px; border-radius: 999px; background: #f1f2f4; color: #444; font-size: 14px; }
.courses-filters a:hover, .courses-filters a.active { background: var(--ffa); color: #1a1a1a; }

/* Busca (input + botão sempre lado a lado, inclusive no mobile) */
.courses-search { display: flex; max-width: 320px; width: 100%; }
.courses-search input {
    flex: 1 1 auto;
    width: auto !important;   /* vence a regra global input{width:100%} no mobile */
    min-width: 0;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 8px 0 0 8px;
    outline: none;
}
.courses-search button {
    flex: 0 0 auto;
    min-height: 46px;
    padding: 0 18px;
    border: none;
    background: var(--ffa);
    color: #1a1a1a;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}

/* Grid */
.courses-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 576px) { .courses-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .courses-grid { grid-template-columns: repeat(3, 1fr); } }

.course-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #eef0f4; border-radius: 14px; overflow: hidden; transition: box-shadow .3s, transform .3s; }
.course-card:hover { box-shadow: 0 16px 40px rgba(0,0,0,.09); transform: translateY(-4px); }
.course-card__thumb { position: relative; display: block; aspect-ratio: 16/10; background: #f4f5f7; overflow: hidden; }
.course-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.course-card:hover .course-card__thumb img { transform: scale(1.05); }
.course-card__thumb .placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2.4rem; color: #c9ccd2; }
.course-badge { position: absolute; top: 12px; left: 12px; background: rgba(26,26,26,.85); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.course-badge.free { right: 12px; left: auto; background: #20c997; }
.course-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.course-card__cat { font-size: 12px; color: #8a8f98; margin-bottom: 6px; }
.course-card__title { font-size: 1.2rem; line-height: 1.35; margin: 0 0 10px; }
.course-card__title a { color: #1a1a1a; }
.course-card__title a:hover { color: #d9a400; }
.course-card__excerpt { color: #666; font-size: .95rem; margin-bottom: 16px; }
.course-card__meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: #8a8f98; padding-top: 12px; border-top: 1px solid #f0f1f4; }

/* Página do curso */
.course-hero { background: #1a1a1a; color: #fff; padding: 60px 0; }
.course-hero.has-image { background-size: cover; background-position: center; background-repeat: no-repeat; }
.course-hero.has-image .course-hero__title,
.course-hero.has-image .course-hero__subtitle,
.course-hero.has-image .course-hero__cat { text-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.course-hero__cat { color: var(--ffa); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; }
.course-hero__title { color: #fff !important; font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.15; margin: 10px 0; }
.course-hero__subtitle { color: #cfcfcf !important; font-size: 1.15rem; }
.course-hero__meta, .course-hero__meta span { color: #eaeaea; }
.course-hero__meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; font-size: 15px; }
.course-hero__meta span { display: inline-flex; align-items: center; gap: 7px; }
.course-hero__meta i { color: var(--ffa); }
.course-free-tag { display: inline-block; background: #20c997; color: #fff; font-weight: 700; padding: 5px 14px; border-radius: 999px; font-size: 14px; }

.course-section { margin-bottom: 40px; }
.course-section h3 { margin-bottom: 18px; }
.course-outcomes { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .course-outcomes { grid-template-columns: 1fr 1fr; } }
.course-outcomes li { display: flex; gap: 10px; }
.course-outcomes li i { color: #20c997; margin-top: 4px; }
.course-program { counter-reset: step; padding: 0; list-style: none; }
.course-program li { position: relative; padding: 14px 16px 14px 56px; background: #f7f8fa; border-radius: 10px; margin-bottom: 10px; }
.course-program li::before { counter-increment: step; content: counter(step); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; background: var(--ffa); color: #1a1a1a; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.course-video-embed { position: relative; width: 100%; padding-top: 56.25%; border-radius: 14px; overflow: hidden; margin-bottom: 30px; }
.course-video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Instrutor */
.course-instructor { display: flex; gap: 18px; align-items: flex-start; background: #f7f8fa; border-radius: 14px; padding: 22px; }
.course-instructor img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.course-instructor .ph { width: 84px; height: 84px; border-radius: 50%; background: #e6e8ec; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 1.6rem; flex-shrink: 0; }

/* FAQ */
.course-faq .faq-item { border: 1px solid #eef0f4; border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.course-faq .faq-q { width: 100%; text-align: left; background: #fff; border: none; padding: 16px 20px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.course-faq .faq-a { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height .3s, padding .3s; color: #555; }
.course-faq .faq-item.open .faq-a { padding: 0 20px 18px; max-height: 500px; }
.course-faq .faq-item.open .faq-q i { transform: rotate(180deg); }

/* Card de inscrição (sticky) */
.enroll-card { position: sticky; top: 20px; background: #fff; border: 1px solid #eef0f4; border-radius: 16px; box-shadow: 0 12px 30px rgba(0,0,0,.06); overflow: hidden; }
.enroll-card__head { padding: 22px; background: #fff8e5; border-bottom: 1px solid #ffe9a8; }
.enroll-card__price { font-size: 1.7rem; font-weight: 800; color: #1a1a1a; }
.enroll-schedule { display: flex; gap: 12px; align-items: flex-start; padding: 16px 22px; border-bottom: 1px solid #f0f1f4; }
.enroll-schedule i { color: #d9a400; font-size: 20px; margin-top: 2px; }
.enroll-schedule strong { display: block; font-size: 13px; color: #8a8f98; font-weight: 600; }
.enroll-card__body { padding: 22px; }
.enroll-card .form-control { margin-bottom: 12px; min-height: 46px; }

/* Selects Estado/Cidade (nice-select do tema) alinhados aos inputs do card */
.enroll-card .nice-select {
    width: 100%;
    height: 46px;
    line-height: 44px;
    margin-bottom: 12px;
    padding: 0 34px 0 14px;
    border: 1px solid #d9dce1;
    border-radius: 8px;
    background-color: #fff;
    font-size: 15px;
    color: #333;
    float: none;
    display: block;
}
.enroll-card .nice-select .current { color: #333; }
.enroll-card .nice-select .list {
    width: 100%;
    max-height: 260px;
    overflow-y: auto;
    margin-top: 4px;
}
.enroll-card .nice-select.disabled { background-color: #f3f4f6; color: #9aa0a6; border-color: #e5e7eb; }
/* Fallback: se virar input de texto (API fora do ar), mantém o padrão */
.enroll-card input.form-control[name="city"] { min-height: 46px; }
.enroll-card .spots { font-size: 14px; color: #8a8f98; margin-bottom: 12px; }
.enroll-card .spots strong { color: #d9534f; }
.enroll-closed { text-align: center; padding: 30px 22px; }
.enroll-closed i { font-size: 2.4rem; color: #d7dbe0; }
.consent-line { font-size: 12px; color: #777; display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 16px; }

.courses-empty { text-align: center; padding: 60px 20px; color: #8a8f98; }
.courses-empty i { font-size: 3rem; color: #d7dbe0; margin-bottom: 16px; }
