/* style.css */

/* === CSS Variables === */
:root {
    /* Fonts */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Work Sans', sans-serif;

    /* Corporate Split-Complementary Colors & Accents */
    --color-primary: #0072CE; /* Corporate Blue */
    --color-primary-dark: #005090; /* Darker blue for hovers/shades */
    --color-primary-rgb: 0, 114, 206; /* RGB for box-shadow focus rings */

    --color-secondary-teal: #26A69A; /* Teal for supporting actions, good contrast */
    --color-secondary-teal-dark: #00796B;

    --color-accent-orange: #E65100; /* Deep Orange for CTAs, warnings */
    --color-accent-orange-dark: #BF360C;

    --color-accent-yellow: #FFB300; /* Amber/Yellow for highlights, info */
    --color-accent-yellow-dark: #FF8F00;
    
    --color-gradient-start: var(--color-primary);
    --color-gradient-end: var(--color-secondary-teal);

    /* Text Colors */
    --text-color-base: #343a40; /* Dark gray for body text */
    --text-color-muted: #6c757d; /* Lighter gray for secondary text */
    --text-color-headings: #222222; /* Darker for headings, as per prompt */
    --text-color-light: #FFFFFF;
    --text-color-link: var(--color-primary);
    --text-color-link-hover: var(--color-primary-dark);

    /* Background Colors */
    --bg-light: #FFFFFF;
    --bg-alt: #F8F9FA; /* Light gray for alternating sections */
    --bg-dark-overlay: rgba(0, 0, 0, 0.6); /* For hero, ensuring text readability */
    --bg-dark-overlay-light: rgba(0, 0, 0, 0.45); /* For other sections with bg images */

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
    --gradient-accent: linear-gradient(135deg, var(--color-accent-orange), var(--color-accent-yellow));

    /* Borders */
    --border-color: #dee2e6;
    --border-radius: 0.3rem;
    --border-radius-small: 0.2rem;
    --border-radius-medium: 8px; /* Used in HTML */
    --border-radius-large: 16px; /* Used in HTML */


    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 1rem 2.5rem rgba(0, 0, 0, 0.125);

    /* Transitions */
    --transition-smooth: all 0.3s ease-in-out;
    --transition-fast: all 0.2s ease-in-out;

    /* Spacing & Sizing */
    --section-padding-vertical: 4rem; /* Bulma's default is 3rem, this is slightly more */
    --header-height: 70px; /* Approx height of fixed header */
}

/* === Global Styles === */
html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

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

.page-wrapper {
    opacity: 1;
    transition: opacity var(--transition-smooth);
}
body.fade-out .page-wrapper {
    opacity: 0;
}

h1, h2, h3, h4, h5, h6,
.title, .subtitle {
    font-family: var(--font-primary);
    color: var(--text-color-headings);
    font-weight: 700; /* Poppins bold/extrabold */
    letter-spacing: -0.5px; /* Subtle tightening */
}

/* Adjust Bulma's title sizes slightly and add bottom margin */
.title.is-1 { font-size: 2.75rem; margin-bottom: 1.5rem !important; } /* 44px */
.title.is-2 { font-size: 2.25rem; margin-bottom: 1.25rem !important; } /* 36px */
.title.is-3 { font-size: 1.75rem; margin-bottom: 1rem !important; } /* 28px */
.title.is-4 { font-size: 1.4rem; margin-bottom: 0.75rem !important; } /* 22.4px */

.subtitle {
    font-weight: 400; /* Lighter weight for subtitles */
    color: var(--text-color-muted);
}
.subtitle.is-3 { font-size: 1.5rem; } /* 24px */
.subtitle.is-5 { font-size: 1.1rem; } /* 17.6px */


p {
    margin-bottom: 1rem;
    color: var(--text-color-base);
}

.content p:not(:last-child),
.content ul:not(:last-child),
.content ol:not(:last-child),
.content blockquote:not(:last-child) {
    margin-bottom: 1.25rem;
}
.content ul { list-style: disc; padding-left: 2em; }
.content strong { color: var(--text-color-headings); font-weight: 600; }

a {
    color: var(--text-color-link);
    transition: var(--transition-fast);
    text-decoration: none;
    font-weight: 500; /* Work Sans medium */
}
a:hover {
    color: var(--text-color-link-hover);
    text-decoration: underline;
}

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

.section {
    padding: var(--section-padding-vertical) 1.5rem;
}
/* Ensure alternating background for better section separation */
.section:nth-of-type(even):not(.hero-section):not(.contact-section):not(.innovation-section) {
    background-color: var(--bg-alt);
}
.section:nth-of-type(odd):not(.hero-section):not(.contact-section):not(.innovation-section) {
    background-color: var(--bg-light);
}


.section-title {
    margin-bottom: 3rem !important;
    color: var(--text-color-headings) !important;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.05);
}
.section-title.has-text-white {
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

/* === Global Button Styles === */
.button {
    font-family: var(--font-primary);
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
    padding: 0.8em 1.8em; /* Adjusted padding */
    box-shadow: var(--shadow-sm);
    border: none;
    letter-spacing: 0.5px;
    text-transform: capitalize; /* Or none, depending on preference */
}
.button:hover, .button:focus {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-md);
}
.button:active {
    transform: translateY(0) scale(1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
.button.is-primary {
    background-color: var(--color-primary);
    color: var(--text-color-light);
}
.button.is-primary:hover {
    background-color: var(--color-primary-dark);
}
.button.is-gradient {
    background-image: var(--gradient-primary);
    color: var(--text-color-light);
}
.button.is-gradient:hover {
    background-image: var(--gradient-primary);
    opacity: 0.9;
    box-shadow: var(--shadow-lg);
}

/* === Header / Navbar === */
.header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}
.navbar { min-height: var(--header-height); }
.navbar-item img { max-height: 38px; } /* Slightly smaller logo */
.navbar-item, .navbar-link {
    font-family: var(--font-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-color-base);
    transition: var(--transition-fast);
    padding: 0.5rem 1rem; /* Adjust padding */
}
.navbar-item:hover, .navbar-link:hover,
.navbar-item.is-active {
    background-color: transparent !important;
    color: var(--color-primary) !important;
}
.navbar-burger { color: var(--text-color-base); }
.navbar-burger:hover { background-color: transparent; color: var(--color-primary); }

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


/* === Hero Section === */
.hero-section {
    position: relative;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-dark-overlay); /* Ensures text readability */
    z-index: 1;
}
.hero-section .hero-body {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.hero-title {
    color: var(--text-color-light) !important;
    font-size: 3rem; /* Adjusted size */
    text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
}
.hero-subtitle {
    color: var(--text-color-light) !important;
    font-size: 1.4rem; /* Adjusted size */
    margin-top: 1rem;
    max-width: 750px;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
}
.hero-section .button { margin-top: 2rem; padding: 1em 2.5em; font-size: 1.1rem; }

/* === Sections with Background Images (Innovation, Contact) === */
.innovation-section, .contact-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-color-light);
}
.hero-overlay-light { /* Used for Innovation and Contact sections */
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-dark-overlay-light);
    z-index: 1;
}
.innovation-section .container, .contact-section .container {
    position: relative; z-index: 2;
}
.innovation-section .content.is-medium, .contact-section .subtitle {
    color: var(--text-color-light) !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* === Research Section (Timeline) === */
.timeline-container .title.is-3 { margin-bottom: 2.5rem; }
.timeline .timeline-header .tag { font-size: 0.9rem; padding: 0.4em 0.8em; }
.timeline .timeline-item .timeline-marker.is-image img { border-radius: 50%; }
.timeline .timeline-content {
    background-color: var(--bg-light); padding: 1.25em;
    border-radius: var(--border-radius-medium); box-shadow: var(--shadow-sm);
}
.timeline .timeline-content .heading {
    font-family: var(--font-primary); color: var(--color-primary);
    font-weight: 600; font-size: 1.1em;
}

/* === Card Styles (Projects, Team) === */
.project-card, .team-member-card {
    background-color: var(--bg-light);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.project-card:hover, .team-member-card:hover {
    transform: translateY(-6px); /* More pronounced lift */
    box-shadow: var(--shadow-lg);
}
.card .card-image { width: 100%; } /* Bulma's card-image */
.card .image-container { /* This is the <figure> in HTML */
    height: 220px; /* Fixed height for image area */
    overflow: hidden;
}
/* Ensure fixed height overrides Bulma's aspect ratio padding */
figure.image-container.is-1by1,
figure.image-container.is-4by3,
figure.image-container.is-16by9 {
    padding-top: 0 !important;
    height: 220px; /* Redundant but safe */
}

.card .image-container img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.card:hover .image-container img { transform: scale(1.05); }

.card .card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.project-card .card-content { text-align: left; }
.team-member-card .card-content { text-align: center; }

.card-title { /* For titles inside cards (p.title.is-4) */
    color: var(--text-color-headings) !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.3;
}
.project-card .card-content .content {
    font-size: 0.9rem; color: var(--text-color-muted);
}
.team-member-card .card-content .subtitle.is-6 {
    color: var(--color-secondary-teal); font-weight: 500; font-size: 0.9rem;
}

/* === Innovation Section Gallery === */
.gallery-innovation .image-container { /* This is the <figure> */
    border-radius: var(--border-radius-medium);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    height: 200px; /* Example fixed height for gallery items */
}
.gallery-innovation .image-container:hover {
    transform: scale(1.05); box-shadow: var(--shadow-md);
}
.gallery-innovation .image-container img {
    width: 100%; height: 100%; object-fit: cover;
}


/* === Sustainability Section === */
.sustainability-section .image-container img {
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-md);
}

/* === External Resources Section === */
.resource-list ul.grid-list {
    list-style: none; padding-left: 0;
    display: grid; gap: 1.5rem;
}
@media screen and (min-width: 769px) {
    .resource-list ul.grid-list { grid-template-columns: repeat(2, 1fr); }
}
.resource-link {
    display: flex; flex-direction: column;
    background-color: var(--bg-light); padding: 1.25rem;
    border-radius: var(--border-radius-medium); box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth); color: var(--text-color-base);
    text-decoration: none; height: 100%; /* For equal height in grid */
}
.resource-link:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-md);
    background-color: #fefefe;
}
.resource-link strong {
    font-family: var(--font-primary); color: var(--color-primary);
    display: block; margin-bottom: 0.5rem; font-size: 1.05rem;
    line-height: 1.3;
}
.resource-link p {
    font-size: 0.85rem; color: var(--text-color-muted);
    line-height: 1.6; margin-bottom: 0; flex-grow: 1;
}

/* === Contact Form === */
.contact-form-styled .label {
    color: var(--text-color-light) !important; /* From HTML, ensure good contrast */
    font-weight: 500;
    font-size: 0.95rem;
}
.contact-form-styled .input,
.contact-form-styled .textarea {
    border-radius: var(--border-radius-small);
    border: 1px solid rgb(102, 100, 100); /* Lighter border for dark bg */
    box-shadow: none; /* Remove default shadow, rely on border */
    transition: var(--transition-fast);
    padding: 0.9em 1.1em;
    background-color: rgba(255,255,255,0.4); /* Slight transparency */
    color: var(--text-color-light);
}
.contact-form-styled .input::placeholder,
.contact-form-styled .textarea::placeholder {
    color: rgba(255,255,255,0.6);
}
.contact-form-styled .input:focus,
.contact-form-styled .textarea:focus {
    border-color: var(--color-accent-yellow);
    background-color: rgba(255,255,255,0.15);
    box-shadow: 0 0 0 0.15rem rgba(var(--color-accent-yellow-rgb, 255, 179, 0), 0.25);
    color: var(--text-color-light);
}
:root { --color-accent-yellow-rgb: 255, 179, 0; }
.contact-form-styled .button { min-width: 220px; font-size: 1.05rem; }


/* === Footer === */
.footer-section {
    background-color: var(--text-color-headings);
    color: #adb5bd;
    padding: 3.5rem 1.5rem 2rem;
}
.footer-section .title.footer-title {
    color: var(--text-color-light) !important;
    font-size: 1.15rem; margin-bottom: 1.25rem;
}
.footer-section p, .footer-section li { font-size: 0.9rem; color: #adb5bd; }
.footer-section a { color: #ced4da; font-weight: 400; }
.footer-section a:hover { color: var(--color-primary); text-decoration: none; }
.footer-section .social-links li { display: inline-block; margin-right: 0.8rem; }
.footer-section .social-links a { font-size: 0.9rem; padding: 0.2em 0; } /* Text links */
.footer-section hr { background-color: #495057; margin: 2.5rem 0; }
.footer-section .content.has-text-centered p { font-size: 0.85rem; color: #6c757d; }
.footer-section img[alt*="Footer"] { opacity: 0.7; margin-top: 1rem; }

/* === Specific Page Styles (Success, Privacy, Terms) === */
body.success-page { /* Add this class to body in success.html */
    display: flex; flex-direction: column; min-height: 100vh;
    padding-top: 0; /* Remove body padding if header is not present */
    justify-content: center; align-items: center; text-align: center;
    background-color: var(--bg-alt); /* Light background for success page */
}
.success-page .success-container {
    background-color: var(--bg-light);
    padding: 3rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-lg);
    max-width: 550px;
    width: 90%;
}
.success-page .success-container .title {
    color: var(--color-secondary-teal) !important; /* Teal for success */
    font-size: 2rem;
}
.success-page .success-container .button { margin-top: 2rem; }

/* For privacy.html, terms.html content area */
/* Assuming these pages will have a main container inside the body */
.static-page-content .container { /* Add .static-page-content to main/section of these pages */
    padding-top: 2rem; /* Additional padding if needed after body's header padding */
    padding-bottom: var(--section-padding-vertical);
    min-height: calc(100vh - var(--header-height) - 180px); /* Approx footer height */
    max-width: 800px; /* Limit width for readability */
    margin-left: auto;
    margin-right: auto;
}
.static-page-content h1, .static-page-content .title.is-1 {
    margin-bottom: 2rem; text-align: center;
}
.static-page-content h2, .static-page-content .title.is-3 {
    margin-top: 2.5rem; margin-bottom: 1rem; color: var(--color-primary);
}
.static-page-content p { line-height: 1.8; }
.static-page-content ul { margin-bottom: 1.5rem; padding-left: 1.5em; }


/* === Utility Classes === */
.is-gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; text-fill-color: transparent;
}
.has-text-shadow { text-shadow: 1px 1px 2px rgba(0,0,0,0.2); }

/* === Read More Link Style === */
a.read-more {
    display: inline-block; font-family: var(--font-primary);
    font-weight: 600; color: var(--color-accent-orange);
    text-decoration: none; padding: 0.2em 0; position: relative;
    transition: var(--transition-fast); font-size: 0.95rem;
}
a.read-more::after {
    content: '→'; margin-left: 0.4em;
    transition: transform var(--transition-fast); display: inline-block;
}
a.read-more:hover { color: var(--color-accent-orange-dark); }
a.read-more:hover::after { transform: translateX(4px); }


/* === Responsive Adjustments === */
@media screen and (max-width: 1023px) { /* Tablet and below */
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.25rem; }
    .title.is-1 { font-size: 2.25rem; }
    .title.is-2 { font-size: 1.85rem; }
    .navbar-item, .navbar-link { font-size: 0.9rem; }
}

@media screen and (max-width: 768px) { /* Mobile */
    html { font-size: 15px; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .section { padding: calc(var(--section-padding-vertical) * 0.8) 1rem; }
    .section-title { margin-bottom: 2rem !important; }
    .card .image-container, figure.image-container.is-4by3 { height: 200px; }
    .gallery-innovation .image-container { height: 180px; }
    .footer-section .columns { text-align: center; }
    .footer-section .column:not(:last-child) { margin-bottom: 2rem; }
    .resource-list ul.grid-list { grid-template-columns: 1fr; }
    .contact-form-styled .button { width: 100%; }
}