/* ================================================
   ATLASIA STATE UNIVERSITY - MSU-GenSan Inspired
   Colors: Maroon (#7A0000) and Gold (#F1C40F)
   ================================================ */

:root {
  --maroon: #7A0000;
  --maroon-dark: #5A0000;
  --gold: #F1C40F;
  --gold-dark: #D4AC0D;
  --text-main: #333333;
  --text-light: #666666;
  --bg-light: #F9F9F9;
  --white: #FFFFFF;
  --font-heading: 'Merriweather', serif;
  --font-body: 'Open Sans', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  line-height: 1.6;
  background-color: var(--white);
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: var(--maroon);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--gold-dark);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center { text-align: center; }
.text-white { color: var(--white) !important; }
.bg-light { background-color: var(--bg-light); }
.bg-maroon { background-color: var(--maroon); }
.bg-gold { background-color: var(--gold) !important; }

/* --- Top Bar --- */
.top-bar {
  background-color: var(--maroon-dark);
  color: var(--white);
  font-size: 0.85rem;
  padding: 8px 0;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-links a {
  color: var(--white);
  margin-left: 15px;
  font-weight: 600;
}

.top-links a:hover {
  color: var(--gold);
}

/* --- Main Header --- */
.main-header {
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
}

.logo {
  height: 60px;
  width: auto;
  filter: brightness(0);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 200;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--maroon);
  border-radius: 3px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* Animate to X when open */
.nav-toggle--open span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.nav-toggle--open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle--open span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

.main-nav a {
  color: var(--maroon);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
}

.main-nav a:hover {
  color: var(--gold-dark);
}

/* --- Hero Section --- */
.hero {
  height: 500px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-overlay {
  background: rgba(122, 0, 0, 0.65); /* Maroon tint */
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
}

.hero-content {
  color: var(--white);
  max-width: 700px;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  margin-bottom: 20px;
  color: var(--gold);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 25px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--gold);
  color: var(--maroon-dark);
}

.btn-primary:hover {
  background-color: var(--gold-dark);
  color: var(--white);
}

.btn-secondary {
  background-color: var(--maroon);
  color: var(--white);
  margin-top: 15px;
}

.btn-secondary:hover {
  background-color: var(--maroon-dark);
  color: var(--gold);
}

/* --- Stats Bar --- */
.stats-bar {
  background-color: var(--gold);
  padding: 30px 0;
}

.stats-container {
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.stat-item h3 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--maroon-dark);
  margin-bottom: 5px;
}

.stat-item p {
  font-weight: 700;
  color: var(--maroon);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Generic Sections --- */
.section-padding {
  padding: 80px 0;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--maroon);
  margin-bottom: 10px;
}

.title-underline {
  height: 4px;
  width: 60px;
  background-color: var(--maroon);
  margin-bottom: 25px;
}

.center-underline {
  margin: 0 auto 25px auto;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.align-center {
  align-items: center;
}

/* --- Images & Cards --- */
.framed-image {
  width: 100%;
  border: 8px solid var(--white);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  border-radius: 4px;
}

.floating-image {
  height: 480px;
  width: auto;
  display: block;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
}

.spotlight {
  padding: 0;
  overflow: hidden;
  position: relative;
}

.spotlight .container {
  position: relative;
  z-index: 2;
}

.spotlight .image-content {
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  position: relative;
  min-height: 520px;
  padding: 0;
}

.diploma-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.8;
  z-index: 0;
  pointer-events: none;
}

.diploma-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20%;
  background: linear-gradient(to bottom, transparent, var(--maroon));
  z-index: 1;
  pointer-events: none;
}

.spotlight .text-content {
  padding: 60px 40px 60px 0;
  position: relative;
  z-index: 3;
}

.half-body-wrap {
  overflow: hidden;
  height: 480px;
  align-self: flex-end;
  position: relative;
  z-index: 2;
}

.half-body-img {
  height: 960px;
  width: auto;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
}

.diploma-preview {
  margin-top: 20px;
  width: 100%;
  max-width: 400px;
  border: 4px solid var(--gold);
  border-radius: 2px;
}

/* --- ID Showcase Section --- */
.id-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 50px;
  align-items: start;
}

.id-card {
  background: var(--white);
  border-radius: 8px;
  border: 1px solid #ddd;
  border-top: 4px solid var(--maroon);
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  padding: 30px 25px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.id-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.13);
}

.id-card--featured {
  border-top: 4px solid var(--gold);
  transform: translateY(-10px);
  box-shadow: 0 10px 35px rgba(0,0,0,0.15);
}

.id-card--featured:hover {
  transform: translateY(-16px);
}

.id-image {
  width: 100%;
  max-width: 220px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-bottom: 20px;
}

.id-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--maroon);
  margin-bottom: 8px;
}

.id-badge {
  display: inline-block;
  background: var(--maroon);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.id-badge--gold {
  background: var(--gold);
  color: var(--maroon);
}

.id-desc {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.7;
}

/* --- Ads / Admissions Section --- */
.ad-card {
  background: var(--white);
  border: 1px solid #ddd;
  border-top: 4px solid var(--maroon);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  margin-top: 40px;
}

.ad-banner {
  width: 100%;
  height: auto;
  border-bottom: 1px solid #eee;
}

.ad-card-body {
  display: flex;
  align-items: center;
  padding: 30px;
  gap: 30px;
  text-align: left;
}

.ad-text h3 {
  font-family: var(--font-heading);
  color: var(--maroon);
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.ad-promo-img {
  width: 100%;
  max-width: 360px;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  display: block;
}

.ad-enroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.ad-enroll-btn {
  width: 100%;
  text-align: center;
  font-size: 1rem;
  padding: 14px 24px;
}

/* --- Footer --- */
.main-footer {
  background-color: #222;
  color: #ccc;
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  height: 30px;
  margin-bottom: 15px;
  filter: brightness(0) invert(1);
}

.footer-links h4 {
  color: var(--gold);
  margin-bottom: 20px;
  font-family: var(--font-heading);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #ccc;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #444;
  padding-top: 20px;
  font-size: 0.85rem;
}

/* --- Placeholder Pages --- */
.placeholder-hero {
  padding: 80px 0 60px;
}

.placeholder-hero-content h1 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  margin-bottom: 15px;
}

.placeholder-hero-content p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 600px;
}

.placeholder-form-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 40px;
  text-align: left;
}

.placeholder-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--maroon);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
  background: #f9f9f9;
  color: #999;
  font-family: var(--font-body);
}

.placeholder-notice {
  background: var(--white);
  border-left: 4px solid var(--gold);
  border-radius: 4px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.placeholder-notice h3 {
  font-family: var(--font-heading);
  color: var(--maroon);
  margin-bottom: 12px;
}

.placeholder-notice p {
  color: #555;
  line-height: 1.75;
  margin-bottom: 10px;
}

.placeholder-directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: left;
}

.directory-card {
  background: var(--white);
  border: 1px solid #ddd;
  border-top: 4px solid var(--maroon);
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.directory-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--maroon);
  margin-bottom: 10px;
}

.directory-card p {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.7;
  margin-top: 10px;
}

.directory-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #e0e0e0;
  margin-bottom: 14px;
}

.directors-letter {
  max-width: 780px;
  margin: 0 auto;
  background: var(--white);
  padding: 50px 60px;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  line-height: 1.9;
  color: #444;
}

.directors-letter p {
  margin-bottom: 20px;
}

.directors-signature {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid var(--gold);
  color: var(--maroon);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  /* Top bar */
  .top-bar-content { flex-direction: column; gap: 6px; text-align: center; padding: 8px 0; }
  .top-links { flex-wrap: wrap; justify-content: center; gap: 10px; }

  /* Header */
  .main-header { box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
  .header-container {
    flex-direction: row;
    flex-wrap: wrap;
    height: auto;
    padding: 14px 0;
    gap: 0;
    align-items: center;
    justify-content: space-between;
  }
  .logo-link { display: flex; align-items: center; }
  .logo { height: 42px; }

  /* Hamburger */
  .nav-toggle { display: flex; }

  /* Nav collapses */
  .main-nav {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .main-nav.nav-open {
    max-height: 400px;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 6px 0 10px;
    border-top: 1px solid #f0e8e8;
    margin-top: 10px;
    width: 100%;
  }
  .main-nav ul li { width: 100%; }
  .main-nav a {
    display: block;
    padding: 11px 10px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f5f0f0;
  }
  .main-nav a:hover { background: #fdf8f8; }

  /* Hero */
  .hero-content h1 { font-size: 1.7rem; }
  .hero-content p { font-size: 0.9rem; }
  .hero-content { padding: 0 10px; }

  /* Stats */
  .stats-container { flex-direction: column; gap: 20px; }

  /* General grids */
  .content-grid { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; text-align: center; }
  .footer-links ul { padding: 0; }

  /* Admissions card */
  .ad-card-body { flex-direction: column; }
  .ad-enroll { width: 100%; align-items: center; }
  .ad-promo-img { max-width: 100%; width: 100%; }
  .ad-enroll-btn { width: 100%; }

  /* Spotlight section */
  .spotlight {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }
  .spotlight .container {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
  }
  .spotlight .image-content {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-height: 280px;
    overflow: hidden;
  }
  .floating-image {
    height: 260px;
    width: auto;
    max-width: 50%;
    flex-shrink: 1;
    object-fit: contain;
    object-position: bottom;
  }
  .half-body-wrap {
    height: 260px;
    max-width: 50%;
    flex-shrink: 1;
    overflow: hidden;
  }
  .half-body-img { height: 520px; }
  .spotlight .text-content {
    padding: 30px 20px 36px 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
    text-align: left;
  }
  .spotlight .section-title {
    font-size: 1.3rem;
    line-height: 1.35;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
  }
  .spotlight .text-content p {
    font-size: 0.92rem;
    line-height: 1.65;
    max-width: 100%;
  }

  /* ID Showcase */
  .id-grid { grid-template-columns: 1fr; }
  .id-card--featured { transform: none; }
  .id-card--featured:hover { transform: translateY(-6px); }

  /* Placeholder pages */
  .placeholder-hero { padding: 50px 0 40px; }
  .placeholder-hero-content h1 { font-size: 1.9rem; }
  .placeholder-hero-content p { font-size: 0.9rem; }
  .placeholder-form-wrap { grid-template-columns: 1fr; gap: 30px; }
  .placeholder-directory { grid-template-columns: 1fr; }
  .directors-letter { padding: 28px 20px; }

  /* Section titles & subtitles */
  .section-title { font-size: 1.6rem; }
  .subtitle { font-size: 0.95rem; }
}

@media (max-width: 400px) {
  .logo { height: 34px; }
  .hero-content h1 { font-size: 1.4rem; }
  .top-links { flex-direction: column; gap: 6px; }
  .btn { padding: 12px 20px; font-size: 0.88rem; }
}