:root {
    /* Bright Color Palette */
    --primary-color: #00BFFF; /* Deep Sky Blue */
    --primary-color-rgb: 0, 191, 255;
    --primary-color-darker: #009acd;
    --secondary-color: #FFA500; /* Orange */
    --secondary-color-rgb: 255, 165, 0;
    --secondary-color-darker: #cc8400;
    --accent-color-1: #FF4081; /* Vibrant Pink */
    --accent-color-2: #76FF03; /* Bright Lime Green */

    /* Text Colors */
    --text-color-light: #FFFFFF;
    --text-color-dark: #333333;
    --text-color-headings: #222222;
    --text-color-subtle: #555555;
    --text-color-footer: #E0E0E0; /* Lighter for better contrast on dark footer */
    --text-color-link: var(--primary-color);
    --text-color-link-hover: var(--primary-color-darker);

    /* Background Colors */
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-dark: #1a1a1a;
    --bg-footer: #2c3e50; /* Consistent with HTML example */
    --bg-hero-overlay: rgba(0, 0, 0, 0.5);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-accent: linear-gradient(135deg, var(--accent-color-1), var(--primary-color));
    --gradient-button: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color-1) 100%);
    --gradient-button-hover: linear-gradient(90deg, var(--accent-color-1) 0%, var(--primary-color) 100%);
    --gradient-section-title-underline: linear-gradient(90deg, var(--primary-color), var(--secondary-color));

    /* Fonts */
    --font-headings: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    /* Sizing & Spacing */
    --header-height: 70px; /* From HTML main margin-top */
    --border-radius-sm: 0.3rem;
    --border-radius-md: 0.6rem;
    --border-radius-lg: 1rem;
    --section-padding-y: 5rem;

    /* Shadows - Subtle for modern look */
    --box-shadow-sm: 0 2px 8px rgba(0,0,0,0.07);
    --box-shadow-md: 0 5px 15px rgba(0,0,0,0.1);
    --box-shadow-lg: 0 10px 30px rgba(0,0,0,0.12);

    /* Transitions */
    --transition-fast: 0.2s ease-in-out;
    --transition-medium: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;

    /* Card Specifics */
    --card-image-container-height: 220px; /* Fixed height for image containers in cards */

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border-color: rgba(255, 255, 255, 0.2);
    --glass-blur: 10px;
}

/* Basic Resets & Global Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-color-dark);
    background-color: var(--bg-white);
    padding-top: var(--header-height); /* For fixed header */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Page Transition Overlay Style (already in HTML's style.css, ensure consistency or manage here) */
#page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-white);
    z-index: 10000;
    opacity: 1; /* JS will set to 0 on load */
    pointer-events: none;
    transition: opacity var(--transition-slow);
}

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

.section-title { /* For h2 in sections */
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    text-align: center;
    color: var(--text-color-headings);
}
.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-section-title-underline);
    margin: 1rem auto 0;
    border-radius: 2px;
}

p {
    margin-bottom: 1rem;
    color: var(--text-color-subtle);
}
.lead { /* Bootstrap class, slight override for consistency */
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-color-subtle);
}

a {
    color: var(--text-color-link);
    text-decoration: none;
    transition: color var(--transition-medium);
}
a:hover {
    color: var(--text-color-link-hover);
    text-decoration: underline;
}

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

/* Main Container */
.main-container {
    width: 100%;
    overflow: hidden; /* Handles animations that might overflow */
}

/* Section Base */
section {
    padding: var(--section-padding-y) 0;
}
.section-bg-light {
    background-color: var(--bg-light);
}

/* Header */
.navbar {
    background-color: rgba(255, 255, 255, 0.85) !important; /* Semi-transparent white for modern feel */
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--box-shadow-sm);
    transition: background-color var(--transition-medium);
}
.navbar-brand {
    font-family: var(--font-headings);
    font-weight: 700;
    color: var(--text-color-headings) !important;
    font-size: 1.8rem;
}
.nav-link {
    font-family: var(--font-headings);
    color: var(--text-color-dark) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color var(--transition-medium);
    position: relative;
}
.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}
.nav-link::before { /* Underline hover effect */
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    transition: width var(--transition-medium);
}
.nav-link:hover::before,
.nav-link.active::before {
    width: 70%;
}
.navbar-toggler {
    border-color: rgba(0,0,0,0.1);
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
#hero {
    position: relative;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: var(--text-color-light);
    min-height: calc(100vh - var(--header-height)); /* Full viewport height minus header */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
#hero::before { /* Overlay for text readability, defined in HTML style but ensure it works */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-hero-overlay); /* Defined in HTML, this is a fallback/consistency */
    z-index: 1;
}
#hero .container {
    position: relative;
    z-index: 2;
}
#hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem); /* Responsive font size */
    color: var(--text-color-light);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    margin-bottom: 1.5rem;
}
#hero p.lead {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: rgba(255,255,255,0.9);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

/* Particle Container (JS populates this) */
#particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Behind hero content but above background image */
    overflow: hidden;
}
#particle-container div { /* Style for individual particles if JS creates them */
    position: absolute;
    background-color: rgba(255, 255, 255, 0.5); /* Example */
    border-radius: 50%;
    /* JS will set size, position, and animation */
}


/* Global Button Styles */
.btn {
    font-family: var(--font-headings);
    font-weight: 500;
    padding: 0.75rem 1.8rem;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    border: none;
    cursor: pointer;
    text-align: center;
    line-height: 1.5; /* Ensure text is vertically centered */
}

/* Primary Creative Button (Used in Hero, Forms) */
.creative-button,
button[type="submit"], /* General submit buttons */
input[type="submit"] { /* General submit inputs */
    background: var(--gradient-button);
    color: var(--text-color-light);
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}
.creative-button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    background: var(--gradient-button-hover);
    color: var(--text-color-light); /* Ensure text color remains light on hover */
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(var(--accent-color-1-rgb, 255, 105, 180), 0.4); /* Using accent in shadow */
}

/* Secondary Creative Button (Used for less prominent actions) */
.creative-button-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.creative-button-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Outline Button (Bootstrap override for consistency) */
.btn-outline-primary { /* For workshop cards Learn More */
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-family: var(--font-headings);
    font-weight: 500;
}
.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    border-color: var(--primary-color);
}
.btn-outline-secondary { /* For external resource cards */
    color: var(--text-color-subtle);
    border-color: #ced4da; /* Default Bootstrap border color */
    font-family: var(--font-headings);
    font-weight: 500;
}
.btn-outline-secondary:hover {
    background-color: var(--text-color-subtle);
    color: var(--text-color-light);
    border-color: var(--text-color-subtle);
}
.btn-link { /* For research cards "Read Article" */
    font-family: var(--font-headings);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0; /* Adjust padding */
}
.btn-link:hover {
    color: var(--primary-color-darker);
    text-decoration: underline;
}
.btn-link::after { /* Optional: add an arrow or similar icon */
    content: " \2192"; /* Right arrow */
    display: inline-block;
    transition: transform var(--transition-fast);
}
.btn-link:hover::after {
    transform: translateX(3px);
}


/* Card Styles */
.card {
    background-color: var(--bg-white);
    border: none; /* Override Bootstrap border */
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-md);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    overflow: hidden; /* Ensure content respects border-radius */
    display: flex; /* For STROGO rule */
    flex-direction: column; /* For STROGO rule */
    /* align-items: center;  Potentially centers card-image and card-body which might not be desired if they are full width */
    text-align: center; /* Centers inline content within card-body */
    height: 100%; /* For equal height cards in rows */
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-lg);
}
.card .card-image { /* Container for the image */
    width: 100%;
    height: var(--card-image-container-height);
    overflow: hidden;
    position: relative; /* For potential overlays or absolutely positioned elements */
    /* background-color: #eee; /* Placeholder if image is loading */
}
.card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the container */
    display: block; /* Removes extra space below image */
    transition: transform var(--transition-slow);
}
.card:hover .card-image img {
    transform: scale(1.05); /* Subtle zoom on card hover */
}
.card .card-body {
    padding: 1.5rem;
    flex-grow: 1; /* Allows card body to take remaining space in flex column */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes button to bottom if card-body is flex */
}
.card .card-title {
    font-family: var(--font-headings);
    font-size: 1.4rem;
    color: var(--text-color-headings);
    margin-bottom: 0.75rem;
}
.card .card-text {
    font-size: 0.95rem;
    color: var(--text-color-subtle);
    margin-bottom: 1rem;
    flex-grow: 1; /* Allows text to take space before button */
}
.card .btn { /* Ensure buttons in cards are styled correctly */
    margin-top: auto; /* Pushes button to bottom of card-body if not using flex on card-body */
    align-self: center; /* Centers button if card-body uses text-align: center */
}

/* Specific Card types */
/* Workshop Carousel Card (already covered by .card) */

/* Research Card (already covered by .card) */

/* Testimonial Card (inside Community Carousel) */
.testimonial-card {
    background-color: var(--bg-white); /* Or a slightly different shade */
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--box-shadow-sm);
}
.testimonial-card img.rounded-circle { /* Avatar */
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.3);
}
.testimonial-card p.fst-italic {
    font-size: 1.1rem;
    color: var(--text-color-dark);
    margin-bottom: 1rem;
}
.testimonial-card h5 { /* Name */
    font-family: var(--font-headings);
    color: var(--text-color-headings);
    font-size: 1.2rem;
}
.testimonial-card p.text-muted { /* Title/Role */
    font-size: 0.9rem;
    color: var(--text-color-subtle);
}

/* Resource Card (External Resources Section) */
.resource-card { /* Extends .card */
    /* align-items: center; */ /* Ensured by text-align: center on .card */
}
.resource-card .card-image img { /* Icon */
    width: 70px; /* Smaller icon */
    height: 70px;
    object-fit: contain; /* Use contain if icons have specific aspect ratios */
    margin: 0 auto 1rem auto; /* Center the icon */
}
.resource-card .card-title {
    font-size: 1.2rem;
}

/* Carousel Controls */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(var(--primary-color-rgb), 0.7); /* Using primary color */
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    background-size: 50% 50%;
}
.carousel-control-prev-icon:hover,
.carousel-control-next-icon:hover {
    background-color: rgba(var(--primary-color-rgb), 1);
}
.carousel-indicators [data-bs-target] {
    background-color: var(--primary-color);
    opacity: 0.5;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
}
.carousel-indicators .active {
    opacity: 1;
}

/* Press Section Logos */
.press-logo {
    max-height: 50px; /* Slightly smaller */
    filter: grayscale(100%) opacity(0.6);
    transition: filter var(--transition-medium), opacity var(--transition-medium);
}
.press-logo:hover {
    filter: grayscale(0%) opacity(1);
}

/* Form Styles */
.form-control {
    font-family: var(--font-body);
    border-radius: var(--border-radius-sm);
    border: 1px solid #ced4da; /* Bootstrap default, can be themed */
    padding: 0.9rem 1rem;
    transition: border-color var(--transition-medium), box-shadow var(--transition-medium);
    background-color: var(--bg-white);
    color: var(--text-color-dark);
}
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-color-rgb), 0.25);
    background-color: var(--bg-white); /* Ensure focus bg is consistent */
}
.form-floating > label {
    font-family: var(--font-body);
    color: var(--text-color-subtle);
}
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color); /* Label color on focus/filled */
}

/* Footer */
.footer {
    background-color: var(--bg-footer);
    color: var(--text-color-footer);
    padding: var(--section-padding-y) 0;
}
.footer h5 {
    font-family: var(--font-headings);
    color: var(--text-color-light);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}
.footer p {
    color: var(--text-color-footer);
    font-size: 0.95rem;
    line-height: 1.6;
}
.footer .list-unstyled li {
    margin-bottom: 0.6rem;
}
.footer .footer-link {
    color: var(--text-color-footer);
    text-decoration: none;
    transition: color var(--transition-medium), padding-left var(--transition-medium);
    position: relative;
}
.footer .footer-link:hover {
    color: var(--primary-color);
    padding-left: 5px; /* Slight indent on hover */
}
.footer .footer-link::before { /* Optional: subtle icon or marker for links */
    /* content: "\2023"; bullet point */
    /* margin-right: 5px; */
}
.footer hr {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 2rem;
    margin-bottom: 2rem;
}
.footer .text-center p { /* Copyright text */
    font-size: 0.9rem;
}
/* Footer Social Links (Text-based) */
.footer .col-md-4:last-child p a { /* Targeting social links specifically if needed */
    display: block; /* Stack them */
    margin-bottom: 0.5rem;
}


/* Specific Page Styles */
/* success.html centering */
body:has(#success-message) .main-container {
    min-height: calc(100vh - var(--header-height) - 1px); /* 1px to prevent scrollbar if footer is tiny */
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0 !important; /* Override pt-5 mt-5 from HTML */
    margin-top: 0 !important; /* Override pt-5 mt-5 from HTML */
}
/* For success.html, if footer is present and small, this main-container might not reach bottom */
/* If footer is sticky or large, this should be fine */

#success-message .success-icon svg {
    width: 100px;
    height: 100px;
    color: var(--accent-color-2); /* Bright Green */
}
#success-message h1 {
    color: var(--text-color-headings);
}

/* privacy.html and terms.html content padding */
/* The HTML structure <main class="main-container pt-5 mt-5"> handles header overlap.
   `body { padding-top: var(--header-height); }` is the global fix.
   If more specific padding is needed for these pages' content sections:
*/
body:has(#privacy-content) #privacy-content,
body:has(#terms-content) #terms-content {
    /* padding-top: 3rem; /* Additional padding if pt-5 mt-5 on main is not enough */
    /* No, this is fine. The global body padding-top and the main container's pt-5 mt-5 are sufficient. */
}

/* Utility Classes */
.reveal-on-scroll { /* Initial state for scroll animations (JS will toggle visibility) */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.glassmorphism-effect {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}


/* Responsive Adjustments */
@media (max-width: 991.98px) { /* Medium devices (tablets) */
    :root {
        --section-padding-y: 4rem;
    }
    .section-title {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }
    #hero h1 {
        font-size: clamp(2rem, 5vw, 3.5rem);
    }
    #hero p.lead {
        font-size: clamp(0.9rem, 2vw, 1.25rem);
    }
    .navbar-nav { /* Style for collapsed Bootstrap navbar */
        background-color: var(--bg-white);
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: var(--border-radius-md);
        box-shadow: var(--box-shadow-md);
    }
    .nav-link {
        padding: 0.8rem 1rem !important; /* Adjust padding for collapsed items */
    }
    .nav-link::before { /* Disable underline effect in collapsed menu or adjust */
        display: none;
    }
}

@media (max-width: 767.98px) { /* Small devices (landscape phones) */
    :root {
        --section-padding-y: 3rem;
        --card-image-container-height: 180px;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    .footer .col-md-4 { /* Stack footer columns */
        text-align: center;
        margin-bottom: 2rem;
    }
    .footer .list-unstyled {
        padding-left: 0;
    }
}

@media (max-width: 575.98px) { /* Extra small devices (portrait phones) */
    #hero h1 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }
    #hero p.lead {
        font-size: clamp(0.8rem, 3vw, 1rem);
    }
    .section-title {
        font-size: 1.6rem;
    }
    .main-container { /* Reduce top padding further if header is smaller on mobile */
       /* padding-top: calc(var(--header-height) - 10px); /* Example if header shrinks */
    }
}

/* Ensure all background images have cover and no-repeat */
/* This is generally applied via inline styles in the HTML for specific elements
   like the hero section, but if there are other CSS-driven backgrounds:
*/
[style*="background-image"] { /* Catch-all for elements with inline background-image */
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center center !important; /* Good default */
}
/* For text over background images, the HTML uses linear-gradient overlay, which is good.
   Example of a class that could apply it:
.bg-image-overlay::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}
.bg-image-overlay > * {
    position: relative;
    z-index: 2;
}
*/

/*
  Final checks for STROGO rules:
  - Card image display: flex, flex-direction: column, align-items: center for .card:
    .card { display: flex; flex-direction: column; }
    align-items: center on .card would center .card-image and .card-body horizontally if they are not full width.
    If they are full width (which they usually are as block elements), this won't have much effect.
    Text-align: center on .card is better for centering inline/text content inside.

  - Image containers in cards: fixed height, object-fit: cover.
    .card .card-image { height: var(--card-image-container-height); ... }
    .card .card-image img { width: 100%; height: 100%; object-fit: cover; ... }
    This is implemented.

  - All .card, .item, .testimonial ... use content centering.
    .card, .testimonial-card { text-align: center; }
    This is implemented. Flex can be used for more complex internal centering.

  - Images in cards never shift from center.
    The `object-fit: cover` and `width: 100%; height: 100%;` on the `img` within a sized `.card-image` container achieves this.
    The image itself fills and is centered within its container.
*/