/*
Theme Name: ScholarShip Hub
Theme URI: https://scholarshiphub.com
Author: Your Name
Author URI: https://yoursite.com
Description: A modern, professional scholarship portal website built for WordPress. Find bachelor, master, PhD scholarships and study opportunities worldwide.
Version: 1.1.1
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: scholarship-hub
Domain Path: /languages
Requires at least: 5.0
Requires PHP: 7.4
*/

/* ============================================
   GLOBAL STYLES & VARIABLES
   ============================================ */

:root {
  --primary-color: #0066cc;
  --primary-dark: #0052a3;
  --secondary-color: #00d4ff;
  --text-color: #222;
  --text-light: #666;
  --text-lighter: #999;
  --bg-color: #ffffff;
  --bg-light: #f8f9fa;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--text-color);
}

h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 28px; }
h4 { font-size: 24px; }
h5 { font-size: 20px; }
h6 { font-size: 16px; font-weight: 600; }

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-light);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: var(--border-radius-lg);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  text-align: center;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: white;
}

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

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
}

.btn-small {
  padding: 8px 20px;
  font-size: 14px;
}

.btn-large {
  padding: 16px 40px;
  font-size: 18px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-md) var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.logo img {
  max-width: 40px;
  height: auto;
}

.logo:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-xl);
}

.nav-menu > li > a {
  color: var(--text-color);
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

.nav-menu > li > a:after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-menu > li > a:hover:after,
.nav-menu > li.active > a:after {
  width: 100%;
}

.nav-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-color);
  min-width: 250px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  margin-top: var(--spacing-md);
  list-style: none;
  z-index: 1001;
}

.nav-submenu li a {
  display: block;
  padding: 12px 20px;
  color: var(--text-color);
  font-weight: 500;
}

.nav-submenu li a:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
  text-decoration: none;
}

.nav-item:hover .nav-submenu {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-item.dropdown > a:after {
  content: '▼';
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.search-btn, .mobile-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-color);
  display: flex;
  align-items: center;
}

.search-btn:hover, .mobile-menu-btn:hover {
  color: var(--primary-color);
}

.mobile-menu-btn {
  display: none;
}

/* ============================================
   SEARCH BOX (HEADER)
   ============================================ */

.search-box {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  background-color: var(--bg-color);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-lg);
  z-index: 999;
}

.search-box.active {
  display: block;
}

.search-box form {
  display: flex;
  gap: var(--spacing-sm);
}

.search-box input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 16px;
}

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

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 100px var(--spacing-lg);
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 56px;
  margin-bottom: var(--spacing-md);
  color: white;
  line-height: 1.2;
}

.hero .subtitle {
  font-size: 20px;
  margin-bottom: var(--spacing-xl);
  opacity: 0.95;
  color: rgba(255,255,255,0.95);
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn {
  font-size: 18px;
  padding: 16px 40px;
}

.hero .btn-secondary {
  border-color: white;
  color: white;
}

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

/* ============================================
   CONTAINER & SECTIONS
   ============================================ */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-xxl) var(--spacing-lg);
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-xxl);
}

.section-title h2 {
  margin-bottom: var(--spacing-md);
}

.section-subtitle {
  color: var(--text-light);
  font-size: 18px;
}

/* ============================================
   GRID & CARDS
   ============================================ */

.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background-color: var(--bg-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

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

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: var(--spacing-lg);
}

.card-title {
  font-size: 20px;
  margin-bottom: var(--spacing-sm);
  color: var(--text-color);
}

.card-text {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

.card-footer {
  padding: 0 var(--spacing-lg) var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-badge {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin: var(--spacing-md) 0;
  font-size: 14px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-light);
}

/* ============================================
   FEATURED CATEGORIES SECTION
   ============================================ */

.category-card {
  text-align: center;
  padding: var(--spacing-xxl) var(--spacing-lg);
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.category-icon {
  font-size: 48px;
  margin-bottom: var(--spacing-md);
  display: block;
}

.category-card h3 {
  margin-bottom: var(--spacing-sm);
}

.category-card p {
  font-size: 14px;
  margin-bottom: 0;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar-widget {
  background-color: var(--bg-color);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
  font-size: 18px;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--primary-color);
}

.widget-list {
  list-style: none;
}

.widget-list li {
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

.widget-list li:last-child {
  border-bottom: none;
}

.widget-list a {
  color: var(--text-light);
  font-weight: 500;
}

.widget-list a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
  color: var(--text-color);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background-color: #1a1a1a;
  color: #ffffff;
  padding: var(--spacing-xxl) var(--spacing-lg);
  margin-top: var(--spacing-xxl);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xxl);
  margin-bottom: var(--spacing-xxl);
}

.footer-column h4 {
  color: white;
  margin-bottom: var(--spacing-lg);
}

.footer-column p {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  line-height: 1.8;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--spacing-md);
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
}

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

.footer-legal {
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

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

/* ============================================
   BLOG/SCHOLARSHIP POST LAYOUT
   ============================================ */

/* Single-post desktop layout; existing responsive rules can now collapse it. */
.single-post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  padding: 48px 0;
  align-items: start;
}

.single-post-layout > main {
  min-width: 0;
}

.post-header {
  max-width: 900px;
  margin: 0 auto var(--spacing-xxl);
}

.post-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--spacing-lg);
  line-height: 1.15;
}

.post-meta {
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
  color: var(--text-light);
  font-size: 14px;
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.featured-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  margin-bottom: var(--spacing-xxl);
}

/*
 * Article typography is intentionally scoped to .post-content and uses
 * :where() for low specificity. Gutenberg utility classes (for example
 * .has-black-color / .has-large-font-size) and inline styles therefore win.
 */
.post-content {
  max-width: 900px;
  margin: 0 auto;
  color: #333;
  font-size: 17px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

body :where(.post-content p) {
  margin-top: 0;
  margin-bottom: 1.35em;
  color: inherit;
  font: inherit;
}

body :where(.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6) {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: inherit;
  clear: both;
}

body :where(.post-content h1) {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 1.6em 0 0.55em;
}

body :where(.post-content h2) {
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  margin: 1.65em 0 0.6em;
}

body :where(.post-content h3) {
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
  margin: 1.5em 0 0.55em;
}

body :where(.post-content h4) {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  margin: 1.4em 0 0.5em;
}

body :where(.post-content h5) {
  font-size: 1.05rem;
  margin: 1.35em 0 0.5em;
}

body :where(.post-content h6) {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1.3em 0 0.5em;
}

/* Restore natural list indentation removed by the global reset. */
.post-content ul,
.post-content ol,
.post-content .wp-block-list {
  margin: 0.9em 0 1.4em;
  padding-left: 1.65em;
  padding-inline-start: 1.65em;
  max-width: 100%;
  list-style-position: outside;
}

.post-content ul {
  list-style-type: disc;
}

.post-content ol {
  list-style-type: decimal;
}

.post-content li {
  margin: 0.35em 0;
  padding-inline-start: 0.15em;
  line-height: 1.7;
}

.post-content li > ul,
.post-content li > ol {
  margin: 0.45em 0 0.45em;
  padding-left: 1.5em;
  padding-inline-start: 1.5em;
}

.post-content ul ul { list-style-type: circle; }
.post-content ul ul ul { list-style-type: square; }
.post-content ol ol { list-style-type: lower-alpha; }
.post-content ol ol ol { list-style-type: lower-roman; }

body :where(.post-content a:not(.btn)) {
  color: var(--primary-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

body :where(.post-content a:not(.btn):hover) {
  color: var(--primary-dark);
}

:where(.post-content) :where(strong, b) {
  font-weight: 700;
}

:where(.post-content) :where(em, i) {
  font-style: italic;
}

:where(.post-content) :where(figure, .wp-block-image, .wp-block-gallery, .wp-block-video, .wp-block-embed) {
  margin-top: 1.75em;
  margin-bottom: 1.75em;
  max-width: 100%;
}

:where(.post-content) :where(img) {
  max-width: 100%;
  height: auto;
}

:where(.post-content) :where(figcaption, .wp-element-caption, .wp-caption-text) {
  margin-top: 0.55em;
  color: var(--text-light);
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
}

:where(.post-content) :where(blockquote, .wp-block-quote) {
  margin: 1.75em 0;
  padding: 1em 1.25em;
  border-left: 4px solid var(--primary-color);
  background: var(--bg-light);
  color: inherit;
}

:where(.post-content) :where(blockquote p:last-child, .wp-block-quote p:last-child) {
  margin-bottom: 0;
}

:where(.post-content) :where(.wp-block-pullquote) {
  margin: 2em 0;
  padding: 1.5em 1em;
  border-top: 3px solid var(--border-color);
  border-bottom: 3px solid var(--border-color);
}

:where(.post-content) :where(.wp-block-table) {
  margin: 1.75em 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

:where(.post-content) :where(table:not(.info-table)) {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.95em;
}

:where(.post-content) :where(table:not(.info-table) th, table:not(.info-table) td) {
  padding: 0.75em 0.9em;
  border: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}

:where(.post-content) :where(table:not(.info-table) th) {
  font-weight: 700;
  background: var(--bg-light);
}

:where(.post-content) :where(pre, .wp-block-code) {
  max-width: 100%;
  margin: 1.5em 0;
  padding: 1em 1.1em;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: #f6f8fa;
  font-size: 0.9em;
  line-height: 1.6;
}

:where(.post-content) :where(code) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
}

:where(.post-content) :where(hr, .wp-block-separator) {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--border-color);
}

:where(.post-content) :where(.aligncenter) {
  margin-left: auto;
  margin-right: auto;
}

:where(.post-content) :where(.alignleft) {
  float: left;
  max-width: 48%;
  margin: 0.35em 1.5em 1em 0;
}

:where(.post-content) :where(.alignright) {
  float: right;
  max-width: 48%;
  margin: 0.35em 0 1em 1.5em;
}

:where(.post-content) :where(.wp-block-group, .wp-block-columns, .wp-block-media-text, .wp-block-buttons) {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

@media (max-width: 767px) {
  .post-content {
    font-size: 16px;
    line-height: 1.7;
  }

  .post-content ul,
.post-content ol,
.post-content .wp-block-list {
    padding-inline-start: 1.4em;
  }

  :where(.post-content) :where(.alignleft, .alignright) {
    float: none;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  :where(.post-content) :where(table:not(.info-table) th, table:not(.info-table) td) {
    padding: 0.65em 0.7em;
  }
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-xxl) 0;
  background-color: var(--bg-light);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.info-table tr td:first-child {
  font-weight: 600;
  width: 30%;
  color: var(--primary-color);
  background-color: rgba(0, 102, 204, 0.05);
}

.info-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.info-table tr:last-child td {
  border-bottom: none;
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */

.newsletter {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: var(--spacing-xxl) var(--spacing-lg);
  text-align: center;
  border-radius: var(--border-radius-lg);
}

.newsletter h2 {
  color: white;
  margin-bottom: var(--spacing-md);
}

.newsletter-form {
  max-width: 500px;
  margin: var(--spacing-lg) auto 0;
}

.newsletter-form input {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-sm);
  font-size: 16px;
}

.newsletter-form button {
  width: 100%;
}

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  font-size: 14px;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--primary-color);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }
.mb-5 { margin-bottom: var(--spacing-xxl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }
.mt-5 { margin-top: var(--spacing-xxl); }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

/* Lazy loading for images */
img[loading="lazy"] {
  background: var(--bg-light);
}

/* ============================================
   RESPONSIVE DESIGN - TABLET
   ============================================ */

@media (max-width: 1024px) {
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }
  h3 { font-size: 24px; }
  
  .nav-menu {
    gap: var(--spacing-lg);
  }
  
  .grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  
  .hero h1 {
    font-size: 40px;
  }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE
   ============================================ */

@media (max-width: 768px) {
  :root {
    font-size: 14px;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-color);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
  }
  
  .nav-menu.mobile-active {
    display: flex;
  }
  
  .nav-menu li {
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-menu > li > a {
    padding: 12px 16px;
    display: block;
  }
  
  .nav-submenu {
    position: static;
    display: none;
    box-shadow: none;
    margin-top: 0;
    background-color: var(--bg-light);
  }
  
  .nav-submenu.active {
    display: block;
  }
  
  .nav-submenu li a {
    padding-left: 32px;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .search-btn {
    display: none;
  }
  
  .header-actions {
    gap: var(--spacing-md);
  }
  
  .header-inner {
    padding: var(--spacing-md);
  }
  
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
  
  .hero {
    padding: 60px var(--spacing-md);
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .hero .subtitle {
    font-size: 16px;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .hero .btn {
    width: 100%;
  }
  
  .section {
    padding: var(--spacing-xl) var(--spacing-md);
  }
  
  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .post-title {
    font-size: 28px;
  }
  
  .post-meta {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .main-sidebar-layout {
    grid-template-columns: 1fr;
  }
  
  .container {
    padding: 0 var(--spacing-md);
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease;
}

/* Print styles */
@media print {
  .header,
  .footer,
  .sidebar,
  .btn,
  .search-box {
    display: none;
  }
}


/* Two-tier header redesign */
.site-header { width:100%; }
.header-top-tier { background:#fff; padding:25px 0; }
.header-branding { display:flex; align-items:center; justify-content:center; gap:20px; text-align:center; }
.placeholder-logo { width:80px; height:80px; object-fit:contain; }
.site-title a { color:var(--text-color); font-size:32px; font-weight:700; text-decoration:none; }
.header-nav-tier { background:#0066cc; width:100%; }
.nav-container { display:flex; align-items:center; justify-content:space-between; }
.header-nav-tier .nav-menu { display:flex; flex-wrap:wrap; list-style:none; margin:0; padding:0; }
.header-nav-tier .nav-menu .nav-item a,
.header-nav-tier .nav-menu a { color:#fff; padding:18px 14px; display:block; text-decoration:none; }
.header-nav-tier .nav-menu a:hover { background:#0052a3; color:#fff; }
.header-search .search-btn { background:none; border:0; color:#fff; font-size:22px; cursor:pointer; }

/* ============================================
   CSC QUICK LINKS
   ============================================ */

.quick-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 245px;
}

.quick-links-section .quick-link-card .card-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
  margin: 0 auto var(--spacing-md);
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.quick-link-card h3 {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
}

.quick-link-button {
  margin-top: var(--spacing-md);
}

/* ============================================
   CSCSTUDY COMPACT HEADER + HOMEPAGE FEEDS
   ============================================ */

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  width: 100%;
  position: relative;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #dfe7ef;
  box-shadow: 0 2px 12px rgba(18, 46, 77, 0.06);
}

.header-top-tier {
  background: #fff;
  padding: 14px 0;
}

.header-branding {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 54px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #17324d;
  text-decoration: none;
}

.site-brand:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.site-logo-image {
  display: block;
  width: auto;
  max-width: 180px;
  max-height: 52px;
  object-fit: contain;
}

.site-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.header-nav-tier {
  width: 100%;
  min-height: 48px;
  background: var(--primary-color);
}

.nav-container {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  min-height: 48px;
}

.main-nav {
  display: flex;
  align-items: stretch;
  min-width: 0;
  flex: 1 1 auto;
}

.header-nav-tier .nav-menu {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav-tier .nav-menu > li {
  position: relative;
  display: flex;
  align-items: stretch;
  margin: 0;
}

.header-nav-tier .nav-menu > li > a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 15px;
  color: #fff;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}

.header-nav-tier .nav-menu > li > a::after {
  display: none;
}

.header-nav-tier .nav-menu > li > a:hover,
.header-nav-tier .nav-menu > li.current-menu-item > a,
.header-nav-tier .nav-menu > li.current-menu-ancestor > a,
.header-nav-tier .nav-menu > li > a:focus-visible {
  background: rgba(0, 0, 0, 0.13);
  color: #fff;
  text-decoration: none;
  outline: none;
}

.header-nav-tier .menu-item-has-children > a::before {
  content: '';
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  order: 2;
  opacity: 0.9;
}

.header-nav-tier .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1100;
  display: none;
  min-width: 230px;
  margin: 0;
  padding: 7px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top: 0;
  border-radius: 0 0 9px 9px;
  box-shadow: 0 12px 28px rgba(22, 50, 78, 0.14);
}

.header-nav-tier .sub-menu li {
  margin: 0;
}

.header-nav-tier .sub-menu a {
  display: block;
  padding: 10px 15px;
  color: #243b53;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  text-decoration: none;
  white-space: normal;
}

.header-nav-tier .sub-menu a:hover,
.header-nav-tier .sub-menu a:focus-visible,
.header-nav-tier .sub-menu .current-menu-item > a {
  background: #f2f7fc;
  color: var(--primary-color);
  text-decoration: none;
  outline: none;
}

.header-nav-tier .menu-item-has-children:hover > .sub-menu,
.header-nav-tier .menu-item-has-children:focus-within > .sub-menu {
  display: block;
}

.header-search {
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
  margin-left: auto;
}

.header-search .search-btn {
  width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.header-search .search-btn:hover,
.header-search .search-btn:focus-visible {
  background: rgba(0, 0, 0, 0.13);
  color: #fff;
  outline: none;
}

.mobile-menu-btn {
  display: none;
}

.search-box {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  padding: 16px 0;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 12px 24px rgba(22, 50, 78, 0.1);
}

.search-box.active {
  display: block;
}

.search-box form {
  display: block;
}

.search-box input[type='search'] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: var(--text-color);
  font: inherit;
}

.search-box input[type='search']:focus {
  border-color: var(--primary-color);
  outline: 2px solid rgba(0, 102, 204, 0.12);
  outline-offset: 1px;
}

/* Homepage section hierarchy */
.category-post-section,
.recent-posts-section {
  border-top: 1px solid #edf1f5;
}

.category-post-section:nth-of-type(even) {
  background: #fbfcfe;
}

.recent-posts-section {
  background: #f6f8fb;
}

.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading-copy h2 {
  margin: 0;
  color: #17324d;
  font-size: 28px;
  letter-spacing: -0.025em;
}

.category-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.category-post-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-width: 0;
  min-height: 92px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e3e9ef;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(25, 52, 77, 0.045);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-post-card:hover {
  transform: translateY(-2px);
  border-color: #c8d8e8;
  box-shadow: 0 8px 20px rgba(25, 52, 77, 0.09);
}

.category-post-image-link {
  display: block;
  min-width: 0;
  height: 100%;
  background: #edf4fb;
  overflow: hidden;
}

.category-post-image,
.category-post-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 92px;
  max-height: 112px;
  object-fit: cover;
}

.post-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eaf4ff 0%, #d9ecff 100%);
  color: var(--primary-color);
  font-size: 28px;
}

.category-post-content {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 14px 15px;
}

.category-post-title {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
}

.category-post-title a {
  color: #20384f;
  text-decoration: none;
}

.category-post-title a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.section-view-all {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.btn-outline {
  padding: 9px 22px;
  border: 1px solid var(--primary-color);
  border-radius: 7px;
  background: #fff;
  color: var(--primary-color);
  box-shadow: none;
  font-size: 14px;
}

.btn-outline:hover {
  background: var(--primary-color);
  color: #fff;
  transform: none;
  text-decoration: none;
}

.section-empty-state {
  margin: 0;
  padding: 22px;
  text-align: center;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 9px;
  color: #64748b;
}

.recent-heading-row {
  margin-bottom: 28px;
}

.recent-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.recent-post-card {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e1e7ee;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(24, 50, 75, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.recent-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(24, 50, 75, 0.12);
}

.recent-post-image-link {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eaf2f9;
}

.recent-post-image,
.recent-post-image-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-post-image {
  transition: transform 0.35s ease;
}

.recent-post-card:hover .recent-post-image {
  transform: scale(1.025);
}

.recent-post-content {
  padding: 17px 18px 20px;
}

.recent-post-title {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
}

.recent-post-title a {
  color: #17324d;
  text-decoration: none;
}

.recent-post-title a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.recent-pagination {
  margin-top: 32px;
}

.recent-pagination .page-numbers {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.recent-pagination .page-numbers li {
  margin: 0;
}

.recent-pagination a.page-numbers,
.recent-pagination span.page-numbers {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #d5dee8;
  border-radius: 7px;
  background: #fff;
  color: #31506d;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.recent-pagination a.page-numbers:hover,
.recent-pagination span.page-numbers.current {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: #fff;
  text-decoration: none;
}
