/* ---------------------------------------- */
/* DESIGN SYSTEM & BASE STYLES          */
/* ---------------------------------------- */

:root {
  --color-navy: #0f172a;
  --color-blue-accent: #2563eb;
  --color-gray-body: #64748b;
  --color-gray-light-bg: #f8fafc;
  --color-white: #ffffff;
  --color-border: #e2e8f0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-gray-body);
  background-color: var(--color-white);
  line-height: 1.6;
  margin: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

h1, h2, h3, h4, h5 {
  color: var(--color-navy);
  font-weight: 700;
  line-height: 1.2;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-blue-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.section {
  padding: 5rem 0;
}

.section-light-gray {
  background-color: var(--color-gray-light-bg);
}

.section-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-blue-accent);
  background-color: #e0e7ff;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.section-heading {
  font-size: 2.25rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

.section-subheading {
  font-size: 1.125rem;
  max-width: 60ch;
  margin: 0 auto 3rem auto;
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--color-navy);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: #1e293b;
}

.btn-secondary {
  background-color: var(--color-white);
  color: var(--color-navy);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-gray-light-bg);
}

/* ---------------------------------------- */
/* NAVIGATION                             */
/* ---------------------------------------- */

.main-header {
  background-color: var(--color-white);
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo .logo-main {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-navy);
}

.logo .logo-sub {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-gray-body);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--color-navy);
  font-weight: 600;
  font-size: 0.875rem;
}

/* ---------------------------------------- */
/* HERO SECTION                           */
/* ---------------------------------------- */

.hero {
  padding: 6rem 0;
}

.hero-grid {
  text-align: center;
}

.hero-headline {
  font-size: 3.75rem;
  margin-bottom: 1rem;
}

.hero-headline .accent {
  color: var(--color-blue-accent);
}

.hero-subheadline {
  font-size: 1.125rem;
  max-width: 55ch; /* Adjusted max-width */
  margin: 0 auto 2rem auto; /* Center the subheadline */
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 4rem;
  justify-content: center; /* Center the buttons */
}

.hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center; /* Center the stats */
}

.stat-item .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-navy);
}

.stat-item .stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-gray-body);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------------------------------------- */
/* ABOUT, PRINCIPLES, BLOG SECTIONS       */
/* ---------------------------------------- */

.centered-content {
  text-align: center;
}

.three-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.info-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2.5rem; /* Increased padding */
  text-align: center;
}

.info-card .icon-placeholder {
  width: 48px;
  height: 48px;
  background-color: var(--color-gray-light-bg);
  border-radius: 8px;
  margin: 0 auto 1.5rem auto;
}

.info-card .card-title {
  font-size: 1.25rem;
  font-weight: 700; /* Explicitly bold */
  color: var(--color-navy); /* Dark navy */
  margin-bottom: 1rem; /* Increased space */
}

.info-card p {
  font-size: 0.95rem; /* Smaller size */
  color: var(--color-gray-body); /* Lighter gray */
  line-height: 1.7; /* More line-height */
}

/* ---------------------------------------- */
/* TEAM SECTION                           */
/* ---------------------------------------- */

.team-member-card {
  text-align: center;
}

.team-member-card .member-photo-link {
  display: block;
  width: 128px;
  height: 128px;
  margin: 0 auto 1.5rem auto;
  border-radius: 50%;
  overflow: hidden;
}

.team-member-card .member-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-member-card .member-name {
  font-size: 1.125rem;
}

.team-member-card .member-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-blue-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.team-member-card .member-degree {
  color: var(--color-gray-body);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ---------------------------------------- */
/* NEWSLETTER & JOIN SECTIONS             */
/* ---------------------------------------- */

.newsletter-form, .join-section {
  text-align: center;
}

.newsletter-form input[type="email"] {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  min-width: 300px;
  margin-right: 0.5rem;
}

.join-section {
  background-color: var(--color-navy);
  color: #d1d5db;
}

.join-section .section-pill {
  background-color: #1e293b;
}

.join-section .section-heading, .join-section a {
  color: var(--color-white);
}

.join-section .btn {
  background-color: var(--color-white);
  color: var(--color-navy);
}

.disclaimer-box {
  max-width: 60ch;
  margin: 3rem auto 0 auto;
  padding: 1.5rem;
  border: 1px solid #334155;
  border-radius: 8px;
  font-size: 0.875rem;
  text-align: left;
}

/* ---------------------------------------- */
/* FOOTER                                 */
/* ---------------------------------------- */

.main-footer {
  padding: 4rem 0;
  border-top: 1px solid var(--color-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
}

.footer-col h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--color-gray-body);
  font-weight: 500;
}

.copyright {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-gray-body);
  text-align: center;
}

/* ---------------------------------------- */
/* BLOG PAGES                             */
/* ---------------------------------------- */

.blog-post-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  border-radius: 12px;
}

.blog-post-card .post-date {
  font-size: 0.875rem;
  color: var(--color-gray-body);
}

.blog-post-card .post-title {
  font-size: 1.25rem;
  margin: 0.5rem 0;
}

.blog-post-card .post-subtitle {
  color: var(--color-gray-body);
}

.blog-post-card .read-more {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
}

/* Blog Show Page */
.blog-post-content {
  padding: 4rem 2rem; /* Added horizontal padding */
}

.blog-post-content .post-header {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-post-content .post-title {
  font-size: 2.5rem;
}

.blog-post-content .post-subtitle {
  font-size: 1.25rem;
  color: var(--color-gray-body);
  margin-top: 1rem;
}

.blog-post-content .post-hero-image {
  margin-bottom: 3rem;
}

/* Trix Content Styling */
.trix-content {
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 700px; /* Readable width */
  margin: 0 auto; /* Center the content */
}

.trix-content p {
  margin: 1rem 0;
}

.trix-content a {
  color: var(--color-blue-accent);
  text-decoration: underline;
}

.trix-content a:hover {
  color: #1d4ed8;
}

.trix-content ul, .trix-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.trix-content h1, .trix-content h2, .trix-content h3 {
  margin: 2rem 0 1rem 0;
}

.trix-content pre {
  background-color: var(--color-gray-light-bg);
  border: 1px solid var(--color-border);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9rem;
}

.trix-content blockquote {
  padding-left: 1rem;
  border-left: 3px solid var(--color-border);
  margin-left: 0;
  color: var(--color-gray-body);
}

/* PDF Section Styles */
.pdf-section {
  margin-top: 4rem; /* Margin above the PDF section */
  text-align: center; /* Center content */
}

.pdf-section-heading {
  font-size: 1.75rem; /* Slightly smaller than main section heading */
  margin-bottom: 2rem;
  color: var(--color-navy);
}

.pdf-download-link {
  margin-top: 2rem; /* Space between iframe and download link */
  display: inline-block; /* To allow margin-top and centering */
}

/* ---------------------------------------- */
/* RESPONSIVENESS                         */
/* ---------------------------------------- */

@media (max-width: 768px) {
  .hero-grid, .three-card-grid, .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
    gap: 2rem;
  }
  .hero-image-placeholder {
    margin-top: 3rem;
  }
  .main-header .container {
    flex-direction: column;
    gap: 1rem;
  }
  .footer-grid {
    text-align: left;
  }
}

/* ---------------------------------------- */
/* POPUP STYLES                           */
/* ---------------------------------------- */

.hidden {
  display: none;
}

.popup-overlay {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100;
}

.popup-content {
  background-color: var(--color-white);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  position: relative;
  max-width: 300px; /* Make it smaller */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Add a subtle shadow */
  border: 1px solid var(--color-border);
}

.popup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-gray-body);
}

.popup-content h3 {
  margin-top: 0;
}

/* ---------------------------------------- */
/* ANIMATIONS                             */
/* ---------------------------------------- */

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fade-in-up 0.6s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ---------------------------------------- */
/* APPLY PAGE                             */
/* ---------------------------------------- */

.apply-form-container {
  max-width: 550px; /* Slightly increased for more space, as suggested */
  margin: 3rem auto 0 auto;
  background-color: var(--color-white);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  text-align: left;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

@media (max-width: 600px) { /* Adjusted breakpoint for mobile form */
  .apply-form-container {
    max-width: calc(100% - 2rem); /* Nearly full-width with 1rem margin on each side */
    margin-left: 1rem;
    margin-right: 1rem;
  }
}

.apply-form .form-group {
  margin-bottom: 1.5rem;
}

.apply-form .form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-navy);
}

.apply-form .form-group input[type="text"],
.apply-form .form-group input[type="email"],
.apply-form .form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-size: 1rem;
  font-family: inherit; /* Ensure textarea uses the body font */
  box-sizing: border-box; /* Added to include padding and border in width */
}

.apply-form .form-actions {
  text-align: center;
}

.form-errors {
  color: #991b1b;
  background-color: #fee2e2;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.form-success {
  color: #065f46;
  background-color: #d1fae5;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

/* Responsive image handling for blog posts */
.post-content img,
.post-body img,
.trix-content img,
action-text-attachment img,
figure img,
.blog-post-content .post-hero-image img { /* Added specific selector for hero images */
  max-width: 100%;
  height: auto;
  display: block;
}

