/* --- ROOT VARIABLES & GENERAL STYLES --- */
:root {
    --button-default-blue: #1e5a9c;
    --button-hover-blue: #0d47a1;
    --primary-color: #ffffff;
    --dark-color: #000000;
    --light-color: #ffffff;
    --text-color: #333333;
    --gray-bg: #f4f6f8;
    --border-color: #e0e0e0;
    --mobile-border-color: #444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--light-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h2.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 50px;
    font-weight: 600;
}
h2.section-title a {
    color: var(--dark-color);
    text-decoration: none;
    display: inline-block;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.25s ease-out;
}
h2.section-title a:hover {
    color: var(--button-default-blue);
}
h2.section-title a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--button-default-blue);
    bottom: 0;
    left: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease-out;
}
h2.section-title a:hover::after {
    transform: scaleX(1);
}

.btn {
    display: inline-block;
    /* CORRECTED: New button style */
    background-color: var(--light-color); /* White background */
    color: var(--dark-color);             /* Black text */
    border: 2px solid var(--dark-color);  /* Black border */
    padding: 10px 25px;                   /* Reduced length (padding) */
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
}

.btn:hover {
    /* Inverted colors for a premium hover effect */
    background-color: var(--dark-color); /* Black background */
    color: var(--light-color);            /* White text */
    transform: translateY(-2px);
}

/* --- HEADER & NAVIGATION --- */
#main-header {
    background-color: var(--dark-color);
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: 2cm;
    /* This new rule adds the edge padding directly to the header */
    padding: 0 5px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 1.7cm;
    width: auto;
}

.main-nav > ul {
    list-style: none;
    display: flex;
}

.main-nav li {
    position: relative;
}

.main-nav li a, .has-submenu > a {
    color: var(--light-color);
    text-decoration: none;
    padding: 0 15px;
    height: 2cm;
    line-height: 2cm;
    font-weight: 600;

    text-transform: uppercase;
    display: block;
    position: relative;
    transition: none;
}
.main-nav li a::after, .has-submenu > a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--light-color);
    bottom: 15px;
    left: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease-out;
}
.main-nav li a:hover::after, .has-submenu:hover > a::after {
    transform: scaleX(1);
}
.main-nav li a:hover, .has-submenu:hover > a, .main-nav li a.active {
    color: var(--light-color);
}

.has-submenu > a { cursor: default; }

.submenu {
    position: absolute;
    top: 100%;
    /* CORRECTED: These two lines center the dropdown */
    left: 50%;
    transform: translate(-50%, 10px); /* Centers horizontally, keeps vertical animation */

    background-color: var(--dark-color);
    border: 1px solid var(--mobile-border-color);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 0 0 5px 5px;
    padding: 10px 0;
    width: 220px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 1001;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    /* CORRECTED: This keeps it centered while moving it into view */
    transform: translate(-50%, 0);
}
.submenu li {
    display: block;
    width: 100%;
}
.submenu li a {
    padding: 10px 20px;
    height: auto;
    line-height: 1.5;
    text-align: center; /* This centers the text inside the dropdown */
}
.submenu li a:hover {
    background-color: transparent;
}
.submenu li a::after {
    bottom: 5px;
}

#hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative; /* Added for z-index to work */
    z-index: 1010; /* Ensures it's on top of the menu */
}

#hamburger-btn .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--light-color);
    transition: all 0.3s ease-in-out;
}

/* Animate hamburger to cross when active */
#hamburger-btn.active .bar:nth-child(2) {
    opacity: 0;
}
#hamburger-btn.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
#hamburger-btn.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* CORRECTED #2: Full screen dynamic slider */
.hero-slider {
    position: relative;
    width: 100%;
    /* This makes the slider fill the vertical screen minus the header height */
    height: calc(100vh - 2cm); 
    background-color: #ccc;
    overflow: hidden;
}
.hero-slider .slide { position: absolute; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.5s ease; }
.hero-slider .slide.active { opacity: 1; }
.slide-caption { position: absolute; bottom: 5%; left: 5%; background-color: rgba(0,0,0,0.6); color: var(--light-color); padding: 15px 25px; border-radius: 5px; max-width: 80%; opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.slide.active .slide-caption { opacity: 1; transform: translateY(0); transition-delay: 0.5s; }
/* CORRECTED #1: Slider Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent; /* No background */
    color: rgb(5, 0, 77);
    border: none;
    font-size: 3rem; /* Bigger size */
    font-weight: bold;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease;
}
.slider-arrow:hover {
    transform: translateY(-50%) scale(1.1);
}
.slider-arrow.prev { left: 20px; }
.slider-arrow.next { right: 20px; }

/* --- CONTENT SECTIONS --- */
.content-section { padding: 60px 0; }
.gray-bg { background-color: var(--gray-bg); }
.two-column-layout {
    display: flex;
    gap: 50px;
    align-items: center; /* This is the key property to vertically center the items */
}
.column-left, .column-right { flex: 1; min-width: 0; }

/* CORRECTED #1: Image Hover Effect */
.image-link-wrapper {
    display: block;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden; /* This is the key fix */
}
.image-link-wrapper:hover {
    transform: scale(1.08);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}
.column-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    transition: transform 0.4s ease; /* This transition was moved to the wrapper */
}

.animated-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.animated-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* CORRECTED #2: Text Alignment */
/* CORRECTED #3: Text Spacing */
.column-right .description {
    margin-top: 2.5em; /* Adds a two-line gap */
}

.profile-card { text-align: center; }
.profile-photo { width: 200px; height: 200px; border-radius: 50%; border: 5px solid var(--light-color); box-shadow: 0 5px 15px rgba(0,0,0,0.1); margin-bottom: 20px; }
.designations { text-align: left; margin-bottom: 25px; }
.designations p { margin-bottom: 15px; font-size: 0.95rem; }
/* CORRECTED #3: Icon Color */
.academic-social-links { padding: 10px; display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; }
.academic-social-links a { font-size: 2.2rem; color: #413b3b; /* Dark Grey */ background-color: transparent; transition: color 0.3s, transform 0.3s; }
.academic-social-links a:hover { color: var(--button-default-blue); transform: scale(1.1); }
.publications-list { list-style: none; }
.publications-list li { margin-bottom: 15px; padding-left: 20px; position: relative; }
.publications-list li::before { content: '\f0f6'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 0; top: 5px; color: var(--button-default-blue); }
.publications-list li a { color: var(--text-color); text-decoration: none; }
.publications-list li a:hover { color: var(--button-default-blue); text-decoration: underline; }

/* CORRECTED #2: Video Wrapper Styling */
.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    aspect-ratio: 18 / 10.1; /* Updated ratio */
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}
.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}
.video-wrapper:hover .video-thumbnail {
    opacity: 0.8;
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5rem;
    /* CORRECTED: Changed color to red */
    color: #ff0000; 
    pointer-events: none;
    transition: transform 0.3s ease, color 0.3s ease;
    z-index: 10;
}
.video-wrapper:hover .video-play-button {
    transform: translate(-50%, -50%) scale(1.1);
    color: #ff0000; /* Solid red on hover */
}

/* --- FOOTER --- */
#main-footer { background-color: var(--dark-color); color: #ccc; padding-top: 60px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; padding-bottom: 50px; }
.footer-col h4 { color: var(--light-color); font-size: 1.1rem; margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: #ccc; text-decoration: none; transition: color 0.3s; }
.footer-col a:hover { color: var(--light-color); }
.footer-col address { font-style: normal; }
#newsletter-form { display: flex; margin-top: 10px; }
#newsletter-form input { width: 100%; padding: 10px; border: 1px solid #555; background: #333; color: var(--light-color); border-radius: 3px 0 0 3px; }
#newsletter-form button { padding: 10px 15px; border: none; background: var(--button-default-blue); color: var(--light-color); cursor: pointer; border-radius: 0 3px 3px 0; }
#newsletter-message { font-size: 0.9rem; margin-top: 10px; }
/* CORRECTED #4: Footer Social Links */
.footer-social-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--mobile-border-color);
    text-align: center;
    /* NEW: Set a max-width to control the number of icons per row */
    max-width: 380px; 
    margin-left: auto;
    margin-right: auto;
}
.footer-social-links a {
    font-size: 1.9rem;
    color: #ffffff;
    margin: 0 10px;
    display: inline-block; /* This is the crucial missing property */
    transition: transform 0.3s ease; /* Simplified transition */
}

.footer-social-links .icon {
  width: 1em;    /* matches fa-icon size */
  height: 1em;
  vertical-align: -0.125em;
}


.footer-social-links a:hover {
    color: var(--light-color); /* Keeps the color the same */
    transform: scale(1.15);  /* Makes the icon slightly bigger */
}

.footer-bottom {
    text-align: center !important; /* This forces the text to be centered */
    padding: 20px 0;
    border-top: 1px solid var(--mobile-border-color);
}

/* This class is added by JavaScript during resize to prevent flickering */
body.is-resizing .main-nav {
    transition: none !important;
}

/* --- RESPONSIVE HAMBURGER MENU --- */
@media (max-width: 1100px) {
    /* Hides the desktop navigation UL */
    .main-nav > ul {
        display: none;
    }

    /* This is the container for the slide-out menu */
.main-nav {
    display: block;
    position: fixed;
    top: 2cm;
    left: 0; /* Explicitly set to the left edge */
    right: 0; /* Explicitly set to the right edge */
    width: 100vw; /* Use viewport width for a guaranteed full-screen width */
    max-width: none; /* Override any other max-width rules */
    height: calc(100% - 2cm);
    background-color: var(--light-color);
    overflow-y: auto;
    z-index: 1005;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.4s ease-in-out, visibility 0s 0.4s;
}
    
    /* When the menu is active, it becomes visible and slides into view */
    .main-nav.active {
        transform: translateX(0);
        visibility: visible;
        transition: transform 0.4s ease-in-out;
    }
    
    /* Re-enables the list for the mobile view */
    .main-nav.active > ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 10px;
        align-content: start;
        padding: 10px;
    }
    
    .main-nav > ul > li {
        border-bottom: 1px solid var(--border-color);
    }

    .main-nav li a, .has-submenu > a {
    padding: 15px 10px;
    height: auto;
    line-height: 1.5;
    width: 100%;
    color: var(--dark-color);
    border-bottom: none;
    font-size: 1rem;
    /* These new lines use Flexbox to align the text and arrow */
    display: flex;
    justify-content: space-between;
    align-items: center;
    }

    .main-nav li a.active {
        background-color: var(--button-default-blue);
        color: var(--light-color);
    }

    .main-nav li a:hover, .has-submenu > a:hover {
        background-color: var(--gray-bg);
        color: var(--button-default-blue);
    }
    
    .main-nav li a::after, .has-submenu > a::after {
        display: none;
    }

    .submenu {
        position: static;
        width: 100%;
        box-shadow: none;
        padding: 0;
        padding-left: 15px;
        background-color: transparent;
        display: none;
        border: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }
.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    /* CORRECTED: This keeps it centered while moving it into view */
    transform: translate(0, 0);
}
    .submenu li a {
        border: none;
        padding-top: 10px;
        padding-bottom: 10px;
        text-align: left; /* Aligns text to the left in the dropdown */
    }

    .submenu li a:hover {
        background-color: #e0e0e0;
    }

    .has-submenu.open > .submenu {
        display: block;
        max-height: 500px;
    }

    .has-submenu > a::after {
    content: ' \25BC';
    transition: transform 0.3s;
    color: var(--dark-color);
    /* We no longer need float or display */
    }

    .has-submenu.open > a::after {
        transform: rotate(180deg);
    }

    #hamburger-btn {
        display: block;
    }

    .main-nav .submenu .active-submenu {
            color: hsl(224, 100%, 50%) !important; /* Forces the color to be blue */
            font-weight: bold; /* Makes it stand out more */
    }

}
    p {
        text-align: justify;
    }

    /* This new rule specifically targets the paragraph in the footer bottom */
    .footer-bottom p {
        text-align: center;
    }

/* --- NEW: Active Menu Highlighting & Underlines --- */

/* 2. Highlights the parent dropdown menu (e.g., "Research") when a submenu item is active */
.has-submenu:has(.active-submenu) > a {
    color: #ffffff !important; /* Sky blue highlight */
}

/* 3. Adds a static white underline to the active DESKTOP menu item */
.main-nav > ul > li > a.active::after {
    transform: scaleX(1);
    background-color: #ffffff; /* White underline */
}

/* 3. Adds a static black underline to the active MOBILE menu item */
@media (max-width: 1100px) {


    
    .main-nav li a.active {
        position: relative;
        background-color: #123456; /* Remove the blue background */
        color: var(--light-color); /* Keep text black */
    }
    .has-submenu:has(.active-submenu) > a {
        color: #ffffff !important; /* Sky blue highlight */
    }
    .submenu .active-submenu {
    color: #ff0000; /* Light blue highlight */
}
    .main-nav li a.active::after {
        content: '';
        position: absolute;
        bottom: 5px;
        left: 15px; /* Align with padding */
        right: 15px; /* Align with padding */
        height: 2px;
        background-color: #ffffff; /* Black underline */
    }
}

@media (max-width: 768px) {
    
    .main-nav.active > ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 0px; /* CORRECTED: Reduced the gap between columns */
        align-content: start;
        padding: 10px;
    }

    .main-nav li a, .has-submenu > a {
        padding: 10px; /* CORRECTED: Reduced side padding */
        height: auto;
        line-height: 1.5;
        width: 100%;
        color: var(--dark-color);
        border-bottom: none;
    }

    /* CORRECTED #2: Slider height on mobile */
    .hero-slider {
        height: 30vh; /* Sets the slider to 40% of the mobile screen height */
        aspect-ratio: auto; /* Overrides the desktop aspect ratio */
    }

    .slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent; /* No background */
    color: rgb(255, 255, 255);
    border: none;
    font-size: 1.5rem; /* smaller size */
    font-weight: bold;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease;
    }

    .two-column-layout {
        flex-direction: column;
    }
    .two-column-layout.reverse-on-mobile {
        flex-direction: column-reverse;
    }
    h2.section-title { font-size: 1.8rem; }
    .main-nav > ul {
        grid-template-columns: 1fr;
    }
    /* CORRECTED #3: Icons in single line on mobile */
    .academic-social-links {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
    }
    .academic-social-links a {
        font-size: 1.8rem;
    }
    .footer-social-links {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
    }
    .footer-social-links a {
        font-size: 1.5rem;
    }
    .academic-social-links, .footer-social-links {
        flex-wrap: nowrap;      /* Prevents the icons from wrapping to the next line */
        overflow-x: auto;       /* Allows horizontal scrolling if needed */
        justify-content: flex-start; /* Aligns icons to the left */
        -webkit-overflow-scrolling: touch; /* Improves scrolling on iOS devices */
        scrollbar-width: none;  /* Hides the scrollbar on Firefox */
    }

    /* Hides the scrollbar on Chrome/Safari */
    .academic-social-links::-webkit-scrollbar, .footer-social-links::-webkit-scrollbar {
        display: none;
    }

    /* Optional: Adjust icon size on mobile for better spacing */
    .academic-social-links a {
        font-size: 1.8rem; 
    }

    .footer-social-links a {
        font-size: 1.5rem;
    }
}

/* --- NEW: Footer Call to Action --- */
.cta-text {
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Base style for the premium button */
.cta-btn {
    display: flex; /* Changed to flex to align text and icon */
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;
    padding: 12px 20px !important;
    font-weight: 600 !important;
    background-color: var(--light-color) !important;
    color: var(--dark-color) !important;
    border: 2px solid var(--dark-color) !important;
    position: relative; /* Needed for the icon positioning */
    overflow: hidden; /* Hides the icon initially */
    transition: all 0.4s ease !important;
}

/* Add an arrow icon using a pseudo-element */
.cta-btn::after {
    content: '\f061'; /* Font Awesome arrow-right icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: -50px; /* Start the icon off-screen to the right */
    opacity: 0;
    transition: all 0.4s ease;
}

/* Premium hover animation */
.cta-btn:hover {
    background-color: var(--dark-color) !important;
    color: var(--light-color) !important;
    transform: translateY(-3px); /* Add a slight lift */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Animate the arrow icon into view on hover */
.cta-btn:hover::after {
    right: 20px; /* Move the icon into place */
    opacity: 1;
}


/* --- NEW: CSS-Only Welcome Animation --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 9999;
    /* This transition handles the final fade-out */
    transition: opacity 1s ease, visibility 1s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* This is the container for our animated items */
.preloader-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: 600;
    opacity: 0; /* All items start completely invisible */
}

/* Specific styles for each item */
#anim-welcome { font-size: 3.5rem; }
#anim-favicon img { width: 200px; }
#anim-name { font-size: 3.5rem; }
#anim-explore { font-size: 3.2rem; letter-spacing: 3px; text-transform: uppercase; }

@media (max-width: 768px) {
    #anim-welcome,
    #anim-name,
    #anim-explore {
        width: 100vw; /* Sets the container width to 90% of the screen's width */
        text-align: center; /* Centers the text */
        padding: 0 20px; /* Adds some padding for better readability */             
    }
    #anim-welcome { font-size: 2rem; }
    #anim-favicon img { width: 150px; }
    #anim-name { font-size: 1.9rem; }
    #anim-explore { font-size: 1.8rem; letter-spacing: 2px; }
}

/* The new animation sequence using keyframes */
#preloader.start-animation #anim-welcome {
    animation: fadeInOut 2.5s ease-in-out forwards;
}
#preloader.start-animation #anim-favicon {
    animation: fadeInOut 2.5s ease-in-out 2.5s forwards; /* Starts after 2s */
}
#preloader.start-animation #anim-name {
    animation: fadeInOut 2.5s ease-in-out 5s forwards; /* Starts after 4s */
}
#preloader.start-animation #anim-explore {
    animation: fadeInOut 4.5s ease-in-out 7.5s forwards; /* Starts after 6s */
}

/* A single keyframe for fading in and out */
@keyframes fadeInOut {
    0% { opacity: 0; }
    25% { opacity: 1; }
    75% { opacity: 1; }
    100% { opacity: 0; }
}


/* By default, hide the main content */
#main-header, main, #main-footer {
    opacity: 0;
}
body.loaded #main-header,
body.loaded main,
body.loaded #main-footer {
    opacity: 1;
    transition: opacity 1s ease;
}
@media (min-width: 1380px) {
    /* This rule ensures the logo is pulled to the absolute left edge */
    .header-container .logo {
        margin-left: -90px; /* This cancels out the container's default padding */
    }
}

/* --- NEW: Global Animated Title on Hover --- */
.section-title {
    display: inline-block; /* Ensures underline fits the text width */
    position: relative;
    cursor: default; /* Keeps the cursor normal since it's not a link */
    transition: color 0.3s ease-out;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: -5px; /* Adjust for space between text and line */
    left: 0;
    background-color: var(--button-default-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-out;
}

.section-title:hover {
    color: var(--button-default-blue);
}

.section-title:hover::after {
    transform: scaleX(1);
}

/* --- NEW: Centering for Animated Titles --- */
.title-wrapper {
    text-align: center;
}

/* --- UNIVERSAL BUTTON SECTION STYLING --- */

/* This ensures the heading and buttons are centered */
.button-section {
    text-align: center;
}

/* This adds the animation to the 'Explore Further' heading */
.button-group h3 {
    display: inline-block; /* Required for the underline to fit the text */
    position: relative;
    padding-bottom: 8px; /* Adds space for the underline */
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #444;
    cursor: default;
    transition: color 0.3s ease-out;
}

.button-group h3::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--button-default-blue);
    transform: scaleX(0);
    transform-origin: center; /* Animates from the center for a balanced look */
    transition: transform 0.3s ease-out;
}

.button-group h3:hover {
    color: var(--button-default-blue);
}

.button-group h3:hover::after {
    transform: scaleX(1);
}

/* This styles the buttons below the heading */
.button-group .btn {
    display: inline-block;
    margin: 10px;
}

/* --- NEW: Universal Scroll Animation --- */

/* The starting state for any element you want to animate */
.animate-on-scroll {
    opacity: 0; /* Start invisible */
    transform: translateY(60px); /* Start slightly lower */
    transition: opacity 1s ease-out, transform 1s ease-out;
}

/* The final, visible state of the animated element */
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- NEW: Fix for Active Submenu Highlight --- */
.submenu a.active-submenu {
    color: #a8cfff !important; /* Sky blue highlight */
    font-weight: bold;
}
