/* ============================================================
   PakMerit – Main Stylesheet
   Pakistan Green: #01411C  Accent: #c8a400
============================================================ */
:root {
  --green:      #01411C;
  --green-dk:   #012e13;
  --green-lt:   #e8f5ee;
  --accent:     #c8a400;
  --red:        #e53935;
  --text:       #222;
  --muted:      #777;
  --border:     #e0e0e0;
  --bg-light:   #f7f8fa;
  --white:      #fff;
  --shadow:     0 2px 12px rgba(0,0,0,.08);
  --radius:     8px;
  --font:       'Inter', 'Segoe UI', Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); line-height: 1.6; background: var(--white); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── CONTAINER ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ── BUTTONS ── */
.btn {
  display: inline-block; padding: 10px 24px; border-radius: 5px;
  font-size: .88rem; font-weight: 600; cursor: pointer; border: none;
  transition: background .2s, color .2s; text-align: center;
}
.btn-primary  { background: var(--green);   color: #fff; }
.btn-primary:hover  { background: var(--green-dk); }
.btn-outline  { background: transparent; border: 2px solid var(--green); color: var(--green); }
.btn-outline:hover  { background: var(--green); color: #fff; }
.btn-accent   { background: var(--accent); color: #fff; }
.btn-accent:hover   { background: #a88800; }
.btn-sm { padding: 7px 16px; font-size: .8rem; }

/* ── BADGES ── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: .72rem; font-weight: 700;
}
.badge-public     { background: #e3f0ff; color: #1565c0; }
.badge-private    { background: #fff3e0; color: #e65100; }
.badge-hec        { background: var(--green-lt); color: var(--green); }

/* ── TOPBAR ── */
.topbar { background: var(--green-dk); color: rgba(255,255,255,.75); font-size: .78rem; padding: 6px 0; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; }
.topbar-links { display: flex; gap: 16px; }
.topbar-links a { color: rgba(255,255,255,.75); }
.topbar-links a:hover { color: #fff; }

/* ── NAVBAR ── */
.navbar {
  background: #fff; border-bottom: 2px solid var(--green);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.nav-inner {
  display: flex; align-items: center; gap: 20px; height: 64px;
}
.nav-logo {
  font-size: 1.45rem; font-weight: 800; color: var(--green);
  flex-shrink: 0; letter-spacing: -0.5px;
}
.nav-logo span {
  background: var(--green); color: #fff;
  padding: 1px 6px; border-radius: 3px; margin-left: 1px;
}
.nav-links {
  display: flex; gap: 4px; margin-left: 10px; flex: 1;
}
.nav-links > li { position: relative; }
.nav-links a {
  display: block; padding: 8px 14px; font-size: .88rem; font-weight: 500;
  color: var(--text); border-radius: 4px; transition: background .15s;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--green-lt); color: var(--green);
}
/* Dropdown */
.has-dropdown .dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); min-width: 200px;
  box-shadow: var(--shadow); z-index: 200;
}
.has-dropdown:hover .dropdown { display: block; }
.dropdown li a { padding: 10px 16px; font-size: .85rem; border-radius: 0; }
.dropdown li a:hover { background: var(--green-lt); }

.nav-search {
  display: flex; align-items: center;
  border: 1.5px solid var(--border); border-radius: 5px; overflow: hidden;
}
.nav-search input {
  border: none; outline: none; padding: 7px 12px; font-size: .85rem; width: 180px;
}
.nav-search button {
  background: var(--green); border: none; color: #fff;
  padding: 7px 12px; cursor: pointer; font-size: .9rem;
}

.nav-auth { display: flex; gap: 8px; flex-shrink: 0; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; }

/* ── FLASH MESSAGES ── */
.flash {
  padding: 12px 0; font-size: .9rem;
}
.flash .container { display: flex; justify-content: space-between; align-items: center; }
.flash-success { background: #e8f5e9; color: #2e7d32; border-bottom: 2px solid #4caf50; }
.flash-error   { background: #ffebee; color: #c62828; border-bottom: 2px solid var(--red); }
.flash-info    { background: #e3f2fd; color: #1565c0; border-bottom: 2px solid #2196f3; }
.flash-close   { background: none; border: none; cursor: pointer; font-size: 1rem; }

/* ── HERO ── */
.hero {
  position: relative; min-height: 460px;
  display: flex; align-items: center; text-align: center; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url('https://images.unsplash.com/photo-1564501049412-61c2a3083791?w=1400&q=80') center/cover no-repeat;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(1,65,28,.85) 0%, rgba(1,65,28,.65) 60%, rgba(0,0,0,.55) 100%);
}
.hero-content { position: relative; z-index: 1; width: 100%; padding: 60px 20px; }
.hero h1 {
  font-size: 2.7rem; font-weight: 800; color: #fff;
  line-height: 1.2; margin-bottom: 12px;
}
.hero h1 em { font-style: normal; color: #a8e6be; }
.hero > .hero-content > p {
  color: rgba(255,255,255,.88); font-size: 1.05rem; margin-bottom: 28px;
}
.search-bar {
  display: flex; background: #fff; border-radius: 6px;
  overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,.3);
  max-width: 840px; margin: 0 auto 20px;
}
.search-bar input, .search-bar select {
  flex: 1; padding: 15px 14px; border: none; outline: none;
  font-size: .93rem; color: var(--text); border-right: 1px solid var(--border);
  font-family: var(--font);
}
.search-bar select { background: #fff; cursor: pointer; }
.search-bar button {
  padding: 15px 28px; background: var(--green); color: #fff;
  border: none; cursor: pointer; font-size: .95rem; font-weight: 700; white-space: nowrap;
}
.search-bar button:hover { background: var(--green-dk); }
.hero-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.hero-tab {
  padding: 7px 18px; border-radius: 20px; font-size: .82rem; font-weight: 500;
  background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.35);
  transition: background .2s;
}
.hero-tab:hover { background: rgba(255,255,255,.9); color: var(--green); font-weight: 600; }

/* ── SECTIONS ── */
.section { padding: 64px 0; }
.section.bg-light { background: var(--bg-light); }
.section-title { font-size: 1.85rem; font-weight: 800; margin-bottom: 6px; }
.section-sub { color: var(--muted); font-size: .95rem; margin-bottom: 36px; }
.section-header {
  display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 32px;
}
.section-header .section-title,
.section-header .section-sub { margin-bottom: 4px; }

/* ── CITIES ── */
.cities-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.city-card {
  position: relative; border-radius: 10px; overflow: hidden; height: 155px;
  display: block;
}
.city-card img, .city-placeholder {
  width: 100%; height: 100%; object-fit: cover; transition: transform .3s;
}
.city-placeholder { background: linear-gradient(135deg, #01411C, #0a6e30); }
.city-card:hover img { transform: scale(1.06); }
.city-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,.05) 60%);
}
.city-label {
  position: absolute; bottom: 14px; left: 16px; color: #fff;
  font-size: 1.05rem; font-weight: 700;
}
.city-count {
  position: absolute; bottom: 14px; right: 14px; color: rgba(255,255,255,.7);
  font-size: .72rem;
}

/* ── DISCIPLINES ── */
.disc-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.disc-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 24px 10px; background: #fff; cursor: pointer;
  border-right: 1px solid #eee; border-bottom: 1px solid #eee;
  transition: background .2s; text-decoration: none; color: var(--text);
}
.disc-cell:hover { background: var(--green-lt); }
.disc-icon { font-size: 1.8rem; }
.disc-cell span:last-child { font-size: .76rem; text-align: center; line-height: 1.3; }

/* ── UNIVERSITIES ── */
.uni-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.uni-card {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; background: #fff; transition: box-shadow .2s, border-color .2s;
}
.uni-card:hover { box-shadow: var(--shadow); border-color: var(--green); }
.uni-logo { width: 56px; height: 56px; flex-shrink: 0; }
.uni-logo img { width: 56px; height: 56px; object-fit: contain; border-radius: 6px; }
.uni-logo-placeholder {
  width: 56px; height: 56px; background: var(--green);
  color: #fff; font-size: 1.4rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border-radius: 6px;
}
.uni-info h4 { font-size: .92rem; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.uni-city { font-size: .78rem; color: var(--muted); display: block; margin-bottom: 6px; }
.uni-meta { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── STATS BAR ── */
.stats-bar { background: var(--green); padding: 48px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.stat-item { padding: 0 10px; border-right: 1px solid rgba(255,255,255,.2); }
.stat-item:last-child { border-right: none; }
.stat-number {
  display: block; font-size: 3rem; font-weight: 800; color: #fff;
  line-height: 1; margin-bottom: 6px;
}
.stat-label { font-size: .72rem; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; }

/* ── SCHOLARSHIPS ── */
.schol-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.schol-card {
  border: 1px solid var(--border); border-left: 4px solid var(--green);
  border-radius: var(--radius); padding: 22px; background: #fff;
  display: block; transition: box-shadow .2s;
}
.schol-card:hover { box-shadow: var(--shadow); }
.schol-badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: .72rem; font-weight: 700; margin-bottom: 10px;
}
.schol-hec        { background: #e8f5ee; color: var(--green); }
.schol-government { background: #e3f0ff; color: #1565c0; }
.schol-university { background: #fff3e0; color: #e65100; }
.schol-private    { background: #fce4ec; color: #c62828; }
.schol-card h4 { font-size: .95rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.schol-card p  { font-size: .82rem; color: var(--muted); line-height: 1.5; margin-bottom: 10px; }
.schol-deadline { font-size: .78rem; color: var(--red); }

/* ── INTERNSHIPS ── */
.intern-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.intern-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; background: #fff; display: flex; flex-direction: column; gap: 6px;
}
.intern-company { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.intern-card h4 { font-size: .93rem; font-weight: 700; color: var(--text); }
.intern-location { font-size: .8rem; color: var(--muted); }
.intern-tag {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: .72rem; font-weight: 600; background: var(--green-lt); color: var(--green);
}
.intern-stipend { font-size: .8rem; color: var(--green); font-weight: 600; }
.intern-apply { margin-top: 8px; display: block; text-align: center; }

/* ── FEATURES ── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff;
}
.feature-icon { font-size: 1.9rem; flex-shrink: 0; }
.feature-card h4 { font-size: .88rem; font-weight: 700; margin-bottom: 5px; color: var(--text); }
.feature-card p  { font-size: .81rem; color: var(--muted); line-height: 1.5; }

/* ── ARTICLES ── */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: #fff; display: block; transition: box-shadow .2s;
}
.article-card:hover { box-shadow: var(--shadow); }
.article-img { width: 100%; height: 178px; object-fit: cover; }
.article-body { padding: 16px 18px; }
.article-meta { font-size: .73rem; color: var(--muted); margin-bottom: 8px; }
.article-body h4 { font-size: .96rem; font-weight: 700; margin-bottom: 7px; color: var(--text); }
.article-body p  { font-size: .81rem; color: var(--muted); line-height: 1.55; margin-bottom: 10px; }
.read-more { font-size: .81rem; color: var(--green); font-weight: 600; }

/* ── NEWSLETTER ── */
.newsletter-section {
  background: linear-gradient(135deg, var(--green-dk), var(--green));
  padding: 60px 0;
}
.newsletter-inner {
  display: flex; align-items: center; justify-content: center; gap: 60px;
}
.newsletter-text h3 { color: #fff; font-size: 1.5rem; margin-bottom: 6px; }
.newsletter-text p  { color: rgba(255,255,255,.8); font-size: .9rem; }
.newsletter-form { display: flex; }
.newsletter-form input {
  padding: 13px 18px; border: none; border-radius: 5px 0 0 5px;
  font-size: .9rem; width: 300px; outline: none; font-family: var(--font);
}
.newsletter-form .btn { border-radius: 0 5px 5px 0; }

/* ── FOOTER ── */
.site-footer { background: #111; color: #ccc; }
.footer-top { padding: 52px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-logo {
  display: block; font-size: 1.3rem; font-weight: 800;
  color: #fff; margin-bottom: 10px;
}
.footer-logo span { color: #4caf7d; }
.footer-brand p { font-size: .82rem; color: #888; line-height: 1.65; }
.social-links { display: flex; gap: 10px; margin-top: 16px; }
.social-links a {
  width: 34px; height: 34px; border-radius: 50%; background: #2a2a2a;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; color: #aaa; transition: background .2s;
}
.social-links a:hover { background: var(--green); color: #fff; }
.site-footer h5 { color: #fff; font-size: .9rem; margin-bottom: 14px; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer ul li a { font-size: .82rem; color: #888; }
.site-footer ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #2a2a2a; padding: 18px 0;
}
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; color: #555;
}
.footer-bottom a { color: #4caf7d; }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--green-dk), var(--green));
  padding: 48px 0 40px; color: #fff;
}
.page-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 6px; }
.page-hero p  { color: rgba(255,255,255,.8); font-size: .95rem; }
.breadcrumb   { font-size: .8rem; color: rgba(255,255,255,.6); margin-bottom: 10px; }
.breadcrumb a { color: rgba(255,255,255,.6); }
.breadcrumb a:hover { color: #fff; }

/* ── FILTERS SIDEBAR ── */
.page-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding: 40px 0; }
.filter-sidebar { position: sticky; top: 80px; align-self: start; }
.filter-box {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; background: #fff; margin-bottom: 16px;
}
.filter-box h4 { font-size: .9rem; font-weight: 700; margin-bottom: 14px; }
.filter-box label {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; margin-bottom: 8px; cursor: pointer;
}
.filter-box select, .filter-box input[type="text"] {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 4px; font-size: .85rem; font-family: var(--font); outline: none;
}

/* ── LISTING CARDS (universities/courses pages) ── */
.listing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.listing-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; background: #fff; display: block;
  transition: box-shadow .2s, border-color .2s;
}
.listing-card:hover { box-shadow: var(--shadow); border-color: var(--green); }

/* ── PAGINATION ── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 4px;
  border: 1px solid var(--border); font-size: .88rem; font-weight: 600;
}
.pagination a:hover { background: var(--green-lt); border-color: var(--green); }
.pagination .active { background: var(--green); color: #fff; border-color: var(--green); }

/* ── FORM STYLES ── */
.form-card {
  max-width: 480px; margin: 60px auto; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); padding: 36px;
  box-shadow: var(--shadow);
}
.form-card h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.form-card p  { color: var(--muted); font-size: .88rem; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--border);
  border-radius: 5px; font-size: .9rem; font-family: var(--font); outline: none;
  transition: border-color .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--green);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-submit { width: 100%; padding: 13px; font-size: .95rem; }
.form-footer { text-align: center; margin-top: 18px; font-size: .85rem; color: var(--muted); }
.form-footer a { color: var(--green); font-weight: 600; }

/* ── ADMIN ── */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 64px); }
.admin-sidebar { background: var(--green-dk); padding: 24px 0; }
.admin-sidebar h3 { color: rgba(255,255,255,.5); font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; padding: 0 20px 10px; }
.admin-sidebar a { display: block; padding: 10px 20px; color: rgba(255,255,255,.75); font-size: .88rem; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-main { padding: 32px; background: var(--bg-light); }
.admin-card { background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); margin-bottom: 24px; }
.admin-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 18px; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.admin-stat { background: #fff; border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); text-align: center; }
.admin-stat .num { font-size: 2rem; font-weight: 800; color: var(--green); }
.admin-stat .lbl { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.data-table th { background: var(--bg-light); padding: 10px 14px; text-align: left; font-weight: 700; border-bottom: 2px solid var(--border); }
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.data-table tr:hover td { background: var(--bg-light); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .uni-grid    { grid-template-columns: repeat(2, 1fr); }
  .intern-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .admin-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links, .nav-search, .nav-auth { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 12px 0; }
  .nav-toggle { display: block; }
  .cities-grid   { grid-template-columns: repeat(2, 1fr); }
  .disc-grid     { grid-template-columns: repeat(3, 1fr); }
  .schol-grid    { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .stats-grid    { grid-template-columns: repeat(2, 1fr); }
  .newsletter-inner { flex-direction: column; gap: 24px; text-align: center; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-layout   { grid-template-columns: 1fr; }
  .listing-grid  { grid-template-columns: 1fr; }
  .hero h1       { font-size: 1.9rem; }
  .search-bar    { flex-direction: column; }
  .search-bar input, .search-bar select, .search-bar button { border-right: none; border-bottom: 1px solid var(--border); }
  .footer-bottom-inner { flex-direction: column; gap: 6px; text-align: center; }
}
@media (max-width: 480px) {
  .cities-grid   { grid-template-columns: 1fr; }
  .disc-grid     { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .intern-grid   { grid-template-columns: 1fr; }
  .admin-stats   { grid-template-columns: repeat(2, 1fr); }
}
