/* GLOBAL STYLES & VARIABLES
-------------------------------------------------- */
:root {
  --primary-color-1: #0D47A1; /* Deep Blue */
  --primary-color-2: #00796B; /* Teal */
  --accent-color-1: #C2185B;  /* Magenta/Deep Pink */
  --accent-color-2: #FFA000;  /* Amber/Orange */

  --text-dark: #222222;
  --text-medium: #333333;
  --text-light: #FFFFFF;
  --text-muted: #555555;
  --text-heading-hero: #FFFFFF;

  --bg-light: #f0f2f5;
  --bg-white: #FFFFFF;
  --bg-dark-overlay: rgba(0, 0, 0, 0.5);
  --bg-dark-overlay-contact: rgba(0, 0, 0, 0.7);

  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-bg-card: rgba(255, 255, 255, 0.4); /* Lighter for cards on light backgrounds */
  --glass-bg-form: rgba(10, 25, 47, 0.5); /* Darker for contact form on image */
  --glass-border-light: rgba(255, 255, 255, 0.3);
  --glass-border-dark: rgba(0, 0, 0, 0.2);
  --glass-blur: 8px;
  --glass-shadow: 0 8px 24px 0 rgba(0, 0, 0, 0.15);

  --font-heading: 'Roboto', sans-serif;
  --font-body: 'Lato', sans-serif;

  --border-radius-small: 5px;
  --border-radius-medium: 10px;
  --border-radius-large: 15px;

  --transition-speed: 0.3s;
  --transition-timing: ease-in-out;

  --header-height: 3.25rem; /* Bulma's default navbar height */
  --section-padding: 3rem 1.5rem; /* Default Bulma section padding */
}

/* Base HTML & Body Styles */
html {
  scroll-behavior: smooth;
  background-color: var(--bg-light); /* Fallback bg */
}

body {
  font-family: var(--font-body);
  color: var(--text-medium);
  line-height: 1.6;
  font-size: 16px; /* Base font size */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

main {
    flex-grow: 1;
    /* Add padding for fixed header if not on hero section specifically */
}

/* Headings */
h1, h2, h3, h4, h5, h6, .title, .subtitle {
  font-family: var(--font-heading);
  color: var(--text-dark);
}

.title {
    font-weight: 700;
}

.subtitle {
    font-family: var(--font-body); /* Subtitles often benefit from body font */
    font-weight: 400;
}

/* Links */
a {
  color: var(--primary-color-1);
  transition: color var(--transition-speed) var(--transition-timing);
}
a:hover {
  color: var(--accent-color-1);
}

/* Buttons - Global Styles */
.button, button, input[type="submit"], input[type="button"] {
    font-family: var(--font-heading); /* Buttons often use heading font for impact */
    font-weight: 700;
    padding: 0.75em 1.75em;
    border-radius: var(--border-radius-small);
    transition: background-color var(--transition-speed) var(--transition-timing),
                transform var(--transition-speed) var(--transition-timing),
                box-shadow var(--transition-speed) var(--transition-timing);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent; /* Base border for consistency */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.button.is-primary, button.is-primary { /* Primary action color from HTML */
    background-color: var(--accent-color-1) !important; /* Override Bulma */
    border-color: var(--accent-color-1) !important;
    color: var(--text-light) !important;
}
.button.is-primary:hover, button.is-primary:hover {
    background-color: color-mix(in srgb, var(--accent-color-1) 85%, black) !important;
    border-color: color-mix(in srgb, var(--accent-color-1) 85%, black) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.button.is-link { /* Example for secondary buttons */
    background-color: var(--accent-color-2) !important;
    border-color: var(--accent-color-2) !important;
    color: var(--text-dark) !important; /* Good contrast on orange */
}
.button.is-link:hover {
    background-color: color-mix(in srgb, var(--accent-color-2) 85%, black) !important;
    border-color: color-mix(in srgb, var(--accent-color-2) 85%, black) !important;
    transform: translateY(-2px);
}

.button.is-info.is-outlined {
    border-color: var(--primary-color-2);
    color: var(--primary-color-2);
}
.button.is-info.is-outlined:hover {
    background-color: var(--primary-color-2);
    color: var(--text-light);
}

/* Form Elements */
.input, .textarea {
    border-radius: var(--border-radius-small);
    border: 1px solid #dbdbdb; /* Bulma default */
    box-shadow: inset 0 1px 2px rgba(10,10,10,.1);
    transition: border-color var(--transition-speed) var(--transition-timing), box-shadow var(--transition-speed) var(--transition-timing);
}
.input:focus, .textarea:focus,
.input.is-focused, .textarea.is-focused,
.input:active, .textarea:active,
.input.is-active, .textarea.is-active {
    border-color: var(--primary-color-1);
    box-shadow: 0 0 0 0.125em color-mix(in srgb, var(--primary-color-1) 25%, transparent);
}
.label {
    color: var(--text-dark); /* Default label color */
    font-weight: 700;
}
#contact .label { /* Labels in contact form with dark bg */
    color: var(--text-light) !important;
}
#contact .input, #contact .textarea {
    background-color: rgba(255,255,255,0.9);
    color: var(--text-dark);
    border-color: var(--glass-border-light);
}
#contact .input::placeholder, #contact .textarea::placeholder {
    color: var(--text-muted);
}


/* Glassmorphism General Card Style */
.glassmorphic-card {
  background: var(--glass-bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--border-radius-medium);
  border: 1px solid var(--glass-border-light);
  box-shadow: var(--glass-shadow);
  padding: 1.5rem;
  transition: transform var(--transition-speed) var(--transition-timing), box-shadow var(--transition-speed) var(--transition-timing);
  height: 100%; /* For consistent height in columns */
  display: flex;
  flex-direction: column;
}
.glassmorphic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

/* Section Styling */
.section {
    padding: var(--section-padding); /* Uses Bulma's default, can be overridden */
    position: relative; /* For pseudo-elements like curves */
}
.section-title {
    font-family: var(--font-heading);
    color: var(--text-dark);
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.5rem;
    font-size: 2.5rem; /* Bulma's .title.is-2 */
}
.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color-1);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}
#contact .section-title { /* For contact section with dark background */
    color: var(--text-light);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
#contact .section-title::after {
    background-color: var(--accent-color-2); /* Brighter accent on dark bg */
}


/* HEADER & NAVIGATION
-------------------------------------------------- */
.header.is-fixed-top {
  /* Bulma handles fixed-top */
  z-index: 1030;
}
.glassmorphic-nav .navbar {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border-light);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.navbar-item, .navbar-link {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-dark); /* Ensure high contrast */
  transition: color var(--transition-speed) var(--transition-timing);
}
.navbar-item:hover, .navbar-link:hover,
.navbar-item.is-active, .navbar-link.is-active {
  background-color: transparent !important; /* Override Bulma */
  color: var(--accent-color-1) !important;
}
.navbar-dropdown.is-boxed {
    background-color: var(--bg-white);
    border-radius: var(--border-radius-small);
    border: 1px solid #eee;
    box-shadow: 0 8px 16px rgba(10,10,10,.1);
}
.navbar-dropdown .navbar-item {
    color: var(--text-medium);
}
.navbar-dropdown .navbar-item:hover {
    background-color: var(--bg-light) !important;
    color: var(--accent-color-1) !important;
}
.navbar-burger {
    color: var(--text-dark); /* Ensure burger is visible */
}
.navbar-burger:hover {
    background-color: rgba(0,0,0,0.05);
}
.navbar-burger span {
    background-color: var(--text-dark); /* Burger lines color */
}

@media screen and (max-width: 1023px) {
    .navbar-menu {
        background: var(--glass-bg);
        backdrop-filter: blur(var(--glass-blur));
        box-shadow: 0 8px 16px rgba(10,10,10,.1);
        padding: 0.5rem 0;
        border-top: 1px solid var(--glass-border-light);
    }
}


/* HERO SECTION
-------------------------------------------------- */
#hero {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative; /* For curved element */
}
#hero .hero-body {
    padding-top: calc(var(--header-height) + 2rem); /* Space for fixed header */
    position: relative;
    z-index: 2; /* Above curved element */
}
#hero .title.is-1 {
  color: var(--text-heading-hero) !important; /* Explicitly white */
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
}
#hero .subtitle.is-3 {
  color: var(--text-heading-hero) !important; /* Explicitly white */
  font-size: 1.5rem;
  line-height: 1.5;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}
.curved-grid-element.bottom-curve {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px; /* Adjust height of the curve */
    overflow: hidden; /* Important for SVG or complex shapes */
    z-index: 1;
    pointer-events: none;
}
.curved-grid-element.bottom-curve::before { /* Simple curve with CSS */
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: -5%; /* Extend to ensure full coverage on all screens */
    width: 110%;
    height: 150px; /* Make it taller than the container to create curve */
    background-color: var(--bg-light); /* Color of the section below hero */
    border-radius: 100% 100% 0 0 / 50% 50% 0 0; /* Creates an upward curve */
    transform: scaleY(0.7) translateY(20%); /* Adjust scale and Y for desired curve */
}
/* Adjustments for responsiveness */
@media screen and (max-width: 768px) {
  #hero .title.is-1 { font-size: 2.5rem; }
  #hero .subtitle.is-3 { font-size: 1.25rem; }
}


/* CARD STYLING (General, adjust per section)
-------------------------------------------------- */
.card {
    background-color: var(--bg-white); /* Solid background for cards for readability */
    border-radius: var(--border-radius-medium);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    height: 100%; /* Make cards in a row same height */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Ensure content respects border-radius */
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.card .card-image { /* Bulma class */
    overflow: hidden; /* To contain the image */
    position: relative; /* For aspect ratio padding trick */
}
.card .card-image img {
    display: block;
    width: 100%;
    height: auto; /* Default, can be overridden by figure aspect ratio */
    object-fit: cover; /* Ensure image covers the area */
}
/* Ensure images within Bulma's figure.is-16by9 or .is-1by1 etc. are correctly handled */
.card .card-image figure.image {
    margin: 0; /* Override Bulma's default if any for cleaner fit */
}
.card .card-image figure.image img {
    position: absolute; /* If figure is used for aspect ratio */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card .card-content {
    padding: 1.5rem;
    flex-grow: 1; /* Allow content to fill remaining space */
    display: flex;
    flex-direction: column;
}
.card .card-content .title, .card .card-content .subtitle {
    margin-bottom: 0.75rem;
}
.card .card-content .title:not(:last-child) {
    margin-bottom: 0.5rem; /* Tighter spacing for title + subtitle */
}
.card .card-content p:not(.title):not(.subtitle) {
    font-family: var(--font-body);
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1; /* Pushes buttons/links to bottom if card content varies */
}
.card .card-content .button {
    margin-top: auto; /* Push button to bottom of card content */
    align-self: flex-start; /* Align button to start if card text is centered */
}
/* Centering card content when needed */
.card.has-text-centered-content .card-content {
    text-align: center;
}
.card.has-text-centered-content .card-content .button {
    align-self: center;
}

/* Specific Card Types */
.instructor-card .card-image figure.is-1by1 { padding-top: 100%; }
.instructor-card .card-content { text-align: center; }

.event-card .title, .news-item .title { font-size: 1.25rem; }
.event-card .progress-container, .about .progress-container { margin-top: 1rem; }
.event-card .progress-container label, .about .progress-container label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9em;
    color: var(--text-medium);
}
.progress.is-link { background-color: var(--accent-color-2); } /* Bulma override */
.progress.is-success { background-color: var(--primary-color-2); }
.progress.is-warning { background-color: color-mix(in srgb, var(--accent-color-2) 70%, var(--bg-light));}

.testimonial-card .media-content .title { color: var(--primary-color-2); }
.testimonial-card .media-content .subtitle { color: var(--text-muted); }
.testimonial-card .content { font-style: italic; }

/* Read More Links */
a.button.is-link.is-small, .news .button.is-link {
    background-color: var(--accent-color-2) !important;
    color: var(--text-dark) !important;
    font-weight: bold;
    font-size: 0.8rem;
    padding: 0.5em 1.2em;
}
a.button.is-link.is-small:hover, .news .button.is-link:hover {
    background-color: color-mix(in srgb, var(--accent-color-2) 85%, black) !important;
}

/* Behind the Scenes / About Section */
#about .content.glassmorphic-card { padding: 2rem; }
#about .progress { height: 1rem; }

/* Research Section */
#research img { border-radius: var(--border-radius-small); margin-top: 1rem;}

/* Partners Section */
#partners img {
  max-height: 70px; /* Adjusted from 80px */
  width: auto;
  transition: filter var(--transition-speed) var(--transition-timing), transform var(--transition-speed) var(--transition-timing);
  filter: grayscale(60%) opacity(0.8);
}
#partners img:hover {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.1);
}

/* External Resources Section */
.external-links-list { padding: 2rem; background-color: var(--bg-white); } /* More solid for readability */
.external-links-list article.media {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}
.external-links-list article.media:last-child {
    border-bottom: none;
}
.external-links-list strong a {
    color: var(--primary-color-1);
    font-size: 1.1em;
}
.external-links-list strong a:hover {
    color: var(--accent-color-1);
    text-decoration: underline;
}
.external-links-list small {
    color: var(--text-muted);
    font-size: 0.9em;
    line-height: 1.5;
}
hr.resource-divider { /* Custom styled HR or remove if using article border */
    display: none; /* Using article border instead */
}


/* CONTACT SECTION
-------------------------------------------------- */
#contact {
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Simple parallax */
  padding: 4rem 1.5rem;
}
.glassmorphic-form {
  background: var(--glass-bg-form);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--border-radius-large);
  border: 1px solid var(--glass-border-light);
  padding: 2.5rem;
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.3);
}


/* FOOTER
-------------------------------------------------- */
.footer.glassmorphic-footer {
  background: color-mix(in srgb, var(--primary-color-1) 85%, black); /* Dark, rich footer */
  color: var(--text-light);
  padding: 3rem 1.5rem 2rem; /* Reduced bottom padding */
  /* No glassmorphism here for better text contrast with solid dark bg */
}
.footer .title.is-5 {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-family: var(--font-heading);
}
.footer p, .footer li {
  font-family: var(--font-body);
  color: var(--text-light);
  opacity: 0.85;
  font-size: 0.95rem;
}
.footer a.footer-link {
  color: var(--text-light) !important; /* Important needed */
  opacity: 0.85;
  transition: opacity var(--transition-speed) var(--transition-timing), color var(--transition-speed) var(--transition-timing);
  text-decoration: none;
}
.footer a.footer-link:hover {
  opacity: 1;
  color: var(--accent-color-2) !important;
  text-decoration: underline;
}
.footer hr {
  background-color: rgba(255,255,255,0.15);
  height: 1px;
}
.footer .content p { /* For copyright */
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ScrollReveal Animation Start State (elements are initially invisible) */
.reveal-on-scroll {
  visibility: hidden;
}

/* SUCCESS PAGE (`success.html`)
-------------------------------------------------- */
body.success-page { /* Add this class to body tag on success.html */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-light);
    color: var(--text-dark);
}
.success-page main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}
.success-container {
    background: var(--bg-white);
    padding: 3rem 4rem;
    border-radius: var(--border-radius-large);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.success-container h1 {
    color: var(--primary-color-2);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.success-container p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}
.success-container .button {
    background-color: var(--primary-color-2);
    color: var(--text-light);
}
.success-container .button:hover {
    background-color: color-mix(in srgb, var(--primary-color-2) 85%, black);
}

/* PRIVACY & TERMS PAGES (`privacy.html`, `terms.html`)
-------------------------------------------------- */
/* Assume a main container with class "static-page-main-content" for these pages */
main.static-page-main-content {
    padding-top: calc(var(--header-height) + 3rem); /* Header height + more space */
    padding-bottom: 3rem;
    background-color: var(--bg-light);
}
.static-page-container { /* This div would be inside the main container */
    max-width: 800px; /* Constrain width for readability */
    margin: 0 auto;
}
.static-page-content {
    background-color: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--border-radius-medium);
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    color: var(--text-medium);
}
.static-page-content h1,
.static-page-content h2,
.static-page-content h3 {
    font-family: var(--font-heading);
    color: var(--primary-color-1);
    margin-bottom: 1rem;
}
.static-page-content h1 { font-size: 2.2rem; margin-bottom: 1.5rem; }
.static-page-content h2 { font-size: 1.8rem; }
.static-page-content h3 { font-size: 1.5rem; }
.static-page-content p {
    line-height: 1.7;
    margin-bottom: 1.2rem;
}
.static-page-content ul, .static-page-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.2rem;
}
.static-page-content li {
    margin-bottom: 0.5rem;
}
.static-page-content a {
    color: var(--accent-color-1);
    text-decoration: underline;
}
.static-page-content a:hover {
    color: color-mix(in srgb, var(--accent-color-1) 80%, black);
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
  .section-title { font-size: 2rem; margin-bottom: 2rem; }
  .section-title::after { width: 60px; height: 3px; }
  .card .card-content { padding: 1rem; }
  .static-page-content { padding: 1.5rem; }
  main.static-page-main-content { padding-top: calc(var(--header-height) + 2rem); }
}