/* Import Gabarito font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Gabarito:wght@400;500;600;700&display=swap');

/* Base font */
body {
    font-family: 'Gabarito', Arial, sans-serif;
    font-weight: 500;
    font-size: 11pt;
    color: #585452;
    background-color: #fff;
}

/* Ensure footer stays at bottom on short pages */
html, body {
    height: 100%;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main.soe-main {
    flex: 1 0 auto;
}

/* Headings */
h1, .h1 {
    font-family: 'Gabarito', Arial, sans-serif;
    font-weight: 700;
    font-size: 20pt;
    color: #585452;
}
h2, .h2 {
    font-family: 'Gabarito', Arial, sans-serif;
    font-weight: 400;
    font-size: 16pt;
    letter-spacing: 0.04em;
    color: #33CCCC;
}
h3, .h3 {
    font-family: 'Gabarito', Arial, sans-serif;
    font-weight: 800;
    font-size: 14pt;
    color: #585452;
}

h4, .h4 {
    font-family: 'Gabarito', Arial, sans-serif;
    font-weight: 600;
    font-size: 12pt;
    color: #33CCCC;
}

h5, .h5 {
    font-family: 'Gabarito', Arial, sans-serif;
    font-weight: 600;
    font-size: 12pt;
    color: #66CC99;
}
.soe-hero-text {
    font-size:16pt;
}

/* Navbar */
.navbar, .navbar-dark, .navbar-light {
    background-color: #585452 !important;
    color: #fff !important;
    border-bottom: #66CC99 1px solid;
}
.navbar .navbar-brand,
.navbar .navbar-nav .nav-link {
    color: #fff !important;
    font-family: 'Gabarito', Arial, sans-serif;
    font-weight: 500;
}
.navbar .navbar-nav .nav-link.active,
.navbar .navbar-nav .nav-link:focus,
.navbar .navbar-nav .nav-link:hover {
    color: #33CCCC !important;
}

/* Add a subtle top border to active and hovered navigation links */
.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    border-top: 2px solid #33CCCC; /* subtle turquoise border */
    padding-top: calc(0.5rem - 2px); /* adjust padding to compensate for border */
}

/* Stronger specificity to override .navbar .navbar-nav .nav-link { color: #fff !important } */
.soe-navbar .nav-contact .nav-link {
    color: #33CCCC !important;    /* turquoise */
}
.soe-navbar .nav-contact .nav-link .bi {
    color: #33CCCC !important;    /* icon same turquoise */
}

/* Beveled bottom for site navbar without hiding the border color */
.soe-navbar {
    position: relative;
    overflow: visible;
    /* keep the visible border (already set above on .navbar) */
}
.soe-navbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px; /* sit below the border so the border remains visible */
    height: 3px;
    pointer-events: none;
    /* subtle dark-to-light gradient to suggest a bevel */
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.10));
    mix-blend-mode: normal;
    z-index: 0;
}
/* ensure navbar content sits above the bevel */
.soe-navbar > .container {
    position: relative;
    z-index: 1;
}

/* Reduce navbar vertical padding so it's not so deep */
.soe-navbar {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

/* Top navbar contact links: forced turquoise, smaller, compact padding and visible on all sizes */
.soe-navbar .nav-contact {
    align-items: center;
}
.soe-navbar .nav-contact .nav-link {
    color: #33CCCC !important;          /* force turquoise */
    font-size: 0.78rem !important;      /* smaller text */
    padding: 0.15rem 0.4rem !important; /* reduce vertical padding */
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center;
}
.soe-navbar .nav-contact .nav-link .bi {
    color: #33CCCC !important;          /* icon turquoise */
    font-size: 0.70rem !important;
    margin-right: 0.35rem;
}

/* separator bar: make visible but compact on small screens */
.soe-navbar .nav-contact .mx-2 {
    color: rgba(255,255,255,0.55);
    margin-left: 0.35rem !important;
    margin-right: 0.35rem !important;
}

/* small screens: keep links readable but compact */
@media (max-width: 767.98px) {
    .soe-navbar .nav-contact .nav-link {
        font-size: 0.9rem !important;
        padding: 0.2rem 0.5rem !important;
    }
}

/* Stronger: force turquoise for nav-contact links and icons on all sizes */
.soe-navbar .nav-contact .nav-link,
.soe-navbar .nav-contact .nav-link span,
.soe-navbar .nav-contact .nav-link .bi {
    color: #33CCCC !important;
}

/* Make toggler (hamburger) white and compact */
.soe-navbar .navbar-toggler {
    border: 0;
    padding: 0.25rem 0.5rem;
}
.soe-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

/* Small-screen collapse behaviour: let Bootstrap control visibility.
   Hidden when .collapse, visible as column when .show or during .collapsing. */
@media (max-width: 767.98px) {
	.soe-navbar .navbar-collapse {
		/* default / initial display for small screens */
		display: block;
	}

	/* collapsed (hidden) state */
	.soe-navbar .navbar-collapse.collapse {
		display: none;
		height: 0;
		overflow: hidden;
	}

	/* transition state and visible state */
	.soe-navbar .navbar-collapse.collapsing,
	.soe-navbar .navbar-collapse.collapse.show,
	.soe-navbar .navbar-collapse.show {
		display: flex;
		flex-direction: column;
		height: auto;
		overflow: visible;
	}

	/* ordering when visible (keeps contact block at the end) */
	.soe-navbar .navbar-nav:not(.nav-contact) {
		order: 1;
	}
	.soe-navbar .nav-contact {
		order: 2;
	}
}

/* restore natural order at md+ (optional explicitness) */
@media (min-width: 768px) {
    .soe-navbar .navbar-nav,
    .soe-navbar .nav-contact {
        order: 0;
    }
}

/* Footer */
footer, .footer {
    background-color: #585452;
    color: #fff;
    font-family: 'Gabarito', Arial, sans-serif;
    font-weight: 500;
    padding: 2rem 0;
    position: relative;
    border-top: 1px solid rgba(0,0,0,0.12);
    /* ensure footer background remains as intended */
    overflow: visible;
}
footer a, .footer a {
    color: #33CCCC;
    text-decoration: none;
}
footer a:hover, .footer a:focus {
    color: #66CC99;
    text-decoration: underline;
}
footer::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 6px;
    pointer-events: none;
    /* subtle light-to-dark gradient to simulate a bevel */
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(0,0,0,0.10));
    mix-blend-mode: normal;
}

/* Style for copyright text and link */
footer .soe-footer-col p.soe-body small {
        font-weight: 100;
    font-size: 0.65rem;
}
footer .soe-footer-col p.soe-body small a {
    font-weight: 100; /* thinner font weight for the link */
}

/* Buttons */
.btn-primary {
    background-color: #33CCCC;
    border-color: #33CCCC;
    color: #fff;
    font-family: 'Gabarito', Arial, sans-serif;
    font-weight: 600;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #66CC99;
    border-color: #66CC99;
    color: #fff;
}

/* Secondary buttons: green (accent) and dark (dark-grey option) */
.btn-secondary-green {
    background-color: #66CC99;
    border-color: #66CC99;
    color: #fff;
    font-family: 'Gabarito', Arial, sans-serif;
    font-weight: 600;
}
.btn-secondary-green:hover,
.btn-secondary-green:focus,
.btn-secondary-green:active {
    background-color: #57b686; /* slightly darker on hover */
    border-color: #57b686;
    color: #fff;
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(102,204,153,0.15);
}

.btn-secondary-dark {
    background-color: #585452;
    border-color: #585452;
    color: #fff;
    font-family: 'Gabarito', Arial, sans-serif;
    font-weight: 600;
}
.btn-secondary-dark:hover,
.btn-secondary-dark:focus,
.btn-secondary-dark:active {
    background-color: #484545; /* slightly darker on hover */
    border-color: #484545;
    color: #fff;
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(88,84,82,0.15);
}

/* Optional outline variants */
.btn-outline-green {
    background-color: transparent;
    border: 1px solid #66CC99;
    color: #66CC99;
}
.btn-outline-green:hover,
.btn-outline-green:focus {
    background-color: rgba(102,204,153,0.08);
    color: #66CC99;
}

.btn-outline-dark {
    background-color: transparent;
    border: 1px solid #585452;
    color: #585452;
}
.btn-outline-dark:hover,
.btn-outline-dark:focus {
    background-color: rgba(88,84,82,0.06);
    color: #585452;
}

/* Accent colors */
.text-turquoise {
    color: #33CCCC !important;
}
.text-green {
    color: #66CC99 !important;
}
.bg-turquoise {
    background-color: #33CCCC !important;
}
.bg-green {
    background-color: #66CC99 !important;
}
.bg-darkgrey {
    background-color: #585452 !important;
}
.text-darkgrey {
    color: #585452 !important;
}

/* Soft light grey box utility */
.bg-lightgrey-soft {
    background-color: #f3f3f3 !important;
}

.bg-darkgrey {
    background-color: #585452 !important;
}
.soe-highlight-box {
    border: 1px solid rgba(88, 84, 82, 0.15);
}

/* Gradient for contact section (turquoise -> green) */
.bg-gradient-turquoise-green {
    background: linear-gradient(180deg, #33CCCC 0%, #66CC99 100%);
    color: #fff;
}

/* Border utilities: colors + sizes
   Usage examples:
     .border-turquoise-thin            -> border: 1px solid #33CCCC
     .border-green-bottom-medium      -> border-bottom: 2px solid #66CC99
*/
.border-turquoise-thin       { border: 1px solid #33CCCC !important; }
.border-turquoise-medium     { border: 2px solid #33CCCC !important; }
.border-turquoise-top-thin   { border-top: 1px solid #33CCCC !important; }
.border-turquoise-top-medium { border-top: 2px solid #33CCCC !important; }
.border-turquoise-right-thin   { border-right: 1px solid #33CCCC !important; }
.border-turquoise-right-medium { border-right: 2px solid #33CCCC !important; }
.border-turquoise-bottom-thin  { border-bottom: 1px solid #33CCCC !important; }
.border-turquoise-bottom-medium{ border-bottom: 2px solid #33CCCC !important; }
.border-turquoise-left-thin    { border-left: 1px solid #33CCCC !important; }
.border-turquoise-left-medium  { border-left: 2px solid #33CCCC !important; }

.border-green-thin       { border: 1px solid #66CC99 !important; }
.border-green-medium     { border: 2px solid #66CC99 !important; }
.border-green-top-thin   { border-top: 1px solid #66CC99 !important; }
.border-green-top-medium { border-top: 2px solid #66CC99 !important; }
.border-green-right-thin   { border-right: 1px solid #66CC99 !important; }
.border-green-right-medium { border-right: 2px solid #66CC99 !important; }
.border-green-bottom-thin  { border-bottom: 1px solid #66CC99 !important; }
.border-green-bottom-medium{ border-bottom: 2px solid #66CC99 !important; }
.border-green-left-thin    { border-left: 1px solid #66CC99 !important; }
.border-green-left-medium  { border-left: 2px solid #66CC99 !important; }

.border-darkgrey-thin       { border: 1px solid #585452 !important; }
.border-darkgrey-medium     { border: 2px solid #585452 !important; }
.border-darkgrey-top-thin   { border-top: 1px solid #585452 !important; }
.border-darkgrey-top-medium { border-top: 2px solid #585452 !important; }
.border-darkgrey-right-thin   { border-right: 1px solid #585452 !important; }
.border-darkgrey-right-medium { border-right: 2px solid #585452 !important; }
.border-darkgrey-bottom-thin  { border-bottom: 1px solid #585452 !important; }
.border-darkgrey-bottom-medium{ border-bottom: 2px solid #585452 !important; }
.border-darkgrey-left-thin    { border-left: 1px solid #585452 !important; }
.border-darkgrey-left-medium  { border-left: 2px solid #585452 !important; }

.border-lightgrey-thin       { border: 1px solid #969696 !important; }
.border-lightgrey-medium     { border: 2px solid #969696 !important; }
.border-lightgrey-top-thin   { border-top: 1px solid #969696 !important; }
.border-lightgrey-top-medium { border-top: 2px solid #969696 !important; }
.border-lightgrey-right-thin   { border-right: 1px solid #969696 !important; }
.border-lightgrey-right-medium { border-right: 2px solid #969696 !important; }
.border-lightgrey-bottom-thin  { border-bottom: 1px solid #969696 !important; }
.border-lightgrey-bottom-medium{ border-bottom: 2px solid #969696 !important; }
.border-lightgrey-left-thin    { border-left: 1px solid #969696 !important; }
.border-lightgrey-left-medium  { border-left: 2px solid #969696 !important; }

/* Ensure hero carousel has a minimum height and slides cover their background */
.soe-hero {
    min-height: 320px;
    width: 100%;
    display: block;
}
/* apply min-height to inner elements instead of forcing height:100% */
.soe-hero .carousel-inner,
.soe-hero .carousel-item,
.soe-hero .soe-hero-slide {
    width: 100%;
    min-height: 320px;
}
/* slide fills container and background covers while preserving aspect ratio */
.soe-hero .soe-hero-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background-repeat: no-repeat;
    background-size: cover;       /* cover fills width & height, preserving aspect ratio */
    background-position: center;  /* center the image */
}

/* NEW: Feature section (background image + 60% right overlay + content above) */
.soe-hero-feature .feature-bg {
    position: relative;
    min-height: 320px;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}
.soe-hero-feature .feature-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    z-index: 1;
    pointer-events: none;
}
.soe-hero-feature .feature-content {
    position: relative;
    z-index: 2;
    margin-top: auto; /* automatically adjust spacing */
    margin-bottom: auto; /* automatically adjust spacing */
    padding-top: 2rem; /* optional: add padding for consistent spacing */
    padding-bottom: 2rem; /* optional: add padding for consistent spacing */
}

/* Ensure the text column is readable on small screens */
.soe-hero-feature .feature-content .soe-secondary-heading,
.soe-hero-feature .feature-content .soe-body {
    color: #fff;
}
@media (max-width: 767.98px) {
    .soe-hero-feature .feature-overlay {
        width: 100%; /* overlay stacks under content on small screens */
        opacity: 0.85;
    }
    .soe-hero-feature .feature-content {
        padding: 1rem;
    }
}

/* Add an inset shadow to the top border of the soe-services section */
.soe-services {
    position: relative;
    background: linear-gradient(270deg, rgba(0, 0, 0, 0.15) 1%, #ffffff00 5%);
    background: -webkit-linear-gradient(270deg, rgba(0, 0, 0, 0.15) 1%, #ffffff00 5%);
    background: -moz-linear-gradient(270deg, rgba(0, 0, 0, 0.15) 1%, #ffffff00 5%);
}

/* Latest articles: semi-transparent white card background (60% opacity) */
.latest-articles .card {
    background-color: rgba(255,255,255,0.8);
    /* keep the card shadow and border behaviour */
    border: none;
}
.latest-articles .card .card-body {
    background: transparent; /* card-body sits on semi-transparent card */
}
/* Utility: 75% white background (use on containers or overlays) */
.bg-white-75 {
    background-color: rgba(255, 255, 255, 0.75) !important;
}
/* Utility: 50% white background (use on containers or overlays) */
.bg-white-50 {
    background-color: rgba(255, 255, 255, 0.5) !important;
}

/* Optional lighter variant if needed */
.bg-white-35 {
    background-color: rgba(255, 255, 255, 0.35) !important;
}

/* Ensure service boxes use flex layout so children can stretch to equal heights */
.soe-service-box {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Make the heading fill available vertical space and center content */
.soe-service-box .soe-secondary-heading {
    flex: 1 0 auto;                 /* grow to fill box */
    display: flex;
    align-items: center;            /* vertical centring of heading text */
    justify-content: center;        /* horizontal centring */
    margin: 0;                      /* avoid extra spacing interfering with height */
    padding: 1.25rem;               /* keep existing spacing */
    min-height: 90px;              /* fallback to keep consistent visual height */
    box-sizing: border-box;
    text-align: center;
}

/* If some boxes include extra elements below the heading, keep them at the end */
.soe-service-box > *:not(.soe-secondary-heading) {
    /* ensure footer elements (icons, buttons, etc.) sit after the flexible heading */
}

/* Mobile navbar collapse — strong override to avoid flicker (visible only when Bootstrap sets .show or during .collapsing) */
@media (max-width: 767.98px) {
    /* Ensure the collapse container can be hidden by Bootstrap (default hidden) */
    .soe-navbar .navbar-collapse.collapse {
        display: none !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* During the collapsing transition and when shown, present as a vertical flex column.
       Use !important so earlier rules won't interfere. Keep height:auto so Bootstrap's JS
       does not immediately toggle the state back. */
    .soe-navbar .navbar-collapse.collapsing,
    .soe-navbar .navbar-collapse.collapse.show,
    .soe-navbar .navbar-collapse.show {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* Keep nav ordering only when the collapse is visible (these don't force the collapse open) */
    .soe-navbar .navbar-nav:not(.nav-contact) {
        order: 1;
    }
    .soe-navbar .nav-contact {
        order: 2;
    }
}

/* Override the hover behaviour for the two contact links so they keep their original padding and no top border */
.soe-navbar .nav-contact .nav-link:hover,
.soe-navbar .nav-contact .nav-link:focus {
    border-top: none !important;
    padding-top: 0.15rem !important;
}

/* NEW: Apply a dark text-shadow to the hero text content */
.soe-hero-feature #hero-text * {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.soe-service-box:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* Training highlight badges */
.soe-training-highlight {
    background: #ffffff;
    border: 1px solid rgba(88, 84, 82, 0.2);
    border-radius: 0.75rem;
    padding: 1.75rem 1rem;
    text-align: center;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.soe-training-highlight i {
    font-size: 2.25rem;
    color: #33CCCC;
    display: block;
    margin-bottom: 0.5rem;
}
.soe-training-highlight span {
    display: block;
    font-family: 'Gabarito', Arial, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    color: #585452;
}
.soe-training-highlight:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}
.soe-training-calendar .table {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 0.5rem;
    overflow: hidden;
}
.soe-training-calendar thead th {
    border: 0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.soe-training-calendar tbody td {
    vertical-align: middle;
    border-color: rgba(88, 84, 82, 0.15);
}
.soe-training-calendar .text-warning {
    color: #f0ad4e !important;
}
.soe-training-calendar .text-danger {
    color: #d9534f !important;
}
.soe-training-calendar a {
    color: #33CCCC;
}
.soe-training-calendar a:hover,
.soe-training-calendar a:focus {
    color: #66CC99;
}

/* Scroll to top button: small square, always on top */
.soe-scroll-buttons {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.5rem;
    z-index: 1050;
}
.soe-scroll-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.35rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #33CCCC;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
    cursor: pointer;
}
.soe-scroll-btn:hover {
    background: #66CC99;
}
.soe-scroll-btn i {
    font-size: 1.1rem;
    line-height: 1;
}
