:root {
    --primary-color: #0d1b2a;
    /* Navy Blue Deep */
    --secondary-color: #1b263b;
    /* Lighter Navy */
    --accent-color: #415a77;
    /* Accent Blue */
    --light-blue: #778da9;
    --text-color: #333333;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    /* Slightly brighter */
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Smoother transition */
    --section-padding: 100px 0;
    /* More breathing room */
    --border-radius: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Softer, deeper shadow */
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text-color);
    line-height: 1.8;
    /* improved readability */
    overflow-x: hidden;
    scroll-behavior: smooth;
    background-color: var(--white);
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    width: 100%;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    /* Modern tight spacing */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1280px;
    /* Wider container for modern screens */
    margin: 0 auto;
    padding: 0 5%;
    /* Use percentage padding for better tablet safety margins */
    width: 100%;
    /* Ensure it takes width */
}

/* Extra large screens */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
}

@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
}

.section {
    padding: var(--section-padding);
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
}

.btn-primary:hover {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 27, 42, 0.2);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
    padding: 12px 26px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    /* Slight transparency */
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 90px;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease-in-out, background-color 0.3s;
}

.navbar--hidden {
    transform: translateY(-100%);
    box-shadow: none;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 45px;
}

.logo-text {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-links li a.btn-primary::after {
    display: none;
}

/* No underline for button */
.nav-links li a.btn-primary {
    color: var(--white);
    padding: 10px 20px;
    /* Reduced padding from 14px 28px */
}

.nav-links li a.btn-primary:hover {
    color: var(--primary-color);
}

/* ... existing code ... */
/* Contact Button Revert */
.block-btn {
    width: 100%;
    /* Reverted to full width */
    font-size: 1.1rem;
    padding: 16px;
    display: block;
}

.lang-btn {
    background: transparent;
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition);
}

.lang-btn:hover {
    border-color: var(--primary-color);
    background-color: #f8f9fa;
}

.flag-icon {
    width: 24px;
    height: 18px;
    /* Maintain aspect ratio roughly */
    object-fit: contain;
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    color: var(--white);
    margin-top: 0;
    /* Remove top margin, handle with padding or bg */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomEffect 20s infinite alternate;
    /* Subtle zoom */
}

@keyframes zoomEffect {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.hero-bg .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 27, 42, 0.9) 0%, rgba(13, 27, 42, 0.6) 100%);
}

.hero-content {
    margin-top: 80px;
    /* Offset for text */
    text-align: left;
    /* Ensure alignment with logo */
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 24px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    font-size: 1.25rem;
    max-width: 650px;
    opacity: 0.95;
    font-weight: 300;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* Decorative element */
.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    border-top: 5px solid var(--accent-color);
    border-left: 5px solid var(--accent-color);
    border-radius: 20px 0 0 0;
    z-index: -1;
}

.about-text h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
}

.about-text p {
    margin-bottom: 24px;
    color: #555;
    text-align: justify;
    font-size: 1.05rem;
}

/* Vision Mission */
.vision-mission {
    background-color: var(--bg-light);
    position: relative;
}

.vision-box {
    text-align: center;
    margin-bottom: 80px;
}

.vision-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: inline-block;
    max-width: 900px;
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-color);
}

.mission-box h3,
.vision-box h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.mission-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.mission-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.mission-card .number {
    font-size: 2.5rem;
    color: #3A7BD5;
    /* Light blue */
    font-weight: 700;
    position: relative;
    display: block;
    margin-bottom: 15px;
    line-height: 1;
}

.mission-card p {
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* Leadership */
.leadership-hero {
    position: relative;
    padding: 120px 0;
    color: var(--white);
    background-attachment: fixed;
    /* Parallax feel */
}

.leadership-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.leadership-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leadership-bg .overlay-blue {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 27, 42, 0.85);
    /* Slightly darker */
}

.leadership-content {
    max-width: 1400px;
}

.leadership-content h2 {
    font-size: 2.5rem;
    margin-bottom: 32px;
    /* Increased from 24px */
}

.leadership-content p {
    margin-bottom: 40px;
    /* Increased to separate button */
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.service-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    gap: 24px;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.icon-box {
    background-color: #3bb2d01a;
    /* #415a77 with 0.1 opacity roughly or adjusted blue tint */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    /* Circle */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-color);
}

.icon-box svg {
    width: 30px;
    height: 30px;
}

.service-info h3 {
    margin-bottom: 12px;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.service-info ul,
.service-info p {
    color: #555;
    font-size: 0.95rem;
}

/* Clients */
.clients-logo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* 5 cols x 4 rows = 20 items */
    gap: 40px;
    margin-top: 60px;
    align-items: center;
    justify-items: center;
}

.client-logo img {
    filter: none;
    opacity: 1;
    transition: var(--transition);
    max-height: 60px;
}

.client-logo:hover img {
    transform: scale(1.05);
}

/* Leader Message */
/* Leader Grid Alignment Fix */
.leader-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    /* Image Left, Text Right */
    gap: 80px;
    align-items: flex-start;
}

.leader-image {
    width: 100%;
    max-width: 350px;
    /* Constrain container */
}

.leader-image img {
    border-radius: 20px;
    width: 100%;
    height: auto;
    /* Maintain aspect ratio */
    box-shadow: var(--shadow);
}

.leader-text h2 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-top: 0;
    /* Ensure no top margin pushing it down */
}

.leader-text p {
    margin-bottom: 24px;
    color: #555;
    text-align: left;
    /* Strict left align */
}

.signature {
    margin-top: 40px;
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
    display: flex;
    flex-direction: column;
}

.signature strong {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* Contact & Footer */
.contact {
    background-color: var(--bg-light);
}

.contact-form {
    max-width: 700px;
    margin: 60px auto 0;
    background: var(--white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 24px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #fcfcfc;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    background-color: var(--white);
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 27, 42, 0.1);
}

/* Mission Card Number Fix */
.mission-card .number {
    font-size: 2.5rem;
    /* Reduced from 3.5rem */
    color: #3A7BD5;
    font-weight: 700;
    position: relative;
    display: block;
    margin-bottom: 15px;
    line-height: 1;
}

.block-btn {
    width: 100%;
    /* Force full width */
    min-width: 0;
    font-size: 1.1rem;
    padding: 16px;
    display: block;
}



/* Contact Button Fix */
.block-btn {
    /* width: fit-content; */
    /* Only take space needed */
    min-width: 150px;
    /* Reduced min-width */
    font-size: 1rem;
    padding: 14px 28px;
    display: block;
}

/* Leader Grid Alignment Fix */
/* Leader Grid Alignment Fix */


.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 80px 0 30px;
}

.footer-top {
    margin-bottom: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 Equal columns for addresses */
    gap: 60px;
    margin-bottom: 60px;
}

.logo-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    font-size: 1.4rem;
}

/* Old .footer-info removed as it is now part of .footer-grid structure */
/* .footer-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
} */

.info-block h4 {
    color: var(--light-blue);
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-block p {
    font-size: 0.95rem;
    margin-bottom: 12px;
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Animations */
.animate-up,
.animate-left,
.animate-right {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.animate-left {
    transform: translateX(-40px);
}

.animate-right {
    transform: translateX(40px);
}

.visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .mission-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .clients-logo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: 70px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        padding: 30px 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        gap: 0;
        border-top: 1px solid #eee;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links li a {
        display: block;
        padding: 15px;
    }

    .lang-selector {
        margin-top: 15px;
        justify-content: center;
        display: flex;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--primary-color);
        margin: 5px 0;
        transition: var(--transition);
        border-radius: 3px;
    }

    .hamburger.toggle span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.toggle span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.toggle span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .about-grid,
    .leader-grid,
    .footer-grid,
    .services-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .footer-info {
        grid-template-columns: 1fr;
    }

    .about-image,
    .leader-image {
        order: -1;
    }

    .mission-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile specific spacing improvements */
    .section {
        padding: 60px 0;
    }

    .about-text h2,
    .leader-text h2,
    .section-title {
        font-size: 2rem;
    }

    .clients-logo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-form {
        padding: 30px;
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .logo-text {
        font-size: 1rem;
        /* Smaller logo text on smallest screens */
    }

    .btn-primary,
    .btn-outline {
        width: 100%;
        text-align: center;
    }

    .clients-logo-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Leadership Page Specifics */
/* Simpler Header Banner */
.page-hero {
    position: relative;
    padding: 100px 0 60px;
    /* Reduced height */
    color: var(--white);
    background-color: var(--primary-color);
    margin-top: 80px;
    text-align: left;
    /* Align left as requested */
    overflow: hidden;
    /* Ensure image doesn't overflow */
}

.page-hero .hero-bg {
    opacity: 1;
    /* Reset opacity so image is visible */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.page-hero .hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero .overlay-blue {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 27, 42, 0.75);
    /* Dark blue overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: left;
    margin-top: 80px;
    width: 100%;
    /* Ensure full container width */
}

/* Limit text width for readability without shrinking container */
.hero-content h1,
.hero-content p {
    max-width: 800px;
}

/* Ensure container alignment */
.container.hero-content {
    align-items: flex-start;
    /* For flex containers if applicable, though hero-content is block usually */
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.hero-content h1 {
    font-size: 3rem;
    /* Make it big */
}

.section.bg-light {
    background-color: #F1F5F9 !important;
}

.page-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Footer Redesign */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 Columns: Logo/Head vs Ops? Or 3? */
    gap: 40px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
        /* Logo/Info, Head Office, Ops Office */
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* We need to restructure HTML for this grid to work perfectly as 3 cols */
/* Current HTML structure: .footer-brand, .footer-info (.info-block, .info-block) */
/* We will just style the existing blocks to fill the grid */

.footer-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    width: 100%;
}

/* Responsive fixes for footer */
@media (max-width: 768px) {
    .navbar {
        height: 70px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        padding: 30px 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        gap: 0;
        border-top: 1px solid #eee;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links li a {
        display: block;
        padding: 15px;
    }

    .lang-selector {
        margin-top: 15px;
        justify-content: center;
        display: flex;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--primary-color);
        margin: 5px 0;
        transition: var(--transition);
        border-radius: 3px;
    }

    .hamburger.toggle span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.toggle span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.toggle span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .about-grid,
    .leader-grid,
    .services-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-hero,
    .hero-content {
        text-align: left;
    }

    .about-image,
    .leader-image {
        order: -1;
    }

    .mission-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile specific spacing improvements */
    .section {
        padding: 60px 0;
    }

    .about-text h2,
    .leader-text h2,
    .section-title {
        font-size: 2rem;
    }

    .clients-logo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-form {
        padding: 30px;
        margin-top: 30px;
    }
}

/* Profiles */
.profile-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    /* Align Top Left */
    gap: 40px;
    transition: var(--transition);
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.profile-img {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--bg-light);
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.profile-info h4 {
    color: var(--accent-color);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-info p {
    color: #555;
    font-size: 1rem;
}

.profile-info ul {
    list-style: none;
    /* or disc inside */
    margin-bottom: 15px;
    color: #555;
    font-size: 0.95rem;
}

.profile-info ul li {
    margin-bottom: 5px;
    position: relative;
    padding-left: 15px;
}

.profile-info ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Tree Org Chart */
.tree {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    width: 100%;
    overflow-x: auto;
    /* Allow scroll if too wide */
    padding-bottom: 20px;
}

.tree ul {
    padding-top: 20px;
    position: relative;
    transition: all 0.5s;
    display: flex;
    justify-content: center;
}

.tree li {
    float: left;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 20px 5px 0 5px;
    transition: all 0.5s;
}

/* We will use ::before and ::after to draw the connectors */
.tree li::before,
.tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid #ccc;
    width: 50%;
    height: 20px;
}

.tree li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid #ccc;
}

/* Only one child needs no connectors */
.tree li:only-child::after,
.tree li:only-child::before {
    display: none;
}

.tree li:only-child {
    padding-top: 0;
}

/* Remove space from the top of single children */
.tree li:first-child::before,
.tree li:last-child::after {
    border: 0 none;
}

/* Adding the vertical connector from the last nodes */
.tree li:last-child::before {
    border-right: 2px solid #ccc;
    border-radius: 0 5px 0 0;
}

.tree li:first-child::after {
    border-radius: 5px 0 0 0;
}

/* Time to add downward connectors from parents */
.tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid #ccc;
    width: 0;
    height: 20px;
}

.tree-card {
    border: 1px solid #e0e0e0;
    padding: 15px 10px;
    text-decoration: none;
    color: #666;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    display: inline-block;
    border-radius: 8px;
    transition: all 0.5s;
    background: #fff;
    min-width: 180px;
    max-width: 220px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.tree-card strong {
    display: block;
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.tree-card span {
    font-size: 0.85rem;
    font-weight: 600;
}

.tree-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
    border-color: var(--accent-color);
}

/* Values Section */
.values-grid {
    display: flex;
    flex-direction: column;
    /* Single column as requested */
    align-items: flex-start;
    gap: 30px;
    margin-top: 50px;
    max-width: 800px;
    /* Constrain width for single col */
    margin-left: auto;
    margin-right: auto;
}

.value-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.value-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    flex-shrink: 0;
}

.value-content h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.value-content p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

/* Activities Grid Fix */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.activity-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 250px;
}

.activity-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.activity-item:hover img {
    transform: scale(1.05);
}

/* Responsive Leadership */
/* Responsive Leadership */
@media (max-width: 992px) {

    /* Changed from 768px to 992px to cover tablets */
    .hero-content {
        padding-left: 5%;
        /* Restore padding for tablet/mobile */
        padding-right: 5%;
        margin-left: auto;
        margin-right: auto;
        text-align: left;
        /* Keep left align but with padding */
    }

    .profile-card {
        flex-direction: column;
        align-items: center;
        /* Center photos on mobile/tablet */
        text-align: center;
        gap: 20px;
    }

    .activities-grid,
    .values-grid {
        grid-template-columns: 1fr;
    }

    /* Org Chart Responsive Stacking with Connectors */
    .tree {
        display: block;
        padding-bottom: 0;
        overflow-x: visible;
        justify-content: center;
    }

    .tree ul {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* changed from center to flex-start for proper indentation */
        padding-top: 0;
        margin-left: 0;
    }

    .tree li {
        float: none;
        width: 100%;
        text-align: left;
        padding: 20px 0 0 20px;
        border-left: 2px solid #ccc;
        margin-left: 20px;
        position: relative;
    }

    .tree > ul {
        align-items: flex-start; /* root ul left aligned */
        padding-left: 5%; /* give some breathing room from screen edge */
    }

    .tree > ul > li {
        border-left: none;
        margin-left: 0;
        padding-left: 0;
        text-align: left; /* left align Vernilla */
    }

    .tree li:last-child {
        border-left-color: transparent;
    }

    /* Hide desktop connectors */
    .tree ul ul::before,
    .tree li::before,
    .tree li::after {
        display: none !important;
    }

    /* Horizontal line for children */
    .tree li::before {
        content: '';
        position: absolute;
        top: 35px;
        left: 0;
        width: 20px;
        height: 0;
        border-top: 2px solid #ccc !important;
        display: block !important;
    }

    /* Vertical line extension for last child */
    .tree li:last-child::after {
        content: '';
        position: absolute;
        top: 0;
        left: -2px;
        width: 0;
        height: 35px;
        border-left: 2px solid #ccc;
        display: block !important;
    }

    /* Root node shouldn't have horizontal or vertical pseudo lines */
    .tree > ul > li:first-child::before,
    .tree > ul > li:first-child::after,
    .tree > ul > li:last-child::before,
    .tree > ul > li:last-child::after {
        display: none !important;
    }

    .tree-card {
        margin: 0;
        min-width: 200px;
        max-width: 90%;
        display: inline-block;
    }
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    z-index: 2001;
    line-height: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 50%;
    z-index: 2001;
    user-select: none;
    transition: background 0.3s;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Tag Styles for Profiles */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    background-color: #f1f5f9;
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.tag:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Lower branch for Org Chart */
@media (min-width: 993px) {
    .tree li.lower-branch {
        padding-top: 60px;
    }

    .tree li.lower-branch::before,
    .tree li.lower-branch::after {
        height: 60px;
    }
}