/*
Theme Name: NNIPHS Theme
Theme URI: https://nniphs.jmcp.edu.pk/
Author: NNIPHS
Author URI: https://nniphs.jmcp.edu.pk/
Description: Naseem Nursing Institute & Public Health School - Official WordPress Theme (One-Page Edition)
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nniphs-theme
Tags: education, healthcare, nursing, school, one-page, custom-colors
*/

:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  --ink: #10303a;
  --body: #2b4650;
  --teal: #1b6b73;
  --mist: #e6f0ee;
  --paper: #f8faf9;
  --card: #ffffff;
  --line: #cfdedb;
  --amber-bg: #fff4d9;
  --amber-ink: #6b4a00;
  --amber-line: #e7c36a;
  --hl: #ffe98a;
  --hl-ink: #3b2f00;
  --foot: #10303a;
  --foot-ink: #dbe9e6;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e4f1ee;
    --body: #b9cdc9;
    --teal: #6fc1c8;
    --mist: #17303a;
    --paper: #0e1c22;
    --card: #14262d;
    --line: #2a444d;
    --amber-bg: #3a2e0e;
    --amber-ink: #f2d98f;
    --amber-line: #7a6320;
    --hl: #6b5a10;
    --hl-ink: #fff3c4;
    --foot: #0a1519;
    --foot-ink: #b9cdc9;
    color-scheme: dark;
  }
}

html {
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 70px);
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Headings */
h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.18rem; }

p {
  margin: 0 0 1em;
  max-width: 68ch;
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: opacity .2s ease, color .2s ease;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.ph {
  background: var(--hl);
  color: var(--hl-ink);
  padding: 0 .3em;
  border-radius: 3px;
}

/* Sample Alert Bar */
.sample {
  background: var(--ink);
  color: var(--paper);
  font-size: .9rem;
  text-align: center;
  padding: 10px 16px;
  font-weight: 500;
}
.sample .ph { margin: 0 .15em; }

/* Sticky Header */
header.top {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 999;
}

header.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.brand-logo-img {
  height: 56px;
  width: 56px;
  object-fit: contain;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  transition: transform .2s ease;
}
.brand:hover {
  text-decoration: none;
  opacity: .95;
}
.brand:hover .brand-logo-img {
  transform: scale(1.04);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-title {
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 0.8rem;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--teal);
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.footer-brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.footer-logo-img {
  height: 50px;
  width: 50px;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
}
.footer-brand-name {
  margin: 0 !important;
  font-size: 1.15rem;
}

nav {
  display: flex;
  gap: 6px 18px;
  flex-wrap: wrap;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--body);
  font-size: .95rem;
  padding: 6px 0;
  font-weight: 500;
}

nav a:hover {
  color: var(--teal);
  text-decoration: underline;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--mist), var(--paper));
  border-bottom: 1px solid var(--line);
  padding: 68px 0 60px;
}

/* Hero with Background Photo */
.hero.has-bg-img {
  position: relative;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  padding: 92px 0 80px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.hero.has-bg-img .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(125deg, rgba(5, 18, 48, 0.93) 0%, rgba(10, 52, 95, 0.86) 42%, rgba(0, 168, 150, 0.78) 100%);
  backdrop-filter: blur(2px);
  z-index: 1;
}

.hero.has-bg-img .wrap {
  position: relative;
  z-index: 2;
}

.hero.has-bg-img h1 {
  color: #ffffff;
  font-size: clamp(2.2rem, 5.2vw, 3.4rem);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
  line-height: 1.18;
}

.hero.has-bg-img p.lead {
  color: #e3f2f0;
  font-size: 1.25rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  max-width: 65ch;
}

.hero.has-bg-img .motto-badge {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(0, 201, 167, 0.25) 50%, rgba(255, 215, 0, 0.2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-left: 4px solid #f9c74f;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(14px);
}

.hero.has-bg-img .motto-text {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.hero.has-bg-img .motto-pulse {
  background: #f9c74f;
  box-shadow: 0 0 0 0 rgba(249, 199, 79, 0.8);
}

.hero.has-bg-img .status {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(7, 36, 70, 0.85) 40%, rgba(0, 168, 150, 0.42) 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-left: 5px solid #ffc107;
  border-radius: 12px;
  padding: 20px 24px;
  max-width: 760px;
  margin-top: 28px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.hero.has-bg-img .status:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.hero.has-bg-img .status::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffc107, #00d2be, transparent);
}

.hero.has-bg-img .status strong {
  color: #ffc107;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.status-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffc107;
  box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.8);
  animation: statusGlow 2s infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes statusGlow {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 7px rgba(255, 193, 7, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
  }
}

.hero.has-bg-img .status p {
  color: #f1f8f7;
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  font-weight: 400;
}

/* College Motto / Tagline Badge */
.motto-banner {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  animation: mottoEntrance 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.motto-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 22px;
  background: linear-gradient(135deg, rgba(27, 107, 115, 0.08) 0%, rgba(255, 244, 217, 0.55) 50%, rgba(27, 107, 115, 0.08) 100%);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 50px;
  box-shadow: 0 4px 14px rgba(16, 48, 58, 0.06);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.motto-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg);
  animation: shimmerLight 4s infinite ease-in-out;
}

.motto-text {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 800;
  font-size: clamp(0.82rem, 1.8vw, 0.95rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}

.motto-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(27, 107, 115, 0.7);
  animation: pulseGlow 2s infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes mottoEntrance {
  0% {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shimmerLight {
  0% { left: -100%; }
  30%, 100% { left: 200%; }
}

@keyframes pulseGlow {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(27, 107, 115, 0.6);
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(27, 107, 115, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(27, 107, 115, 0);
  }
}

.hero p.lead {
  font-size: 1.22rem;
  color: var(--body);
  line-height: 1.6;
}

.status {
  background: var(--amber-bg);
  color: var(--amber-ink);
  border: 1px solid var(--amber-line);
  border-left: 6px solid var(--amber-line);
  border-radius: 8px;
  padding: 16px 20px;
  max-width: 740px;
  margin-top: 26px;
}

.status strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.05rem;
}

.status p {
  margin: 0;
  font-size: 1rem;
}

/* General Sections */
section {
  padding: 60px 0;
  border-bottom: 1px solid var(--line);
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  margin-top: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.card h3 {
  margin-bottom: .35em;
}

.card p {
  margin: 0;
  font-size: .97rem;
  line-height: 1.55;
}

.two {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 20px;
}

/* Description Lists */
dl {
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}

dt {
  font-weight: 700;
  color: var(--ink);
}

dd {
  margin: 0;
}

.soon {
  border-style: dashed;
  background: transparent;
}

.btn {
  display: inline-block;
  background: var(--teal);
  color: #ffffff;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  margin-top: 14px;
  border: none;
  cursor: pointer;
  transition: background .2s ease, opacity .2s ease, transform .2s ease;
}

.btn:hover {
  opacity: .92;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent !important;
  color: var(--teal) !important;
  border: 2px solid var(--teal) !important;
}

.btn-outline:hover {
  background: var(--teal) !important;
  color: #ffffff !important;
}

/* Hero Prospectus CTA Button */
.hero-actions {
  margin: 24px 0 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-prospectus {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 28px;
  background: linear-gradient(135deg, #00a896 0%, #028090 100%);
  color: #ffffff !important;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none !important;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 10px 28px rgba(0, 168, 150, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-prospectus:hover {
  background: linear-gradient(135deg, #00c9a7 0%, #009688 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 34px rgba(0, 168, 150, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: #ffffff !important;
}

.btn-prospectus:active {
  transform: translateY(0) scale(0.99);
}

.btn-prospectus i.fa-file-pdf {
  font-size: 1.2rem;
  color: #ffd166;
}

.btn-prospectus i.fa-download,
.btn-prospectus i.fa-arrow-down {
  font-size: 0.95rem;
  opacity: 0.92;
  transition: transform 0.2s ease;
}

.btn-prospectus:hover i.fa-download,
.btn-prospectus:hover i.fa-arrow-down {
  transform: translateY(2px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn {
    color: #06161b;
  }
}

/* Footer */
footer {
  background: var(--foot);
  color: var(--foot-ink);
  padding: 40px 0 32px;
  font-size: .93rem;
}

footer p {
  max-width: none;
  margin: 0 0 .6em;
}

footer a {
  color: var(--foot-ink);
}

/* WordPress Admin Bar Compatibility */
body.admin-bar header.top {
  top: 32px;
}
@media screen and (max-width: 782px) {
  body.admin-bar header.top {
    top: 46px;
  }
}

/* Mobile Adjustments */
@media (max-width: 560px) {
  dl {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px;
  }
  dt {
    margin-top: 8px;
  }
  header.top .wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}
