/* CSS Variables */
:root {
    --primary-color: #2A4A7C; /* Deep Blue */
    --secondary-color: #E87B30; /* Vibrant Orange */
    --accent-color-green: #4A7C2A; /* Earthy Green */
    --accent-color-magenta: #7C2A4A; /* Deep Magenta/Purple */

    --text-color-dark: #222222;
    --text-color-light: #FFFFFF;
    --text-color-muted: #6c757d; /* Bootstrap's muted color */

    --background-light: #F8F9FA;
    --background-medium: #E9ECEF;
    --background-dark: #1E1E1E; /* For footer or dark sections */

    --border-color-strong: #000000;
    --border-color-subtle: #DEE2E6; /* Bootstrap's card border color */
    --border-color-interactive: var(--secondary-color);

    --shadow-hard: 3px 3px 0px var(--border-color-strong);
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-inset: inset 2px 2px 5px rgba(0,0,0,0.1);

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Merriweather', serif;

    --spacing-unit: 1rem;
    --border-radius-sharp: 0;
    --border-radius-neo: 4px; /* Neo-brutalist can have slight rounding */

    --transition-speed: 0.2s;
    --transition-ease: ease-in-out;
}

/* Global Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color-dark);
    background-color: var(--text-color-light); /* Default light background */
    line-height: 1.7;
    font-size: 1rem; /* Base font size for 16px */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color); /* Default heading color */
    margin-bottom: var(--spacing-unit);
    line-height: 1.3;
}
h1 { font-size: 2.8rem; font-weight: 900; } /* For Hero titles, etc. */
h2 { font-size: 2.2rem; } /* For Section titles */
h3 { font-size: 1.8rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }

p {
    margin-bottom: var(--spacing-unit);
    color: var(--text-color-dark); /* Ensuring good contrast */
}

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

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

img {
    max-width: 100%;
    height: auto;
    display: block; /* Removes bottom space under image */
}

/* Utility Classes */
.section-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 2.5rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: calc(var(--spacing-unit) * 3);
    text-align: center;
    text-shadow: 1px 1px 0px var(--border-color-subtle); /* Subtle shadow */
}
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
        margin-bottom: calc(var(--spacing-unit) * 2);
    }
}


.section-bg-light {
    background-color: var(--background-light);
    border-top: 2px solid var(--border-color-subtle);
    border-bottom: 2px solid var(--border-color-subtle);
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--transition-ease), transform 0.6s var(--transition-ease);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Header & Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.95); /* Slight transparency for Neo */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding-top: var(--spacing-unit);
    padding-bottom: var(--spacing-unit);
    border-bottom: 2px solid var(--border-color-strong);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--primary-color) !important;
}

.navbar .nav-link {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--primary-color) !important;
    margin-left: var(--spacing-unit);
    padding: 0.5rem 1rem !important;
    border: 2px solid transparent;
    transition: all var(--transition-speed) var(--transition-ease);
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--secondary-color) !important;
    border-bottom-color: var(--secondary-color);
}

.navbar-toggler {
    border: 2px solid var(--primary-color);
    padding: 0.25rem 0.5rem;
}

.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(42,74,124,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Global Button Styles */
.btn {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1.75rem;
    border-radius: var(--border-radius-neo); /* Neo-brutalist touch */
    border-width: 2px;
    border-style: solid;
    transition: all var(--transition-speed) var(--transition-ease);
    box-shadow: var(--shadow-hard);
    transform: translate(0,0); /* Initial state for hover effect */
}

.btn:hover {
    box-shadow: none;
    transform: translate(3px, 3px);
}

.btn:active, .btn:focus {
    box-shadow: var(--shadow-inset) !important; /* Bootstrap focus shadow is too soft */
    transform: translate(1px, 1px);
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--border-color-strong);
    color: var(--text-color-light);
    box-shadow: 3px 3px 0px var(--border-color-strong);
}

.btn-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--border-color-strong);
    color: var(--text-color-light);
    box-shadow: none;
    transform: translate(3px, 3px);
}

.btn-secondary {
    background-color: var(--primary-color);
    border-color: var(--border-color-strong);
    color: var(--text-color-light);
    box-shadow: 3px 3px 0px var(--border-color-strong);
}

.btn-secondary:hover {
    background-color: var(--accent-color-magenta);
    border-color: var(--border-color-strong);
    color: var(--text-color-light);
    box-shadow: none;
    transform: translate(3px, 3px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
    box-shadow: 3px 3px 0px var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    border-color: var(--primary-color);
    box-shadow: none;
    transform: translate(3px, 3px);
}

.btn-outline-secondary {
    color: var(--accent-color-magenta);
    border-color: var(--accent-color-magenta);
    background-color: transparent;
    box-shadow: 3px 3px 0px var(--accent-color-magenta);
}
.btn-outline-secondary:hover {
    background-color: var(--accent-color-magenta);
    color: var(--text-color-light);
    border-color: var(--accent-color-magenta);
    box-shadow: none;
    transform: translate(3px, 3px);
}

/* Read More Link Style */
.read-more-link {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
    display: inline-block;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-speed) var(--transition-ease);
}
.read-more-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    transform: translateX(5px);
}
.read-more-link::after {
    content: ' →'; /* Arrow icon */
    display: inline-block;
    transition: transform var(--transition-speed) var(--transition-ease);
}
.read-more-link:hover::after {
    transform: translateX(3px);
}

/* Global Card Styles */
.card {
    border: 2px solid var(--border-color-strong);
    border-radius: var(--border-radius-neo);
    box-shadow: var(--shadow-hard);
    background-color: var(--text-color-light);
    transition: transform var(--transition-speed) var(--transition-ease), box-shadow var(--transition-speed) var(--transition-ease);
    height: 100%; /* For equal height cards in rows */
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--border-color-strong);
}

.card .card-image { /* The div wrapping the img */
    height: 200px; /* Default fixed height */
    overflow: hidden;
    border-bottom: 2px solid var(--border-color-strong);
    border-radius: var(--border-radius-neo) var(--border-radius-neo) 0 0; /* Match card top radius */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-medium); /* Placeholder if image fails to load */
}

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

.card-body {
    padding: calc(var(--spacing-unit) * 1.5);
    flex-grow: 1; /* Allows card body to expand and push footer (if any) down */
    display: flex;
    flex-direction: column;
}
.card-body > *:last-child {
    margin-bottom: 0; /* Remove bottom margin from last element in card body */
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: calc(var(--spacing-unit) * 0.75);
}

.card-text {
    font-size: 0.95rem;
    color: var(--text-color-dark);
    flex-grow: 1; /* Ensure text takes up space before buttons */
}
.card-text:last-child {
    margin-bottom: 0;
}

.card .btn {
    margin-top: auto; /* Pushes button to bottom of card-body if it's a flex item */
    align-self: flex-start; /* Align button to the left */
}


/* Hero Section */
.hero-section {
    min-height: 85vh; /* Responsive height */
    padding: 6rem 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-section::before { /* Overlay for text readability, as background-image is inline */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)); handled in HTML style */
    z-index: 1;
}
.hero-section .container {
    position: relative;
    z-index: 2;
}
.hero-title {
    font-family: var(--font-heading);
    font-weight: 900;
    color: var(--text-color-light) !important; /* Explicitly white */
    font-size: 3.5rem;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
}
.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-color-light) !important; /* Explicitly white */
    margin-bottom: calc(var(--spacing-unit) * 2);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.hero-cta {
    font-size: 1.1rem;
    padding: 0.8rem 2.5rem;
}
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.2rem; }
    .hero-section { min-height: 70vh; padding: 4rem 0;}
}

/* About Us Section */
#about .custom-img-style {
    border: 3px solid var(--border-color-strong);
    border-radius: var(--border-radius-neo);
    box-shadow: var(--shadow-hard);
}
#about h3 {
    color: var(--primary-color);
}

/* Methodology Section */
.methodology-card .card-image {
    height: auto; /* For icons, not fixed height like other cards */
    border-bottom: none;
    padding-top: var(--spacing-unit);
    background-color: transparent;
}
.methodology-card .card-image img {
    width: 80px; /* Adjust as needed */
    height: 80px; /* Adjust as needed */
    object-fit: contain;
    margin-bottom: var(--spacing-unit);
}
.methodology-card .card-body {
    text-align: center;
}
.methodology-card .card-title {
    color: var(--accent-color-magenta);
}

/* Webinars Section */
.webinar-slider .card-image { /* Slider items often need fixed height */
    height: 220px;
}
/* Basic styles for a conceptual slider container if not using a JS library */
.webinar-slider {
    display: flex; /* Or grid */
    overflow-x: auto; /* Simple scrollable slider */
    gap: var(--spacing-unit);
    padding-bottom: var(--spacing-unit); /* For scrollbar visibility */
}
.webinar-slider .webinar-card {
    min-width: 300px; /* Adjust card width in slider */
    flex: 0 0 auto;
}
@media (min-width: 992px) {
    .webinar-slider .webinar-card {
        min-width: calc(33.333% - var(--spacing-unit) * (2/3)); /* 3 cards with gap */
    }
}

/* Instructors Section */
.instructor-card .card-image {
    height: 280px; /* Or adjust as needed for portraits */
}
.instructor-card .card-body {
    text-align: center;
}
.instructor-card .card-subtitle {
    color: var(--text-color-muted);
    font-family: var(--font-body);
}

/* External Resources Section */
.resource-card {
    background-color: var(--background-medium); /* Slightly different bg */
}
.resource-card .card-title a {
    color: var(--primary-color);
    text-decoration: none;
}
.resource-card .card-title a:hover {
    color: var(--secondary-color);
}
.resource-card .btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Contact Section */
.contact-form .form-control,
.contact-form .form-select {
    border: 2px solid var(--border-color-strong);
    border-radius: var(--border-radius-neo);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-inset);
    transition: border-color var(--transition-speed) var(--transition-ease);
}
.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-inset), 0 0 0 0.2rem rgba(var(--rgb-secondary-color), 0.25); /* BS focus style with our color */
}
.contact-form .form-label {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}
.contact-details-card {
    background-color: var(--background-light);
    border: 2px solid var(--border-color-strong);
    border-radius: var(--border-radius-neo);
    box-shadow: var(--shadow-hard);
}
.contact-details-card p img {
    display: inline-block;
    vertical-align: middle;
    margin-top: -3px;
}
.contact-details-card iframe {
    border-radius: var(--border-radius-neo);
    border: 2px solid var(--border-color-strong);
}

/* FAQ Section */
.accordion-brutalist .accordion-item {
    border: 2px solid var(--border-color-strong);
    border-radius: var(--border-radius-neo); /* Slight rounding for Neo */
    margin-bottom: var(--spacing-unit);
    background-color: var(--text-color-light);
}
.accordion-brutalist .accordion-header {
    border-bottom: 2px solid var(--border-color-strong);
}
.accordion-brutalist .accordion-button {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    background-color: transparent; /* Brutalist - no frills */
    border-radius: var(--border-radius-neo) var(--border-radius-neo) 0 0;
    padding: 1.25rem 1.5rem;
    box-shadow: none !important; /* Override Bootstrap */
}
.accordion-brutalist .accordion-button:not(.collapsed) {
    color: var(--secondary-color);
    background-color: var(--background-light); /* Slight differentiation */
}
.accordion-brutalist .accordion-button::after { /* Custom icon */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%232A4A7C'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transform: rotate(-90deg);
}
.accordion-brutalist .accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23E87B30'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transform: rotate(0deg); /* Or keep it simple and just change color */
}
.accordion-brutalist .accordion-body {
    padding: 1.5rem;
    background-color: var(--text-color-light);
    border-radius: 0 0 var(--border-radius-neo) var(--border-radius-neo);
}

/* Accolades Section */
.accolade-item img {
    margin: 0 auto var(--spacing-unit) auto; /* Center image */
    filter: grayscale(50%);
    transition: filter var(--transition-speed) var(--transition-ease);
}
.accolade-item:hover img {
    filter: grayscale(0%);
}
.accolade-item h5 { color: var(--primary-color); }

/* Press Section */
.press-card {
    background-color: var(--background-light);
}
.press-card .card-image {
    height: auto; /* Logos have various aspect ratios */
    padding: var(--spacing-unit);
    border-bottom: 1px solid var(--border-color-subtle);
    background-color: transparent;
}
.press-card .press-logo {
    object-fit: contain;
    max-height: 60px; /* Control logo height */
    width: auto;
    margin: 0 auto; /* Center logo */
}
.press-card .blockquote {
    font-size: 0.95rem;
    border-left: 4px solid var(--secondary-color);
    padding-left: var(--spacing-unit);
    margin-top: var(--spacing-unit);
}
.press-card .blockquote-footer {
    color: var(--text-color-muted);
    font-family: var(--font-body);
}

/* Events Section */
.event-card .card-image {
    height: 250px;
}
.event-card .card-text small img {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 0.3rem;
    vertical-align: text-bottom;
}

/* Media Section */
.media-card .ratio iframe {
    border: 2px solid var(--border-color-strong);
    border-radius: var(--border-radius-neo);
}
.media-card .card-image { /* For article image */
    height: 200px;
}

/* Footer */
.footer-section {
    background-color: var(--background-dark);
    color: var(--text-color-light);
    padding-top: calc(var(--spacing-unit) * 3);
    padding-bottom: calc(var(--spacing-unit) * 3);
    border-top: 3px solid var(--secondary-color);
}
.footer-section h5 {
    color: var(--text-color-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}
.footer-section p, .footer-section .footer-link {
    color: #adb5bd; /* Lighter gray for footer text on dark bg */
    font-size: 0.9rem;
}
.footer-section .footer-link {
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.5rem;
    transition: color var(--transition-speed) var(--transition-ease), transform var(--transition-speed) var(--transition-ease);
}
.footer-section .footer-link:hover {
    color: var(--secondary-color);
    transform: translateX(3px);
}
.footer-section hr {
    border-color: rgba(255, 255, 255, 0.2);
    margin-top: calc(var(--spacing-unit) * 2);
    margin-bottom: calc(var(--spacing-unit) * 2);
}
.footer-section .list-unstyled li {
    margin-bottom: 0.5rem;
}
/* Footer Social Links - Text Based */
.footer-section .list-unstyled a[target="_blank"]::after {
    /* Optional: Add an external link icon for text links */
    /* content: ' ↗'; */
    /* font-size: 0.8em; */
}

/* Modal Styles (Bootstrap uses these, can enhance) */
.modal-content {
    border: 3px solid var(--border-color-strong);
    border-radius: var(--border-radius-neo);
    box-shadow: 10px 10px 0px var(--border-color-strong); /* Brutalist modal shadow */
    background-color: var(--text-color-light);
}
.modal-header {
    background-color: var(--background-light);
    border-bottom: 2px solid var(--border-color-strong);
    padding: 1.5rem;
}
.modal-header .modal-title {
    color: var(--primary-color);
    font-weight: 900;
}
.modal-body {
    padding: 1.5rem;
}
.modal-body img.img-fluid {
    border: 2px solid var(--border-color-subtle);
    border-radius: var(--border-radius-neo);
    margin-bottom: var(--spacing-unit);
}
.modal-footer {
    background-color: var(--background-light);
    border-top: 2px solid var(--border-color-strong);
    padding: 1rem 1.5rem;
}

/* Specific Page Styles */
/* For pages like privacy.html, terms.html to avoid header overlap */
.main-content-padding-top main { /* Assuming body has a class like .privacy-page */
    padding-top: 120px; /* Adjust based on actual header height */
    padding-bottom: 60px;
}
.main-content-padding-top main h1 {
    margin-bottom: 2rem;
}

/* Success Page Styling */
.success-page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background-color: var(--background-light);
}
.success-page-container .card {
    max-width: 500px;
    width: 100%;
    padding: 2rem;
}
.success-page-container .icon-success {
    font-size: 4rem;
    color: var(--accent-color-green);
    margin-bottom: 1rem;
    /* For a SVG/Image icon: */
    /* width: 80px; height: 80px; margin: 0 auto 1rem auto; */
}

/* Cookie Consent Popup */
#cookieConsentPopup {
    font-family: var(--font-body);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    border-top: 3px solid var(--secondary-color) !important; /* Override inline style for emphasis */
}
#cookieConsentPopup p {
    color: var(--text-color-light); /* Ensuring readability on dark popup */
}
#cookieConsentPopup a {
    color: var(--secondary-color); /* Brighter link on dark bg */
    text-decoration: underline;
}
#acceptCookieButton {
    background-color: var(--accent-color-green) !important; /* Override inline for consistency */
    border: 2px solid var(--border-color-strong) !important;
    box-shadow: 2px 2px 0px var(--border-color-strong) !important;
    transition: all var(--transition-speed) var(--transition-ease);
}
#acceptCookieButton:hover {
    background-color: #3a6320 !important; /* Darker green */
    box-shadow: none !important;
    transform: translate(2px, 2px);
}


/* Responsive Adjustments for smaller screens */
@media (max-width: 991.98px) {
    .navbar .nav-link {
        margin-left: 0;
        margin-bottom: 0.5rem;
        display: block;
        text-align: center;
        border-bottom-width: 2px; /* Ensure border is visible on mobile */
    }
    .navbar-nav {
        margin-top: var(--spacing-unit);
        border-top: 2px solid var(--border-color-strong);
        padding-top: var(--spacing-unit);
    }
}

@media (max-width: 575.98px) {
    h1, .hero-title { font-size: 2.2rem; }
    h2, .section-title { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    .hero-section {
        min-height: auto;
        padding: 3rem 1rem;
    }
}