/* style.css */

/* 1. CSS Variables & Base Styles
---------------------------------------------------------------------------------------------------- */
:root {
    --color-primary-dark: #1E1E1E;   /* Deep Charcoal */
    --color-secondary-light: #F0F0F0;/* Off-White/Light Grey */
    --color-accent: #FFC107;         /* Amber Yellow */
    --color-text-on-dark: #F5F5F5;
    --color-text-on-light: #1E1E1E;
    --color-white: #FFFFFF;
    --color-danger: #f14668; /* Bulma danger for error states */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Work Sans', sans-serif;
    --shadow-brutalist: 3px 3px 0 var(--color-primary-dark);
    --shadow-brutalist-accent: 3px 3px 0 var(--color-accent);
    --border-brutalist: 2px solid var(--color-primary-dark);
}

html {
    scroll-behavior: smooth;
    background-color: var(--color-secondary-light); /* Fallback */
}

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

/* 2. Typography
---------------------------------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6,
.title, .subtitle { /* Bulma classes */
    font-family: var(--font-primary);
    color: var(--color-text-on-light); /* Default for light backgrounds */
    font-weight: 700;
    line-height: 1.2;
}

.title { /* Specific Bulma .title override if needed, or use custom classes */
    color: var(--color-primary-dark); /* Ensure high contrast for titles */
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.section-title {
    text-align: center;
    margin-bottom: 3rem; /* Increased from 2.5rem for more space */
    font-size: 2.5rem;   /* Responsive font size below */
    color: var(--color-primary-dark);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

@media screen and (max-width: 768px) {
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
}


/* 3. Global UI Component Styles (Buttons, Inputs, Cards)
---------------------------------------------------------------------------------------------------- */

/* Global Button Styles (Brutalist) */
.button { /* General Bulma button enhancement */
    font-family: var(--font-secondary);
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 0; /* Brutalist - no rounded corners */
    transition: all 0.2s ease-in-out;
    border: var(--border-brutalist);
    box-shadow: var(--shadow-brutalist);
    padding: 0.75em 1.5em; /* Slightly larger padding */
}

.button:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--color-primary-dark) !important;
}

.button.is-primary {
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
    border: var(--border-brutalist); /* Ensure it's there */
    box-shadow: var(--shadow-brutalist); /* Ensure it's there */
}
.button.is-primary:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-accent);
    border-color: var(--color-primary-dark); /* Keep border consistent on hover */
    box-shadow: 1px 1px 0 var(--color-accent); /* Modified shadow on hover */
}

.button.is-primary.is-outlined {
    background-color: transparent;
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: none; /* Outlined buttons usually don't have heavy shadows */
}
.button.is-primary.is-outlined:hover {
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
    border-color: var(--color-accent);
    box-shadow: 2px 2px 0 var(--color-primary-dark); /* Subtle brutalist shadow on hover */
}
.button.is-small.is-outlined.is-primary { /* For "Read More" links */
    padding: 0.5em 1em;
    font-size: 0.85rem;
}


/* Inputs and Textareas (Brutalist) */
.input, .textarea {
    border: var(--border-brutalist);
    box-shadow: var(--shadow-brutalist);
    border-radius: 0;
    font-family: var(--font-secondary);
    padding: 0.75em;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.input:focus, .textarea:focus {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-brutalist-accent);
    outline: none; /* Remove default focus outline */
}

/* Cards (Brutalist) */
.card {
    background-color: var(--color-secondary-light);
    border: var(--border-brutalist);
    box-shadow: 5px 5px 0 var(--color-primary-dark);
    border-radius: 0;
    height: 100%; /* For consistent card height in a Bulma row */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Ensures content respects card boundaries */
}
.card .card-image { /* Bulma's card-image div */
    border-bottom: var(--border-brutalist);
    position: relative; /* For potential overlays on image */
}
.card .card-image .image img { /* Target img within Bulma's figure.image */
    object-fit: cover;
    height: 200px; /* Fixed height for card images */
    width: 100%;
    display: block; /* Remove any potential space below image */
}
.card .card-content {
    padding: 1.5rem;
    flex-grow: 1; /* Allows content to expand */
    color: var(--color-text-on-light);
}
.card .card-content .title,
.card .card-content h1, .card .card-content h2, .card .card-content h3, .card .card-content h4 {
    color: var(--color-primary-dark); /* Darker titles within cards */
}
.card .card-content .content p { /* For <p class="content"> from Bulma */
    color: var(--color-text-on-light);
}
/* Ensure text in card-content has good contrast if card has dark background */
.card.has-background-dark .card-content,
.card.has-background-dark .card-content .title,
.card.has-background-dark .card-content p {
    color: var(--color-text-on-dark);
}

/* 4. Layout (Header, Footer, Sections)
---------------------------------------------------------------------------------------------------- */

/* Header */
.site-header {
    background-color: var(--color-primary-dark);
    padding: 0.5rem 0; /* Reduced padding slightly */
    border-bottom: 3px solid var(--color-accent);
    position: sticky; /* Sticky header */
    top: 0;
    z-index: 1000;
    width: 100%;
}
.site-header .navbar {
    background-color: transparent; /* Navbar itself is transparent */
}
.site-header .navbar-brand .navbar-item {
    color: var(--color-accent);
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: bold;
}
.site-header .navbar-brand .navbar-item:hover {
    color: var(--color-white); /* Slightly lighter accent on hover */
    background-color: transparent;
}
.site-header .navbar-menu .navbar-item {
    color: var(--color-secondary-light);
    font-weight: 500;
    font-family: var(--font-secondary);
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
}
.site-header .navbar-menu .navbar-item:hover,
.site-header .navbar-menu .navbar-item.is-active { /* Style for active link */
    background-color: transparent;
    color: var(--color-accent);
}
.navbar-burger { /* Burger for mobile */
    color: var(--color-secondary-light);
}
.navbar-burger:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--color-accent);
}
.navbar-burger span {
    height: 2px; /* Thicker burger lines */
    background-color: var(--color-secondary-light);
}
.navbar-burger.is-active span {
    background-color: var(--color-accent);
}

/* Ensure content doesn't hide behind sticky header */
/* This will be applied via JS or specific page classes if needed. */
/* Or, if the header height is fixed:
body { padding-top: 65px; } Adjust 65px to actual header height. */

/* Footer */
.site-footer {
    background-color: var(--color-primary-dark);
    color: var(--color-secondary-light);
    padding: 3rem 1.5rem;
    border-top: 3px solid var(--color-accent);
}
.site-footer .title {
    color: var(--color-secondary-light) !important; /* Override Bulma title color */
}
.site-footer a {
    color: var(--color-accent);
    font-weight: bold;
}
.site-footer a:hover {
    color: var(--color-secondary-light);
    text-decoration: underline;
}
.site-footer .social-links p { /* Each social link is in a <p> in the HTML */
    margin-bottom: 0.5rem;
}
.site-footer .social-links a {
    display: inline-block; /* Allows padding/margin if needed */
    padding: 0.25rem 0;
    font-size: 0.95rem;
}
.site-footer .content p { /* For copyright text */
    color: var(--color-secondary-light);
    font-size: 0.85rem;
}

/* Sections General Styling */
.section {
    padding: 4rem 1.5rem; /* Default section padding */
}
@media screen and (max-width: 768px) {
    .section {
        padding: 3rem 1rem;
    }
}
.section.has-background-light { /* Bulma class */
    background-color: #F9F9F9; /* Slightly different light for variation */
}


/* 5. Specific Section Styles
---------------------------------------------------------------------------------------------------- */

/* Hero Section */
#hero.hero {
    background-color: var(--color-primary-dark); /* Fallback if image fails */
    /* Parallax styles are applied via .parallax-background class */
}
#hero .hero-body {
    padding-top: 8rem; /* More top padding */
    padding-bottom: 8rem; /* More bottom padding */
    position: relative; /* Ensure content is above ::before pseudo-element */
    z-index: 2;
}
#hero .title,
#hero .subtitle {
    color: var(--color-white) !important; /* STRICTLY WHITE */
    text-shadow: 2px 2px 6px rgba(0,0,0,0.7); /* Enhanced readability */
}
#hero .title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}
#hero .subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    font-weight: 400; /* Lighter subtitle */
}
#hero .button.is-primary {
    padding: 1em 2.5em; /* Larger hero button */
    font-size: 1.1rem;
}

@media screen and (max-width: 768px) {
    #hero .title { font-size: 2.5rem; }
    #hero .subtitle { font-size: 1.2rem; }
}

/* Parallax Background Effect (used on Hero and CTA) */
.parallax-background {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}
.parallax-background::before { /* Darkening overlay for text readability */
    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));
    z-index: 1;
}
.parallax-background > * { /* Content on top of overlay */
    position: relative;
    z-index: 2;
}

/* History Section */
#history .content {
    font-size: 1.1rem;
}

/* News Section, Webinars, Research Cards, External Resources */
/* General card styles above apply. These sections use columns of cards. */

/* Portfolio Section - Modals */
.modal-content {
    background-color: var(--color-secondary-light);
    padding: 30px;
    border: 3px solid var(--color-primary-dark);
    box-shadow: 7px 7px 0 var(--color-primary-dark); /* Stronger brutalist shadow */
    border-radius: 0;
    max-height: calc(100vh - 80px); /* Max height with some margin */
}
.modal-content .title {
    color: var(--color-primary-dark);
    margin-bottom: 1.5rem;
}
.modal-content p {
    color: var(--color-text-on-light);
    line-height: 1.8;
}
.modal-content figure.image img {
    border: var(--border-brutalist);
}
.modal-close {
    background-color: var(--color-primary-dark) !important;
    color: var(--color-accent) !important;
    border-radius: 0;
    width: 40px;
    height: 40px;
}
.modal-close:hover {
    background-color: var(--color-accent) !important;
    color: var(--color-primary-dark) !important;
}

/* Awards Section */
#awards figure.image img {
    border-radius: 50%; /* Circular award icons/seals */
    border: 2px solid var(--color-accent);
    padding: 3px;
    background-color: var(--color-white);
}
#awards .column p strong {
    color: var(--color-primary-dark);
}

/* Partners Section */
#partners figure.image img {
    filter: grayscale(80%); /* Subtle effect for partner logos */
    transition: filter 0.3s ease;
    max-height: 80px; /* Control logo size */
    width: auto;
}
#partners figure.image img:hover {
    filter: grayscale(0%);
}
#partners .column p {
    font-weight: 500;
    margin-top: 0.5rem;
    color: var(--color-primary-dark);
}

/* Pricing Section */
#pricing .card {
    text-align: center;
}
#pricing .card .title.is-4 { /* Plan name */
    margin-bottom: 0.5rem;
}
#pricing .card .subtitle.is-2 { /* Price */
    font-family: var(--font-primary);
    color: var(--color-accent) !important; /* Force accent color */
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}
#pricing .card ul {
    text-align: left;
    list-style: none;
    margin-left: 0;
    margin-bottom: 2rem !important; /* Override Bulma */
}
#pricing .card ul li {
    padding: 0.3rem 0;
    border-bottom: 1px solid #ddd; /* Subtle separator */
}
#pricing .card ul li:last-child {
    border-bottom: none;
}
#pricing .card ul li::before {
    content: "✓";
    color: var(--color-accent);
    font-weight: bold;
    margin-right: 0.5em;
}
#pricing .card ul li:not(:has(span.icon))::before { /* For features not included */
    /* If an item isn't included, the HTML often has it struck through or with a different icon */
    /* Example: – for not included (from HTML) - adjust if structure changes */
}
/* Highlighted 'Popular' plan (already has inline style in HTML, this ensures it) */
#pricing .card[style*="border: 3px solid var(--color-accent)"] {
    position: relative; /* For the tag */
}
#pricing .tag.is-warning { /* Popular tag */
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
    font-weight: bold;
    position: absolute;
    top: -15px;
    right: 15px;
    border-radius: 0;
    border: var(--border-brutalist);
    box-shadow: var(--shadow-brutalist);
}

/* FAQ Section */
#faq details {
    margin-bottom: 1rem;
    border: var(--border-brutalist);
    background-color: var(--color-white); /* Slightly off-white bg for details */
    padding: 1rem;
}
#faq details summary {
    font-weight: bold;
    cursor: pointer;
    color: var(--color-primary-dark);
    font-size: 1.15rem; /* Make summary text slightly larger */
    outline: none; /* Remove focus outline from summary */
}
#faq details summary::-webkit-details-marker { /* Custom marker */
  display: none; /* Hide default marker */
}
#faq details summary::before { /* Custom marker */
    content: '+'; /* Collapsed state */
    font-family: var(--font-primary);
    color: var(--color-accent);
    margin-right: 0.75em;
    font-size: 1.2em;
    line-height: 1;
    display: inline-block;
    transition: transform 0.2s ease-in-out;
}
#faq details[open] summary::before {
    content: '–'; /* Expanded state */
    transform: rotate(180deg);
}
#faq details .content p { /* Content inside details */
    padding-top: 1rem;
    margin-bottom: 0;
    color: var(--color-text-on-light);
}
#faq hr {
    background-color: var(--color-primary-dark);
    height: 2px;
    border: none;
    margin: 1.5rem 0;
}

/* Contact CTA Section */
#contact-cta.section {
    padding: 6rem 1.5rem; /* More padding for impact */
}
#contact-cta .title,
#contact-cta .subtitle {
    color: var(--color-white) !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}
#contact-cta .button.is-primary {
    padding: 1em 2.5em; /* Larger CTA button */
    font-size: 1.1rem;
}


/* 6. Page-Specific Styles
---------------------------------------------------------------------------------------------------- */

/* Privacy & Terms Pages - ensure content is below fixed header */
.main-content-padding-top {
    padding-top: 100px; /* Adjust if header height changes. (Header is approx 60-70px) */
}
.main-content-padding-top .section:first-child {
    padding-top: 2rem; /* Reduce top padding of the first section if needed */
}
.legal-page-content h1.title { /* Main title on legal pages */
    margin-bottom: 2rem;
    font-size: 2.2rem;
}
.legal-page-content h2.title {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

/* Success Page (success.html) */
.success-page-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 70px); /* 70px approx header height */
    text-align: center;
    padding: 2rem;
    background-color: var(--color-secondary-light);
}
.success-page-container .icon { /* For a success icon */
    font-size: 5rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}
.success-page-container .title {
    color: var(--color-primary-dark);
    margin-bottom: 1rem;
}
.success-page-container p {
    color: var(--color-text-on-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 2rem;
}

/* Contact Page (contacts.html) */
#contact-form-section .label {
    color: var(--color-primary-dark);
    font-weight: 600;
}
#contact-form-section .column.is-one-third { /* For contact info aside form */
    border-left: 2px solid var(--color-accent);
    padding-left: 2rem;
}
@media screen and (max-width: 768px) {
    #contact-form-section .column.is-one-third {
        border-left: none;
        border-top: 2px solid var(--color-accent);
        padding-left: 0;
        padding-top: 2rem;
        margin-top: 2rem;
    }
}
#contact-form-section .contact-details p {
    margin-bottom: 0.8rem;
}
#contact-form-section .contact-details strong {
    color: var(--color-primary-dark);
}
#contact-form-section .contact-details .icon {
    color: var(--color-accent);
    margin-right: 0.5rem;
}


/* 7. Animations & Particles
---------------------------------------------------------------------------------------------------- */
/* Particle Animation Container (JS populates this) */
#particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Behind all content */
    pointer-events: none; /* Allow clicks to pass through */
}

/* AOS Animations are handled by the library */
/* Add custom smooth transitions for general elements if needed */
*:focus {
    outline-color: var(--color-accent); /* Custom focus outline for accessibility */
    outline-offset: 2px;
}


/* 8. Utility Classes (Example)
---------------------------------------------------------------------------------------------------- */
.text-accent {
    color: var(--color-accent) !important;
}
.bg-primary-dark {
    background-color: var(--color-primary-dark) !important;
    color: var(--color-text-on-dark) !important; /* Ensure text contrast */
}
.bg-primary-dark .title, .bg-primary-dark p {
     color: var(--color-text-on-dark) !important;
}

/* Cookie Consent Popup (already styled inline in HTML, but can be moved here) */
#cookieConsentPopup {
    /* Styles are mostly in HTML to ensure they load fast without waiting for CSS file */
    /* Example of a few overrides or additions if needed: */
    /* font-family: var(--font-secondary); */
}
#cookieConsentPopup a {
    color: var(--color-accent);
}
#cookieConsentPopup button { /* Overriding global button for this specific case if different */
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
    border: 1px solid var(--color-primary-dark); /* Less brutalist for this small element */
    box-shadow: 2px 2px 0 var(--color-primary-dark);
    padding: 8px 20px;
    font-size: 0.9rem;
}
#cookieConsentPopup button:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-accent);
    box-shadow: 1px 1px 0 var(--color-accent);
}

/* Asymmetric Balance: Mostly achieved through Bulma column usage in HTML
   e.g., .columns with .is-two-thirds etc.
   If a specific asymmetric section layout is needed: */
.asymmetric-section .columns {
    align-items: center; /* Example: vertically align items in columns */
}
.asymmetric-block-left {
    padding-right: 3rem; /* Example: more space on one side */
}
.asymmetric-block-right {
    padding-left: 3rem;  /* Example: more space on one side */
}

/* Ensure Bulma overrides or defaults work well */
.content ul {
    list-style: disc; /* Default Bulma list style */
    margin-left: 1.5em; /* Adjust if needed */
}
.content ol {
    list-style: decimal;
    margin-left: 1.5em;
}

/* Final check for contrasts and readability */
.has-text-light { color: var(--color-secondary-light) !important; }
.has-text-dark { color: var(--color-primary-dark) !important; }
.has-text-accent { color: var(--color-accent) !important; }


/* Ensure that text on images/dark backgrounds has good contrast */
.image-overlay-text {
    position: relative;
    color: var(--color-white); /* Example for text on an image */
}
.image-overlay-text::before { /* If the parent has the image and this is text on it */
    content: '';
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4));
    z-index: -1; /* Place overlay behind text but on top of image (if text is direct child) */
}