/* =====================================================
   aim.in - EdTech + Ecosystem Connector
   ===================================================== */

:root {
    --primary: #1e3a5f;
    --primary-light: #2d4a6f;
    --primary-dark: #152a45;
    --accent: #f97316;
    --accent-light: #fb923c;
    --accent-dark: #ea580c;
    --success: #16a34a;
    --success-light: #22c55e;
    --warning: #eab308;
    --danger: #dc2626;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* =====================================================
   Header
   ===================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.logo span {
    color: var(--primary);
}

.header-nav {
    display: none;
}

@media (min-width: 768px) {
    .header-nav {
        display: flex;
        gap: 32px;
    }

    .header-nav a {
        color: var(--text);
        text-decoration: none;
        font-weight: 500;
        padding: 8px 0;
        position: relative;
        transition: color 0.2s;
    }

    .header-nav a:hover,
    .header-nav a.active {
        color: var(--accent);
    }

    .header-nav a.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--accent);
        border-radius: 2px;
    }
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: 0.2s;
}

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }
}

/* =====================================================
   Side Menu
   ===================================================== */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 200;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--surface);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 201;
    display: flex;
    flex-direction: column;
}

.side-menu.active {
    transform: translateX(0);
}

.side-menu-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.side-menu-header h2 {
    font-size: 20px;
    color: var(--accent);
}

.close-menu {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 8px;
}

.side-menu-items {
    list-style: none;
    padding: 16px 0;
    flex: 1;
    overflow-y: auto;
}

.side-menu-items a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.side-menu-items a:hover,
.side-menu-items a.active {
    background: var(--background);
    color: var(--accent);
}

.side-menu-items .divider {
    height: 1px;
    background: var(--border);
    margin: 12px 20px;
}

/* =====================================================
   Main Content
   ===================================================== */
.main-content {
    margin-top: 60px;
    min-height: calc(100vh - 140px);
}

.page {
    display: none;
    padding: 20px 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.page.active {
    display: block;
}

/* =====================================================
   Hero Section
   ===================================================== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 48px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    text-align: center;
}

.hero-tagline {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-tagline .accent {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 16px;
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .hero {
        padding: 64px 48px;
    }

    .hero-tagline {
        font-size: 48px;
    }

    .hero-subtitle {
        font-size: 18px;
    }
}

/* =====================================================
   Pillar Cards
   ===================================================== */
.pillars {
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .pillars {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

.pillar-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
    box-shadow: var(--shadow);
}

.pillar-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pillar-card.learn { border-color: var(--primary); }
.pillar-card.connect { border-color: var(--accent); }
.pillar-card.do { border-color: var(--success); }

.pillar-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
}

.pillar-card.learn .pillar-icon { background: rgba(30, 58, 95, 0.1); }
.pillar-card.connect .pillar-icon { background: rgba(249, 115, 22, 0.1); }
.pillar-card.do .pillar-icon { background: rgba(22, 163, 74, 0.1); }

.pillar-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.pillar-card p {
    color: var(--text-muted);
    font-size: 14px;
}

/* =====================================================
   Stats Bar
   ===================================================== */
.stats-bar {
    display: flex;
    justify-content: space-around;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (min-width: 768px) {
    .stat-number {
        font-size: 36px;
    }

    .stat-label {
        font-size: 14px;
    }
}

/* =====================================================
   Quote Section
   ===================================================== */
.quote-section {
    background: var(--surface);
    border-left: 4px solid var(--accent);
    padding: 24px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 32px;
}

.quote-text {
    font-size: 18px;
    font-style: italic;
    color: var(--text);
    margin-bottom: 12px;
}

.quote-attribution {
    font-size: 14px;
    color: var(--text-muted);
}

/* =====================================================
   Section Headers
   ===================================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
}

.section-header p {
    color: var(--text-muted);
    margin-top: 4px;
}

/* =====================================================
   Filter Chips
   ===================================================== */
.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.chip {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* =====================================================
   Tabs
   ===================================================== */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

.tab {
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    color: var(--primary);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* =====================================================
   Search Box
   ===================================================== */
.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    background: var(--surface);
    transition: border-color 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* =====================================================
   Cards Grid
   ===================================================== */
.cards-grid {
    display: grid;
    gap: 16px;
}

@media (min-width: 640px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =====================================================
   Course Card
   ===================================================== */
.course-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.course-thumbnail {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.course-thumbnail.food { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.course-thumbnail.digital { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.course-thumbnail.handloom { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.course-thumbnail.aquaculture { background: linear-gradient(135deg, #cffafe, #a5f3fc); }
.course-thumbnail.agriculture { background: linear-gradient(135deg, #dcfce7, #bbf7d0); }

.course-body {
    padding: 16px;
}

.course-sector {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(30, 58, 95, 0.1);
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    margin-bottom: 8px;
}

.course-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.course-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.course-msme {
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 12px;
}

.course-msme a {
    color: var(--accent);
    text-decoration: none;
}

.course-msme a:hover {
    text-decoration: underline;
}

.course-modules {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.module-tag {
    padding: 4px 8px;
    background: var(--background);
    color: var(--text-muted);
    font-size: 11px;
    border-radius: 4px;
}

/* =====================================================
   MSME Card
   ===================================================== */
.msme-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.msme-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.msme-header {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.msme-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    flex-shrink: 0;
}

.msme-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.msme-owner {
    font-size: 14px;
    color: var(--text-muted);
}

.msme-location {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.msme-sector {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    margin-bottom: 12px;
}

.msme-description {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.msme-tags {
    margin-bottom: 12px;
}

.msme-tags-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.msme-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-need {
    padding: 4px 10px;
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
    font-size: 12px;
    border-radius: 12px;
}

.tag-offer {
    padding: 4px 10px;
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
    font-size: 12px;
    border-radius: 12px;
}

/* =====================================================
   Scheme Card
   ===================================================== */
.scheme-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.scheme-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.scheme-ministry {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.scheme-benefit {
    font-size: 18px;
    font-weight: 600;
    color: var(--success);
    margin-bottom: 12px;
}

.scheme-details {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.scheme-details p {
    margin-bottom: 4px;
}

.scheme-deadline {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
    font-size: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.scheme-deadline.urgent {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

/* =====================================================
   Opportunity Card
   ===================================================== */
.opportunity-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.opportunity-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.opportunity-type {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.opportunity-type.internship {
    background: rgba(30, 58, 95, 0.1);
    color: var(--primary);
}

.opportunity-type.problem {
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent);
}

.opportunity-type.shadow {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

.opportunity-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.opportunity-msme {
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 8px;
}

.opportunity-msme a {
    color: var(--accent);
    text-decoration: none;
}

.opportunity-msme a:hover {
    text-decoration: underline;
}

.opportunity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.opportunity-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.opportunity-description {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.opportunity-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-tag {
    padding: 4px 10px;
    background: var(--background);
    color: var(--text-muted);
    font-size: 12px;
    border-radius: 12px;
}

/* =====================================================
   Opportunity Sections
   ===================================================== */
.opportunity-section {
    margin-bottom: 32px;
}

.opportunity-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.opportunity-section h3 .icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.opportunity-section.internships h3 .icon {
    background: rgba(30, 58, 95, 0.1);
}

.opportunity-section.problems h3 .icon {
    background: rgba(249, 115, 22, 0.1);
}

.opportunity-section.shadow h3 .icon {
    background: rgba(22, 163, 74, 0.1);
}

/* =====================================================
   Buttons
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-dark);
}

.btn-secondary {
    background: var(--primary);
    color: white;
}

.btn-secondary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* =====================================================
   Bottom Navigation
   ===================================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-item svg {
    width: 24px;
    height: 24px;
}

.nav-item.active {
    color: var(--accent);
}

@media (min-width: 768px) {
    .bottom-nav {
        display: none;
    }

    body {
        padding-bottom: 0;
    }
}

/* =====================================================
   Footer
   ===================================================== */
.footer {
    background: var(--primary);
    color: white;
    padding: 40px 20px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

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

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: white;
}

.footer-tagline {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.footer-tagline a {
    color: var(--accent);
    text-decoration: none;
}

/* =====================================================
   Empty State
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text);
}

/* =====================================================
   Loading
   ===================================================== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================
   Utilities
   ===================================================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mb-32 {
    margin-bottom: 32px;
}
