:root {
  --navy: #0a2240;
  --navy-deep: #081a34;
  --accent: #ffd200;
  --muted: #bcd0ff;
  --card: #0f2c54;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--navy);
  color: #fff;
  line-height: 1.6;
}
a { color: #fff; text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #111;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  animation: pulse 2s infinite; /* 👈 auto pulse */
  transition: all 0.3s ease;
}

/* Hover + Click still work */
.btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.05);
  box-shadow: 0 6px 14px rgba(255,210,0,0.4);
}

.btn:active {
  transform: translateY(2px) scale(0.97);
}

/* 🔥 Pulse Animation */
@keyframes pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* === Navbar/Header === */
header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--navy-deep);
  border-bottom: 1px solid rgb(255 255 255 / .08);
}
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 52px; width: auto; }
.brand-title { font-weight: 800; }
.nav-links {
  display: flex; gap: 22px; list-style: none; align-items: center;
}
.nav-links a {
  padding: 8px 10px; border-radius: 10px; opacity: .95;
}
.nav-links a:hover { background: rgb(255 255 255 / .08); }
.menu-toggle {
  display: none; font-size: 28px; cursor: pointer;
  padding: 8px 12px; border-radius: 10px;
  border: 1px solid rgb(255 255 255 / .18);
}

/* === Sections === */
section { padding: 56px 0; }
.section-title {
  font-size: clamp(22px,3vw,32px);
  margin: 0 0 18px;
}

/* === Hero === */
.hero {
  position: relative; isolation: isolate; min-height: 60vh;
  display: grid; place-items: center; text-align: center;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: url(assets/images/hero.jpg) center/cover no-repeat;
  filter: brightness(.55); z-index: -1;
}
.hero h1 {
  font-size: clamp(28px,4vw,44px);
  margin: 0 0 14px;
}

/* === Principal Section === */
.principal {
  display: grid; grid-template-columns: 360px 1fr; gap: 28px;
  align-items: center;
  background: var(--navy-deep);
  border: 1px solid rgb(255 255 255 / .08);
  border-radius: 18px;
  padding: 22px;
}
.frame {
  border: 14px solid #7a5635;
  border-image: linear-gradient(45deg,#8b5a3c,#b07a4f,#7a5635) 1;
  border-radius: 12px; overflow: hidden; background: #3a2618;
}
.principal img { display: block; width: 100%; height: auto; }
.bubble {
  position: relative; background: #113459;
  border: 1px solid rgb(255 255 255 / .15);
  border-radius: 14px; padding: 18px;
}
.bubble::before {
  content: ""; position: absolute; left: -10px; top: 40px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 10px solid #113459;
}
.bubble h3 { margin: 0 0 10px; font-size: 22px; }

/* === Cards/Grid === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 16px;
}
.card, .tile {
  background: var(--card);
  border: 1px solid rgb(255 255 255 / .08);
  border-radius: 14px;
  overflow: hidden;
}
.card img, .tile img {
  display: block; width: 100%; height: auto;
}
.card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* text starts immediately */
  gap: 0; /* remove gaps */
}
.card-title {
  margin: 0 0 4px; /* tight spacing */
  font-size: 18px; font-weight: 800;
}
.small { font-size: .95rem; color: var(--muted); }

/* === Lightbox === */
.lightbox {
  position: fixed; inset: 0;
  background: rgb(0 0 0 / .84);
  display: none; align-items: center; justify-content: center;
  z-index: 2000; padding: 28px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw; max-height: 70vh; width: auto; height: auto;
  border-radius: 10px; box-shadow: 0 10px 40px rgb(0 0 0 / .5);
}
.lightbox .close {
  position: absolute; top: 18px; right: 22px;
  font-size: 30px; cursor: pointer; user-select: none;
}

/* === Modal Card === */
.modal-card {
  max-width: 960px; background: #0f2c54;
  border: 1px solid rgb(255 255 255 / .12);
  border-radius: 14px; overflow: hidden;
}
.modal-card .content { padding: 16px; }
.modal-card h3 { margin: 0 0 10px; }

/* === Popup (Independence Day) === */
.popup {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgb(0 0 0 / .8);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.popup.hidden { display: none; }
.popup-content {
  background: #fff; padding: 20px; max-width: 700px; width: 90%;
  text-align: center; position: relative; border-radius: 8px;
}
.popup-close {
  position: absolute; top: 10px; right: 15px;
  font-size: 28px; cursor: pointer;
}
.popup-images img {
  max-width: 100%; height: auto; border-radius: 6px;
}
.popup-prev, .popup-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgb(0 0 0 / .6); color: #fff; border: none;
  font-size: 24px; padding: 8px 12px; cursor: pointer;
  border-radius: 4px;
}
.popup-prev { left: 10px; }
.popup-next { right: 10px; }

/* === Footer === */
footer {
  background: #111; color: #fff;
  padding: 40px 20px 20px;
  margin-top: 40px; text-align: center;
}
.footer-content {
  display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 30px;
}
.footer-logo { width: 60px; margin-bottom: 10px; }
.footer-links ul { list-style: none; padding: 0; }
.footer-links ul li { margin-bottom: 8px; }
.footer-links ul li a { color: #ddd; text-decoration: none; }
.footer-links ul li a:hover { color: #fff; text-decoration: underline; }
.footer-contact a { color: #ddd; text-decoration: none; }
.footer-contact a:hover { color: #fff; }
.footer-bottom {
  text-align: center; padding-top: 20px;
  border-top: 1px solid #333; font-size: 14px; margin-top: 20px;
}

/* === Entry Test Page Grid === */
.entry-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 30px; align-items: center; margin-bottom: 50px;
}
.entry-text { color: #fff; }
.entry-text h2 { margin-bottom: 10px; color: gold; }
.entry-image img {
  width: 80%; max-width: 300px; height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgb(0 0 0 / .4);
  display: block; margin: 0 auto;
}
@media (max-width:768px) {
  .entry-grid { grid-template-columns: 1fr; text-align: center; }
  .entry-image { margin-top: 20px; }
}

/* === Responsive Navbar === */
@media(max-width:860px){
  .nav-links {
    display: none; position: absolute; right: 16px; top: 64px;
    background: var(--navy-deep); padding: 10px; border-radius: 12px;
    border: 1px solid rgb(255 255 255 / .12);
    flex-direction: column; width: 220px;
  }
  .nav-links.open { display: flex; }
  .menu-toggle { display: block; }
  .principal { grid-template-columns: 1fr; }
  .bubble::before {
    left: 20px; top: -10px;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #113459;
  }
}

/* === Uniform Card Images for Entry Tests === */
.entry-tests .grid .card img,
img[alt="MDCAT Preparation"],
img[alt="ECAT Preparation"],
img[alt="Other Entry Tests"] {
  height: 160px !important;
  width: 100%;
  object-fit: cover;
  display: block;
}
