/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@700&family=Lato:wght@400;700&display=swap');

/*=============== CSS VARIABLES ===============*/
:root {
  /* Colors */
  --primary-color: #3498db;
  --primary-color-dark: #2980b9;
  --accent-color: #4dabf7;
  --bg-color: #f4f7f9;
  --surface-color: #ffffff;
  --text-color: #333333;
  --text-color-light: #555555;
  --header-text-color: #222222;
  --white-color: #FFFFFF;
  --dark-color: #141414;
  --border-color: #e0e0e0;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-border-color: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
  --glass-blur: 10px;

  /* Fonts */
  --font-family-headings: 'Roboto', sans-serif;
  --font-family-body: 'Lato', sans-serif;

  /* Sizing */
  --header-height: 5rem;
  --container-width: 1200px;
  --border-radius: 8px;
  --transition-speed: 0.3s ease;
}

/*=============== BASE STYLES ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-body);
  font-size: 1rem;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-headings);
  color: var(--header-text-color);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--primary-color-dark);
}

p {
  margin-bottom: 1rem;
  color: var(--text-color-light);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/*=============== UTILITY CLASSES ===============*/
.container {
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.section {
  padding: 4rem 0;
}

.section__title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
  color: var(--header-text-color);
}
.section__title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section__description {
    max-width: 700px;
    margin: 0 auto 3rem auto;
    text-align: center;
    color: var(--text-color-light);
}

/*=============== GLOBAL COMPONENT STYLES ===============*/
/* --- Buttons --- */
.button {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-family: var(--font-family-headings);
    cursor: pointer;
    border: none;
    transition: all var(--transition-speed);
    text-align: center;
}

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

.button--primary:hover {
    background-color: var(--primary-color-dark);
    color: var(--white-color);
    transform: translateY(-3px);
}

.button--3d {
    box-shadow: 0 4px var(--primary-color-dark);
    position: relative;
}

.button--3d:active {
    transform: translateY(2px);
    box-shadow: 0 2px var(--primary-color-dark);
}

/* --- Cards (Glassmorphism) --- */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: 12px;
    border: 1px solid var(--glass-border-color);
    box-shadow: var(--glass-shadow);
    padding: 2rem;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 36px 0 rgba(31, 38, 135, 0.15);
}

.card-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex; /* Centering helper */
    align-items: center;
    justify-content: center;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
}

.card__title {
    font-size: 1.5rem;
    color: var(--header-text-color);
}

/*=============== HEADER & NAVIGATION ===============*/
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 100;
  transition: box-shadow var(--transition-speed);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border-color);
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--header-text-color);
  font-family: var(--font-family-headings);
}

.nav__list {
  display: flex;
  gap: 2.5rem;
}

.nav__link {
  font-weight: 700;
  color: var(--text-color-light);
  position: relative;
  padding-bottom: 0.5rem;
}

.nav__link:hover,
.nav__link.active-link {
  color: var(--primary-color);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width var(--transition-speed);
}

.nav__link:hover::after,
.nav__link.active-link::after {
  width: 100%;
}

.nav__toggle, .nav__close {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
}

/*=============== HERO SECTION ===============*/
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* Parallax Effect */
  color: var(--white-color);
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-top: var(--header-height);
}

.hero__title {
  font-size: 3.5rem;
  color: var(--white-color);
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  margin-bottom: 1rem;
}

.hero__subtitle {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2rem auto;
  color: var(--white-color);
  opacity: 0.9;
}

/*=============== SERVICES SECTION ===============*/
.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.progress-indicator {
    width: 100%;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    text-align: left;
}
.progress-indicator label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 700;
}
.progress-indicator progress {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    border: none;
    margin-bottom: 1rem;
}
.progress-indicator progress::-webkit-progress-bar {
    background-color: #e0e0e0;
    border-radius: 4px;
}
.progress-indicator progress::-webkit-progress-value {
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: width 1s ease;
}
.progress-indicator progress::-moz-progress-bar {
    background-color: var(--primary-color);
    border-radius: 4px;
}

/*=============== RESEARCH (TIMELINE) ===============*/
.timeline {
    position: relative;
    max-width: 800px;
    margin: 2rem auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--accent-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}
.timeline__item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
.timeline__item:nth-child(odd) {
    left: 0;
}
.timeline__item:nth-child(even) {
    left: 50%;
}
.timeline__item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--white-color);
    border: 4px solid var(--accent-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}
.timeline__item:nth-child(even)::after {
    left: -10px;
}
.timeline__content {
    padding: 1.5rem;
    position: relative;
}
.timeline__date {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: inline-block;
}
.timeline__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/*=============== WORKSHOPS & STATS ===============*/
.stats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
    text-align: center;
}
.stat-widget {
    padding: 1.5rem;
}
.stat__number {
    font-size: 3rem;
    color: var(--primary-color);
}
.stat__label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color-light);
}

.gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.gallery__item img {
    border-radius: var(--border-radius);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}
.gallery__item img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/*=============== EVENTS CALENDAR ===============*/
.events__list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}
.event-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    text-align: left;
}
.event__date {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    font-weight: 700;
    min-width: 80px;
}
.event__date span {
    display: block;
    font-size: 2rem;
    line-height: 1;
}
.event__title {
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
}
.event__description {
    margin: 0;
}

/*=============== EXTERNAL RESOURCES ===============*/
.resources__list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.resource-item {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--accent-color);
    transition: box-shadow var(--transition-speed);
}
.resource-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.resource-item h4 {
    margin-bottom: 0.5rem;
}
.resource-item p {
    margin-bottom: 0;
    font-size: 0.9rem;
}
.resource-item a::after {
    content: ' →';
}

/*=============== CONTACT PAGE & FORM ===============*/
.contact-teaser {
    text-align: center;
    background: var(--dark-color);
}
.contact-teaser .section__title, .contact-teaser p {
    color: var(--white-color);
    text-shadow: none;
}
.contact-teaser .section__title::after {
    background-color: var(--white-color);
}

.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: flex-start;
}
.contact__info p {
    margin-bottom: 1.5rem;
}
.contact__map {
    margin-top: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* --- Form Styles --- */
.contact__form {
    padding: 2.5rem;
}
.form__group {
    position: relative;
    margin-bottom: 2rem;
}
.form__input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: transparent;
    font-family: var(--font-family-body);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition-speed);
}
.form__label {
    position: absolute;
    left: 1rem;
    top: 0.8rem;
    color: var(--text-color-light);
    background-color: var(--surface-color);
    padding: 0 0.5rem;
    transition: all var(--transition-speed);
    pointer-events: none;
}
.form__input:focus {
    border-color: var(--primary-color);
}
.form__input:focus + .form__label,
.form__input:not(:placeholder-shown) + .form__label {
    top: -0.8rem;
    font-size: 0.8rem;
    color: var(--primary-color);
}
textarea.form__input {
    resize: vertical;
    min-height: 120px;
}
.contact__form .button {
    width: 100%;
}
.card--glass .form__label {
    background: transparent; /* Fix for glassmorphism */
}

/*=============== ABOUT PAGE ===============*/
.about__mission {
    text-align: center;
}
.about__mission .card-image {
    height: auto;
    max-height: 400px;
}
.about__mission p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.team__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.team__role {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/*=============== FOOTER ===============*/
.footer {
  background-color: var(--dark-color);
  color: var(--white-color);
  padding: 4rem 0 2rem;
}
.footer__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.footer__title {
  color: var(--white-color);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}
.footer p, .footer__link {
  color: rgba(255,255,255,0.7);
}
.footer__link {
  display: inline-block;
  margin-bottom: 0.5rem;
  transition: color var(--transition-speed), transform var(--transition-speed);
}
.footer__link:hover {
  color: var(--white-color);
  transform: translateX(5px);
}
.footer__copy {
  text-align: center;
  margin-top: 3rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}

/*=============== LEGAL & SUCCESS PAGES ===============*/
.legal-page, .success-page {
    padding-top: calc(var(--header-height) + 2rem);
    padding-bottom: 4rem;
}
.legal-page h2 {
    margin-top: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}
.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.success-box {
    max-width: 600px;
    padding: 3rem;
}

/*=============== RESPONSIVE DESIGN ===============*/
@media screen and (max-width: 992px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .hero__title {
    font-size: 2.8rem;
  }
  .contact__grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 768px) {
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    transition: right var(--transition-speed);
    padding: 6rem 2rem 2rem;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  }
  .nav__menu.show-menu {
    right: 0;
  }
  .nav__list {
    flex-direction: column;
    gap: 2.5rem;
  }
  .nav__link {
    font-size: 1.2rem;
  }
  .nav__toggle, .nav__close {
    display: block;
  }
  .nav__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
  }

  .section__title {
    font-size: 2rem;
  }
  .hero__title {
    font-size: 2.2rem;
  }
  .hero__subtitle {
    font-size: 1.1rem;
  }

  .timeline::after {
    left: 20px;
  }
  .timeline__item {
    width: 100%;
    padding-left: 60px;
    padding-right: 10px;
  }
  .timeline__item:nth-child(even), .timeline__item:nth-child(odd) {
    left: 0;
  }
  .timeline__item::after {
    left: 10px;
  }
}