/* =====================================================
   JYE Portal — Frontend CSS (Light Blue Theme)
   ===================================================== */

:root {
    --primary: #0284c7;
    --primary-light: #e0f2fe;
    --primary-dark: #0369a1;
    --accent: #0ea5e9;
    --accent-light: #bae6fd;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text: #1e293b;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --bg: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; transition: all 0.2s; }
img { max-width: 100%; height: auto; }

/* ---- Header ---- */
.site-header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--primary); }
.logo-icon { font-size: 28px; }
.logo img { height: 40px; }
.mobile-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }
.nav-menu { display: flex; list-style: none; gap: 4px; align-items: center; }
.nav-link { padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text-light); }
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--primary-light); }
.nav-item.has-dropdown { position: relative; }
.dropdown { display: none; position: absolute; top: 100%; left: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; min-width: 200px; box-shadow: var(--shadow-md); list-style: none; z-index: 50; }
.nav-item.has-dropdown:hover .dropdown { display: block; }
.dropdown li a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 13px; color: var(--text-light); }
.dropdown li a:hover { background: var(--primary-light); color: var(--primary); }
.search-link { font-size: 16px; }

/* ---- Hero ---- */
.hero { background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 30%, #7dd3fc 70%, #38bdf8 100%); padding: 60px 0 50px; }
.hero h1 { font-size: 36px; font-weight: 800; color: var(--text); margin-bottom: 12px; line-height: 1.2; }
.hero p { font-size: 18px; color: var(--text-light); max-width: 600px; margin-bottom: 24px; }
.hero-search { display: flex; gap: 0; max-width: 550px; }
.hero-search input { flex: 1; padding: 14px 20px; border: 2px solid var(--white); border-right: none; border-radius: var(--radius) 0 0 var(--radius); font-size: 15px; outline: none; background: var(--white); }
.hero-search input:focus { border-color: var(--primary); }
.hero-search button { padding: 14px 28px; background: var(--primary); color: white; border: none; border-radius: 0 var(--radius) var(--radius) 0; font-weight: 600; cursor: pointer; font-size: 15px; }
.hero-search button:hover { background: var(--primary-dark); }
.hero-stats { display: flex; gap: 30px; margin-top: 30px; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 24px; font-weight: 700; color: var(--primary); }
.hero-stat .label { font-size: 12px; color: var(--text-light); }

/* ---- Section ---- */
.section { padding: 50px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-header h2 { font-size: 22px; font-weight: 700; }
.section-header a { color: var(--primary); font-size: 14px; font-weight: 600; }
.section-header a:hover { text-decoration: underline; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 28px; font-weight: 700; }
.section-title p { color: var(--text-light); margin-top: 8px; }
.section-alt { background: var(--white); }

/* ---- Cards Grid ---- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; transition: all 0.3s; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--accent-light); }
.card-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; margin-bottom: 10px; }
.badge-govt { background: #dbeafe; color: #2563eb; }
.badge-state { background: #fae8ff; color: #a855f7; }
.badge-central { background: #e0f2fe; color: #0284c7; }
.badge-active { background: #dcfce7; color: #16a34a; }
.badge-private { background: #ffedd5; color: #ea580c; }
.badge-exam { background: #fef9c3; color: #ca8a04; }
.card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--primary); }
.card-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-lighter); margin-bottom: 10px; flex-wrap: wrap; }
.card-meta span { display: flex; align-items: center; gap: 4px; }
.card p { font-size: 13px; color: var(--text-light); line-height: 1.5; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.card-link { color: var(--primary); font-size: 13px; font-weight: 600; }
.card-link:hover { text-decoration: underline; }

/* ---- Category Cards ---- */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.cat-card { text-align: center; padding: 20px 12px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); transition: all 0.3s; }
.cat-card:hover { box-shadow: var(--shadow); border-color: var(--accent-light); transform: translateY(-2px); }
.cat-card .icon { font-size: 28px; margin-bottom: 8px; }
.cat-card .name { font-size: 13px; font-weight: 600; color: var(--text); }

/* ---- State Grid ---- */
.states-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.state-pill { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--white); border: 1px solid var(--border); border-radius: 10px; font-size: 13px; font-weight: 500; transition: all 0.2s; }
.state-pill:hover { border-color: var(--primary); background: var(--primary-light); }
.state-pill .count { background: var(--primary-light); color: var(--primary); padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }

/* ---- Detail Page ---- */
.detail-hero { background: linear-gradient(135deg, #e0f2fe, #bae6fd); padding: 40px 0; }
.detail-hero h1 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.detail-content { padding: 40px 0; }
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 30px; }
.detail-main { min-width: 0; }
.detail-sidebar { position: sticky; top: 80px; }
.info-box { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px; }
.info-box h2 { font-size: 18px; font-weight: 600; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-light); color: var(--primary-dark); }
.info-box p, .info-box ul { font-size: 14px; line-height: 1.8; }
.info-box ul { padding-left: 20px; }
.info-table { width: 100%; border-collapse: collapse; }
.info-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.info-table td:first-child { font-weight: 600; color: var(--text); width: 40%; background: #f8fafc; }
.apply-btn { display: inline-block; padding: 12px 32px; background: var(--primary); color: white; border-radius: var(--radius); font-weight: 600; font-size: 15px; text-align: center; width: 100%; margin-top: 16px; }
.apply-btn:hover { background: var(--primary-dark); }
.source-badge { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; font-size: 12px; color: #15803d; font-weight: 500; margin-top: 12px; }

/* ---- Breadcrumbs ---- */
.breadcrumb-section { background: var(--white); border-bottom: 1px solid var(--border); padding: 10px 0; }
.breadcrumb { display: flex; gap: 8px; font-size: 13px; color: var(--text-lighter); list-style: none; }
.breadcrumb a { color: var(--primary); }
.breadcrumb li::before { content: '›'; margin-right: 8px; }
.breadcrumb li:first-child::before { content: ''; margin: 0; }

/* ---- Search ---- */
.search-results { padding: 40px 0; }

/* ---- Ad Container ---- */
.ad-container { text-align: center; padding: 10px 0; max-width: 1200px; margin: 0 auto; }

/* ---- Footer ---- */
.site-footer { background: #0f172a; color: #94a3b8; padding: 50px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; margin-bottom: 30px; }
.footer-col h4 { color: white; font-size: 16px; margin-bottom: 16px; }
.footer-col p { font-size: 13px; line-height: 1.7; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; color: #94a3b8; }
.footer-col ul li a:hover { color: var(--accent); }
.social-links { display: flex; gap: 8px; margin-top: 16px; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: rgba(255,255,255,0.1); border-radius: 8px; color: #94a3b8; font-size: 12px; font-weight: 600; }
.social-links a:hover { background: var(--primary); color: white; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.trust-badges .badge { display: inline-block; padding: 6px 12px; background: rgba(255,255,255,0.08); border-radius: 8px; font-size: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; }
.footer-bottom p { font-size: 13px; }
.disclaimer { font-size: 11px; margin-top: 8px; color: #64748b; }

/* ---- Pagination ---- */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 30px; padding: 0; list-style: none; }
.pagination li span, .pagination li a { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 8px; font-size: 14px; border: 1px solid var(--border); }
.pagination li span.bg-blue-500, .pagination li.active span { background: var(--primary) !important; color: white !important; border-color: var(--primary) !important; }
.pagination li a:hover { background: var(--primary-light); color: var(--primary); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    .nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
    .nav-menu.active { display: flex; }
    .dropdown { position: static; box-shadow: none; border: none; padding-left: 20px; }
    .nav-item.has-dropdown:hover .dropdown { display: block; }
    .hero h1 { font-size: 24px; }
    .hero p { font-size: 15px; }
    .hero { padding: 36px 0 30px; }
    .hero-stats { gap: 16px; flex-wrap: wrap; }
    .hero-stat .num { font-size: 20px; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-hero h1 { font-size: 22px; }
    .cards-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-search { flex-direction: column; }
    .hero-search input, .hero-search button { border-radius: var(--radius); border: 2px solid var(--white); }
    .section { padding: 30px 0; }
    .section-header h2 { font-size: 18px; }
    .info-box { padding: 16px; margin-bottom: 16px; }
    .info-box h2 { font-size: 16px; }
    .info-table td { padding: 8px 10px; font-size: 13px; }
    .info-table td:first-child { width: 35%; }
    .container { padding: 0 16px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .detail-hero { padding: 24px 0; }
    .apply-btn { padding: 10px 20px; font-size: 14px; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .states-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 20px; }
    .hero-stats { gap: 12px; }
    .section-header h2 { font-size: 16px; }
    .detail-hero h1 { font-size: 19px; }
    .info-table td:first-child { width: 40%; font-size: 12px; }
    .info-table td { font-size: 12px; padding: 7px 8px; }
    .container { padding: 0 12px; }
}
