/* style.css - Premium academic website card styling with smooth animations */

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

:root {
  --primary: #1dbab4;
  --primary-dark: #139a95;
  --primary-deeper: #0f7f7a;
  --text: #1a2c3e;
  --muted: #4a5b6e;
  --card-bg: rgba(255, 255, 255, 0.98);
  --card-border: rgba(29, 186, 180, 0.14);
  --shadow-soft: 0 20px 35px -12px rgba(0, 0, 0, 0.10), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 28px 48px -16px rgba(0, 0, 0, 0.18);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-pill: 999px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(145deg, #eef2f9 0%, #d9e2ef 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  line-height: 1.5;
  animation: bgPulse 12s infinite alternate;
}

@keyframes bgPulse {
  0% { background: linear-gradient(145deg, #eef2f9 0%, #d9e2ef 100%); }
  100% { background: linear-gradient(145deg, #e0e9f5 0%, #cbdbe9 100%); }
}

/* ================= NAVIGATION ================= */
.navbar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.9rem 2rem;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  animation: slideDownNav 0.5s ease-out;
}

@keyframes slideDownNav {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.navbar a {
  color: white;
  font-weight: 600;
  text-decoration: none;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-pill);
  transition: all 0.25s ease;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  background: rgba(255, 255, 255, 0);
  position: relative;
  overflow: hidden;
}

.navbar a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0%;
  height: 3px;
  background: white;
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 3px;
}

.navbar a:hover::after {
  width: 70%;
}

.navbar a:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  backdrop-filter: blur(4px);
}

/* ================= MAIN CARD BASE ================= */
.first-box,
.second-box,
.grid-item.box {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: 2rem 2rem;
  margin: 0 0 1.8rem 0;
  border: 1px solid var(--card-border);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1), box-shadow 0.35s ease, border-color 0.35s ease;
  animation: cardAppear 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1) backwards;
  overflow: hidden;
}

@keyframes cardAppear {
  from { opacity: 0; transform: scale(0.96) translateY(18px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.first-box:hover,
.second-box:hover,
.grid-item.box:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-hover);
  border-color: rgba(29, 186, 180, 0.24);
}

/* ================= FIRST BOX ================= */
.first-box {
  text-align: center;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  width: 90%;
}

.first-box::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), #7be7e2, var(--primary-dark));
}

.first-box h1 {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1e2e3e, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.75rem;
  animation: titleGlow 3s infinite alternate;
}

@keyframes titleGlow {
  0% { filter: drop-shadow(0 0 0px rgba(29,186,180,0)); }
  100% { filter: drop-shadow(0 0 6px rgba(29,186,180,0.3)); }
}

.first-box p {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.first-box input {
  width: 70%;
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid #cfdfed;
  font-size: 1rem;
  background: #ffffff;
  transition: all 0.25s;
  outline: none;
}

.first-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(29, 186, 180, 0.25);
  transform: scale(1.01);
}

/* ================= SECOND BOX: PREMIUM FEATURE CARD ================= */
.second-box {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding: 2rem 2rem 2rem 2.5rem;
  border-left: 10px solid var(--primary);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,255,255,0.98)),
    radial-gradient(circle at top right, rgba(29, 186, 180, 0.10), transparent 35%);
}

.second-box::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: linear-gradient(90deg, var(--primary), #7de7e2, var(--primary-dark));
}

.second-box::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--primary-deeper));
  border-top-left-radius: var(--radius-xl);
  border-bottom-left-radius: var(--radius-xl);
}

.second-box h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0b3b3f;
  margin-bottom: 1.2rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.3rem 1rem 0.3rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(29, 186, 180, 0.08);
  box-shadow: inset 0 0 0 1px rgba(29, 186, 180, 0.12);
}

.second-box h2::before {
  content: "★";
  color: var(--primary-dark);
  font-size: 0.95rem;
}

.second-box h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* Feature pills for the "Why Students Love..." list */
.second-box ul {
  display: flex;
  justify-content: center;
  gap: 14px;
  list-style: none;
  padding: 0;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.second-box li {
  background: linear-gradient(135deg, #ffffff, #edf9f8);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  color: #175e5a;
  font-size: 0.98rem;
  transition: all 0.25s ease;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
  cursor: default;
  border: 1px solid rgba(29, 186, 180, 0.14);
  position: relative;
  overflow: hidden;
}

.second-box li::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: translateX(-120%);
}

.second-box li:hover::before {
  animation: shimmer 0.9s ease;
}

@keyframes shimmer {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

.second-box li:hover {
  transform: translateY(-3px) scale(1.03);
  background: linear-gradient(135deg, #dff7f4, #c9eef3);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.08);
}

/* ================= GRID ================= */
.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 1rem 2rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.grid-item.box {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.grid-item.box::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--primary), var(--primary-deeper));
}

.grid-item.box::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29,186,180,0.12), transparent 70%);
  pointer-events: none;
}

/* Typography inside cards */
.second-box h2,
.grid-item.box h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1e2f3a;
  margin-bottom: 1rem;
}

.grid-item.box h2 {
  border-left: 5px solid var(--primary);
  padding-left: 1rem;
  line-height: 1.25;
}

.grid-item.box h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
  color: #1f5e66;
}

.grid-item.box ul,
.grid-item.box ol {
  margin: 0.8rem 0 1rem 1.8rem;
  color: #2d3e4e;
}

.grid-item.box li {
  margin: 0.6rem 0;
  line-height: 1.45;
  transition: transform 0.2s, color 0.2s;
}

.grid-item.box li:hover {
  transform: translateX(4px);
  color: var(--primary);
}

.grid-item.box p {
  color: #3f5568;
  margin: 1rem 0;
}

/* ================= BUTTON ================= */
.button {
  background: linear-gradient(100deg, var(--primary), #10807b);
  color: white;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: all 0.25s;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.button:hover::before {
  left: 100%;
}

.button:hover {
  transform: translateY(-3px);
  background: linear-gradient(100deg, #129e98, #0c6b67);
  box-shadow: 0 12px 22px -8px rgba(0, 0, 0, 0.25);
}

.first-box .button {
  margin-top: 0.5rem;
}

/* ================= FOOTER ================= */
.footer {
  background: #0b2a2c;
  color: #e2edf2;
  text-align: center;
  padding: 2rem 2rem 2rem;
  margin-top: auto;
  border-radius: 32px 32px 0 0;
  font-size: 0.85rem;
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.05);
  animation: fadeInFooter 0.8s ease-out;
}

@keyframes fadeInFooter {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.footer p {
  margin: 0.7rem 0;
}

.footer a {
  color: #b6f5ef;
  text-decoration: none;
  margin: 0 6px;
  transition: all 0.2s;
  font-weight: 500;
  position: relative;
}

.footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 1px;
  background: #b6f5ef;
  transition: width 0.2s;
}

.footer a:hover::after {
  width: 100%;
}

.footer a:hover {
  color: white;
  transform: translateY(-1px);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .grid-container {
    gap: 1.5rem;
    padding: 1rem 1.5rem;
  }

  .first-box input {
    width: 85%;
  }

  .navbar {
    padding: 0.7rem 1rem;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .navbar a {
    white-space: nowrap;
    padding: 0.5rem 1rem;
  }

  .second-box {
    padding: 1.7rem 1.4rem 1.6rem 1.7rem;
  }

  .second-box h2 {
    font-size: 1.45rem;
  }

  .second-box ul {
    gap: 12px;
  }

  .second-box li {
    padding: 10px 18px;
    font-size: 0.92rem;
  }
}

@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: 1fr;
  }

  .first-box,
  .second-box,
  .grid-item.box {
    padding: 1.6rem;
    border-radius: 24px;
  }

  .first-box h1 {
    font-size: 1.8rem;
  }

  .first-box input {
    width: 100%;
  }

  .button {
    width: 100%;
    text-align: center;
  }

  .footer {
    border-radius: 24px 24px 0 0;
    padding: 1.5rem;
  }

  .second-box ul {
    gap: 10px;
  }

  .second-box li {
    padding: 9px 16px;
    font-size: 0.9rem;
  }
}

@media (max-width: 520px) {
  .second-box {
    padding: 1.35rem 1rem 1.25rem 1.15rem;
  }

  .second-box h2 {
    font-size: 1.2rem;
    line-height: 1.3;
    padding: 0.25rem 0.7rem;
    text-align: center;
  }

  .second-box ul {
    gap: 10px;
    margin-top: 1rem;
  }

  .second-box li {
    width: 100%;
    text-align: center;
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .grid-item.box h2 {
    font-size: 1.25rem;
  }
}

/* ================= EXTRA POLISH ================= */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

input, button, a, .button {
  font-family: inherit;
}

/* Subtle float effect on cards */
@keyframes subtleFloat {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-5px); }
}

.first-box:hover,
.second-box:hover {
  animation: subtleFloat 0.5s ease-out forwards;
}