/* ============================================================
   styles.css
   AFS.Institute — Shared Stylesheet
   Applies to all pages. Page-specific styles remain
   in each HTML file's own <style> block.
   ============================================================ */


/* ════════════════════════════
   DESIGN TOKENS
   All colours, shadows and
   transitions in one place.
   Edit here — updates everywhere.
════════════════════════════ */
:root {
  --navy:           #0b1f3a;
  --navy-light:     #12345d;
  --blue:           #1f6fb2;
  --blue-dark:      #15558b;
  --gold:           #d7a928;
  --gold-light:     #f3d77a;
  --accent:         #00c2ff;
  --accent-soft:    #7fdfff;
  --white:          #ffffff;
  --off-white:      #f5f7fa;
  --text:           #243447;
  --text-main:      #e4eaf4;
  --text-muted:     #8c9ab0;
  --text-caption:   #526070;
  --muted:          #667085;
  --border:         #d9e0e8;
  --border-page:    #101e30;
  --shadow:         0 8px 24px rgba(11, 31, 58, 0.12);
  --transition-in:  0.28s ease;
  --transition-out: 0.16s ease;
}


/* ════════════════════════════
   RESET & BASE
════════════════════════════ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}


a {
  text-decoration: none;
}


:focus-visible {
  outline: 3px solid rgba(215, 169, 40, 0.55);
  outline-offset: 3px;
  border-radius: 3px;
}


/* ════════════════════════════
   SITE HEADER
   Navy gradient + 2px gold bar
   Consistent across all pages.
════════════════════════════ */
.site-header {
  background: linear-gradient(
    135deg,
    var(--navy),
    var(--navy-light)
  );
  border-bottom: 2px solid var(--gold);
  color: var(--white);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}


.header-inner {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}


/* ════════════════════════════
   BRAND BLOCK
   Logo slot is optional.
   Add or remove .brand-logo
   in any HTML file freely —
   layout adjusts automatically,
   no style sheet edits needed.
════════════════════════════ */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}


/* Logo slot — optional.
   Remove the .brand-logo div
   from any page to hide it.
   Nothing breaks. */
.brand-logo img {
  height: 56px;
  width: auto;
  display: block;
}


.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}


.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
  line-height: 1;
}


/* Sub-line — set per page in HTML.
   Colour and size controlled here. */
.brand-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.70);
  letter-spacing: 0.04em;
}


/* ════════════════════════════
   NAVIGATION
════════════════════════════ */
.nav-links {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-shrink: 0;
}


.nav-links a {
  display: inline-block;
  font-size: 11px;
  padding: 8px 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.16s ease,
              border-color 0.16s ease;
}


.nav-links a:hover {
  color: rgba(255, 255, 255, 0.90);
  border-bottom-color: rgba(255, 255, 255, 0.25);
}


/* Active page tab — white */
.nav-links a.active {
  color: var(--white);
  border-bottom-color: var(--white);
  font-weight: 600;
}


/* ════════════════════════════
   BUTTONS
   .btn-primary  — solid blue
   .btn-secondary — outlined
   .portal-btn   — solid blue,
                   smaller, used
                   inside panels
════════════════════════════ */
.btn-primary {
  display: inline-block;
  padding: 9px 20px;
  background: var(--blue);
  color: var(--white);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: background  0.2s ease,
              transform   0.2s ease,
              box-shadow  0.2s ease;
  text-decoration: none;
}


.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(21, 85, 139, 0.4);
  color: var(--white);
}


.btn-secondary {
  display: inline-block;
  padding: 9px 20px;
  background: transparent;
  color: var(--accent-soft);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.875rem;
  border: 1px solid rgba(0, 194, 255, 0.35);
  cursor: pointer;
  transition: background    0.2s ease,
              border-color  0.2s ease,
              transform     0.2s ease;
  text-decoration: none;
}


.btn-secondary:hover {
  background: rgba(0, 194, 255, 0.08);
  border-color: var(--accent-soft);
  transform: translateY(-1px);
  color: var(--accent-soft);
}


/* Portal button — solid blue,
   compact, used inside white
   panels on portal page and
   member directory pages */
.portal-btn {
  display: inline-block;
  padding: 9px 18px;
  background: var(--blue);
  color: var(--white);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.82rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease,
              transform  0.2s ease,
              box-shadow 0.2s ease;
  text-decoration: none;
}


.portal-btn:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(21, 85, 139, 0.35);
  color: var(--white);
}


/* ════════════════════════════
   SITE FOOTER
   Solid navy bar — all pages
════════════════════════════ */
.site-footer {
  background: var(--navy);
  color: #dbe5f0;
  font-size: 0.85rem;
  padding: 22px 20px;
  text-align: center;
  letter-spacing: 0.04em;
}


/* ════════════════════════════
   RESPONSIVE — SHARED
   Page-specific breakpoints
   stay in each HTML file.
════════════════════════════ */
@media (max-width: 650px) {

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    font-size: 10px;
    padding: 6px 10px;
    letter-spacing: 0.07em;
  }

  .brand-title {
    font-size: 14px;
  }

  .brand-sub {
    display: none;
  }

}


/* ════════════════════════════
   INDEX.HTML PAGE STYLES
   Moved from index.html
   style block for
   maintainability.
════════════════════════════ */

/* ── BODY ── */
.index-page {
  background-color: #0c1520;
  background-image: radial-gradient(
    ellipse at top left,
    #152338 0%,
    #0c1520 50%,
    #070e18 100%
  );
  background-attachment: fixed;
  color: var(--text-main);
}

.index-page a {
  color: var(--accent-soft);
  transition: color var(--transition-out);
}

.index-page a:hover {
  color: var(--accent);
}

/* ── PAGE WRAPPER ── */
.page-wrapper {
  width: min(780px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 60px;
}

/* ── CYAN CARD BASE ── */
.card {
  background: linear-gradient(
    135deg,
    rgba(0, 194, 255, 0.16) 0%,
    rgba(0, 194, 255, 0.06) 40%,
    rgba(8, 16, 28, 0.97)   100%
  );
  border-radius: 12px;
  border: 1px solid rgba(0, 194, 255, 0.32);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    inset 0 0 30px rgba(0, 194, 255, 0.04);
  position: relative;
  overflow: hidden;
  transition:
    background    var(--transition-in),
    border-color  var(--transition-in),
    transform     var(--transition-in),
    box-shadow    var(--transition-in);
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--accent)            0%,
    rgba(0, 194, 255, 0.40) 65%,
    transparent             100%
  );
  transition:
    height     var(--transition-in),
    background var(--transition-in);
}

.card:hover {
  background: #060f1c;
  border-color: rgba(0, 194, 255, 0.70);
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(0, 194, 255, 0.25),
    0 0 36px rgba(0, 194, 255, 0.22),
    0 20px 52px rgba(0, 0, 0, 0.65),
    inset 0 0 80px rgba(0, 194, 255, 0.06);
}

.card:hover::before {
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--accent)            0%,
    rgba(0, 194, 255, 0.80) 50%,
    rgba(0, 194, 255, 0.30) 80%,
    transparent             100%
  );
}

/* ── HERO LAYOUT ── */
.hero-outer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}

.hero-panel {
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
}

.panel-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-soft);
  margin-bottom: 12px;
  opacity: 0.8;
}

.institute-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.03em;
  margin-bottom: 4px;
  line-height: 1.2;
}

.institute-tagline {
  font-size: 0.82rem;
  color: var(--accent-soft);
  margin-bottom: 16px;
}

.institute-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 8px;
}

/* ── EXPAND BUTTONS ── */
.expand-row {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 194, 255, 0.15);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-expand {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 7px;
  border: 1px solid rgba(0, 194, 255, 0.35);
  background: rgba(0, 194, 255, 0.08);
  color: var(--accent-soft);
  cursor: pointer;
  transition:
    background     0.2s ease,
    border-color   0.2s ease,
    color          0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.btn-expand:hover {
  background: rgba(0, 194, 255, 0.18);
  border-color: rgba(0, 194, 255, 0.60);
  color: #fff;
}

.btn-expand .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-style: normal;
}

.btn-expand.open .arrow {
  transform: rotate(180deg);
}

/* ── EXPANDABLE PANELS ── */
.expand-panel {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease,
    opacity    0.3s ease;
  opacity: 0;
}

.expand-panel.open {
  max-height: 900px;
  opacity: 1;
}

.expand-inner {
  margin-top: 14px;
  padding: 18px 20px;
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid rgba(0, 194, 255, 0.15);
  border-radius: 8px;
  font-size: 0.80rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.expand-inner strong {
  color: var(--text-main);
}

.expand-inner ul {
  margin: 10px 0 0 18px;
  padding: 0;
}

.expand-inner li { margin: 8px 0; }

.expand-inner a {
  color: var(--accent-soft);
}

.expand-inner a:hover { color: #fff; }

/* ── GOLD MEMBER CARD ── */
.member-card {
  background: linear-gradient(
    135deg,
    rgba(215, 169, 40, 0.18) 0%,
    rgba(215, 169, 40, 0.07) 50%,
    rgba(8, 16, 28, 0.97)    100%
  );
  border-radius: 12px;
  border: 1px solid rgba(215, 169, 40, 0.38);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    inset 0 0 30px rgba(215, 169, 40, 0.04);
  position: relative;
  overflow: hidden;
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  transition:
    background    var(--transition-in),
    border-color  var(--transition-in),
    transform     var(--transition-in),
    box-shadow    var(--transition-in);
}

.member-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--gold)              0%,
    rgba(215, 169, 40, 0.40) 65%,
    transparent              100%
  );
  transition:
    height     var(--transition-in),
    background var(--transition-in);
}

.member-card:hover {
  background: #18120a;
  border-color: rgba(215, 169, 40, 0.72);
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(215, 169, 40, 0.28),
    0 0 36px rgba(215, 169, 40, 0.24),
    0 20px 52px rgba(0, 0, 0, 0.65),
    inset 0 0 80px rgba(215, 169, 40, 0.07);
}

.member-card:hover::before {
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--gold)              0%,
    rgba(215, 169, 40, 0.80) 50%,
    rgba(215, 169, 40, 0.30) 80%,
    transparent              100%
  );
}

.member-card-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-light);
  margin-bottom: 10px;
  opacity: 0.85;
}

.member-card-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.member-card-text strong {
  color: var(--text-main);
  display: block;
  margin-bottom: 4px;
  font-size: 0.88rem;
}

.btn-member-login {
  display: inline-block;
  padding: 9px 22px;
  background: #d4a017;
  color: #0c1520;
  border: none;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
  letter-spacing: 0.03em;
  white-space: nowrap;
  align-self: flex-start;
}

.btn-member-login:hover {
  background: #e8b820;
  color: #0c1520;
}

/* ── PROFILE CARD — RIGHT ── */
.profile-card {
  padding: 0;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.profile-photo-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 300px;
  overflow: hidden;
  border-radius: 12px;
}

.profile-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
  border-radius: 12px;
  transition: transform 0.5s ease;
}

.profile-card:hover .profile-photo {
  transform: scale(1.03);
}

.profile-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(6, 12, 24, 0.97)  0%,
    rgba(6, 12, 24, 0.92) 60%,
    rgba(6, 12, 24, 0.0)  100%
  );
  transform: translateY(100%);
  transition: transform 0.45s ease;
  border-radius: 0 0 12px 12px;
  padding: 28px 24px 24px;
}

.profile-card:hover .profile-overlay {
  transform: translateY(0);
}

.profile-overlay-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.profile-title {
  font-size: 0.78rem;
  color: var(--accent-soft);
  margin: 0 0 8px 0;
}

.profile-credentials {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.9;
  padding-top: 10px;
  border-top: 1px solid
    rgba(0, 194, 255, 0.15);
}

.profile-credentials strong {
  color: var(--text-main);
}

.profile-link-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid
    rgba(0, 194, 255, 0.15);
}

.profile-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 20px 16px;
  background: linear-gradient(
    to top,
    rgba(6, 12, 24, 0.88) 0%,
    transparent           100%
  );
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 0 0 12px 12px;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.profile-card:hover .profile-strip {
  opacity: 0;
}

.profile-strip-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.profile-strip-hint {
  font-size: 0.72rem;
  color: var(--accent-soft);
  opacity: 0.8;
}

/* ── SECTION LABELS ── */
.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold-light);
  margin-bottom: 12px;
  margin-top: 42px;
  opacity: 0.88;
}

.section-intro {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

/* ── SERVICE CARDS ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  padding: 20px 20px 18px;
}

.service-card h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.service-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}

.service-card ul {
  margin: 4px 0 0 16px;
  padding: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.service-card li { margin: 4px 0; }

/* ── INDEX RESPONSIVE ── */
@media (max-width: 600px) {

  .hero-outer,
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .profile-overlay {
    transform: translateY(65%);
  }

  .profile-card:hover .profile-overlay,
  .profile-card:focus-within
    .profile-overlay {
    transform: translateY(0);
  }

  .profile-strip {
    display: none;
  }

}
