/* Font declarations */
@font-face {
  font-family: 'Ablation';
  src: url('/fonts/ablation/Ablation-FreeDemo-BF6756d2fd9ebe3.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'HK Grotesk';
  src: url('/fonts/hk-grotesk/WEB/HKGrotesk-Regular.woff2') format('woff2'),
       url('/fonts/hk-grotesk/WEB/HKGrotesk-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'HK Grotesk';
  src: url('/fonts/hk-grotesk/WEB/HKGrotesk-Bold.woff2') format('woff2'),
       url('/fonts/hk-grotesk/WEB/HKGrotesk-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
}

/* Color Variables */
:root {
  --background-color: #dcd5cf;
  --red: #832827;
  --yellow: #cc9637;
  --teal: #3f6266;
  --purple: #372c3d;
  --text-color: #333333;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
  font-family: 'HK Grotesk', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  font-size: 18px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Ablation', sans-serif;
  margin-bottom: 1rem;
  color: var(--red);
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.5rem;
}

p {
  margin-bottom: 1.2rem;
}

ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
header {
  padding: 1.5rem 0;
}

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

.logo {
  max-width: 200px;
  height: auto;
}

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

.main-nav a {
  text-decoration: none;
  color: var(--teal);
  font-weight: bold;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: var(--red);
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .logo {
    margin-bottom: 1rem;
    max-width: 180px;
  }
  
  .main-nav {
    width: 100%;
  }
  
  .main-nav ul {
    gap: 1rem;
    display: flex;
    justify-content: center;
    padding-left: 0;
    width: 100%;
  }
}

/* Hero Section */
.hero {
  height: calc(100vh - 80px); /* Subtract approximate header height */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 10vh 0 0 0;
  margin: 0;
  position: relative;
  box-sizing: border-box;
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.35rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

/* Sections */
section {
  padding: 4rem 0;
}

#about {
  position: relative;
  margin-top: 0;
  padding-top: 2rem;
}

.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

.content {
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Cards */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 300px;
  height: 100%;
  position: relative;
}

.card-link:hover .card {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-link:hover h3 {
  color: var(--red);
}

.card-logo {
  padding: 1.5rem 1.5rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 150px;
}

.card-logo img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}

.card-content {
  padding: 1.5rem;
  font-size: 1.05rem;
}

.card h3 {
  color: var(--teal);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 300px;
}

/* Subsections */
.section-divider {
  margin: 4rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.subsection {
  margin-bottom: 2rem;
}

.subsection.bg-light {
  padding: 2.5rem 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.subsection-heading {
  color: var(--teal);
  margin-bottom: 2rem;
  text-align: center;
  font-size: 1.8rem;
}

/* Logo Grid */
.logo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  color: var(--text-color);
  transition: transform 0.3s ease;
  width: 200px;
  min-height: 200px;
}

.logo-item:hover {
  transform: translateY(-5px);
}

.logo-container {
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background-color: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.logo-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Fallback for missing logos */
.logo-container:empty::before {
  content: attr(data-name);
  font-family: 'Ablation', sans-serif;
  font-size: 1.1rem;
  color: var(--teal);
  text-align: center;
  padding: 0 0.5rem;
}

.logo-name {
  font-weight: bold;
  margin-bottom: 0;
  font-size: 1.15rem;
}

.logo-container + .logo-name {
  margin-top: 1rem;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .logo-grid {
    gap: 1.5rem;
  }
  
  .logo-item {
    width: 150px;
    min-height: 150px;
  }
  
  .logo-container {
    width: 120px;
    height: 120px;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background-color: var(--teal);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: var(--purple);
}

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

.btn-outline:hover {
  background-color: var(--teal);
  color: white;
}

/* Footer */
footer {
  background-color: var(--purple);
  color: white;
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo-img {
  max-width: 150px;
  filter: brightness(0) invert(1);
}

.footer-nav h3,
.footer-contact h3 {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.footer-nav ul {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

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

.footer-nav a,
.footer-contact a {
  color: var(--yellow);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: white;
  text-decoration: underline;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icon {
  color: var(--yellow);
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  footer {
    padding: 2rem 0 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  
  .footer-logo, .footer-nav, .footer-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .footer-logo-img {
    max-width: 120px;
    margin-bottom: 1rem;
  }
  
  .footer-nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* Team Section */
.section-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  font-size: 1.3rem;
  line-height: 1.6;
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.team-member {
  text-decoration: none;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.3s ease;
  width: 250px;
  min-height: 230px;
}

.team-member:hover {
  transform: translateY(-5px);
}

.member-photo {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fallback for missing photos */
.member-photo:empty::before {
  content: attr(data-name);
  font-family: 'Ablation', sans-serif;
  font-size: 1.1rem;
  color: var(--teal);
  text-align: center;
  padding: 0 0.5rem;
}

.member-info {
  padding: 0.5rem;
}

.member-name {
  font-family: 'Ablation', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
  color: var(--teal);
}

.member-photo + .member-info .member-name {
  margin-top: 0.5rem;
}

.member-institution {
  font-size: 1.05rem;
  color: var(--text-color);
  opacity: 0.8;
}

.contact-info {
  max-width: 600px;
  margin: 2rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  text-align: center;
}

.contact-info h3 {
  color: var(--red);
  margin-bottom: 1rem;
}

.contact-info a {
  color: var(--teal);
  text-decoration: none;
  font-weight: bold;
}

.contact-info a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .team-grid {
    gap: 2rem;
  }
  
  .team-member {
    width: 160px;
    min-height: 180px;
  }
  
  .member-photo {
    width: 120px;
    height: 120px;
  }
  
  .member-name {
    font-size: 1.2rem;
  }
}

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

/* Background Utilities */
.bg-light {
  background-color: #f5f2ef;
}

.bg-dark {
  background-color: var(--teal);
  color: white;
}

.bg-dark h2 {
  color: white;
}

/* Page Templates */
.page-hero {
  background-color: var(--teal);
  color: white;
  padding: 4rem 0;
  margin-bottom: 2rem;
}

.page-hero h1 {
  color: white;
  margin-bottom: 1rem;
}

.hero-subheading {
  font-size: 1.35rem;
  line-height: 1.5;
  max-width: 800px;
}

.page-content {
  padding: 2rem 0 4rem;
}

.page-content .content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.7;
}

.page-content h1 {
  color: var(--red);
  margin: 2rem 0 1.5rem;
}

.page-content h2 {
  color: var(--teal);
  font-size: 1.8rem;
  margin: 1.5rem 0 1rem;
}

.page-content ul, 
.page-content ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.active {
  color: var(--red) !important;
  font-weight: bold;
}

/* Media Queries */
@media (max-width: 768px) {
  h1 {
    font-size: 1.8rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .hero {
    min-height: 60vh;
    padding: 2rem 0;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .hero h1 {
    max-width: 100%;
  }
  
  .main-nav ul {
    gap: 1rem;
    justify-content: center;
    padding-left: 0;
    margin-left: 0;
  }
  
  .card {
    width: 100%;
    max-width: 300px;
  }
  
  .card-link {
    width: 100%;
    max-width: 300px;
  }
}