:root {
  --iitk-blue: #002349;
  --iitk-gold: #e2b347;
  --light-gold: #f5e8c7;
  --light-text: #ffffff;
  --dark-text: #1a202c;
  --subtle-gray: #f9f9f9;
  --sidebar-bg: #f1f5f9;
  --image-block-bg: #e6eef6;
  --image-caption-color: #4a5568;
  --border-color: #d1d5db;
  --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: sans-serif;
  background-color: var(--subtle-gray);
  color: var(--dark-text);
  line-height: 1.6;
}

.container {
  /* min-height: 100vh; */
  display: flex;
  flex-direction: column;
}

/* Header Styles */
.header {
  background: rgba(226, 229, 233, 1);
  /* box-shadow: var(--shadow-light); */
}

.alumni-News-header {
  max-width: 1350px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}

.main-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--iitk-blue);;
  margin-bottom: 0.5rem;
}

.title-underline {
  width: 4rem;
  height: 0.25rem;
  background-color: var(--iitk-gold);
  margin: 0 auto;
  border-radius: 2px;
}

/* Main Layout */
.main-wrapper {
  max-width: 1350px;
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1;
}

.content-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
}

/* Sidebar Styles */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 90px;
  height: fit-content;
}

.card {
  background-color: var(--light-text);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-light);
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: 1rem;
}

/* Search Styles */
.search-container {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background-color: var(--white);
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--iitk-blue);
  box-shadow: 0 0 0 3px rgba(0, 35, 73, 0.1);
}

.search-input.active {
  border-color: var(--iitk-blue);
}

.clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--iitk-blue);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s;
}

.clear-btn:hover {
  background-color: var(--light-gold);
}

.search-results {
  font-size: 0.75rem;
  color: var(--image-caption-color);
  margin-top: 0.5rem;
}

/* Year Filter Styles */
.search-notice {
  font-size: 0.75rem;
  color: var(--image-caption-color);
  margin-bottom: 1rem;
}

.year-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.year-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background-color: var(--light-text);
  color: var(--dark-text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.year-btn:hover:not(:disabled) {
  background-color: var(--light-gold);
  border-color: var(--iitk-blue);
}

.year-btn.active {
  background-color: var(--iitk-blue);
  color: var(--light-text);
  border-color: var(--iitk-blue);
}

.year-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.active-badge {
  background-color: var(--iitk-gold);
  color: var(--iitk-blue);
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  font-weight: 600;
}

/* Main Content Styles */
.main-content {
  min-width: 0;
}

.search-header {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: var(--light-gold);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-light);
}

.search-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--iitk-blue);
  margin-bottom: 0.25rem;
}

.search-description {
  color: var(--dark-text);
  font-size: 0.875rem;
}

.news-area {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.year-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.year-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.year-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--light-text);
  background-color: var(--iitk-blue);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  white-space: nowrap;
}

.year-line {
  flex: 1;
  height: 2px;
  background-color: var(--iitk-gold);
  border-radius: 1px;
}

.news-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Horizontal News Cards */
.news-card {
  background-color: var(--light-text);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-light);
  overflow: hidden;
  transition: all 0.2s ease;
}

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

.news-card-content {
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.news-image-container {
  flex-shrink: 0;
  width: 200px;
  height: auto;
  min-height: 200px;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 3px solid var(--iitk-gold);
  background-color: var(--image-block-bg);
  display: flex;
  /* align-items: center; */
  justify-content: center;
}

.news-image {
  width: 100%;
  /* height: 100%; */
  object-fit: cover;
  display: block;
}

.news-content {
  flex: 1;
  min-width: 0;
}

.news-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--iitk-blue);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.news-date {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--light-gold);
  color: var(--iitk-blue);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  margin-bottom: 0.75rem;
}

.news-description {
  font-size: 0.875rem;
  color: var(--image-caption-color);
  line-height: 1.5;
  text-align: justify;
}

/* No Results Styles */
.no-results {
  background-color: var(--light-text);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-light);
  padding: 3rem;
  text-align: center;
}

.no-results-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--image-caption-color);
  margin-bottom: 0.5rem;
}

.no-results-text {
  font-size: 0.875rem;
  color: var(--image-caption-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .content-container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 1;
    position: static;
  }

  .main-content {
    order: 2;
  }
}

@media (max-width: 768px) {
  .main-title {
    font-size: 2rem;
  }

  .news-card-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .news-image-container {
    align-self: center;
    width: 200px;
    height: 120px;
  }

  .year-header {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }

  .year-line {
    height: 1px;
  }
}

@media (max-width: 480px) {
  .main-wrapper {
    padding: 1rem 0.5rem;
  }

  .alumni-News-header {
    padding: 1.5rem 1rem;
  }

  .main-title {
    font-size: 1.75rem;
  }

  .card-content {
    padding: 1rem;
  }

  .news-card-content {
    padding: 1rem;
  }

  .news-image-container {
    width: 150px;
    min-height: 150px;
  }
}

.year-filter-card {
  background-color: var(--sidebar-bg);
}
