:root {
    /* Fonts */
    --font-family-headings: 'Manrope', sans-serif;
    --font-family-base: 'Rubik', sans-serif;

    /* Color Scheme: Professional Blue Primary, Vibrant Orange & Bright Yellow Accents */
    --primary-color: #0A7EA4; /* Professional Blue */
    --primary-rgb: 10, 126, 164;
    --primary-darker: #086381;
    --primary-lighter: #3FA9D1;

    --secondary-color: #FF8C00; /* Vibrant Orange (CTA Accent) */
    --secondary-rgb: 255, 140, 0;
    --secondary-darker: #CC7000;

    --accent-color: #FFD700; /* Bright Yellow/Gold (Highlight Accent) */
    --accent-rgb: 255, 215, 0;

    /* Neutral Colors */
    --neutral-lightest: #F8F9FA;
    --neutral-lighter: #E9ECEF;
    --neutral-light: #DEE2E6;
    --neutral-medium: #6C757D;
    --neutral-dark: #343A40;
    --neutral-darker: #212529;

    /* Text Colors */
    --text-color-base: var(--neutral-darker);
    --text-color-light: #FFFFFF;
    --text-color-muted: var(--neutral-medium);
    --text-color-headings: #222222; /* Darker for strong headings */

    /* Backgrounds */
    --bg-body: var(--neutral-lightest);
    --bg-light-section: var(--neutral-lightest);
    --bg-dark-section: var(--neutral-lighter);
    --card-bg: #FFFFFF;

    /* Shadows & Volumetric UI */
    --volumetric-shadow-light: 0 2px 5px rgba(0, 0, 0, 0.05), 0 5px 15px rgba(var(--primary-rgb), 0.08);
    --volumetric-shadow-medium: 0 4px 8px rgba(0, 0, 0, 0.07), 0 10px 20px rgba(var(--primary-rgb), 0.12);
    --volumetric-shadow-heavy: 0 6px 12px rgba(0, 0, 0, 0.1), 0 15px 30px rgba(var(--primary-rgb), 0.18);
    --volumetric-shadow-inset: inset 0 2px 4px 0 rgba(0,0,0,0.05);

    /* Borders */
    --border-radius-small: 0.3rem;   /* approx 5px */
    --border-radius-medium: 0.6rem;  /* approx 10px */
    --border-radius-large: 1rem;     /* approx 16px */
    --border-color: var(--neutral-light);

    /* Transitions */
    --transition-speed-fast: 0.2s;
    --transition-speed-normal: 0.3s;
    --transition-easing: cubic-bezier(0.25, 0.8, 0.25, 1); /* Smoother easing */

    /* Header height variable for calculations */
    --header-height-desktop: 70px;
    --header-height-mobile: 60px;
}

/* Global Styles */
body {
    font-family: var(--font-family-base);
    color: var(--text-color-base);
    background-color: var(--bg-body);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
    padding-top: var(--header-height-desktop); /* Account for fixed header */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    color: var(--text-color-headings);
    font-weight: 700; /* Manrope is good at heavier weights */
    margin-bottom: 0.8em;
    line-height: 1.3;
}
h1 { font-size: clamp(2.2rem, 5vw, 3rem); } /* Responsive font size */
h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); } /* Section titles */
h3 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h4 { font-size: clamp(1.2rem, 3vw, 1.7rem); }
h5 { font-size: clamp(1rem, 2.5vw, 1.35rem); } /* Card titles */
h6 { font-size: clamp(0.9rem, 2vw, 1.1rem); }

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed-fast) var(--transition-easing);
}
a:hover {
    color: var(--primary-darker);
    text-decoration: underline;
}

/* Global Button Styles */
.btn, button, input[type='submit'], input[type='button'] {
    font-family: var(--font-family-headings);
    font-weight: 600; /* Slightly bolder for Manrope */
    padding: 0.8rem 1.8rem;
    border-radius: var(--border-radius-medium);
    transition: all var(--transition-speed-normal) var(--transition-easing);
    box-shadow: var(--volumetric-shadow-light);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 0.9rem;
    border: 2px solid transparent;
    cursor: pointer;
}
.btn:hover, button:hover, input[type='submit']:hover, input[type='button']:hover {
    transform: translateY(-3px) scale(1.03); /* More pronounced volumetric effect */
    box-shadow: var(--volumetric-shadow-medium);
}
.btn:active, button:active, input[type='submit']:active, input[type='button']:active {
    transform: translateY(-1px) scale(0.99);
    box-shadow: var(--volumetric-shadow-inset);
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--text-color-light);
}
.btn-primary:hover {
    background-color: var(--secondary-darker);
    border-color: var(--secondary-darker);
    color: var(--text-color-light);
}

.btn-secondary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-color-light);
}
.btn-secondary:hover {
    background-color: var(--primary-darker);
    border-color: var(--primary-darker);
    color: var(--text-color-light);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}
.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.btn-link { /* "Read More" link style */
    font-family: var(--font-family-base);
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.25rem 0.1rem;
    border-bottom: 2px solid rgba(var(--primary-rgb),0.3);
    transition: color var(--transition-speed-fast) var(--transition-easing), border-color var(--transition-speed-fast) var(--transition-easing);
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
}
.btn-link:hover {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
    text-decoration: none;
    background-color: transparent; /* Override any potential button bg */
    transform: none; /* No 3D effect for simple links */
    box-shadow: none;
}

/* Utility Classes */
.section-bg-light { background-color: var(--bg-light-section); }
.section-bg-dark { background-color: var(--bg-dark-section); }

.volumetric-element {
    background-color: var(--card-bg);
    box-shadow: var(--volumetric-shadow-medium);
    border-radius: var(--border-radius-medium);
    transition: transform var(--transition-speed-normal) var(--transition-easing), box-shadow var(--transition-speed-normal) var(--transition-easing);
}
.volumetric-element:hover {
    transform: translateY(-6px) scale(1.02); /* Enhanced hover */
    box-shadow: var(--volumetric-shadow-heavy);
}

/* Header */
.header.sticky-top {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    height: var(--header-height-desktop);
}
.navbar-brand {
    font-family: var(--font-family-headings);
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--primary-color) !important;
}
.nav-link {
    font-family: var(--font-family-headings);
    font-weight: 500;
    color: var(--neutral-dark) !important;
    padding: 0.6rem 1.1rem !important;
    margin: 0 0.3rem;
    border-radius: var(--border-radius-small);
    transition: color var(--transition-speed-fast) var(--transition-easing), background-color var(--transition-speed-fast) var(--transition-easing);
}
.nav-link:hover, .nav-link.active {
    color: var(--secondary-color) !important;
    background-color: rgba(var(--secondary-rgb), 0.08);
}
.navbar-toggler {
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    padding: .35rem .65rem;
}
.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(var(--primary-rgb), 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991.98px) {
    body { padding-top: var(--header-height-mobile); }
    .header.sticky-top { height: var(--header-height-mobile); }
    .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.97);
        margin-top: 0.5rem;
        border-radius: var(--border-radius-medium);
        box-shadow: var(--volumetric-shadow-heavy); /* More prominent on mobile dropdown */
        padding: 1rem;
    }
    .nav-link { margin: 0.3rem 0; }
}

/* Hero Section */
.hero-section {
    color: var(--text-color-light);
    padding: 6rem 0; /* Adjusted based on header height for visual balance */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    /* background-attachment: fixed; /* Parallax effect, use with caution on mobile */
}
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: var(--text-color-light) !important;
    text-shadow: 2px 3px 10px rgba(0, 0, 0, 0.65);
    margin-bottom: 1rem;
}
.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--text-color-light) !important;
    margin-bottom: 2.5rem;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.55);
    line-height: 1.6;
}
.hero-cta {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* General Section Styling */
section {
    padding: 4.5rem 0;
}
section:nth-of-type(even) { /* Alternate light backgrounds for rhythm */
    background-color: var(--neutral-lighter);
}
.section-title {
    margin-bottom: 3.5rem;
    font-weight: 800;
    color: var(--text-color-headings);
    position: relative;
    padding-bottom: 0.75rem;
}
.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 70px;
    height: 4px;
    background-image: linear-gradient(to right, var(--primary-lighter), var(--secondary-color));
    border-radius: 3px;
}

/* Card Styling (Generic) */
.card {
    border: none;
    box-shadow: none;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.card.volumetric-element {
    box-shadow: var(--volumetric-shadow-medium);
}
.card.volumetric-element:hover {
    box-shadow: var(--volumetric-shadow-heavy);
}
.card-image {
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--neutral-lighter); /* Placeholder bg for images */
}
.card-image img, .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: var(--border-radius-medium);
    border-top-right-radius: var(--border-radius-medium);
}
.card-body {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
}
.card-title {
    margin-bottom: 0.75rem;
    color: var(--text-color-headings);
    font-weight: 700;
}
.card-text {
    color: var(--text-color-base);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}
.card-footer {
    background-color: transparent;
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.75rem;
    font-size: 0.85rem;
}

/* Specific card image heights */
.research-card .card-image,
.news-card .card-image {
    height: 230px;
}
.project-card .card-image { /* For carousel project cards where image is a column */
    height: 100%; /* Take full height of its column */
}
.project-card .card-image img {
    border-radius: 0; /* Reset if image is part of multi-col card */
    border-top-left-radius: var(--border-radius-medium);
    border-bottom-left-radius: var(--border-radius-medium);
}
@media (max-width: 767.98px) {
    .project-card .card-image img {
        border-bottom-left-radius: 0;
        border-top-right-radius: var(--border-radius-medium);
    }
}
.blog-post-card .card-image { height: 100%; } /* If image is full height of its column */
.blog-post-card .card-image img {
    border-radius: 0;
    border-top-left-radius: var(--border-radius-medium);
    border-bottom-left-radius: var(--border-radius-medium);
}
@media (max-width: 991.98px) { /* For .col-lg-6 blog posts */
    .blog-post-card .card-image img {
        border-bottom-left-radius: 0;
        border-top-right-radius: var(--border-radius-medium);
        height: 250px;
    }
}

.testimonial-card { text-align: center; }
.testimonial-card .card-image { /* Avatar */
    height: 100px; width: 100px;
    margin: 1.5rem auto 1rem auto; /* More space around avatar */
    border-radius: 50%;
    box-shadow: var(--volumetric-shadow-light);
}
.testimonial-card .card-image img {
    border-radius: 50% !important;
}

/* Timeline (Press Section) */
.timeline { position: relative; padding: 20px 0; list-style: none; }
.timeline::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; margin-left: -2px; background-color: var(--border-color); border-radius: 2px; }
.timeline-item { margin-bottom: 30px; position: relative; }
.timeline-item::after { content: ""; display: table; clear: both; }
.timeline-item .timeline-badge { color: var(--text-color-light); width: 50px; height: 50px; line-height: 50px; font-size: 1.5em; text-align: center; position: absolute; top: 16px; left: 50%; margin-left: -25px; background-color: var(--neutral-medium); z-index: 10; border-radius: 50%; box-shadow: var(--volumetric-shadow-medium); display: flex; align-items: center; justify-content: center; }
.timeline-item .timeline-badge i { font-size: 1.2rem; } /* Adjust icon size within badge */
.timeline-item .timeline-badge.primary { background-color: var(--primary-color); }
.timeline-item .timeline-badge.warning { background-color: var(--secondary-color); }
.timeline-item .timeline-badge.danger { background-color: var(--accent-color); }
.timeline-panel { width: 45%; float: left; border: 1px solid var(--border-color); border-radius: var(--border-radius-medium); padding: 25px; position: relative; background-color: var(--card-bg); }
.timeline-panel::before { position: absolute; top: 26px; right: -15px; display: inline-block; border-top: 15px solid transparent; border-left: 15px solid var(--border-color); border-right: 0 solid var(--border-color); border-bottom: 15px solid transparent; content: " "; }
.timeline-panel::after { position: absolute; top: 27px; right: -14px; display: inline-block; border-top: 14px solid transparent; border-left: 14px solid var(--card-bg); border-right: 0 solid var(--card-bg); border-bottom: 14px solid transparent; content: " "; }
.timeline-item.timeline-inverted .timeline-panel { float: right; }
.timeline-item.timeline-inverted .timeline-panel::before { border-left-width: 0; border-right-width: 15px; left: -15px; right: auto; }
.timeline-item.timeline-inverted .timeline-panel::after { border-left-width: 0; border-right-width: 14px; left: -14px; right: auto; }
.timeline-title { margin-top: 0; color: var(--primary-color); font-size: 1.4rem; font-weight: 700; }
.timeline-body > p, .timeline-body > ul { margin-bottom: 0; font-size: 0.95rem; }
@media (max-width: 767px) {
    .timeline::before { left: 25px; }
    .timeline-item .timeline-badge { left: 25px; margin-left: -25px; }
    .timeline-panel { width: calc(100% - 70px); float: right; }
    .timeline-panel::before, .timeline-item.timeline-inverted .timeline-panel::before { border-left-width: 0; border-right-width: 15px; left: -15px; right: auto; }
    .timeline-panel::after, .timeline-item.timeline-inverted .timeline-panel::after { border-left-width: 0; border-right-width: 14px; left: -14px; right: auto; }
}

/* Contact Section */
.contact-section { background-color: var(--bg-dark-section); }
.contact-form-card { padding: 2.5rem; background-color: var(--card-bg); }
.modern-input { background-color: var(--neutral-lightest); border: 1px solid var(--border-color); border-radius: var(--border-radius-small); padding: 0.9rem 1.1rem; font-size: 1rem; box-shadow: var(--volumetric-shadow-inset); transition: border-color var(--transition-speed-fast) var(--transition-easing), box-shadow var(--transition-speed-fast) var(--transition-easing); }
.modern-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.2), var(--volumetric-shadow-inset); outline: none; }
.contact-info { margin-top: 3rem; text-align: center; }
.contact-info-title { color: var(--primary-color); margin-bottom: 0.5rem; font-weight: 700; }
.contact-info p, .contact-info a { color: var(--text-color-base); }
.contact-info a:hover { color: var(--secondary-color); }

/* Footer */
.footer { background-color: var(--neutral-darker); color: var(--neutral-light); padding: 3.5rem 0; }
.footer-heading { font-family: var(--font-family-headings); color: var(--text-color-light); margin-bottom: 1.2rem; font-size: 1.4rem; font-weight: 700; }
.footer-text { color: var(--neutral-light); font-size: 0.95rem; line-height: 1.6; opacity: 0.85; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-link { color: var(--neutral-light) !important; text-decoration: none; transition: color var(--transition-speed-fast) var(--transition-easing), padding-left var(--transition-speed-fast) var(--transition-easing); opacity: 0.85; }
.footer-link:hover { color: var(--secondary-color) !important; text-decoration: none !important; padding-left: 5px; opacity: 1; }
.footer-divider { border-color: rgba(255, 255, 255, 0.1); }
.copyright-text { color: var(--neutral-medium); font-size: 0.9rem; margin-top: 1.5rem; opacity: 0.7; }

/* Success Page Specifics (for success.html) */
/* Assuming <main class="success-page-main"> wraps the success content */
.success-page-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1; /* Takes space between header and footer */
    text-align: center;
    padding: 2rem;
    min-height: calc(100vh - var(--header-height-desktop) - var(--footer-height, 150px)); /* Adjust footer height estimate */
}
@media (max-width: 991.98px) {
    .success-page-main {
        min-height: calc(100vh - var(--header-height-mobile) - var(--footer-height, 150px));
    }
}
.success-page-main h1 { color: var(--primary-color); font-size: clamp(2.5rem, 6vw, 3.5rem); margin-bottom: 1.5rem; }
.success-page-main p { font-size: clamp(1.1rem, 3vw, 1.3rem); margin-bottom: 2.5rem; max-width: 650px; }

/* Privacy/Terms Page Specifics */
.static-page-content { /* Use for <main> or content wrapper on privacy.html, terms.html */
    padding-top: 2rem; /* Additional space from header (body already has 70px) */
    padding-bottom: 3rem;
}
.static-page-content h1,
.static-page-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
}
.static-page-content h1:first-child,
.static-page-content h2:first-child {
    margin-top: 0;
}
.static-page-content p, .static-page-content ul, .static-page-content li {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: var(--text-color-base);
}
.static-page-content ul { padding-left: 2rem; }

/* Animation Placeholders (JS will add .is-visible) */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s var(--transition-easing), transform 0.7s var(--transition-easing);
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Carousel controls visual improvement */
#projectsCarousel .carousel-control-prev-icon,
#projectsCarousel .carousel-control-next-icon {
    background-color: rgba(var(--primary-rgb), 0.6);
    border-radius: 50%;
    width: 45px; /* Control size */
    height: 45px;
    background-size: 50% 50%;
    transition: background-color var(--transition-speed-fast) var(--transition-easing);
}
#projectsCarousel .carousel-control-prev-icon:hover,
#projectsCarousel .carousel-control-next-icon:hover {
    background-color: rgba(var(--secondary-rgb), 0.8);
}
#projectsCarousel .carousel-indicators button {
    background-color: rgba(var(--primary-rgb),0.4);
    border-radius: 50%; width: 10px; height: 10px; margin: 0 4px; border:0;
    transition: background-color var(--transition-speed-fast) var(--transition-easing);
}
#projectsCarousel .carousel-indicators button.active {
    background-color: var(--secondary-color);
}

/* Ensure images in columns don't overflow their containers if Bootstrap grid is used directly for layout */
.row > [class*="col-"] img.img-fluid {
    max-width: 100%;
    height: auto;
}