/* =========================================================================
   Global Variables
   ========================================================================= */
:root {
  /* Colors */
  --primary-color: #0056b3; /* Dark Blue */
  --secondary-color: #d32f2f; /* Red Accent */
  --bg-color: #f8f9fa;
  --surface-color: #ffffff;
  --text-primary: #333333;
  --text-secondary: #666666;
  --border-color: #e0e0e0;
  --success-color: #28a745;
  --hover-bg: #f1f5f9;

  /* Typography */
  --font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  --h1-size: clamp(2rem, 5vw, 2.5rem);
  --h2-size: clamp(1.5rem, 4vw, 2rem);
  --h3-size: clamp(1.25rem, 3vw, 1.5rem);
  --text-base: 1rem;

  /* Layout */
  --container-width: 1200px;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --border-radius: 8px;
  --box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --transition: all 0.3s ease;
}

/* =========================================================================
   Reset & Base Styles
   ========================================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

/* =========================================================================
   Typography (SEO optimized)
   ========================================================================= */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

h1 {
  font-size: var(--h1-size);
}
h2 {
  font-size: var(--h2-size);
}
h3 {
  font-size: var(--h3-size);
}

/* =========================================================================
   Header & Navigation
   ========================================================================= */
.site-header {
  background-color: var(--surface-color);
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background-color: var(--primary-color);
  color: white;
  padding: var(--spacing-sm) 0;
  text-align: center;
}

.header-top a {
  color: white;
  font-weight: bold;
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) 0;
}

.logo {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.logo-accent {
  color: var(--secondary-color);
}

/* Navigation Menu */
.main-nav ul {
  display: flex;
  gap: var(--spacing-lg);
}

.main-nav a {
  color: var(--text-primary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  padding: var(--spacing-sm) 0;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
}

/* =========================================================================
   Hero / Search Section
   ========================================================================= */
.hero {
  background: linear-gradient(135deg, var(--primary-color), #003d82);
  color: white;
  padding: var(--spacing-xl) 0;
  text-align: center;
}

.hero h1 {
  color: white;
  margin-bottom: var(--spacing-sm);
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.9;
}

.search-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: inherit;
}

.search-input:focus {
  outline: 2px solid var(--secondary-color);
}

.btn-search {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 0 1.5rem;
  border-radius: var(--border-radius);
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.btn-search:hover {
  background-color: #b71c1c;
}

/* =========================================================================
   Marquee / Updates
   ========================================================================= */
.latest-updates {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-sm) 0;
  display: flex;
  align-items: center;
}

.update-label {
  background-color: var(--secondary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.85rem;
  margin-right: 1rem;
  white-space: nowrap;
}

.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
}

.marquee-content {
  display: inline-block;
  animation: marquee 20s linear infinite;
}

.marquee-content a {
  margin-right: 2rem;
  font-weight: 500;
}

@keyframes marquee {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* =========================================================================
   Layout Grids (Homepage Main)
   ========================================================================= */
.main-content {
  padding: var(--spacing-xl) 0;
}

.page-hero,
.main-content {
  background: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

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

.section-title.alt {
  color: var(--secondary-color);
}

.admit-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

.admit-post-card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: var(--transition);
}

.admit-post-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--box-shadow);
  transform: translateY(-2px);
}

.admit-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.admit-post-card h3 {
  font-size: 1.05rem;
  margin: 0;
}

.admit-post-card h3 a {
  color: var(--primary-color);
}

.admit-post-card .content-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.admit-post-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.status-badge.expected {
  background: #fff3cd;
  color: #7a5b00;
}

.status-badge.available,
.status-badge.released {
  background: #d1e7dd;
  color: #0f5132;
}

.grid-3-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.section-box {
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  border-top: 4px solid var(--primary-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.section-box.accent-red {
  border-top-color: var(--secondary-color);
}

.section-box.accent-green {
  border-top-color: var(--success-color);
}

.section-header {
  background-color: #f8f9fa;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.section-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--primary-color);
}

.section-box.accent-red .section-header h2 {
  color: var(--secondary-color);
}
.section-box.accent-green .section-header h2 {
  color: var(--success-color);
}

.list-group {
  padding: 0;
  margin: 0;
  flex: 1;
}

.list-group li {
  border-bottom: 1px solid var(--border-color);
}

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

.list-group a {
  display: block;
  padding: 0.75rem var(--spacing-md);
  color: var(--text-primary);
  font-weight: 500;
}

.list-group a:hover {
  background-color: var(--hover-bg);
  text-decoration: none;
  color: var(--primary-color);
  padding-left: 1.5rem;
}

.title-list {
  list-style: disc;
  padding: 0.5rem 1.75rem 1rem;
}

.title-list li {
  border-bottom: none;
  list-style: disc;
  margin-bottom: 0.25rem;
}

.title-list a {
  padding: 0.3rem 0;
}

.title-list a:hover {
  background: none;
  padding-left: 0;
}

.btn-view-all {
  display: block;
  text-align: center;
  padding: 0.75rem;
  background-color: #f1f5f9;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
}

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

/* =========================================================================
   Job Card Component
   ========================================================================= */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.job-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.job-card:hover {
  box-shadow: var(--box-shadow);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.job-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.job-card h3 a {
  color: var(--primary-color);
}

.job-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.job-meta span strong {
  color: var(--text-primary);
}

.job-desc {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex: 1;
}

.job-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  font-size: 0.9rem;
  transition: var(--transition);
  border: 1px solid transparent;
}

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

.btn-primary:hover {
  background-color: #004494;
  color: white;
  text-decoration: none;
}

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

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

/* =========================================================================
   Job Details Page
   ========================================================================= */
.breadcrumb {
  margin: var(--spacing-md) 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.breadcrumb span {
  margin: 0 0.5rem;
}

.job-detail-header {
  background: var(--surface-color);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: var(--spacing-lg);
  border-left: 5px solid var(--primary-color);
}

.job-detail-header h1 {
  margin-bottom: 0.5rem;
}

.post-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.job-content-box {
  background: var(--surface-color);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: var(--spacing-lg);
}

.job-content-box h2 {
  color: var(--primary-color);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-top: 1.5rem;
}

.job-content-box h2:first-child {
  margin-top: 0;
}

/* Tables */
.responsive-table {
  overflow-x: auto;
  margin-bottom: var(--spacing-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--spacing-sm);
}

th,
td {
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  text-align: left;
}

th {
  background-color: #f1f5f9;
  font-weight: 600;
  color: var(--text-primary);
}

tr:nth-child(even) {
  background-color: #f9fbfd;
}

/* Grid for split info blocks (Dates vs Fees) */
.info-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.info-card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
}

.info-card h3 {
  font-size: 1.1rem;
  color: var(--secondary-color);
  margin-bottom: 0.75rem;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 0.5rem;
}

.info-card ul {
  padding-left: 1.25rem;
  list-style-type: disc;
}

.info-card li {
  margin-bottom: 0.5rem;
}

/* Important Links Table */
.links-table th,
.links-table td {
  text-align: center;
}

.links-table a.btn {
  margin: 0.25rem;
}

/* =========================================================================
   FAQ Section
   ========================================================================= */
.faq-section {
  margin-top: var(--spacing-xl);
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-sm);
  background: var(--surface-color);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover {
  background-color: var(--hover-bg);
}

.faq-icon {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
  color: var(--primary-color);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease;
  padding: 0 1rem;
}

.faq-item.active .faq-answer {
  padding: 0 1rem 1rem 1rem;
  /* Arbitrary large enough value for transition to work */
  max-height: 1000px;
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  background-color: #212529;
  color: #f8f9fa;
  padding: var(--spacing-xl) 0 var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-widget h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-widget h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 2px;
  background-color: var(--secondary-color);
}

.footer-widget ul li {
  margin-bottom: 0.5rem;
}

.footer-widget a {
  color: #adb5bd;
}

.footer-widget a:hover {
  color: white;
  text-decoration: none;
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid #343a40;
  color: #adb5bd;
  font-size: 0.9rem;
}

/* =========================================================================
   Responsive Design
   ========================================================================= */
@media (max-width: 992px) {
  .grid-3-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-main {
    flex-wrap: wrap;
  }

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

  .main-nav {
    display: none;
    width: 100%;
    margin-top: var(--spacing-md);
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav a {
    display: block;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-color);
  }

  .grid-3-col {
    grid-template-columns: 1fr;
  }

  .info-split {
    grid-template-columns: 1fr;
  }

  .admit-card-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .search-form {
    flex-direction: column;
  }

  .btn-search {
    padding: 0.75rem;
  }

  .jobs-grid {
    grid-template-columns: 1fr;
  }

  .post-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}
