/* =========================================================================
   ACCFIN BSc — Eclass (frontend)
   Mirrors accfinbsc-faq.php / accfinbsc-contact.php design language:
   navy #0d1b4a + gold #d4af37, clip-path hero, organic shapes, IO reveals.
   ========================================================================= */

:root {
	--ec-bg:        #0d1b4a;
	--ec-bg-dark:   #091438;
	--ec-bg-light:  #1a2d6b;
	--ec-white:     #ffffff;
	--ec-white-70:  rgba(255,255,255,0.7);
	--ec-white-50:  rgba(255,255,255,0.5);
	--ec-white-20:  rgba(255,255,255,0.2);
	--ec-white-10:  rgba(255,255,255,0.1);
	--ec-gold:      #d4af37;
	--ec-gold-light:#e6c14a;
	--ec-body:      #f5f6fa;
	--ec-text:      #1a2238;
	--ec-text-muted:#6b7280;
	--ec-border:    #e2e4ea;
	--ec-error:     #b32d2e;
	--ec-ok:        #166534;
}

/* Hide article on /eclass/ pages and let JS-built .ec-page take over. */
.accfinbsc-ec-page #content { padding: 0 !important; }

.ec-page {
	width: 100%;
	color: var(--ec-text);
	background: var(--ec-body);
	overflow: hidden;
}

/* =========================================================================
   HERO — copied 1:1 from .fq-hero (accfinbsc-faq.php)
   ========================================================================= */
.ec-hero {
	position: relative;
	width: 100%;
	padding: clamp(10rem, 20vw, 15rem) clamp(1.5rem, 8vw, 7rem) clamp(9rem, 16vw, 14rem);
	background: var(--ec-bg);
	color: var(--ec-white);
	overflow: hidden;
	clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
	margin-bottom: -3rem;
	z-index: 5;
}
.ec-hero--compact {
	padding: clamp(7rem, 14vw, 11rem) clamp(1.5rem, 8vw, 7rem) clamp(6rem, 12vw, 10rem);
}
.ec-hero__grid {
	position: absolute; inset: 0; pointer-events: none; opacity: 0.05; z-index: 2;
	background-image:
		linear-gradient(rgba(255,255,255,.4) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.4) 1px, transparent 1px);
	background-size: 80px 80px;
}
.ec-hero__blob {
	position: absolute; top:-18%; right:-8%; width:55vw; height:130%;
	background: radial-gradient(ellipse 70% 60% at 60% 40%, var(--ec-bg-light) 0%, transparent 70%);
	opacity: 0.38; pointer-events: none;
}
.ec-hero__circle {
	position: absolute; bottom: 22%; right: 12%;
	width: clamp(80px,12vw,180px); height: clamp(80px,12vw,180px);
	border-radius: 50%; border: 2px solid var(--ec-white-20); pointer-events: none;
}
.ec-hero__line {
	position: absolute; top: 8%; right: 28%;
	width: 1px; height: 110%;
	background: linear-gradient(to bottom, transparent 10%, var(--ec-white-20) 40%, var(--ec-white-20) 60%, transparent 90%);
	transform: rotate(-22deg); transform-origin: top center; pointer-events: none;
}
.ec-hero__inner { position: relative; z-index: 1; max-width: 52rem; }
.ec-hero__back {
	display: inline-block;
	color: var(--ec-white-70);
	text-decoration: none;
	font-size: 0.85rem;
	margin-bottom: 1rem;
}
.ec-hero__back:hover { color: var(--ec-gold); }
.ec-hero__eyebrow {
	display: inline-flex; align-items: center; gap: .6rem;
	font-size: .72rem; font-weight: 700; letter-spacing: .22em;
	text-transform: uppercase; color: var(--ec-gold); margin: 0 0 1.6rem;
}
.ec-hero__eyebrow::before { content:''; width: 2.2rem; height: 2px; background: var(--ec-gold); display: inline-block; }
.ec-hero__title {
	font-size: clamp(2.4rem, 6vw, 5.2rem) !important;
	font-weight: 900 !important; line-height: 1.05 !important;
	color: var(--ec-white) !important;
	margin: 0 0 1.6rem !important;
	padding: 0 !important; letter-spacing: -0.03em;
}
.ec-hero__title .ec-accent {
	color: var(--ec-gold); display: block;
	padding-left: clamp(1.5rem,4vw,4rem); margin-top: .12em;
}
.ec-hero__sub {
	max-width: 32rem; color: var(--ec-white-70);
	font-size: 1.02rem; line-height: 1.7; margin: 0 0 1.4rem;
}
.ec-hero__profs { color: var(--ec-white-70); font-size: .9rem; margin: .2rem 0 1.2rem; }
.ec-hero__profs strong { color: var(--ec-white); }
.ec-hero__actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* =========================================================================
   GENERIC LAYOUT
   ========================================================================= */
.ec-section {
	max-width: 1100px;
	margin: 1.6rem auto;
	padding: 0 clamp(1rem, 4vw, 2rem);
	position: relative;
	z-index: 6;
}
.ec-section--available { padding-bottom: 4rem; }
.ec-section__title {
	font-size: 1.4rem; font-weight: 800; color: var(--ec-bg);
	margin: 1.2rem 0 1rem; padding-bottom: .4rem;
	border-bottom: 2px solid var(--ec-gold); display: inline-block;
}
.ec-empty {
	padding: 2rem; text-align: center; color: var(--ec-text-muted);
	background: #fff; border-radius: 14px; border: 1px dashed var(--ec-border);
}
.ec-flash {
	max-width: 1100px; margin: 1rem auto 0;
	padding: .9rem 1.2rem; border-radius: 10px;
	font-size: .92rem;
}
.ec-flash-success { background: #e6f6ec; color: #166534; border-left: 4px solid #1d6b3a; }
.ec-flash-info    { background: #eef0fa; color: #1a2d6b; border-left: 4px solid var(--ec-bg); }
.ec-flash-error   { background: #fff4f5; color: #7a1322; border-left: 4px solid var(--ec-error); }

/* =========================================================================
   COURSE CARDS
   ========================================================================= */
.ec-card-grid {
	display: grid; gap: 1.2rem;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.ec-card {
	display: flex; flex-direction: column;
	padding: 1.4rem; background: #fff;
	border-radius: 18px; border: 1px solid var(--ec-border);
	box-shadow: 0 12px 30px -16px rgba(13,27,74,0.18);
	text-decoration: none; color: var(--ec-text);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
	position: relative; overflow: hidden;
	min-height: 200px;
}
.ec-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 40px -16px rgba(13,27,74,0.28);
	border-color: var(--ec-gold);
}
.ec-card--joined { border-left: 4px solid var(--ec-gold); }
.ec-card__cover {
	position: absolute; inset: 0 0 auto 0; height: 90px;
	background-size: cover; background-position: center;
	opacity: 0.18; z-index: 0;
}
.ec-card > * { position: relative; z-index: 1; }
.ec-card__code {
	display: inline-block;
	font-size: .68rem; font-weight: 700;
	letter-spacing: .14em; text-transform: uppercase;
	color: var(--ec-gold); background: var(--ec-bg);
	padding: 3px 10px; border-radius: 999px;
	width: max-content;
}
.ec-card__title { font-size: 1.1rem; font-weight: 800; margin: .6rem 0 .4rem; color: var(--ec-bg); }
.ec-card__summary { font-size: .88rem; color: var(--ec-text-muted); line-height: 1.55; margin: 0 0 .6rem; }
.ec-card__profs { font-size: .8rem; color: var(--ec-text-muted); margin: 0 0 .4rem; }
.ec-card__meta {
	display: flex; flex-wrap: wrap; gap: .4rem 1rem;
	font-size: .72rem; color: var(--ec-text-muted);
	margin-top: auto; padding-top: .6rem;
	border-top: 1px dashed var(--ec-border);
}
.ec-card__action { margin-top: auto; padding-top: .8rem; }

/* =========================================================================
   TABS (course single)
   ========================================================================= */
.ec-tabs {
	max-width: 1100px;
	margin: 1.5rem auto 0;
	padding: 0 clamp(1rem, 4vw, 2rem);
	display: flex; gap: .25rem; flex-wrap: wrap;
	border-bottom: 1px solid var(--ec-border);
	position: relative; z-index: 6;
}
.ec-tab {
	padding: .9rem 1.2rem; text-decoration: none;
	font-size: .82rem; font-weight: 700;
	letter-spacing: .08em; text-transform: uppercase;
	color: var(--ec-text-muted);
	border-bottom: 3px solid transparent;
	transition: color .2s, border-color .2s;
}
.ec-tab:hover { color: var(--ec-bg); }
.ec-tab.is-active { color: var(--ec-bg); border-bottom-color: var(--ec-gold); }
.ec-tab__count {
	display: inline-block; min-width: 20px;
	padding: 1px 7px; border-radius: 999px;
	background: var(--ec-body); color: var(--ec-text-muted);
	font-size: .68rem; margin-left: .4rem;
}
.ec-tabpanel {
	max-width: 1100px;
	margin: 1.5rem auto 4rem;
	padding: 0 clamp(1rem, 4vw, 2rem);
	display: none;
}
.ec-tabpanel.is-active { display: block; }

/* =========================================================================
   LISTS (announcements, files, resources)
   ========================================================================= */
.ec-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.ec-list__item {
	background: #fff; border-radius: 14px;
	border: 1px solid var(--ec-border);
	padding: 1.2rem 1.4rem;
	box-shadow: 0 8px 22px -14px rgba(13,27,74,0.18);
}
.ec-list__item.is-pinned { border-left: 4px solid var(--ec-gold); }
.ec-list__title { font-size: 1.05rem; font-weight: 800; color: var(--ec-bg); margin: 0 0 .2rem; }
.ec-list__title a { color: inherit; text-decoration: none; }
.ec-list__date, .ec-list__filename {
	font-size: .78rem; color: var(--ec-text-muted);
	margin: 0 0 .6rem;
}
.ec-list__body { font-size: .95rem; line-height: 1.6; color: var(--ec-text); }
.ec-list__meta { display: flex; gap: 1rem; font-size: .8rem; margin: .4rem 0 .6rem; color: var(--ec-text-muted); }
.ec-pin { font-size: 1rem; margin-right: 4px; }
.ec-files .ec-list__item {
	display: flex; align-items: center; gap: 1rem; justify-content: space-between;
}
.ec-files .ec-btn { flex-shrink: 0; }

/* Status badges */
.ec-badge {
	display: inline-block; padding: 3px 10px;
	border-radius: 999px; font-size: .72rem; font-weight: 700;
	letter-spacing: .04em;
}
.ec-badge--open, .ec-badge--available  { background: #e0f2fe; color: #0369a1; }
.ec-badge--submitted, .ec-badge--in_progress { background: #fef3c7; color: #92400e; }
.ec-badge--graded, .ec-badge--completed { background: #dcfce7; color: #166534; }
.ec-badge--closed   { background: #f3f4f6; color: #6b7280; }

/* =========================================================================
   FORMS (frontend submission, quiz, etc.)
   ========================================================================= */
.ec-card-block {
	background: #fff; border-radius: 16px;
	border: 1px solid var(--ec-border);
	padding: clamp(1.2rem, 3vw, 2rem);
	box-shadow: 0 12px 30px -18px rgba(13,27,74,0.2);
	margin-bottom: 1.2rem;
}
.ec-prose { line-height: 1.7; color: var(--ec-text); }
.ec-prose--quote {
	background: var(--ec-body); padding: 1rem;
	border-left: 4px solid var(--ec-gold); border-radius: 0 8px 8px 0;
}
.ec-form { display: flex; flex-direction: column; gap: .8rem; }
.ec-label { font-weight: 700; font-size: .82rem; color: var(--ec-bg); }
.ec-input {
	padding: .8rem 1rem; border: 1.5px solid var(--ec-border);
	border-radius: 10px; font-size: .95rem;
	font-family: inherit; color: var(--ec-text);
	background: #fff;
}
.ec-input:focus { outline: none; border-color: var(--ec-bg); box-shadow: 0 0 0 4px rgba(13,27,74,0.1); }
.ec-help { font-size: .8rem; color: var(--ec-text-muted); }
.ec-warn {
	padding: .85rem 1rem; background: #fff8e8;
	border-left: 4px solid var(--ec-gold); color: #6b4d00;
	border-radius: 0 8px 8px 0;
	font-size: .9rem;
}

.ec-grade-box {
	background: var(--ec-bg); color: #fff;
	padding: 1rem 1.2rem; border-radius: 12px;
	margin-top: 1rem;
}
.ec-grade-box--big {
	text-align: center; padding: 2rem 1rem;
	background: linear-gradient(135deg, var(--ec-bg) 0%, var(--ec-bg-light) 100%);
}
.ec-grade-box__label {
	font-size: .72rem; letter-spacing: .16em;
	text-transform: uppercase; color: var(--ec-gold);
	margin-bottom: .4rem;
}
.ec-grade-box__value {
	font-size: 2.2rem; font-weight: 900;
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.ec-grade-box__sub {
	font-size: .85rem; color: var(--ec-white-70);
	margin-top: .4rem;
}
.ec-grade-box__feedback {
	margin-top: .6rem; font-size: .9rem;
	background: rgba(255,255,255,0.07); padding: .6rem .8rem;
	border-radius: 6px;
}

/* Buttons */
.ec-btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: .85rem 1.6rem; border: 0; border-radius: 999px;
	font-size: .85rem; font-weight: 700; letter-spacing: .06em;
	text-transform: uppercase; text-decoration: none; cursor: pointer;
	font-family: inherit;
	transition: transform .2s, box-shadow .2s, background .2s;
}
.ec-btn-sm { padding: .55rem 1rem; font-size: .75rem; }
.ec-btn-gold { background: var(--ec-gold); color: var(--ec-bg); box-shadow: 0 8px 18px rgba(212,175,55,.25); }
.ec-btn-gold:hover { transform: translateY(-2px); background: var(--ec-gold-light); }
.ec-btn-ghost { background: transparent; color: var(--ec-bg); border: 1.5px solid var(--ec-border); }
.ec-btn-ghost:hover { border-color: var(--ec-bg); background: var(--ec-body); color: var(--ec-bg); }

/* Ghost buttons inside the dark hero: white outline on navy, gold on hover (always readable). */
.ec-hero .ec-btn-ghost {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.45);
	background: rgba(255, 255, 255, 0.04);
}
.ec-hero .ec-btn-ghost:hover {
	color: var(--ec-bg);
	background: var(--ec-gold);
	border-color: var(--ec-gold);
}

/* =========================================================================
   QUIZ
   ========================================================================= */
.ec-quiz-timer {
	position: sticky; top: 1rem; z-index: 10;
	background: var(--ec-bg); color: var(--ec-gold);
	padding: .8rem 1.2rem; border-radius: 999px;
	display: inline-flex; align-items: center; gap: .8rem;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-weight: 700;
	box-shadow: 0 8px 22px rgba(0,0,0,0.18);
	margin-bottom: 1.2rem;
}
.ec-quiz-timer__label {
	font-size: .68rem; letter-spacing: .14em;
	text-transform: uppercase; color: var(--ec-white-70);
}
.ec-quiz-timer__value { font-size: 1.05rem; }
.ec-quiz-timer.is-warning .ec-quiz-timer__value { color: #ffd28a; }
.ec-quiz-timer.is-danger  { background: #b32d2e; color: #fff; }
.ec-quiz-timer.is-danger  .ec-quiz-timer__label { color: rgba(255,255,255,0.85); }

.ec-quiz-q {
	margin: 0 0 1.4rem; padding: 1rem 1.2rem;
	border: 1px solid var(--ec-border); border-radius: 12px;
	background: #fff;
}
.ec-quiz-q__title {
	display: block; font-weight: 800;
	color: var(--ec-bg); margin-bottom: .8rem;
	font-size: 1rem;
}
.ec-quiz-q__opt {
	display: flex; align-items: flex-start; gap: .8rem;
	padding: .6rem .8rem; border-radius: 8px;
	margin-bottom: .3rem;
	cursor: pointer; transition: background .15s;
}
.ec-quiz-q__opt:hover { background: var(--ec-body); }
.ec-quiz-q__opt input { margin-top: .25rem; }

.ec-quiz-review { padding-left: 1.4rem; }
.ec-quiz-review__q {
	margin-bottom: 1rem; padding: .8rem 1rem;
	border-radius: 8px;
	border-left: 4px solid transparent;
}
.ec-quiz-review__q--ok  { border-left-color: #166534; background: #ecfdf5; }
.ec-quiz-review__q--bad { border-left-color: #b32d2e; background: #fef2f2; }
.ec-quiz-review__title { font-weight: 700; color: var(--ec-bg); margin-bottom: .4rem; }
.ec-quiz-review__opts { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.ec-quiz-review__opts li { padding: 3px 0; }
.ec-quiz-review__opts .is-correct { color: #166534; font-weight: 700; }
.ec-quiz-review__opts .is-wrong { color: #b32d2e; text-decoration: line-through; }

@media (max-width: 720px) {
	.ec-card-grid { grid-template-columns: 1fr; }
	.ec-tabs { gap: 0; overflow-x: auto; }
	.ec-tab { padding: .8rem .9rem; font-size: .72rem; }
}
