/* ==========================================================================
   Modern Scholarships Page Styles
   ========================================================================== */

/* Variables matching the main site theme */
:root {
  --primary-main: #0B1F33;
  --primary-blue: #1a73e8;
  --accent-orange: #fca311;
  --accent-green: #28a745;
  --accent-green-hover: #218838;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --text-dark: #2c3e50;
  --text-muted: #6c757d;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.12);
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition-fast: all 0.2s ease;
  --transition-base: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
  background-color: var(--bg-light);
  font-family: 'Tajawal', sans-serif;
  color: var(--text-dark);
}

.scholarship-page {
  /* Removed padding-top as navbar should handle spacing */
}

/* =========================================
   Hero Section
   ========================================= */
.scholarship-hero {
  background: linear-gradient(135deg, rgba(11, 31, 51, 0.85) 0%, rgba(26, 115, 232, 0.8) 100%), url('../images/scholar-banner.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--bg-white);
  padding: 140px 0 100px;
  text-align: center;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-bottom: 60px;
  position: relative;
  box-shadow: var(--shadow-md);
}

.scholarship-hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 40px;
  background: var(--bg-light);
  clip-path: polygon(0 100%, 100% 100%, 100% 0, 50% 100%, 0 0);
}

.scholarship-hero .hero-content {
  max-width: 850px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.scholarship-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 25px;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  line-height: 1.3;
}

.scholarship-hero p {
  font-size: 1.25rem;
  margin: 0 auto 40px;
  max-width: 700px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  line-height: 1.6;
}

/* Hero CTA Button */
.scholarship-hero .primary-btn {
  background: var(--accent-orange) !important;
  color: var(--bg-white) !important;
  padding: 16px 40px !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
  font-size: 1.15rem !important;
  transition: var(--transition-base) !important;
  box-shadow: 0 8px 15px rgba(252, 163, 17, 0.4) !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none !important;
  text-decoration: none !important;
}

.scholarship-hero .primary-btn:hover {
  background: #e5940f !important;
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 20px rgba(252, 163, 17, 0.5) !important;
}

/* =========================================
   Info Grid (Benefits)
   ========================================= */
.scholarship-info {
  padding: 0 0 60px;
  margin-top: -80px;
  /* Pull into hero */
  position: relative;
  z-index: 10;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
}

.info-card {
  background: var(--bg-white);
  padding: 35px 25px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: var(--transition-base);
  border: 1px solid rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-blue);
  transform: scaleX(0);
  transition: var(--transition-base);
  transform-origin: left;
}

.info-card:hover::before {
  transform: scaleX(1);
}

.info-card:hover {
  transform: translateY(-8px);
}

.info-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: rgba(26, 115, 232, 0.1);
  color: var(--primary-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: var(--transition-base);
}

.info-card:hover .info-icon {
  background: var(--primary-blue);
  color: var(--bg-white);
  transform: rotate(10deg) scale(1.1);
}

.info-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary-main);
}

.info-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

/* =========================================
   Scholarships List Section
   ========================================= */
.scholarship-details {
  padding: 40px 0 80px;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-main);
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent-orange);
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

/* Grid Layout for Cards */
.scholarships-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.scholarships-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

/* Base Scholarship Card */
.scholarship-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
}

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

/* Card Banner & Logo */
.scholarship-banner {
  height: 130px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.scholarship-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(11, 31, 51, 0.2), rgba(11, 31, 51, 0.8));
}

.scholarship-logo-circle {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-white);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border: 4px solid var(--bg-white);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scholarship-logo-circle img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.discount-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--accent-orange);
  color: var(--bg-white);
  padding: 6px 14px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 2;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Card Content Area */
.scholarship-content {
  padding: 50px 25px 30px;
  /* top padding to account for overlapping logo */
  flex: 1;
  display: flex;
  flex-direction: column;
}

.scholarship-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-main);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.4;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Specs/Groups inside Card */
.group {
  background: #fdfdfd;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  transition: var(--transition-fast);
}

.group:hover {
  background: #f4f8ff;
  border-color: #dce7fa;
}

.group-title {
  font-weight: 700;
  color: var(--primary-blue);
  font-size: 0.95rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-title i {
  width: 16px;
  text-align: center;
}

.group p {
  font-size: 0.9rem;
  color: var(--text-dark);
  margin: 6px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.group p strong {
  font-weight: 700;
  color: var(--text-dark);
}

.group p i {
  color: var(--text-muted);
  font-size: 0.8rem;
  width: 16px;
}

.scholarship-disclaimer {
  font-size: 0.8rem;
  color: #856404;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: right;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.scholarship-disclaimer i {
  margin-top: 3px;
}

/* Secondary Button (Show More) */
.toggle-details {
  background: transparent;
  color: var(--primary-blue);
  border: 1px solid var(--primary-blue);
  padding: 10px 14px;
  text-align: center;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-base);
  width: 100%;
  margin-bottom: 10px;
}

.toggle-details:hover {
  background: rgba(26, 115, 232, 0.05);
  color: var(--primary-main);
}

.hidden-special {
  display: none !important;
}

/* Buttons Area - always pinned to bottom of card */
.buttons-area {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Card Footer Button */
.details-btn {
  background: var(--accent-green);
  color: var(--bg-white);
  padding: 14px;
  text-align: center;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  display: block;
  margin-top: auto;
  border: none;
  cursor: pointer;
  transition: var(--transition-base);
}

.details-btn:hover {
  background: var(--accent-green-hover);
  color: var(--bg-white);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* =========================================
   Process Steps
   ========================================= */
.scholarship-features {
  margin-top: 80px;
  padding-top: 60px;
  border-top: 1px solid #eee;
}

.scholarship-features h3 {
  text-align: center;
  font-size: 2rem;
  color: var(--primary-main);
  font-weight: 800;
  margin-bottom: 40px;
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
}

.step-card {
  background: var(--bg-white);
  padding: 40px 25px 30px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: center;
  position: relative;
  border: 1px solid #eee;
  transition: var(--transition-base);
}

.step-card:hover {
  border-color: var(--primary-blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.step-number {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 46px;
  background: var(--primary-blue);
  color: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(26, 115, 232, 0.3);
  border: 3px solid var(--bg-white);
}

.step-card h3 {
  color: var(--primary-main);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

/* =========================================
   Application Form Block
   ========================================= */
.scholarship-form-section {
  padding: 80px 0;
  background: linear-gradient(to bottom, #f8f9fa, #eef2f7);
  border-top: 1px solid #e1e5eb;
  border-bottom: 1px solid #e1e5eb;
}

/* Override application form container slightly for spacing */
#scholarship-form-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* =========================================
   FAQ Section
   ========================================= */
.faq-section {
  padding: 80px 0;
  background: var(--bg-white);
}

.faq-container {
  max-width: 850px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 20px;
  border: 1px solid #eaeaea;
  border-radius: var(--radius-md);
  background: var(--bg-white);
  transition: var(--transition-base);
  overflow: hidden;
}

.faq-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
}

.faq-question {
  width: 100%;
  padding: 22px 25px;
  background: transparent;
  border: none;
  text-align: right;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-fast);
}

.faq-question i {
  color: var(--primary-blue);
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.faq-question.active i {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 25px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
  background: #fafbfe;
  opacity: 0;
}

.faq-answer.active {
  padding: 0 25px 25px;
  max-height: 500px;
  opacity: 1;
}

.faq-answer p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 1rem;
}

/* =========================================
   Animations
   ========================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scholarship-card {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.scholarship-card:nth-child(1) {
  animation-delay: 0.1s;
}

.scholarship-card:nth-child(2) {
  animation-delay: 0.2s;
}

.scholarship-card:nth-child(3) {
  animation-delay: 0.3s;
}

.scholarship-card:nth-child(4) {
  animation-delay: 0.4s;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 991px) {
  .scholarship-hero h1 {
    font-size: 2.5rem;
  }

  .scholarship-hero p {
    font-size: 1.1rem;
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .scholarships-grid,
  .scholarships-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .scholarship-hero {
    padding: 100px 20px 80px;
  }

  .scholarship-hero h1 {
    font-size: 2rem;
  }

  .scholarships-grid,
  .scholarships-row {
    grid-template-columns: 1fr;
  }

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

  .section-title {
    font-size: 1.8rem;
  }

  .scholarship-details {
    padding: 20px 20px 60px;
  }

  .scholarship-form-section {
    padding: 40px 20px;
  }

  .faq-section {
    padding: 40px 20px;
  }
}