/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Source+Sans+Pro:wght@400;600&display=swap');

/*=============== CSS VARIABLES ===============*/
:root {
  /* Colors (Triadic Scheme: Deep Blue, Warm Orange, Muted Green) */
  --primary-color: #0A2B4C; /* Deep Navy Blue */
  --secondary-color: #F2A359; /* Warm Sophisticated Orange */
  --accent-color: #59A68C; /* Muted Teal/Green */
  
  --primary-color-darker: #071f38;
  --secondary-color-darker: #d9904d;

  /* Text Colors */
  --title-color: #222222;
  --text-color: #333333;
  --text-color-light: #777777;
  --text-color-inverted: #FFFFFF;

  /* Backgrounds */
  --body-bg: #F4F7F5; /* Eco-minimalism off-white */
  --container-bg: #FFFFFF;
  
  /* Glassmorphism Effect */
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-bg-dark: rgba(10, 43, 76, 0.7);
  --glass-border: 1px solid rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
  --glass-blur: blur(8px);

  /* Fonts */
  --font-family-headings: 'Playfair Display', serif;
  --font-family-body: 'Source Sans Pro', sans-serif;

  /* Typography */
  --h1-font-size: clamp(2.5rem, 5vw, 4rem);
  --h2-font-size: clamp(2rem, 4vw, 2.75rem);
  --h3-font-size: 1.5rem;
  --h4-font-size: 1.25rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;

  /* Spacing */
  --header-height: 5rem;
  --section-padding: 5rem 0;
  --container-width: 1200px;
  --grid-gap: 2rem;
  
  /* Transitions & Animations */
  --transition-smooth: all 0.3s ease-in-out;
  --transition-bouncy: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

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

html {
  scroll-behavior: smooth;
}

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

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

ul {
  list-style: none;
}

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

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

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

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

.grid {
  display: grid;
  gap: var(--grid-gap);
}

.section {
  padding: var(--section-padding);
}

.section__title {
  font-size: var(--h2-font-size);
  text-align: center;
  margin-bottom: 3rem;
  color: var(--primary-color);
}

.section__subtitle {
  font-size: var(--h3-font-size);
  text-align: center;
  margin-bottom: 2rem;
}

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

/*=============== BUTTONS ===============*/
.button, button {
  display: inline-block;
  font-family: var(--font-family-body);
  font-weight: 600;
  font-size: var(--normal-font-size);
  padding: 1rem 2rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-bouncy);
}

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

.button--primary:hover {
  background-color: var(--secondary-color-darker);
  color: var(--primary-color);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 4px 15px rgba(242, 163, 89, 0.4);
}

.button--secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--accent-color);
}

.button--secondary:hover {
  background-color: var(--accent-color);
  color: var(--text-color-inverted);
}

button:active, .button:active {
    transform: translateY(0) scale(0.98);
}

.link {
    color: var(--accent-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 2px;
}

.link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease-in-out;
}

.link:hover::after {
    width: 100%;
}


/*=============== HEADER & NAV ===============*/
.header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background-color: var(--glass-bg-dark);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: var(--glass-border);
  transition: var(--transition-smooth);
}

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

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

.nav__list {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__link {
  color: var(--text-color-inverted);
  font-weight: 600;
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition-smooth);
}

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

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

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

.nav__toggle {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.nav__toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color-inverted);
    border-radius: 3px;
    transition: var(--transition-smooth);
}


/*=============== HERO SECTION ===============*/
.hero {
  color: var(--text-color-inverted);
  min-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero__container {
  max-width: 900px;
}

.hero__title {
  font-size: var(--h1-font-size);
  color: var(--text-color-inverted);
  margin-bottom: 1.5rem;
}

.hero__description {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
}

/*=============== CARD STYLES ===============*/
.card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: var(--transition-bouncy);
  overflow: hidden;
}

.card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.15);
}

.card-image {
  margin-bottom: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content h3, .card-content h4 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}
.card-content p {
    color: var(--text-color);
    margin-bottom: 1rem;
}


/*=============== MISSION SECTION ===============*/
.mission__container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: center;
}

.mission__content {
    text-align: left;
}

.mission__image img {
    border-radius: 12px;
}


/*=============== METHODOLOGY (ACCORDION) ===============*/
.accordion__item {
  background-color: var(--container-bg);
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: var(--transition-smooth);
}

.accordion__header {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion__header h3 {
    margin: 0;
    color: var(--primary-color);
}

.accordion__header::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}
.accordion__item.active .accordion__header::after {
    transform: rotate(45deg);
}

.accordion__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.65, 0.05, 0.36, 1), padding 0.5s cubic-bezier(0.65, 0.05, 0.36, 1);
  padding: 0 1.5rem;
}
.accordion__content p {
    margin-bottom: 1.5rem;
}
.accordion__item.active .accordion__content {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

/*=============== TEAM (INSTRUCTORS) SECTION ===============*/
.team__container {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.team__name {
  font-size: var(--h4-font-size);
  color: var(--primary-color);
}

.team__title {
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.team .card-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
}

/*=============== CASE STUDIES & TESTIMONIALS (CAROUSEL) ===============*/
.content-carousel {
    display: flex;
    gap: var(--grid-gap);
    overflow-x: auto; /* Basic scroll for demonstration */
    padding-bottom: 1.5rem;
    scroll-snap-type: x mandatory;
}
/* Hide scrollbar */
.content-carousel {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
.content-carousel::-webkit-scrollbar {
  display: none;
}

.carousel__item, .testimonial__item {
    flex: 0 0 100%;
    scroll-snap-align: center;
}

@media (min-width: 768px) {
  .carousel__item, .testimonial__item {
      flex: 0 0 calc(50% - (var(--grid-gap) / 2));
  }
}

@media (min-width: 992px) {
  .carousel__item, .testimonial__item {
      flex: 0 0 calc(33.333% - (var(--grid-gap) * 2 / 3));
  }
}

.testimonial__item {
    background: var(--primary-color);
    color: var(--text-color-inverted);
    padding: 2.5rem;
    border-radius: 12px;
}
.testimonial__item blockquote {
    border: none;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}
.testimonial__item cite {
    font-weight: 600;
    color: var(--secondary-color);
    font-style: normal;
}


/*=============== WEBINARS & NEWS SECTION ===============*/
.webinars__container, .news__container {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.webinar__date {
    display: block;
    font-weight: 600;
    color: var(--text-color-light);
    margin-bottom: 0.5rem;
}

.webinar__title {
    color: var(--primary-color);
    font-size: 1.3rem;
    min-height: 3.9rem; /* 3 lines */
}
.webinar__speaker {
    font-weight: 600;
    margin-bottom: 1rem;
}
.webinar__description {
    min-height: 4.5rem; /* ~3 lines */
}

.news .card {
    text-align: left;
    align-items: flex-start;
}

.news .card-content {
    width: 100%;
}


/*=============== EXTERNAL RESOURCES ===============*/
.resource-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.resource-item {
    padding: 1.5rem;
    background: var(--container-bg);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: var(--transition-smooth);
}
.resource-item:hover {
    transform: translateX(10px);
    box-shadow: -5px 5px 15px rgba(0,0,0,0.05);
    border-color: var(--accent-color);
}
.resource-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: inline-block;
}
.resource-description {
    color: var(--text-color-light);
}

/*=============== CONTACT FORM ===============*/
.contact__form {
    max-width: 700px;
    margin: 0 auto;
    padding: 2.5rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 12px;
}

.form__group {
    position: relative;
    margin-bottom: 2rem;
}

.form__input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ccc;
    border-radius: 8px;
    background-color: transparent;
    font-size: var(--normal-font-size);
    font-family: var(--font-family-body);
    outline: none;
    transition: var(--transition-smooth);
}

.form__label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    padding: 0 0.25rem;
    background-color: #fff; /* Match .form__group bg */
    color: var(--text-color-light);
    transition: var(--transition-smooth);
    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.75rem;
    left: 0.75rem;
    font-size: var(--small-font-size);
    color: var(--primary-color);
}

textarea.form__input {
    resize: vertical;
    min-height: 120px;
}

/*=============== FOOTER ===============*/
.footer {
  background-color: var(--primary-color);
  color: #a9b4c0;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer__container {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  row-gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer__title {
  font-family: var(--font-family-headings);
  color: var(--text-color-inverted);
  margin-bottom: 1rem;
}

.footer__description {
  margin-bottom: 1.5rem;
}

.footer__link {
  color: #a9b4c0;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.footer__link:hover {
  color: var(--secondary-color);
  transform: translateX(5px);
}

.footer__copy {
  text-align: center;
  font-size: var(--small-font-size);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
}

/*=============== SPECIFIC PAGE STYLES ===============*/
.legal-page, .success-page, .contact-page, .about-page {
    padding-top: calc(var(--header-height) + 3rem);
}

.success-page .container {
    min-height: calc(100vh - var(--header-height) - 10rem); /* 100vh minus header and footer padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.legal-page .container {
    max-width: 800px;
}
.legal-page h2 {
    margin-top: 2.5rem;
    color: var(--primary-color);
}
.legal-page ul {
    list-style: disc;
    padding-left: 2rem;
}
.legal-page li {
    margin-bottom: 1rem;
}
.contact-page__container {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}
.map-container {
    margin-top: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

/*=============== RESPONSIVE DESIGN ===============*/
@media screen and (max-width: 992px) {
  .nav__list {
    gap: 1.5rem;
  }
  .contact-page__container {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 768px) {
  .section {
    padding: 4rem 0;
  }
  
  .nav__menu {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--glass-bg-dark);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 3rem;
    transition: right 0.4s ease-in-out;
  }

  .nav__menu.active {
      right: 0;
  }
  
  .nav__list {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }

  .nav__link {
      font-size: 1.5rem;
  }
  
  .nav__toggle {
    display: flex;
  }
  
  .nav__toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .nav__toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav__toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .mission__container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .mission__content {
    text-align: center;
  }
}