/* ==========================================================
   IACI Online Academy — course catalog, course page, student area
   Builds on the variables defined in luxury/css/style.css
   ========================================================== */

.ac-section { padding-block: 64px 90px; background: var(--off-white); }
.ac-muted { color: var(--text-muted); }
.ac-flash { padding: .9rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.4rem; font-size: .9rem; display: flex; gap: .7rem; align-items: flex-start; }
.ac-flash.success { background: #ecfdf3; border: 1px solid #abefc6; color: #067647; }
.ac-flash.error   { background: #fef3f2; border: 1px solid #fecdca; color: #b42318; }
.ac-flash.info    { background: #fffaeb; border: 1px solid #fedf89; color: #93370d; }
.ac-flash ul { margin: 0; padding-left: 1.1rem; }

/* ---------- Search ---------- */
.ac-search { display: flex; max-width: 520px; margin: 1.4rem auto 0; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.ac-search input { flex: 1; min-width: 0; border: 0; padding: .9rem 1.1rem; font: inherit; outline: none; }
.ac-search button { border: 0; background: var(--gold); color: var(--navy); padding: 0 1.3rem; cursor: pointer; font-weight: 600; }

/* ---------- Course cards ---------- */
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.6rem; }
.ac-card { background: var(--white); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; transition: transform var(--transition), box-shadow var(--transition); color: inherit; text-decoration: none; }
.ac-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.ac-card-img { position: relative; aspect-ratio: 16/9; background: var(--navy); overflow: hidden; }
.ac-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.ac-card:hover .ac-card-img img { transform: scale(1.05); }
.ac-badge { position: absolute; top: .7rem; left: .7rem; background: var(--gold); color: var(--navy); font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .6rem; border-radius: 3px; }
.ac-card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.ac-card-title { font-family: var(--ff-heading); font-size: 1.3rem; font-weight: 600; color: var(--navy); line-height: 1.2; margin: 0; }
.ac-card-sub { font-size: .82rem; color: var(--text-mid); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-card-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .75rem; color: var(--text-muted); }
.ac-card-meta i { color: var(--gold); margin-right: .25rem; }
.ac-card-foot { margin-top: auto; padding-top: .6rem; display: flex; align-items: baseline; gap: .5rem; }
.ac-price { font-size: 1.25rem; font-weight: 700; color: var(--navy); }
.ac-price-old { font-size: .85rem; color: var(--text-muted); text-decoration: line-through; }
.ac-empty { text-align: center; padding: 4rem 1rem; color: var(--text-muted); }
.ac-empty i { font-size: 2.4rem; color: var(--gold); margin-bottom: 1rem; display: block; }

/* ---------- Course page hero (Udemy-like) ---------- */
.ac-hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); color: #fff; padding: 140px 0 48px; }
.ac-hero .breadcrumb a, .ac-hero .breadcrumb li { color: var(--gold-light); font-size: .8rem; }
.ac-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 3rem; }
.ac-hero h1 { font-family: var(--ff-heading); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.12; margin: .8rem 0 .7rem; color: #fff; }
.ac-hero-sub { font-size: 1.05rem; color: rgba(255,255,255,.85); line-height: 1.6; margin-bottom: 1rem; }
.ac-hero-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .82rem; color: rgba(255,255,255,.8); }
.ac-hero-meta i { color: var(--gold); margin-right: .35rem; }
.ac-hero-meta a { color: var(--gold-light); text-decoration: underline; }
.ac-stars { color: #f5b301; letter-spacing: 1px; }

.ac-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 3rem; align-items: start; }
.ac-main { padding-top: 2.4rem; min-width: 0; }

/* ---------- Sticky purchase card ---------- */
.ac-buy { position: sticky; top: 100px; margin-top: -260px; background: var(--white); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-lg); overflow: hidden; z-index: 2; }
.ac-buy-preview { position: relative; display: block; width: 100%; aspect-ratio: 16/9; background: var(--navy) center/cover no-repeat; border: 0; cursor: pointer; padding: 0; }
.ac-buy-preview::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,27,62,.05) 30%, rgba(13,27,62,.75)); }
.ac-play { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; background: #fff; color: var(--navy); display: grid; place-items: center; font-size: 1.3rem; box-shadow: 0 8px 30px rgba(0,0,0,.3); transition: transform .25s; }
.ac-buy-preview:hover .ac-play { transform: translate(-50%, -50%) scale(1.08); }
.ac-play i { margin-left: 4px; }
.ac-buy-preview span.lbl { position: absolute; bottom: .8rem; left: 0; right: 0; text-align: center; color: #fff; font-weight: 600; font-size: .9rem; }
.ac-buy-body { padding: 1.4rem; }
.ac-buy-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.ac-buy-price .ac-price { font-size: 2rem; }
.ac-off { color: #067647; font-size: .85rem; font-weight: 600; }
.ac-btn-block { width: 100%; justify-content: center; padding: 1rem; font-size: .9rem; }
.ac-buy form { margin: 0; }
.ac-includes { margin-top: 1.3rem; }
.ac-includes h5 { font-size: .9rem; font-weight: 600; color: var(--navy); margin: 0 0 .6rem; font-family: var(--ff-body); }
.ac-includes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.ac-includes li { font-size: .82rem; color: var(--text-mid); display: flex; gap: .6rem; }
.ac-includes li i { color: var(--gold); width: 16px; text-align: center; margin-top: 2px; }
.ac-note { font-size: .75rem; color: var(--text-muted); text-align: center; margin-top: .8rem; line-height: 1.5; }

/* ---------- Content blocks ---------- */
.ac-block { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 1.6rem 1.8rem; margin-bottom: 1.6rem; }
.ac-block h2 { font-family: var(--ff-heading); font-size: 1.7rem; color: var(--navy); margin: 0 0 1rem; }
.ac-learn { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1.6rem; list-style: none; margin: 0; padding: 0; }
.ac-learn li { min-width: 0; overflow-wrap: anywhere; display: flex; gap: .7rem; font-size: .88rem; color: var(--text-mid); line-height: 1.5; }
.ac-learn li i { color: var(--gold); margin-top: 4px; }
.ac-list { margin: 0; padding-left: 1.2rem; color: var(--text-mid); font-size: .9rem; line-height: 1.8; }
.ac-rich { color: var(--text-mid); font-size: .93rem; line-height: 1.8; }
.ac-rich img { max-width: 100%; height: auto; }

/* curriculum */
.ac-curr-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .85rem; color: var(--text-mid); margin-bottom: .8rem; }
.ac-link-btn { background: none; border: 0; color: var(--gold-dark); font-weight: 600; cursor: pointer; font-size: .85rem; padding: 0; }
.ac-sec { border: 1px solid #e7e3d6; border-bottom: 0; }
.ac-sec:last-child { border-bottom: 1px solid #e7e3d6; }
.ac-sec > summary { list-style: none; cursor: pointer; background: #faf9f5; padding: .95rem 1.1rem; display: flex; align-items: center; gap: .8rem; font-weight: 600; color: var(--navy); font-size: .92rem; }
.ac-sec > summary::-webkit-details-marker { display: none; }
.ac-sec > summary .chev { transition: transform .25s; color: var(--gold-dark); font-size: .75rem; }
.ac-sec[open] > summary .chev { transform: rotate(180deg); }
.ac-sec > summary .sec-meta { margin-left: auto; font-weight: 400; font-size: .78rem; color: var(--text-muted); white-space: nowrap; }
.ac-lec { display: flex; align-items: center; gap: .8rem; padding: .7rem 1.1rem; font-size: .86rem; color: var(--text-mid); border-top: 1px solid #f1eee4; }
.ac-lec > i { color: var(--text-muted); width: 16px; text-align: center; }
.ac-lec .t { flex: 1; min-width: 0; }
.ac-lec .prev-link { color: var(--gold-dark); text-decoration: underline; cursor: pointer; background: none; border: 0; font-size: .82rem; padding: 0; }
.ac-lec .dur { font-size: .78rem; color: var(--text-muted); white-space: nowrap; }

/* instructor */
.ac-instructor { display: flex; gap: 1.2rem; align-items: flex-start; }
.ac-instructor img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold-light); flex-shrink: 0; }
.ac-instructor h3 { font-family: var(--ff-heading); font-size: 1.4rem; color: var(--navy); margin: 0; }
.ac-instructor .pos { font-size: .8rem; color: var(--gold-dark); margin-bottom: .5rem; }

/* reviews */
.ac-review { border-top: 1px solid #f1eee4; padding: 1rem 0; }
.ac-review:first-of-type { border-top: 0; }
.ac-review strong { color: var(--navy); font-size: .9rem; }

/* ---------- Preview modal ---------- */
.ac-modal { position: fixed; inset: 0; z-index: 9999; background: rgba(5,10,25,.82); display: none; align-items: center; justify-content: center; padding: 1rem; }
.ac-modal.open { display: flex; }
.ac-modal-box { background: #1c1d1f; color: #fff; width: 100%; max-width: 720px; border-radius: 6px; overflow: hidden; max-height: 92vh; display: flex; flex-direction: column; }
.ac-modal-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 1rem 1.2rem .6rem; gap: 1rem; }
.ac-modal-head small { color: #c7c7c7; font-size: .75rem; display: block; }
.ac-modal-head h4 { margin: .2rem 0 0; font-size: 1.05rem; font-family: var(--ff-body); color: #fff; }
.ac-modal-close { background: none; border: 0; color: #fff; font-size: 1.3rem; cursor: pointer; line-height: 1; }
.ac-modal video { width: 100%; background: #000; display: block; max-height: 56vh; }
.ac-modal-list { overflow-y: auto; padding: .4rem 0 .8rem; }
.ac-modal-list h5 { font-size: .85rem; margin: .7rem 1.2rem .4rem; color: #fff; font-family: var(--ff-body); }
.ac-modal-item { display: flex; align-items: center; gap: .8rem; width: 100%; background: none; border: 0; color: #e5e5e5; padding: .65rem 1.2rem; cursor: pointer; text-align: left; font-size: .85rem; }
.ac-modal-item:hover, .ac-modal-item.active { background: #3e4143; }
.ac-modal-item .dur { margin-left: auto; color: #aaa; font-size: .78rem; }

/* ---------- Auth ---------- */
.ac-auth { max-width: 460px; margin: 0 auto; background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 2.2rem; box-shadow: var(--shadow-sm); }
.ac-auth h2 { font-family: var(--ff-heading); font-size: 2rem; color: var(--navy); margin: 0 0 .3rem; text-align: center; }
.ac-auth > p { text-align: center; color: var(--text-muted); font-size: .88rem; margin-bottom: 1.6rem; }
.ac-auth label { display: block; font-size: .78rem; font-weight: 600; color: var(--navy); margin-bottom: .35rem; }
.ac-auth .lux-form > div { display: flex; flex-direction: column; }
.ac-auth .ac-check { flex-direction: row !important; align-items: center; gap: .5rem; font-size: .85rem; color: var(--text-mid); }
.ac-auth .ac-check input { width: auto; }
.ac-auth-alt { text-align: center; font-size: .86rem; color: var(--text-mid); margin-top: 1.4rem; }
.ac-auth-alt a { color: var(--gold-dark); font-weight: 600; }

/* ---------- My courses ---------- */
.ac-mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.6rem; }
.ac-progress { height: 6px; background: #ece8db; border-radius: 3px; overflow: hidden; }
.ac-progress > span { display: block; height: 100%; background: var(--gold); transition: width .4s; }
.ac-pending { background: #fffaeb; color: #93370d; font-size: .78rem; padding: .6rem .8rem; border-radius: var(--radius); line-height: 1.5; }
.ac-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.ac-tabs a { padding: .55rem 1rem; border-radius: var(--radius); font-size: .85rem; color: var(--text-mid); background: var(--white); border: 1px solid var(--border); }
.ac-tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .ac-hero { padding-top: 120px; }
  .ac-hero-grid, .ac-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ac-hero-grid > *, .ac-layout > * { min-width: 0; width: 100%; }
  .ac-hero-grid > .ac-hero-spacer { display: none; }
  .ac-buy { position: static; margin-top: 1.6rem; }
  .ac-layout { display: flex; flex-direction: column-reverse; }
  .ac-learn { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .ac-block { padding: 1.2rem; }
  .ac-auth { padding: 1.5rem 1.2rem; }
  .ac-instructor { flex-direction: column; }
  .ac-lec { flex-wrap: wrap; }
}
