/* ═══════════════════════════════════════════════════
   ENSINO-IFSC — Design System
   Dark-mode premium · Glassmorphism · IFSC brand
   ═══════════════════════════════════════════════════ */

/* ═══════ RESET & BASE ═══════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --ifsc-green: #00843D;
    --ifsc-green-light: #00a94f;
    --ifsc-green-dark: #006330;
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.6);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f4f8;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-amber: #f59e0b;
    --accent-red: #ef4444;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --shadow-glow: 0 0 60px rgba(0, 132, 61, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ═══════ ANIMATED BACKGROUND ═══════ */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(0, 132, 61, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    animation: bgPulse 12s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

.bg-grid::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ═══════ LAYOUT ═══════ */
.container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ═══════ NAVBAR ═══════ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 0;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.navbar-brand .emoji { font-size: 1.3rem; }

.navbar-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.navbar-links a {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.navbar-links a:hover { color: var(--ifsc-green-light); }

/* ═══════ HERO ═══════ */
.hero {
    text-align: center;
    padding: 72px 0 48px;
}

.hero-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--ifsc-green);
    box-shadow: 0 0 40px rgba(0, 132, 61, 0.3), 0 0 80px rgba(0, 132, 61, 0.1);
    margin: 0 auto 24px;
    transition: var(--transition);
    animation: avatarFloat 6s ease-in-out infinite;
}

@keyframes avatarFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 0 60px rgba(0, 132, 61, 0.5);
}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary), var(--ifsc-green-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 6px;
}

.hero-institution {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(0, 132, 61, 0.12);
    border: 1px solid rgba(0, 132, 61, 0.25);
    border-radius: 100px;
    font-size: 0.78rem;
    color: var(--ifsc-green-light);
    font-weight: 500;
}

.hero-badge .dot {
    width: 7px;
    height: 7px;
    background: var(--ifsc-green-light);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ═══════ STATS BAR ═══════ */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin: 32px 0 48px;
    padding: 22px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
}

.stat { text-align: center; }

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--ifsc-green-light);
    line-height: 1;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* ═══════ SECTION ═══════ */
.section { margin-bottom: 48px; }

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-glass);
}

.section-icon { font-size: 1.3rem; }
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.section-count {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 3px 10px;
    border-radius: 100px;
    font-weight: 500;
}

/* ═══════ CARDS GRID ═══════ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.card {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 26px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-accent, var(--ifsc-green));
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), var(--shadow-glow);
}

.card:hover::before { opacity: 1; }

.card-emoji {
    font-size: 2rem;
    margin-bottom: 14px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 6px;
}

.card-code {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 3px 8px;
    border-radius: 6px;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.3;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.card-meta-item {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-glass);
}

.card-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.card-status {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
}

.card-status--active {
    background: rgba(0, 169, 79, 0.15);
    color: var(--ifsc-green-light);
}

.card-status--soon {
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
}

.card-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: var(--transition);
}

.card:hover .card-arrow {
    background: var(--card-accent, var(--ifsc-green));
    color: #fff;
    transform: translateX(3px);
}

/* Card accent colors */
.card--green  { --card-accent: var(--ifsc-green); }
.card--blue   { --card-accent: var(--accent-blue); }
.card--purple { --card-accent: var(--accent-purple); }
.card--amber  { --card-accent: var(--accent-amber); }
.card--red    { --card-accent: var(--accent-red); }
.card--cyan   { --card-accent: var(--accent-cyan); }
.card--emerald { --card-accent: var(--accent-emerald); }

/* Card disabled state */
.card--disabled {
    opacity: 0.55;
    pointer-events: none;
}

.card--disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ═══════ PROGRESS BAR ═══════ */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 100px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 100px;
    background: var(--card-accent, var(--ifsc-green));
    transition: width 1s ease-out;
}

/* ═══════ FOOTER ═══════ */
footer {
    text-align: center;
    padding: 44px 0;
    border-top: 1px solid var(--border-glass);
    margin-top: 16px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-links a:hover { color: var(--ifsc-green-light); }

.footer-copy {
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* ═══════ ANIMATIONS ═══════ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

.fade-in:nth-child(1) { animation-delay: 0.04s; }
.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.16s; }
.fade-in:nth-child(4) { animation-delay: 0.22s; }
.fade-in:nth-child(5) { animation-delay: 0.28s; }
.fade-in:nth-child(6) { animation-delay: 0.34s; }
.fade-in:nth-child(7) { animation-delay: 0.4s; }

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 768px) {
    .hero { padding: 48px 0 32px; }
    .hero-avatar { width: 80px; height: 80px; }
    .cards-grid { grid-template-columns: 1fr; }
    .stats-bar { gap: 20px; padding: 18px; }
    .stat-value { font-size: 1.4rem; }
    .navbar-links { display: none; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero h1 { font-size: 1.6rem; }
    .card { padding: 20px; }
}
