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

body {
    font-family: 'Raleway', sans-serif;
    line-height: 1.6;
    color: #222;
    background-color: #f9f9fb;
}

/* CTA buttons container for hero and other sections */
.cta-container {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Newsletter sign‑up section */
.newsletter {
    background: #f5f5fe;
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid #e5e5f0;
    border-bottom: 1px solid #e5e5f0;
}

.newsletter h3 {
    font-size: 1.8rem;
    color: #3a0ca3;
    margin-bottom: 1rem;
}

.newsletter p {
    max-width: 700px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
    color: #222;
}

.newsletter-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-form input[type="email"] {
    flex: 1 1 250px;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.newsletter-form button {
    background-color: #f72585;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
    background-color: #d0146f;
}

/* Blog section styles */
.blog-section {
    padding: 3rem 2rem;
    background-color: #f9f9fb;
}

.blog-section h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: #3a0ca3;
}

.blog-preview {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
    color: #222;
    /* Centre align the blog summaries on the insights page for a balanced layout */
    text-align: center;
}

.blog-preview h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1b263b;
}

.blog-preview p {
    margin-bottom: 1rem;
}

.blog-preview a {
    color: #f72585;
    font-weight: 600;
}

/* Industries page styles */
.industries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.industry-card {
    background: linear-gradient(135deg, #1e3a8a, #7b2cbf);
    color: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.industry-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    text-align: center;
}

.industry-card p {
    margin: 0;
    color: #f1f5f9;
    line-height: 1.4;
    text-align: center;
}

.industry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* Blog article styles */
.blog-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
    line-height: 1.8;
    color: #222;
}

.blog-article h2 {
    color: #3a0ca3;
    margin-bottom: 1rem;
    text-align: center;
}

.blog-article h3 {
    color: #1b263b;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.blog-article ul {
    padding-left: 1.5rem;
    list-style: disc;
}

.blog-article ul li {
    margin-bottom: 0.5rem;
}

.blog-article a {
    color: #f72585;
    font-weight: 600;
}

/* Founder biography layout */
.founder-bio {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Ensure biography text aligns nicely next to the founder photo. */
.bio-text {
    flex: 1;
    min-width: 250px;
}

/* Style paragraphs within the biography. Remove explicit margins here; spacing will be controlled by margin-bottom property on p tags in HTML. */
.bio-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Stylised quote from the founder. Using italic and accent colour for emphasis */
.founder-quote {
    font-style: italic;
    color: #3a0ca3;
    margin-top: 1rem;
    margin-bottom: 0;
}

.founder-photo {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/*
 * Single-column founder content. Centres the biography text, portrait, quote
 * and call-to-action within a contained width on the page. This layout
 * creates a visual flow: text → portrait → quote → button.
 */
.founder-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.founder-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.founder-photo-large {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin: 1rem auto;
}

.founder-cta {
    margin-top: 1.5rem;
}

.founder-cta .btn {
    display: inline-block;
}

/* Celebration overlay displayed after newsletter subscription */
.celebration {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Make the overlay transparent so only the pop‑up box is visible */
    background-color: transparent;
    z-index: 10000;
    text-align: center;
    color: #3a0ca3;
    padding: 2rem;
}

.hidden {
    display: none;
}

/* Popup container inside celebration overlay */
.celebration-popup {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    padding: 2rem 2.5rem;
    max-width: 400px;
    text-align: center;
    position: relative;
    color: #1b263b;
}

/* Close button for the celebration popup */
.close-popup {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #1b263b;
}

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

/* Navigation styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
    position: relative; /* establish positioning context for dropdown menu */
}

.logo {
    /*
     * When the logo contains an image instead of simple text, we ensure it
     * aligns nicely with the navigation bar. The text styling below acts as
     * fallback for older browsers or when an image is not supplied. When an
     * image is present, these font settings are ignored by the browser.
     */
    font-size: 1.5rem;
    font-weight: 600;
    color: #1b263b;
}

/*
 * Logo image sizing. We constrain the height to 40px and allow the width
 * to scale automatically. The object-fit property ensures the logo
 * maintains its aspect ratio without distortion. The vertical align
 * property helps centre the image relative to the nav links.
 */
.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

/* Hamburger menu icon hidden on desktop */
.hamburger {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: #1b263b;
    user-select: none;
}

.nav-links li a {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: #f72585; /* accent color on hover */
}

/* Hero section */
.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    /* Updated gradient for a sleek, modern feel */
    background: linear-gradient(135deg, #0a192f, #3a0ca3);
    color: #ffffff;
}

.hero-content {
    max-width: 50%;
    min-width: 300px;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 450px;
}

.hero-image-wrapper {
    max-width: 45%;
    min-width: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Section styles */
.section {
    padding: 3rem 2rem;
}

.section h2 {
    font-size: 2rem;
    color: #3a0ca3; /* updated heading color to complement new palette */
    margin-bottom: 1rem;
    text-align: center;
}

/* Subtitle within sections (e.g., for differentiators and comprehensive services) */
.subtitle {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1b263b;
    margin-top: 2rem;
    text-align: center;
}

.section p {
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.7;
    text-align: center;
}

/* Services */
.services .service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.service-item {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item h3 {
    margin-bottom: 0.5rem;
    color: #1b263b;
}

.service-item p {
    text-align: left;
    margin: 0;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Contact */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Service map (visual layout for services on subpage) */
.service-map {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.service-node {
    background: linear-gradient(135deg, #1e3a8a, #7b2cbf);
    color: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    width: calc(50% - 1.5rem);
    min-width: 260px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.service-node .icon {
    font-size: 2rem;
    display: block;
    margin: 0 auto 0.5rem;
}

.service-node h4 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    color: #ffffff;
}

/*
 * Paragraphs inside service nodes should inherit the centre alignment of the card.
 * Explicitly set text-align to centre so that longer lines wrap evenly and
 * maintain consistency across the home page and services page.
 */
.service-node p {
    margin: 0;
    color: #f1f5f9;
    line-height: 1.4;
    text-align: center;
}

.service-node:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .service-node {
        width: 100%;
    }
}
.contact-form label {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #064663;
    box-shadow: 0 0 0 2px rgba(6, 70, 99, 0.2);
}

.btn {
    background-color: #f72585; /* vibrant accent for calls to action */
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.btn:hover {
    background-color: #d0146f;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    background-color: #002e4a;
    color: #ffffff;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    .hero-content {
        max-width: 100%;
    }
    .hero-image-wrapper {
        max-width: 100%;
        margin-top: 1.5rem;
    }
    .nav-links {
        /* Hide navigation links on mobile; they will appear in a dropdown */
        display: none;
        flex-direction: column;
        gap: 1rem;
        position: absolute;
        right: 1rem;
        top: 100%;
        background-color: #fff;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 1rem;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    .nav-links.open {
        display: flex;
    }
    .hamburger {
        display: block;
    }
}