/* ===============================
   Global Styles
================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f6f9fc;
  color: #0f172a;
  margin: 0;
  line-height: 1.7;
}

a {
  text-decoration: none;
  color: inherit;
}

header a {
  display:inline-flex;   /* prevents anchor stretching */
  align-items:center;
}


a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
}

.muted {
  color: #475569;
}

/* ===============================
   Header / Navigation (FINAL FIX)
================================ */
header{
  background:#ffffff;
  border-bottom:1px solid #e5e7eb;
  position:sticky;
  top:0;
  z-index:99;
}

/* nav row */
header .nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  height:72px;
  position:relative;
}

/* ✅ empty area NOT clickable */
header,
header .nav,
header .container{
  cursor:default;
}

/* logo link only clickable */
header .logo{
  display:flex;
  align-items:center;
  flex:0 0 auto;
  line-height:1;
  cursor:pointer;
}

/* ensure logo link does NOT stretch */
header .logo{
  width: 10px;
}
header .logo img{
  height: 70px;
  width:auto;
  object-fit:contain;
  display:block;
}


/* desktop nav */
header nav{
  display:left;
  align-items:center;
  gap:22px;
  margin-left:auto;
  flex-wrap:nowrap;
}

/* links only clickable */
header nav a{
  font-weight:600;
  color:#334155;
  padding:8px 10px;
  border-radius:10px;
  margin:0;
  white-space:nowrap;
  cursor:pointer;
}
header nav a:hover{
  color:#0ea5e9;
  background:#f1f5f9;
  text-decoration:none;
}

/* hamburger (mobile) */
header .menu-toggle{
  display:none;
  font-size:28px;
  line-height:1;
  user-select:none;
  cursor:pointer;
}

.nav{
  height: 72px;
}


/* ===============================
   Mobile Navbar
================================ */
@media (max-width:768px){
  header .nav{
    height:68px;
  }

  header .logo img{
    height:44px;
    max-height:52px;
  }

  header .menu-toggle{
    display:block;
  }

  header nav{
    position:absolute;
    top:68px;
    left:0;
    right:0;
    width:100%;
    background:#ffffff;
    flex-direction:column;
    align-items:flex-start;
    padding:14px 18px 18px;
    gap:10px;
    box-shadow:0 10px 30px rgba(0,0,0,.10);

    /* hidden by default */
    transform:translateY(-120%);
    opacity:0;
    pointer-events:none;
    transition:.25s ease;
  }

  header nav.active{
    transform:translateY(0);
    opacity:1;
    pointer-events:auto;
  }

  header nav a{
    width:100%;
    padding:12px 12px;
  }
}



/* ===============================
   Hero Section
================================ */
/* HERO layout: text left + image focus right */
.hero {
  position: relative;
  overflow: hidden;
  padding: 180px 0;
  background: #0b1220;
}

/* Background image + readability overlay */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;

  /* ✅ safer: first try relative image, then root absolute if you use root hosting */
  background-image:
    linear-gradient(rgba(15, 23, 42, .55), rgba(15, 23, 42, .35)),
    url("ahs.hero.webp");
  background-repeat: no-repeat;
  background-size: cover;

  /* focus right side (girl face) */
  background-position: 75% 25%;
}

/* If your image is ONLY available on root, uncomment this:
.hero::before{
  background-image:
    linear-gradient(rgba(15,23,42,.55), rgba(15,23,42,.35)),
    url("/ahs.hero.jpg");
}
*/

.hero .container {
  position: relative;
  z-index: 2;

  /* ✅ FIXED invalid margin */
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero h1 {
  margin: 0 0 12px;
  max-width: 620px;
  color: #ffffff;
  font-size: 44px;
  line-height: 1.15;
}

.hero p {
  max-width: 620px;
  color: #e2e8f0;
  font-size: 18px;
}

/* ===============================
   Buttons
================================ */
.btn {
  display: inline-block;
  padding: 14px 22px;
  background: #0ea5e9;
  color: #ffffff;
  border-radius: 10px;
  font-weight: 800;
  transition: .2s ease;
}

.btn:hover {
  background: #0284c7;
  transform: translateY(-1px);
  text-decoration: none;
}

/* ===============================
   Sections & Cards
================================ */
section {
  padding: 60px 0;
}

h2 {
  font-size: 30px;
  margin: 0 0 10px;
  line-height: 1.25;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: #ffffff;
  border-radius: 14px;
  padding: 22px;
  border: 1px solid #e5e7eb;
  transition: .2s ease;
}

.card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
}

/* ===============================
   TOOLS – Advanced Cards
================================ */
.tools-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.tool-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .06);
  transition: .25s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .12);
}

.tool-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e0f2fe, #f0fdfa);
  border: 1px solid #bae6fd;
  font-size: 22px;
}

.tool-badge {
  font-size: 12px;
  font-weight: 800;
  color: #0ea5e9;
  background: #ecfeff;
  border: 1px solid #bae6fd;
  padding: 6px 10px;
  border-radius: 999px;
}

.tool-card h3 {
  margin: 8px 0 6px;
  font-size: 18px;
}

.tool-card p {
  margin: 0 0 14px;
  color: #475569;
  font-size: 14.5px;
  line-height: 1.6;
}

.tool-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-link {
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  font-weight: 800;
  background: #ffffff;
  transition: .2s ease;
}

.tool-link:hover {
  background: #f8fafc;
  text-decoration: none;
}

.tool-link.primary {
  background: #0ea5e9;
  color: #ffffff;
  border: none;
}

.tool-link.primary:hover {
  background: #0284c7;
}

/* ===============================
   Footer
================================ */
footer {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 40px 0;
}

footer a {
  display: block;
  margin-bottom: 8px;
  color: #475569;
}

footer a:hover {
  color: #0ea5e9;
  text-decoration: none;
}

.copyright {
  text-align: center;
  color: #64748b;
  font-size: 14px;
  margin-top: 20px;
}

/* ===============================
   Article Typography (AdSense Safe)
================================ */
article {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 18px;
}

article h1 {
  font-size: 38px;
  line-height: 1.25;
  margin-bottom: 16px;
}

article h2 {
  font-size: 28px;
  margin-top: 34px;
  margin-bottom: 12px;
}

article h3 {
  font-size: 22px;
  margin-top: 26px;
  margin-bottom: 8px;
}

article p {
  font-size: 18px;
  line-height: 1.9;
  margin-bottom: 18px;
  color: #0f172a;
}

article ul {
  margin: 12px 0 22px 22px;
}

article li {
  font-size: 18px;
  margin-bottom: 10px;
}

.article-note {
  background: #f1f5f9;
  border-left: 5px solid #0ea5e9;
  padding: 16px 18px;
  margin: 26px 0;
  font-size: 17px;
  color: #334155;
}

.article-urdu {
  font-style: italic;
  color: #475569;
  margin: 18px 0;
}

/* ===============================
   GPA Calculator Page Styles
================================ */
.wrap {
  max-width: 1500px;
  margin: 34px auto;
  padding: 0 16px;
}

.wrap .card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

.wrap .card>h1 {
  text-align: center;
  margin: 0 0 10px;
  font-size: 34px;
}

.wrap .card>.sub {
  text-align: center;
  color: #64748b;
  margin: 0 0 18px;
  line-height: 1.5;
}

.toolbar {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}

.toolbar .btn {
  border: 0;
  padding: 11px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  background: #0ea5e9;
  color: #ffffff;
  transition: .2s ease;
}

.toolbar .btn:hover {
  background: #0284c7;
  transform: translateY(-1px);
}

.toolbar .btn.secondary {
  background: #111827;
}

.toolbar .btn.secondary:hover {
  background: #0b1220;
}

.toolbar .btn.ghost {
  background: transparent;
  color: #111827;
  border: 1px solid #e5e7eb;
}

.toolbar .btn.ghost:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}

.tableWrap {
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
}

.tableWrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1050px;
  background: #ffffff;
}

.tableWrap thead th {
  font-size: 13px;
  padding: 12px 10px;
  background: #f1f5f9;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
  text-align: left;
  color: #0f172a;
}

.tableWrap tbody td {
  padding: 10px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}

.tableWrap tbody tr:last-child td {
  border-bottom: 0;
}

.tableWrap input {
  width: 100%;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  background: #ffffff;
}

.tableWrap input:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .15);
}

.tableWrap input[type="number"] {
  text-align: left;
}

.tableWrap .delBtn {
  padding: 8px 10px;
  border-radius: 10px;
}

/* Grade / GP Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  white-space: nowrap;
}

.ok {
  color: #0f766e;
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.bad {
  color: #b91c1c;
  background: #fee2e2;
  border-color: #fca5a5;
}

.tableWrap td.gr,
.tableWrap td.gp {
  white-space: nowrap;
}

.result {
  margin-top: 18px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.bar {
  width: 4px;
  border-radius: 10px;
  background: #0ea5e9;
  align-self: stretch;
}

.result h3 {
  margin: 0;
  font-size: 16px;
}

.result p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
}

.gpaBox {
  margin-left: auto;
  text-align: right;
}

.gpaVal {
  font-size: 28px;
  font-weight: 900;
  color: #0f172a;
}

.gpaHint {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

/* ===============================
   Responsive
================================ */
@media (max-width: 768px) {
  .hero {
    padding: 120px 0;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 16px;
  }

  h2 {
    font-size: 26px;
  }

  nav {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 90px 0;
  }

  .hero h1 {
    font-size: 28px;
  }
}

/* ===============================
   Program Cards (Images)
================================ */
.programs-grid .program-card {
  padding: 18px;
}

.program-img {
  width: 100%;
  height: 165px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  margin-bottom: 12px;
  background: #f1f5f9;
}


/* ================================
   Hover Animation: Shine + 3D Glow
   + 3-COLOR RUNNING BORDER LIGHT
   (COLORS UNCHANGED)
================================ */

.card, .tool-card{
  position: relative;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  transform: translateZ(0);
  transition:
    transform .35s ease,
    box-shadow .35s ease,
    border-color .35s ease;
}

/* ================================
   RUNNING BORDER LIGHT
================================ */
.card::before,
.tool-card::before{
  content:"";
  position:absolute;
  inset:-2px;                 /* border thickness */
  border-radius:20px;

  /* 🔵🔴🟣 EXACT SAME COLORS AS YOU PROVIDED */
  background: conic-gradient(
    from 0deg,
    transparent 0%,

    rgba(14,165,233,.95) 10%,      /* BLUE */
    rgba(239,68,68,.95) 20%,       /* RED */
    rgba(247,144,85,.65) 30%,      /* ORANGE/PURPLE soft */

    transparent 42%,
    transparent 60%,

    rgba(14,165,233,.65),          /* BLUE soft */
    rgba(239,68,68,.65),           /* RED soft */
    rgba(247,144,85,.65),          /* ORANGE/PURPLE soft */

    transparent 88%
  );

  opacity: 0;
  transform: rotate(0deg);
  animation: borderRun 1.8s linear infinite;
  pointer-events: none;
  filter: blur(0.8px);
}

/* ================================
   INNER MASK (important fix)
================================ */
.card::after,
.tool-card::after{
  content:"";
  position:absolute;
  inset:1.5px;               /* 👈 slightly more space = cleaner border */
  border-radius:16.5px;
  background:#ffffff;
  pointer-events:none;
  z-index:1;
}

/* ================================
   HOVER / ACTIVE STATE
================================ */
.card:hover,
.tool-card:hover{
  transform: translateY(-10px) perspective(900px) rotateX(2deg);
  border-color:#0ea5e9;
  box-shadow:
    0 22px 50px rgba(14,165,233,.22),
    0 10px 22px rgba(0,0,0,.14);
}

/* start running light on hover */
.card:hover::before,
.tool-card:hover::before{
  opacity:1;
}

/* mobile tap glow burst */
@media (hover:none){
  .card:active::before,
  .tool-card:active::before{
    opacity:1;
    animation-duration:.7s;
    filter: blur(1px);
  }
}

/* keep real content above effects */
.card > *,
.tool-card > *{
  position: relative;
  z-index: 2;
}

/* animation */
@keyframes borderRun{
  to{ transform: rotate(360deg); }
}

/* ================================
   PROGRAM IMAGE ZOOM (UNCHANGED)
================================ */
.program-card{ overflow:hidden; }
.program-img{
  transition: transform .7s ease;
}
.program-card:hover .program-img{
  transform: scale(1.08);
}

/* ===============================
   PROFESSIONAL EQUAL CARD LAYOUT
================================ */

/* Grid auto equal height */
.grid{
  display:grid;
  gap:24px;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
}

/* Cards equal height on desktop */
.card{
  display:flex;
  flex-direction:column;
  height:100%;
  padding:22px;
}

/* Image fixed ratio */
.program-img,
.study-img{
  width:100%;
  height:190px;
  object-fit:cover;
  border-radius:14px;
  margin-bottom:16px;
}

/* Heading spacing */
.card h3{
  font-size:18px;
  margin-bottom:12px;
  line-height:1.3;
}

/* Paragraph flexible */
.card p{
  font-size:15px;
  line-height:1.6;
  margin-bottom:18px;
  flex-grow:1;   /* pushes button down */
}

/* Button always bottom */
.card .btn{
  align-self:flex-start;
  margin-top:auto;
}

/* ===============================
   MOBILE OPTIMIZATION
================================ */

@media (max-width:768px){

  .program-img,
  .study-img{
    height:160px;
  }

  .card{
    padding:18px;
  }

}


/* ===============================
   MOBILE NAVBAR PROFESSIONAL
================================ */

.menu-toggle{
  display:none;
  font-size:26px;
  cursor:pointer;
  user-select:none;
}

/* Desktop nav */
nav{
  display:flex;
  gap:22px;
}

/* ===============================
   MOBILE STYLE
================================ */

@media (max-width:768px){

  .menu-toggle{
    display:block;
  }

  nav{
    position:absolute;
    top:70px;
    right:0;
    background:#ffffff;
    width:100%;
    flex-direction:column;
    align-items:center;
    padding:20px 0;
    gap:18px;
    box-shadow:0 10px 30px rgba(0,0,0,.1);
    transform:translateY(-120%);
    transition:.35s ease;
  }

  nav.active{
    transform:translateY(0);
  }

  nav a{
    font-size:16px;
    font-weight:600;
  }

}

/* ================================
   MLT NAVBAR / HEADER (AHS Guexam)
   Paste this at the END of style.css
================================= */

/* Basic layout helpers (if already exist, this will just reinforce) */
.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
}

/* Brand */
.brand {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.1;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #111;
}

.brand-tag {
  font-size: 12px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.6);
  margin-top: 3px;
}

/* Navbar */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.8);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.nav-link:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #000;
  transform: translateY(-1px);
}

/* Active state */
.nav-link.is-active,
.nav-link[aria-current="page"] {
  background: rgba(0, 0, 0, 0.09);
  color: #000;
}

/* Right-side CTA button */
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  background: #111;
  transition: transform 0.15s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

/* Responsive: wrap on small screens */
@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 12px 0;
  }

  .main-nav {
    width: 100%;
    justify-content: center;
  }

  .nav-list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .nav-cta {
    width: 100%;
    max-width: 420px;
    justify-content: center;
  }
}



/* ============================= */
/* ABOUT / TRUST SECTION STYLING */
/* ============================= */

.about-section {
  background: #ffffff;
  padding: 60px 30px;
  margin: 60px auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
  max-width: 1100px;
}

.about-section h2 {
  font-size: 28px;
  margin-bottom: 15px;
  margin-top: 40px;
  color: #1a1a1a;
  position: relative;
}

.about-section h2:first-child {
  margin-top: 0;
}

.about-section h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #2a7de1;
  margin-top: 8px;
  border-radius: 3px;
}

.about-section p {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 18px;
}

/* Responsive */
@media (max-width: 768px) {
  .about-section {
    padding: 40px 20px;
  }

  .about-section h2 {
    font-size: 22px;
  }

  .about-section p {
    font-size: 15px;
  }
}
