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

/* Sticky Footer Layout */
html, body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #2e1a47;
    position: sticky;
    top: 0;
    z-index: 999;
}

#logo {
    display: flex;
    align-items: center;
}

#logo img {
    margin-right: 15px;
}

#sectors h2, .metric h3, .metric i {
    color: #41245f;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
}

h1 {
    color: #41245f;
}

.title h2 {
    color: #fff;
    font-size: 1.3rem;
}

.title h1 {
    font-size: 0.9rem;
    color: #ccc;
}

#menu ul {
    display: flex;
    gap: 20px;
    list-style: none;
}

#menu ul li a {
    color: #fff;
    font-weight: 600;
    padding: 6px 12px;
    transition: background 0.3s, color 0.3s;
}

#menu ul li a:hover,
#menu ul li a.active {
    background-color: #fff;
    color: #2e1a47;
    border-radius: 4px;
}

.btn-primary {
    background-color: #d9e021;
    color: #2e1a47 !important;
    border-radius: 4px;
    padding: 6px 12px;
}

/* Mobile Menu */
#menu-burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

#menu-burger span {
    background: #fff;
    height: 3px;
    margin: 4px 0;
    width: 20px;
}

/* Header */
header {
    background: linear-gradient(to right, #2e1a47, #4b296b);
    color: #fff;
    padding: 80px 30px;
    text-align: center;
}

#section-profile h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

#section-profile p {
    max-width: 700px;
    margin: 0 auto 20px auto;
    font-size: 1.1rem;
}

.btn-primary:hover {
    background-color: #b8c500;
}

/* Metrics & Sectors */
#metrics, #sectors, #services, #cases {
    padding: 60px 20px;
    text-align: center;
}

.metrics-container, .sectors-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.metric, .sector-card, .service-block, .case {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 300px;
    transition: transform 0.3s;
}

.metric i {
    font-size: 2.2rem;
    color: #41245f;
    margin-bottom: 10px;
}

.metric:hover, .sector-card:hover, .service-block:hover, .case:hover {
    transform: translateY(-5px);
}

/* Contact Form */
#contact_form {
    padding: 60px 20px;
    max-width: 600px;
    margin: auto;
}

#contact_form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#contact_form label {
    font-weight: bold;
}

#contact_form input,
#contact_form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

#contact_form input[type="submit"] {
    background-color: #2e1a47;
    color: #fff !important;
    cursor: pointer;
    transition: background 0.3s;
}

#contact_form input[type="submit"]:hover {
    background-color: #1d1030;
}

.service-text, .sector-text, .case-text,
.service-image, .sector-image, .case-image {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Add slight margin between text and image cards */
.service-row, .sector-row, .case-row {
    gap: 20px;
    /* Remove main row background */
    background: transparent;
    /* Remove shadow from main row */
    box-shadow: none;
    /* Remove extra padding */
    padding: 0;
}

.service-row, .sector-row, .case-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin: 40px 0;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Text Column */
.service-text, .sector-text, .case-text {
    flex: 1 1 50%;
    text-align: left;
}

/* Image Container */
.service-image, .sector-image, .case-image {
    flex: 1 1 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
}

/* Image Styling */
.service-image img,
.sector-image img,
.case-image img {
    width: 100%;
    height: auto;
    /* Ensure full image fits */
    object-fit: contain;
    border-radius: 8px;
    /* No cropping */
    max-height: none;       
}

/* Responsive Typography */
h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
}

h3 {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
}

p {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
}

/* Footer */
footer {
    background-color: #2e1a47;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

footer a.cta {
    background-color: #d9e021;
    padding: 10px 20px;
    color: #2e1a47;
    font-weight: bold;
    border-radius: 6px;
    transition: background 0.3s;
}

footer a.cta:hover {
    background-color: #b8c500;
}

/* Footer Legal Links */
footer .legal-links {
    margin-top: 20px;
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

footer .legal-links a {
    color: #ccc;
    text-decoration: underline;
}

footer .legal-links a:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    #menu ul {
        display: none;
        flex-direction: column;
        background-color: #2e1a47;
        position: absolute;
        top: 70px;
        right: 30px;
        width: 200px;
        border-radius: 8px;
        padding: 15px;
    }

    #menu ul li a {
        font-size: 0.85rem;
    }

    #menu ul.show {
        display: flex;
    }

    #menu-burger {
        display: flex;
    }

    .service-row, .sector-row, .case-row {
        flex-direction: column;
        text-align: center;
    }

    .service-text, .sector-text, .case-text,
    .service-image, .sector-image, .case-image {
        flex: 1 1 100%;
    }

    .legal-page {
        padding: 20px;
        font-size: 0.95rem;
    }

    .legal-page h1 {
        font-size: 1.6rem;
    }

    .legal-page h2 {
        font-size: 1.1rem;
    }
    
}

/* Legal Pages Styling */
.legal-page {
    max-width: 900px;
    margin: 60px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    line-height: 1.8;
    font-size: 1rem;
    color: #333;
}

.legal-page h1 {
    font-size: 2rem;
    color: #2e1a47;
    margin-bottom: 20px;
    text-align: center;
}

.legal-page h2 {
    font-size: 1.3rem;
    color: #2e1a47;
    margin-top: 25px;
    margin-bottom: 10px;
}

.legal-page p,
.legal-page ul li {
    margin-bottom: 10px;
}

.legal-page ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.legal-page a {
    color: #2e1a47;
    text-decoration: underline;
}

#captcha-error {
    color: #d9534f; /* Professional red tone */
    font-weight: 500;
    margin-top: 6px;
    display: none;
}