/**
 * Theme Overrides — custom additions for WordPress theme version.
 */

/* Hero Video — proportional heights matching Slider Revolution fullwidth scaling.
   Formula: height = gridHeight × (viewportWidth / gridWidth), capped at gridHeight.
   Desktop: 1000/1920 = 52.08vw | Tablet: 768/1140 = 67.37vw | Mobile: 960/960 = 100vw */
.hero-video {
    position: relative;
    overflow: hidden;
    height: min(1000px, 52.08vw);
}

@media (max-width: 1239px) {
    .hero-video {
        height: min(768px, 67.37vw);
    }
}

@media (max-width: 1023px) {
    .hero-video {
        height: min(960px, 100vw);
    }
}

.hero-video__player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-video__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Dropdown menu fixes (from original WP custom CSS) */
.dropdown .dropdown-menu {
    margin-top: 0;
    background: transparent;
    border: 0;
    padding-top: 10px;
}

.dropdown .dropdown-menu li {
    background: #fff !important;
    border-right: 1px solid #e9ecef;
    border-left: 1px solid #e9ecef;
}

.dropdown .dropdown-menu li:first-child {
    border-top: 1px solid #e9ecef;
}

.dropdown .dropdown-menu li:last-child {
    border-bottom: 1px solid #e9ecef;
}

.menu-item-has-children a {
    display: inline-block;
}

.dropdown-wrapper {
    vertical-align: middle;
    display: inline-block;
}

@media screen and (max-width: 960px) {
    .current-menu-item.nav-item .nav-link::after {
        display: none;
    }

    .dropdown-wrapper {
        display: inline-block !important;
    }
}

@media (max-width: 1400px) {
    .navbar .container {
        max-width: none !important;
    }
}

/* Navbar nav wrapper — constrain width to match original site spacing */
.navbar-nav-wrapper {
    max-width: 80%;
    width: 100%;
}

@media screen and (max-width: 720px) {
    .navbar-nav-wrapper {
        max-width: 100%;
    }
}

/* Search modal styles */
.search-form .search-field:focus {
    outline: none;
    box-shadow: none;
    border-color: #fff;
}

.search-form .search-field::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Footer text offset color */
.text-offwhite {
    color: rgba(255, 255, 255, 0.7) !important;
}

.text-offwhite a {
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none;
}

.text-offwhite a:hover {
    color: #fff !important;
}

/* Footer rounded top-left */
.rounded-top-left {
    border-top-left-radius: 2rem;
}

/* Logo gallery item — full colour (matches original site) */
.logo-gallery-item {
    max-height: 60px;
    transition: all 0.3s ease;
}

.logo-gallery-item:hover {
    opacity: 0.8;
}

/* Content hub article cards */
.content-hub__article-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-hub__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Social icon sizing */
.social-icon {
    width: 25px;
    height: 25px;
}

/* Fix Bootstrap Icons font path */
@font-face {
    font-family: "bootstrap-icons";
    src: url("../fonts/bootstrap-icons.woff2") format("woff2"),
         url("../fonts/bootstrap-icons.woff") format("woff");
}

/* Neo Sans — self-hosted (replaces Adobe TypeKit) */
@font-face {
    font-family: "neo-sans";
    src: url("../fonts/neo-sans-regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "neo-sans";
    src: url("../fonts/neo-sans-medium.otf") format("opentype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "neo-sans";
    src: url("../fonts/neo-sans-bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Gallery Swiper */
.gallerySwiper .swiper-button-next,
.gallerySwiper .swiper-button-prev {
    color: #333;
}

.gallerySwiper .swiper-pagination-bullet-active {
    background: #333;
}

/* Testimonial Swiper */
.testimonialSwiper .swiper-pagination-bullet-active {
    background: #333;
}

/* Case study featured image */
.case-study-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Service navigation */
.service-nav {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.service-nav .swiper-slide {
    width: auto;
    padding: 0.5rem 1.5rem;
}

.service-nav .swiper-slide a {
    color: #333;
    text-decoration: none;
    font-weight: 400;
    white-space: nowrap;
}

.service-nav .swiper-slide a.current {
    font-weight: 700;
    border-bottom: 2px solid #333;
}

/* Pagination */
.page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.page-numbers .page-numbers {
    padding: 0.5rem 0.75rem;
    border-radius: 50%;
    color: #333;
    text-decoration: none;
}

.page-numbers .page-numbers.current {
    background: #333;
    color: #fff;
}

/* Category filter pills */
.category-filter .btn {
    border-radius: 50rem;
    font-size: 0.875rem;
}

.category-filter .btn.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* Team Grid */
.team-bio-button {
    cursor: pointer;
    transition: background 0.2s ease;
}

.team-bio-button:hover {
    background: rgba(0, 0, 0, 0.03);
}

.profile-button {
    transition: transform 0.3s ease;
}

.profile-button::after {
    content: "+";
    font-size: 1.5rem;
    font-weight: 300;
    color: #333;
}

[aria-expanded="true"] .profile-button::after {
    content: "\2212";
}

.profile-item {
    border-top: 1px solid #e9ecef;
}

/* Video Block */
.video-block .video-wrapper {
    cursor: pointer;
}

.video-block .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.video-block .video-panel {
    background-size: cover;
    background-position: center;
}

.video-block .play-icon {
    width: 60px;
    height: auto;
    z-index: 2;
}

.video-block .video-text {
    font-size: 1.25rem;
    letter-spacing: 0.1em;
    z-index: 2;
}

@media (max-width: 768px) {
    .video-block .play-icon {
        width: 40px;
    }

    .video-block .video-text {
        font-size: 0.875rem;
    }
}

/* WPForms fallback styles — pixel-perfect match when plugin not installed */
.wpforms-container-full .wpforms-form .wpforms-field-container {
    padding: 0;
}

.wpforms-container-full .wpforms-form .wpforms-field {
    padding: 10px 0;
    clear: both;
}

.wpforms-container-full .wpforms-form .wpforms-field-label {
    display: block;
    font-weight: 700;
    font-size: 16px;
    float: none;
    line-height: 1.3;
    margin: 0 0 4px 0;
    padding: 0;
    color: #fff;
}

.wpforms-container-full .wpforms-form .wpforms-required-label {
    color: #ff0000;
    font-weight: 400;
}

.wpforms-container-full .wpforms-form .wpforms-field-medium {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 2px;
    color: #333;
    display: block;
    font-size: 16px;
    font-family: inherit;
    padding: 6px 10px;
    height: 38px;
    width: 100%;
    max-width: 100%;
    line-height: 1.3;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.wpforms-container-full .wpforms-form .wpforms-field-medium:focus {
    border-color: #999;
    outline: none;
    box-shadow: none;
}

.wpforms-container-full .wpforms-form .wpforms-submit-container {
    padding: 10px 0 0 0;
    clear: both;
}

.wpforms-container-full .wpforms-form .wpforms-submit {
    background-color: #eee;
    border: 1px solid #ddd;
    color: #333;
    font-size: 1em;
    font-family: inherit;
    padding: 10px 15px;
    cursor: pointer;
    line-height: 1;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.wpforms-container-full .wpforms-form .wpforms-submit:hover {
    background-color: #ddd;
    border-color: #ccc;
}
