﻿/*
    STYLE GUIDE

    Heading Font: Mrs Saint Delafield // MRS SAINT DELAFIELD
    Body: Raleway

    Gold: #B6A260
    Pink: #E14190
    Darker Purple: #FFFFFF
    Lighter Purple: #6D5395
    Very Light Pink: #FCECF4

*/

:root {
    --primary: #1B2A49;
    --accent: #ffcc00;
    --white: #ffffff;
    --Muted-Grey: #6B7280;
    --Divider: #E5E7EB;
    --body: Helvetica;
}

html, body {
    scroll-behavior: smooth;
    background-color: #F5F7FA;
    color: #222222;
    font-family:var(--body);
}

a[href^="tel"] {
    text-decoration: none; /* Remove underline */
    color: inherit; /* Use the current text color */
    cursor: pointer; /* Ensure it's still clickable but without link styling */
}

/* Standard parallax for desktop */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* iOS-specific fix */
@supports (-webkit-overflow-scrolling: touch) {
    .parallax {
        background-attachment: scroll;
        -webkit-transform: translate3d(0, 0, 0); /* Use this only for iOS */
        will-change: transform;
        background-size: cover;
    }
}


a, a:link, a:active, a:visited {
    color: var(--primary);
    text-decoration: none;
}

    a::after {
        content: ''; /* Empty content for the pseudo-element */
        position: absolute; /* Position it absolutely */
        left: 0; /* Start from the left */
        bottom: 0; /* Align to the bottom of the text */
        height: 1px; /* Thickness of the underline */
        width: 0; /* Start with width 0 */
        background-color: var(--accent); /* Underline color */
        transition: width 0.3s ease; /* Smooth transition for width */
    }


/*------------------------Footer-------------------------------------*/

footer a, footer a:link, footer a:active, footer a:visited, .footerbase a {
    position: relative; /* Position relative for pseudo-element */
    display: inline-block; /* Make the element inline-block to fit the text */
    color: white; /* Start color */
    text-decoration: none; /* Remove default underline */
    transition: color 0.3s ease; /* Smooth color transition */
}

    footer a::after, .footerbase a::after {
        content: ''; /* Empty content for the pseudo-element */
        position: absolute; /* Position it absolutely */
        left: 0; /* Start from the left */
        bottom: 0; /* Align to the bottom of the text */
        height: 1px; /* Thickness of the underline */
        width: 0; /* Start with width 0 */
        background-color: var(--accent); /* Underline color */
        transition: width 0.3s ease; /* Smooth transition for width */
    }

    /* Underline effect for main nav item on hover, but not for images */
    footer a:not(:has(img)), .footerbase a:not(:has(img)) {
        color: white; /* Start color */
    }

        /* Underline effect on hover */
        footer a:not(:has(img)):hover, .footerbase a:not(:has(img)):hover {
            color: var(--accent); /* Change text color on hover */
        }

            /* Underline for text links on hover */
            footer a:not(:has(img)):hover::after, .footerbase a:not(:has(img)):hover::after {
                content: ""; /* Create an empty content for the pseudo-element */
                position: absolute;
                left: 0;
                bottom: 0; /* Position at the bottom of the anchor */
                width: 100%; /* Expand to full width on hover */
                height: 1px; /* Height of the border */
                background-color: var(--accent); /* Border color */
                transition: width 0.3s; /* Smooth transition for width */
            }

    /* For images within anchor tags in the footer */
    footer a img {
        transition: transform 0.3s ease; /* Smooth scaling transition */
    }

    /* Scale images on hover */
    footer a:hover img {
        transform: scale(1.1); /* Slightly scale the image */
    }

.footerbase {
    color: #fff;
    background-color: #162454;
    padding: 10px 0;
    font-size: 9pt;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
}
/* Primary navigation bar styles */
.primarynavbar {
    display: flex;
    flex-direction: column;
    padding: 10px;
}

    .primarynavbar.active {
        display: flex;
        flex-direction: column;
        padding: 10px 10px 2px 10px;
        background-color: var(--primary);
    }

/* Flex container for nav items and logo */
.primarynavbar-content {
    display: flex;
    justify-content: center; /* Center the logo and the strapline */
    align-items: center; /* Vertically center the items */
    position: relative;
    width: 100%;
}

/* Navigation divs */
.nav-container, .nav-containerActive {
    flex: 1;
    position: fixed;
    text-align: center;
    z-index: 5;
    top: 40px;
    transition: top 0.5s ease; /* smooth linear slide */
}

    .nav-container.active, .nav-containerActive {
        top: 15px;
    }


/* Logo styles */
.primarynavbar-brand {
    text-align: center; /* Center the logo text */
    margin: 0 20px; /* Optional margin */
}

.primarynavbar-logo {
    width: 100px; /* Set logo width */
    height: auto;
}

/* NAV ITEM */
.nav-item {
    position: relative;
    display: inline-block;
    margin: 0 5px;
}

    /* MAIN LINK */
    .nav-item > a {
        display: inline-block; /* stable clickable box */
        position: relative; /* if you ever re-add pseudo-elements */
        text-decoration: none;
        color: var(--white);
        padding: 6px 15px;
        font-family: var(--body);
        font-size: 12pt;
        border-bottom: 2px solid var(--white);
        transition: color 0.3s ease, border-color 0.3s ease;
    }

        /* REMOVE UNDERLINE PSEUDO ELEMENT COMPLETELY */
        .nav-item > a::after {
            content: none !important;
            display: none !important;
        }

    /* “ACTIVE” STATE WHILE HOVERING LINK OR DROPDOWN */
    .nav-item:hover > a,
    .nav-item:focus-within > a {
        color: var(--accent);
        border-color: var(--accent);
        text-decoration: none;
    }

/* DROPDOWN */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background-color: var(--primary);
    list-style: none;
    padding: 5px;
    margin: 0;
    min-width: 240px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    /* hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: none; /* small slide */
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

    /* create an invisible bridge between the parent link and the dropdown */
    .nav-dropdown::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: -12px; /* height of the bridge */
        height: 12px;
        background: transparent;
    }

/* SHOW dropdown when hovering parent OR focusing inside (keyboard) */
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}



/* DROPDOWN ITEMS */
.nav-dropdown li {
    margin: 0;
}

    .nav-dropdown li a {
        display: block;
        padding: 8px 10px;
        font-size: 11pt;
        color: var(--white) !important;
        border: none;
        border-bottom: 2px solid var(--white);
        text-decoration: none;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .nav-dropdown li:last-child a {
        border-bottom: none;
    }

    .nav-dropdown li:hover a,
    .nav-dropdown li a:focus {
        background-color: var(--accent);
        color: #fff;
    }

/* Triangle */
.nav-dropdown::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 20px;
    border-width: 0 8px 8px 8px;
    border-style: solid;
    border-color: transparent transparent var(--primary) transparent;
}

.logoInternal {
    width: 180px;
    height: auto;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 5;
    transform: scale(1);
    transform-origin: top left;
    transition: transform 600ms ease-out;
    visibility: visible;
}

    .logoInternal.active {
        transform: scale(0.75); /* 180 → ~135 */
        top: 5px;
        left: 5px;
    }

.logoInternalActive {
    width: 135px;
    height: auto;
    position: fixed;
    top: 5px;
    left: 5px;
    z-index: 5;
    transform: scale(1);
    transform-origin: top left;
    transition: transform 600ms ease-out;
    visibility: visible;
}



.hero-carousel {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    width: 100%;
    margin-top: 0;
}

.hero-images {
    display: none;
}

.hero-slides,
.hero-slide,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-slide {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1.2s ease-in-out, transform 6s ease;
}

    .hero-slide.active {
        opacity: 1;
        transform: scale(1.08);
    }

.hero-overlay {
    background: rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-title {
    font-size: clamp(32px, 5vw, 42px);
    color: var(--accent);
    margin: 0 0 24px;
    line-height: 1.2;
    /*border-left: 8px solid #73a246;
    padding-left: 16px;*/
}

    .hero-title span {
        color: #fff;
    }

.hero-details {
    color: #fff;
    font-size: 18px;
    line-height: 1.6;
}


/*---------------
    HOME GRID 
---------------*/
.home-grid-container {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
}

.home-grid-item {
    position: relative;
    display: inline-block;
    padding: 25px;
    overflow: hidden;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    min-height: 150px;
}

    .home-grid-item:after {
        content: " ";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(44, 44, 44, 0.4);
        opacity: 0;
        transition: 0.5s all ease-in-out;
        -webkit-transition: 0.5s all ease-in-out;
        -moz-transition: 0.5s all ease-in-out;
        z-index: 0;
    }

    .home-grid-item .home-grid-item-text {
        color: #fff;
        bottom: 25px;
        position: absolute;
        transition: 0.5s all ease-in-out;
        -webkit-transition: 0.5s all ease-in-out;
        -moz-transition: 0.5s all ease-in-out;
        z-index: 2;
    }

    .home-grid-item .home-grid-item-link {
        position: absolute;
        bottom: -25%;
        color: var(--accent);
        font-size: 1.2em;
        z-index: 5;
        text-decoration: none;
        background-image: linear-gradient(var(--accent), var(--accent));
        background-size: 0% 2px;
        background-position: 0 100%;
        background-repeat: no-repeat;
        transition: bottom 0.5s ease-in-out, background-size 0.3s ease;
    }

    .home-grid-item:hover .home-grid-item-link {
        bottom: 25px;
    }

    .home-grid-item .home-grid-item-link:hover {
        background-size: 100% 2px;
    }

    .home-grid-item:hover .home-grid-item-text {
        bottom: 60px;
    }

    .home-grid-item:hover:after {
        opacity: 1;
    }


    .home-grid-item.square:before {
        content: ' ';
        display: block;
        width: 100%;
        padding-top: 75%;
    }

    .home-grid-item:first-child {
    }

.home-grid .home-grid-item:nth-child(2) {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
}

.home-grid .home-grid-item:nth-child(3) {
    grid-column: 3 / 5;
    grid-row: 1 / 2;
}


body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: #1a1a1a;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    padding: 20px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav a {
    margin-left: 30px;
    text-decoration: none;
    color: #333;
}

.cta {
    background: #2F7A7B;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
}

/* HERO UPGRADE */
.hero {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 140px 60px;
    background: linear-gradient(135deg,#eef8f8 0%, #ffffff 70%);
    position: relative;
}

    .hero::before {
        content: "";
        position: absolute;
        right: -120px;
        top: -120px;
        width: 500px;
        height: 500px;
        background: #2F7A7B;
        opacity: 0.08;
        border-radius: 50%;
    }

.hero-text {
    flex: 1;
}

    .hero-text h1 {
        font-size: 72px;
        line-height: 1.05;
        color: #193051;
    }

    .hero-text p {
        font-size: 20px;
        max-width: 520px;
        margin-top: 20px;
    }

.hero-image {
    flex: 1;
    height: 460px;
    background: url('https://via.placeholder.com/520x460') center/cover;
    border-radius: 14px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.2);
    transform: translateY(30px);
}

.search-box {
    margin-top: 40px;
    display: flex;
    gap: 10px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.1);
}

    .search-box input {
        padding: 16px;
        border: none;
        flex: 1;
    }

    .search-box button {
        background: #193051;
        color: white;
        border: none;
        padding: 16px 28px;
    }

.section {
    padding: 110px 60px;
}

/* JOBS */
.slider-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 25px;
}

    .slider-controls button {
        border: 1px solid #ddd;
        background: white;
        padding: 8px 12px;
        cursor: pointer;
    }

.jobs {
    display: flex;
    gap: 30px;
    transition: transform 0.5s ease;
}

.job-card {
    min-width: 380px;
    border: 1px solid #e5e7eb;
    padding: 30px;
    border-radius: 12px;
    position: relative;
    transition: 0.4s;
    background: white;
}

    .job-card h3 {
        font-size: 22px;
        color: #193051;
        margin-bottom: 10px;
    }

    .job-card p {
        margin: 6px 0;
    }

.job-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

    .job-actions button {
        padding: 10px 16px;
        border-radius: 6px;
        border: none;
        cursor: pointer;
        font-size: 14px;
    }

.btn-primary {
    background: #2F7A7B;
    color: white;
}

.btn-secondary {
    background: #f1f5f5;
}

.job-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #2F7A7B;
    transform: scaleY(0);
    transition: 0.3s;
}

.job-card:hover::before {
    transform: scaleY(1);
}

.job-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
}

/* PEOPLE */
.people {
    display: flex;
    gap: 70px;
    align-items: center;
}

    .people img {
        width: 440px;
        border-radius: 14px;
        transform: translateX(-40px);
    }

.people-content {
    max-width: 520px;
}

    .people-content button {
        margin-top: 20px;
        padding: 12px 25px;
        background: #2F7A7B;
        border: none;
        color: white;
        border-radius: 6px;
    }

/* SPECIALISMS */
.specialisms {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 25px;
}

.spec {
    border: 1px solid #e5e7eb;
    padding: 40px;
    border-radius: 12px;
    background: white;
    transition: 0.3s;
}

    .spec:hover {
        transform: translateY(-6px);
        border-color: #2F7A7B;
    }

/* CONSULT */
.consult {
    background: #193051;
    color: white;
    text-align: center;
    padding: 140px 20px;
    position: relative;
}

    .consult::after {
        content: "";
        position: absolute;
        left: -120px;
        bottom: -120px;
        width: 350px;
        height: 350px;
        background: #2F7A7B;
        opacity: 0.1;
        border-radius: 50%;
    }

    .consult button {
        background: #2F7A7B;
        border: none;
        padding: 15px 30px;
        margin-top: 20px;
        color: white;
        border-radius: 6px;
    }

/* WHY */
.why {
    background: #f9fafb;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 30px;
}

.why-item {
    padding: 30px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    transition: 0.3s;
}

    .why-item:hover {
        transform: translateY(-5px);
        border-color: #2F7A7B;
    }

.logos {
    display: flex;
    justify-content: space-around;
    margin-top: 50px;
    opacity: 0.6;
}

footer {
    padding: 60px;
    background: #111;
    color: white;
}

.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: 0.8s ease;
}

    .fade-up.show {
        opacity: 1;
        transform: translateY(0);
    }