/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f4f8fc;
    color: #0a1931;
  }
  
  /* Navbar */
  .navbar {
    background-color: #0a1931;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
  }
  
  /* Homepage navbar should not be fixed (already handled by homepage-specific styles) */
  body.index-page .navbar,
  body.homepage .navbar {
    position: relative;
  }
  
  /* Add padding to body to account for fixed navbar on non-homepage pages */
  body:not(.index-page):not(.homepage) {
    padding-top: 80px;
  }
  
.site-name {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.site-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: block;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, #ffffff, #c5cbd3);
  box-shadow: 0 10px 24px rgba(0, 191, 255, 0.35);
}

.site-name-text {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.site-name-text span {
  color: #00bfff;
  display: inline-block;
}
  
  .nav-links a {
    color: white;
    margin-left: 1rem;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border: 2px solid #00bfff;
    border-radius: 6px;
    transition: all 0.3s ease;
  }
  
  .nav-links a:hover {
    background-color: #00bfff;
    color: white;
  }
  
  /* Container */
  .container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
    text-align: center;
  }
  
  /* Grid Layout */
  .exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    align-items: stretch;
    justify-content: center;
  }
  
  /* Exam Card */
  .exam-card {
    background-color: white;
    padding: 1.5rem 1rem;
    border-radius: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-height: 100px;
    max-width: 100%; /* ✅ Add this line */
  }
  
  
  .exam-card:hover {
    transform: translateY(-5px);
  }
  
  .exam-card h3 {
    color: #0a1931;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
  }
  
  .exam-card p {
    color: #444;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    min-height: 48px; /* To ensure all cards have consistent space */
    word-break: break-word;
  }
  
  
  /* Click Here Button */
  .exam-card a {
    display: inline-block;
    text-decoration: none;
    background-color: #00bfff;
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
  }
  
  .exam-card a:hover {
    background-color: #0095cc;
  }
  /* Search Box */
.search-box {
  padding: 0.5rem;
  border-radius: 6px;
  border: none;
  outline: none;
  width: 200px;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
  .navbar {
    padding: 0.75rem 1rem;
    flex-wrap: nowrap;
    gap: 0;
    align-items: center;
    justify-content: space-between;
  }

  .site-name {
    font-size: 1.3rem;
    gap: 0.65rem;
    align-items: center;
    flex-shrink: 0;
  }

  .site-logo {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 191, 255, 0.25);
  }

  .nav-links {
    display: none;
  }

  .search-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .search-box {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: calc(100vw - 2rem);
    max-width: 300px;
    margin-top: 0.5rem;
    z-index: 1001;
    left: auto;
  }

  .search-box.mobile-visible {
    display: block;
  }

  /* Show magnifying glass icon instead of search box on mobile */
  .search-login {
    position: relative;
    overflow: visible;
    min-width: 40px;
    min-height: 40px;
  }
  
  /* Ensure search results stay within viewport on mobile */
  .search-results-container {
    position: fixed !important;
    top: 60px !important; /* Below navbar */
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    max-height: calc(100vh - 60px) !important;
    z-index: 1001 !important;
  }

  .search-login::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.2rem;
    color: #ffffff;
    cursor: pointer;
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none; /* Let clicks pass through to overlay */
    z-index: 5;
  }

  .container {
    margin: 1.5rem auto;
    padding: 0 1rem;
  }

  .exam-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .exam-card {
    padding: 1.25rem 1rem;
  }

  .exam-card h3 {
    font-size: 1.2rem;
  }

  .exam-card p {
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 480px) {
  .navbar {
    padding: 0.75rem;
  }

  .site-name {
    font-size: 1.2rem;
    gap: 0.5rem;
  }

  .site-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .nav-links a {
    font-size: 0.85rem;
    padding: 0.35rem 0.7rem;
  }

  .container {
    margin: 1rem auto;
    padding: 0 0.75rem;
  }

  .exam-grid {
    gap: 1rem;
  }

  .exam-card {
    padding: 1rem 0.75rem;
  }
}
  