/* ===== Scholarship Page Styles — Matched to index.html design system ===== */

/* Hero Content */
.sch-hero-content {
  text-align: center;
  padding: 80px 20px 40px;
}

.sch-hero-title {
  margin: 0;
  font-size: clamp(32px, 4.5vw, 58px);
  line-height: 1.2;
  letter-spacing: -0.3px;
  color: var(--ink);
}

.sch-hero-title span {
  color: var(--blue);
}

.sch-hero-subtitle {
  margin: 20px auto 0;
  max-width: 680px;
  font-size: 20px;
  line-height: 1.65;
  color: #455474;
}

/* Search Bar */
.sch-search-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 820px;
  margin: 32px auto 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(25, 73, 138, 0.1);
}

.sch-search-field {
  flex: 1;
  min-width: 140px;
}

.sch-search-field input,
.sch-search-field select {
  width: 100%;
  border: 1px solid #cfe0ff;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.sch-search-field input:focus,
.sch-search-field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(25, 104, 222, 0.14);
}

.sch-search-btn {
  padding: 12px 28px !important;
  font-size: 16px !important;
  white-space: nowrap;
}

/* Filters */
.sch-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}

.sch-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #f0f5ff;
  color: #274d91;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(163, 191, 236, 0.45);
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
  user-select: none;
}

.sch-filter-chip:hover {
  background: #e4edff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(25, 73, 138, 0.1);
}

.sch-filter-chip input[type="checkbox"] {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
}

/* Category Grid */
.sch-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.sch-cat-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-a);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.sch-cat-card:nth-child(even) {
  background: var(--card-b);
}

.sch-cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(120deg, #2b7dfa, #21b3a3, #ff9f43, #a855f7);
  opacity: 0;
  transition: opacity 0.22s ease;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.sch-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 24px rgba(33, 83, 160, 0.14);
}

.sch-cat-card:hover::before {
  opacity: 1;
}

.sch-cat-icon {
  font-size: 36px;
  margin-bottom: 10px;
  line-height: 1;
}

.sch-cat-icon img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #d8e6ff;
}

.sch-cat-card h4 {
  margin: 0 0 6px;
  font-size: 20px;
  color: #1a3e80;
}

.sch-cat-card p {
  margin: 0;
  font-size: 14px;
  color: #5d6f8d;
  line-height: 1.5;
}

/* Featured Scholarship Cards Grid */
.sch-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.sch-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-a);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.sch-card:nth-child(even) {
  background: var(--card-b);
}

.sch-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(120deg, #2b7dfa, #1fbf75, #f8a01a, #8e45d2);
  opacity: 0;
  transition: opacity 0.22s ease;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.sch-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px rgba(24, 63, 128, 0.14);
}

.sch-card:hover::before {
  opacity: 1;
}

.sch-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: #173d7c;
}

.sch-card .meta {
  color: #5f6e8e;
  font-size: 14px;
  margin: 0 0 10px;
  line-height: 1.5;
}

.sch-card .desc {
  margin: 0 0 14px;
  color: #486083;
  font-size: 15px;
  line-height: 1.6;
}

.sch-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.sch-actions .btn.view {
  border: 0;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #1a68de, #0f4fb0);
  box-shadow: 0 8px 18px rgba(24, 97, 210, 0.22);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.sch-actions .btn.view:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(24, 97, 210, 0.3);
}

.sch-actions .countdown {
  background: #f0f5ff;
  color: #274d91;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(163, 191, 236, 0.4);
  animation: badgeZoom 1.8s ease-in-out infinite;
}

/* Closing Soon */
.sch-closing-wrap {
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-b);
  padding: 20px 24px;
  box-shadow: 0 12px 20px rgba(24, 63, 128, 0.08);
}

.sch-closing-list {
  margin: 0;
  padding-left: 20px;
  list-style: none;
  display: grid;
  gap: 12px;
}

.sch-closing-list li {
  position: relative;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #dce8ff;
  border-radius: 12px;
  font-size: 15px;
  color: #2e4775;
  line-height: 1.5;
  padding-left: 36px;
}

.sch-closing-list li::before {
  content: "⏰";
  position: absolute;
  left: 12px;
  top: 12px;
  font-size: 16px;
}

/* Resource Grid */
.sch-resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.sch-resource-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-a);
  padding: 22px 16px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.sch-resource-item:nth-child(even) {
  background: var(--card-b);
}

.sch-resource-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(120deg, #2b7dfa, #21b3a3, #ff9f43, #a855f7);
  opacity: 0;
  transition: opacity 0.22s ease;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.sch-resource-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 24px rgba(33, 83, 160, 0.14);
}

.sch-resource-item:hover::before {
  opacity: 1;
}

.sch-res-icon {
  font-size: 32px;
  line-height: 1;
}

.sch-resource-item h4 {
  margin: 0;
  font-size: 18px;
  color: #173d7c;
}

.sch-resource-item p {
  margin: 0;
  font-size: 14px;
  color: #5d6f8d;
  line-height: 1.5;
}

/* Subscribe Panel */
.sch-subscribe-panel {
  background: linear-gradient(135deg, var(--blue-2), var(--blue));
  border-radius: 18px;
  padding: 36px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  color: #fff;
  box-shadow: 0 20px 44px rgba(15, 79, 176, 0.28);
}

.sch-subscribe-content h3 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.3;
}

.sch-subscribe-content p {
  margin: 0;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

.sch-subscribe-form {
  display: grid;
  gap: 10px;
}

.sch-subscribe-form input[type="email"] {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  backdrop-filter: blur(6px);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.sch-subscribe-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.sch-subscribe-form input[type="email"]:focus {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.sch-subscribe-form .btn.primary {
  background: #fff;
  color: var(--blue-2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.sch-subscribe-form .btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.sch-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  justify-content: center;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.sch-whatsapp-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Modal Overrides */
.sch-modal-content {
  max-width: 780px;
  width: 95%;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 28px 55px rgba(11, 38, 86, 0.35);
  padding: 28px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
}

.sch-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  background: #f0f5ff;
  color: #1a3e80;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.sch-modal-close:hover {
  background: #dce8ff;
  transform: scale(1.08);
}

.sch-modal-content h2 {
  margin: 0 0 8px;
  font-size: 26px;
  color: #173d7c;
}

.sch-modal-content h4 {
  margin: 18px 0 8px;
  font-size: 18px;
  color: #1a3e80;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.sch-modal-content p {
  color: #486083;
  font-size: 15px;
  line-height: 1.65;
  margin: 6px 0;
}

.sch-modal-content ul,
.sch-modal-content ol {
  padding-left: 22px;
  color: #35527f;
  font-size: 15px;
  line-height: 1.7;
  margin: 6px 0;
}

.sch-modal-content .apply {
  display: inline-block;
  margin-top: 12px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #1a68de, #0f4fb0);
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(24, 97, 210, 0.28);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.sch-modal-content .apply:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(24, 97, 210, 0.35);
}

/* Ensure modal visible/hidden correctly */
.modal[aria-hidden="true"] {
  display: none !important;
}

.modal[aria-hidden="false"] {
  display: flex;
}

#modalCountdown {
  background: #f0f5ff;
  color: #274d91;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  display: inline-block;
  border: 1px solid rgba(163, 191, 236, 0.5);
  animation: badgeZoom 1.8s ease-in-out infinite;
}

/* ===== Responsive ===== */
@media (max-width: 1120px) {
  .sch-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .sch-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sch-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sch-subscribe-panel {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 860px) {
  .sch-hero-content {
    padding: 80px 14px 30px;
  }
  .sch-hero-subtitle {
    font-size: 17px;
  }
  .sch-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sch-cards-grid {
    grid-template-columns: 1fr;
  }
  .sch-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sch-subscribe-panel {
    padding: 28px 20px;
  }
  .sch-subscribe-content h3 {
    font-size: 22px;
  }
}

@media (max-width: 560px) {
  .sch-hero-content {
    padding: 70px 10px 24px;
  }
  .sch-hero-title {
    font-size: clamp(26px, 7vw, 40px);
  }
  .sch-hero-subtitle {
    font-size: 15px;
  }
  .sch-search-bar {
    flex-direction: column;
    gap: 8px;
  }
  .sch-search-field {
    min-width: 100%;
  }
  .sch-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .sch-resource-grid {
    grid-template-columns: 1fr;
  }
  .sch-subscribe-panel {
    padding: 24px 16px;
  }
  .sch-subscribe-content h3 {
    font-size: 20px;
  }
  .sch-closing-wrap {
    padding: 14px 16px;
  }
  .sch-closing-list li {
    font-size: 14px;
  }
}

/* ===== Dark Mode Support ===== */

/* Hero */
html[data-theme="night"] .sch-hero-title {
  color: #e2e8f0;
}

html[data-theme="night"] .sch-hero-title span {
  color: #38bdf8;
}

html[data-theme="night"] .sch-hero-subtitle {
  color: #94a3b8;
}

/* Search Bar */
html[data-theme="night"] .sch-search-bar {
  background: rgba(17, 24, 39, 0.8);
  border-color: #25344c;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

html[data-theme="night"] .sch-search-field input,
html[data-theme="night"] .sch-search-field select {
  background: #172033;
  border-color: #2b3a54;
  color: #dbe6f7;
}

html[data-theme="night"] .sch-search-field input::placeholder {
  color: #7a8fa8;
}

html[data-theme="night"] .sch-search-field input:focus,
html[data-theme="night"] .sch-search-field select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

/* Filter Chips */
html[data-theme="night"] .sch-filter-chip {
  background: #172033;
  border-color: #2b3a54;
  color: #c6d4ec;
}

html[data-theme="night"] .sch-filter-chip:hover {
  background: #1e293b;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

html[data-theme="night"] .sch-filter-chip input[type="checkbox"] {
  accent-color: #38bdf8;
}

/* Category Cards */
html[data-theme="night"] .sch-cat-card {
  background: linear-gradient(145deg, #111827 0%, #1a2744 100%);
  border-color: #25344c;
}

html[data-theme="night"] .sch-cat-card:nth-child(even) {
  background: linear-gradient(145deg, #0f1b30 0%, #1e2a45 100%);
}

html[data-theme="night"] .sch-cat-card h4 {
  color: #e2e8f0;
}

html[data-theme="night"] .sch-cat-card p {
  color: #94a3b8;
}

html[data-theme="night"] .sch-cat-icon img {
  border-color: #2b3a54;
}

/* Scholarship Cards */
html[data-theme="night"] .sch-card {
  background: linear-gradient(145deg, #111827 0%, #1a2744 100%);
  border-color: #25344c;
}

html[data-theme="night"] .sch-card:nth-child(even) {
  background: linear-gradient(145deg, #0f1b30 0%, #1e2a45 100%);
}

html[data-theme="night"] .sch-card h3 {
  color: #e2e8f0;
}

html[data-theme="night"] .sch-card .meta {
  color: #94a3b8;
}

html[data-theme="night"] .sch-card .desc {
  color: #94a3b8;
}

html[data-theme="night"] .sch-actions .btn.view {
  color: #081018;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  box-shadow: 0 8px 18px rgba(56, 189, 248, 0.22);
}

html[data-theme="night"] .sch-actions .countdown {
  background: #172033;
  color: #38bdf8;
  border-color: #2b3a54;
}

/* Closing Soon */
html[data-theme="night"] .sch-closing-wrap {
  background: linear-gradient(145deg, #0f1b30 0%, #1e2a45 100%);
  border-color: #25344c;
}

html[data-theme="night"] .sch-closing-list li {
  background: rgba(17, 24, 39, 0.7);
  border-color: #25344c;
  color: #c6d4ec;
}

/* Resource Items */
html[data-theme="night"] .sch-resource-item {
  background: linear-gradient(145deg, #111827 0%, #1a2744 100%);
  border-color: #25344c;
  color: #dbe6f7;
}

html[data-theme="night"] .sch-resource-item:nth-child(even) {
  background: linear-gradient(145deg, #0f1b30 0%, #1e2a45 100%);
}

html[data-theme="night"] .sch-resource-item h4 {
  color: #e2e8f0;
}

html[data-theme="night"] .sch-resource-item p {
  color: #94a3b8;
}

html[data-theme="night"] .sch-resource-item .tag {
  background: #172033;
  color: #38bdf8;
  border-color: #2b3a54;
}

/* Subscribe Panel */
html[data-theme="night"] .sch-subscribe-panel {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border: 1px solid #2a3954;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4);
}

html[data-theme="night"] .sch-subscribe-content h3 {
  color: #e2e8f0;
}

html[data-theme="night"] .sch-subscribe-content p {
  color: rgba(226, 232, 240, 0.7);
}

html[data-theme="night"] .sch-subscribe-form input[type="email"] {
  background: rgba(23, 32, 51, 0.6);
  border-color: rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}

html[data-theme="night"] .sch-subscribe-form input[type="email"]::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

html[data-theme="night"] .sch-subscribe-form .btn.primary {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #081018;
}

html[data-theme="night"] .sch-whatsapp-btn {
  background: rgba(23, 32, 51, 0.5);
  border-color: rgba(148, 163, 184, 0.25);
  color: #c6d4ec;
}

html[data-theme="night"] .sch-whatsapp-btn:hover {
  background: rgba(56, 189, 248, 0.15);
}

/* Modal */
html[data-theme="night"] .sch-modal-content {
  background: #111827;
  border-color: #25344c;
  box-shadow: 0 28px 55px rgba(0, 0, 0, 0.5);
}

html[data-theme="night"] .sch-modal-close {
  background: #172033;
  color: #c6d4ec;
}

html[data-theme="night"] .sch-modal-close:hover {
  background: #1e293b;
}

html[data-theme="night"] .sch-modal-content h2 {
  color: #e2e8f0;
}

html[data-theme="night"] .sch-modal-content h4 {
  color: #c6d4ec;
  border-bottom-color: #25344c;
}

html[data-theme="night"] .sch-modal-content p {
  color: #94a3b8;
}

html[data-theme="night"] .sch-modal-content ul,
html[data-theme="night"] .sch-modal-content ol {
  color: #94a3b8;
}

html[data-theme="night"] .sch-modal-content .apply {
  color: #081018;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  box-shadow: 0 10px 22px rgba(56, 189, 248, 0.24);
}

html[data-theme="night"] #modalCountdown {
  background: #172033;
  color: #38bdf8;
  border-color: #2b3a54;
}
