/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *



 */

#submit-loading {
  display: none;
  width: 100%;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  text-align: center;
  background: rgba(0, 0, 0, .4);
  margin: 0;
  padding: 0;
  z-index: 9999;    
}

#submit-loading div {
  opacity: 25%;
}

p:empty {
  height: 0!important;
  padding: 0!important;
  margin: 0!important;
  width: 0!important;
}
/* ------------------- */
/*        setup        */
/* ------------------- */
:root {
    --red: #F21D2F;
    --test-red: #BE3A34;
    --yellow: #F2E635;
    --blue: #1F82BF;
    --mustard: #F2B035;
    --orange: #F2762E;
    --dark: #0D0D0D;
    --txt-color: #535862;
    --roboto: "Roboto", sans-serif;
    --light-grey: #F9FAFB;
}
html{
    scroll-behavior: smooth;
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.main {
    flex: 1;
}
body * {
    font-family: var(--roboto);
}
body a {
    text-decoration: none;
}
h1, h2, h3,
h4, h5, h6{
    font-family: var(--roboto);
}
::selection {
    background-color: var(--yellow);
    color: #101010;
}
::-moz-selection {
    background-color: var(--yellow);
    color: #101010;
}

/* width sizes */
.mw-280 {
    max-width: 280px;
}
.mw-md-280 {
    width: 100%;
}
.mw-480 {
    max-width: 480px;
}
.mw-576 {
    max-width: 576px;
}
.mw-lg-576 {
    width: 100%;
}
.mw-768 {
    max-width: 768px;
}
.mw-lg-768 {
    width: 100%;
}
.mw-991 {
    width: 100%;
    max-width: 991px;
}
.mw-1024 {
    width: 100%;
    max-width: 1024px;
}
.br-16 {
    border-radius: 16px;
    overflow: hidden;
}

/* background colour */
.bg-amf-dark{
    background-color: var(--dark);
}
.bg-amf-mustard{
    background-color: var(--mustard);
}

/* row gap */
.row-gap-64 {
    row-gap: 64px;
}

/* section settings */
.section-p {
    padding-top: 64px;
    padding-bottom: 64px;
}

.single-p {
    padding-bottom: 64px;
}

.section-title h2 {
    color: var(--dark);
    font-size: 30px;
    font-weight: 700;
    line-height: 38px;
    margin-bottom: 24px;
}
.section-title h3 {
    color: var(--dark);
    font-size: 24px;
    font-weight: 600;
    line-height: 32px;
    margin-bottom: 16px;
}

.rich-text-section h2 {
    color: var(--dark);
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
    margin-bottom: 24px;
    margin-top: 24px;
}

.rich-text-section h3 {
    color: var(--dark);
    font-size: 20px;
    font-weight: 700;
    line-height: 30px;
    margin-top: 24px;
    margin-bottom: 16px;
}

.section-title p,
.section-title ul,
.section-content p,
.section-content ul,
.rich-text-section p {
    color: var(--txt-color);
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
}

.section-title p a,
.section-content p a,
.rich-text-section p a {
    color: var(--txt-color);
    text-decoration: underline 2px var(--txt-color);
    transition: opacity 0.2s ease;
}

.section-link:hover,
.section-title p a:hover,
.section-content p a:hover,
.rich-text-section p a:hover {
    opacity: 0.8;
}

.rich-text-section .section-divider{
    margin-top: 48px;
}

/* --------------------- */
/* large image container */
/* --------------------- */
.large-img-container {
    width: 100%;
    max-width: 576px;
    height: 240px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.large-img-container img {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    object-fit: cover;
    position: relative;
}
.img-png {
    width: 100%;
    height: 100%;
    padding: 24px;
    object-fit: contain;
    background-color: var(--granite);
}
.image-border::after {
    position: absolute;
    content: '';
    width: 100%;
    height: 100%;
    box-shadow: inset 0px 0px 0px 5px var(--primary);
    border-radius: 16px;
    left: -8px;
    top: -8px;
}

/* --------------------- */
/* small image container */
/* --------------------- */
.small-img-container {
    width: 100%;
    max-width: 576px;
    height: 240px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.small-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
}

/* --------------- */
/* rich text image */
/* --------------- */
.rich-text-img {
    margin-bottom: 48px;
    width: 100%;
    height: 200px;
    box-shadow: 0.3px 0.5px 0.7px hsl(0deg 0% 63% / 0.34),
        0.4px 0.8px 1px -1.2px hsl(0deg 0% 63% / 0.34),
        1px 2px 2.5px -2.5px hsl(0deg 0% 63% / 0.34);
}
.rich-text-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* -------------------- */
/* Skip to main content */
/* -------------------- */
.skip-to-main-content {
    position: absolute;
    left: -9999px;
    z-index: 9999;
    padding: 1em;
    background-color: black;
    color: #fff;
    opacity: 0;
}

.skip-to-main-content:focus {
    left: 50%;
    top: 1%;
    transform: translateX(-50%);
    opacity: 1;
    border: 1px solid red;
}

/* --------------------- */
/*    Section divider    */
/* --------------------- */
.section-divider {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.section-divider div {
    height: 1px;
    width: 100%;
    max-width: 1300px;
    padding: 0px 32px;
    align-self: center;
    background-color: #D9D9D9;
}

/* ------------------- */
/*       buttons       */
/* ------------------- */

/* primary */
.btn.amf-btn {
    /* background-color: var(--mustard); */
    background-color: var(--test-red);
    border-radius: 8px;
    padding: 12px 18px;
    border: 2px solid #ffffff;
    /* color: var(--dark); */
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}
.btn.amf-btn-dark {
    background-color: var(--dark);
    border-radius: 8px;
    padding: 12px 18px;
    border: 2px solid var(--mustard);
    color: var(--mustard);
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}
.btn.amf-btn:hover,
.btn.amf-btn:active,
.btn.amf-btn:focus,
.btn.amf-btn:focus-visible {
    border-color: var(--blue);
    background-color: #FFFFFF;
    color: var(--dark);
}
.btn.amf-btn-dark:hover,
.btn.amf-btn-dark:active,
.btn.amf-btn-dark:focus,
.btn.amf-btn-dark:focus-visible{
    border-color: var(--dark);
    background-color: var(--mustard);
    color: var(--dark);
}


/* ------------------ */
/*       Navbar       */
/* ------------------ */
.offcanvas.offcanvas-end{
    width: 100%;
}
.amf-nav{
    background-color: #ffffff;
    border-bottom: 2px solid var(--dark);
}
.amf-nav .navbar-brand{
    height: 48px;
}
.navbar-brand img{
    height: 100%;
    object-fit: contain;
    width: 100%;
}
.amf-nav .nav-link{
    color: var(--dark, #0D0D0D);
    font-size: 20px;
    font-weight: 700;
    line-height: 30px;
    white-space: nowrap;
    transition: box-shadow 0.2s ease;
}
.amf-nav .navbar-nav{
    column-gap: 24px;
}
.amf-nav .navbar-nav .nav-link.active,
.amf-nav.navbar-nav .nav-link.show,
.amf-nav .nav-link:hover:not(.active){
    -webkit-box-shadow: inset 0px -6px 0px -1px #000000;
    box-shadow: inset 0px -6px 0px -1px #000000;
}
.amf-nav .btn-close{
    background-image: none;
    color: var(--dark);
    opacity: 1;
}
.amf-nav .lang-switch{
    display: flex;
    justify-content: center;
}
.amf-nav .lang-switch a{
    /* color: var(--dark); */
    color: #ffffff;
    display: block;
    padding: 12px;
    font-weight: 700;
    background-color: var(--dark);
    transition: background-color 0.2s ease;
}
.amf-nav .lang-switch a.active {
    background-color: var(--test-red);
    color: #ffffff;
}
.amf-nav .lang-switch a:first-child {
    border: 1px solid var(--dark);
    border-right-color: transparent;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}
.amf-nav .lang-switch a:last-child {
    border: 1px solid var(--dark);
    border-left-color: transparent;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}
.amf-nav .lang-switch a:hover:not(.active) {
    background-color: var(--dark);
    color: #ffffff;
}
.amf-nav .lang-switch a:first-child:not(.active):hover{
    border-right-color: #ffffff;
}
.amf-nav .lang-switch a:last-child:not(.active):hover{
    border-left-color: #ffffff;
}
.navbar-toggler{
    width: 44px;
    height: 44px;
    padding: 10px 9px;
    border: 1px solid var(--dark);
    color: var(--dark);
    background-color: transparent;
    transition: background-color 0.2s ease;
}
.navbar-toggler:hover,
.navbar-toggler:active,
.navbar-toggler:focus-visible{
    background-color: var(--dark);
    color: var(--mustard);
}

/* -------------- */
/*    homepage    */
/* -------------- */
.home-banner{
    height: 100svh;
}
.home-banner .carousel-item{
    height: 100%;
}
.home-banner .carousel-item img{
    height: 100%;
    object-fit: cover;
}
.home-banner .carousel-item .overlay{
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    align-content: center;
    background-color: rgba(0, 0, 0, 0.35);
}

.home-banner .carousel,
.home-banner .carousel-inner{
    height: 100%;
}
.home-banner h1,
.home-banner h2{
    color: #FFFFFF;
    font-size: 30px;
    font-weight: 800;
    line-height: 38px;
}
.home-banner p{
    color: #FFFFFF;
    font-size: 20px;
    line-height: 30px;
}
.home-banner .carousel-caption{
    text-align: left;
    bottom: unset;
    padding-top: 0;
    padding-bottom: 0;
    position: relative;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
    padding-left: 8px;
    padding-right: 8px;
}
.carousel-caption h1,
.carousel-caption h2{
    max-width: 1024px;
}
.home-banner .carousel-control-next,
.home-banner .carousel-control-prev{
    width: 10%;
}
/* services */
.highlighted{
    display: inline-block;
    padding: 4px 16px;
    /* background-color: var(--mustard); */
    background-color: var(--test-red);
    color: #ffffff!important;
}
.home-services{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 64px 32px;
}
.home-services .service{
    display: flex;
    min-width: 280px;
    max-width: 384px;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    flex: 1 0 0;
    text-align: center;
}
.home-services .service > i{
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-color: var(--dark);
    color: #ffffff;
    align-content: center;
    font-size: 20px;
}
.home-services .service h3{
    color: var(--dark);
    font-size: 18px;
    font-weight: 700;
    line-height: 28px;
}
.home-services .service p{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    color: var(--txt-color);
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 0;
}
a.arrow-link{
    display: block;
    color: var(--dark, #0D0D0D);
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: transparent;
    transition: text-decoration 0.2s ease, color 0.2s ease;
}
a.arrow-link:hover{
    color: var(--red);
    text-decoration-color: var(--red);
}
a.arrow-link i{
    color: var(--red);
    transition: padding 0.2s ease;
}
a.arrow-link:hover i{
    padding-left: 8px;
}
/* projects */
.home-projects{
    background-image: url(/../images/background-pattern.png);
    background-position: top;
    background-size: cover;
}
.bg-amf-dark p{
    color: #ffffff;
}
/* homepage grid */
.home-grid {
    display: grid;
    gap: 10px;
    grid-auto-rows: 240px;
    grid-template-columns: 1fr;
}
.home-grid a {
    grid-column: auto;
    grid-row: auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
    transition: transform 0.2s ease;
}
.home-grid a:hover{
    transform: scale(1.03);
}
.home-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.modal.image-modal{
    z-index: 1057;
}
.image-modal .modal-header{
    background-color: var(--mustard);
    border-bottom: 0;
}
.image-modal .btn-close{
    background-image: none;
    color: var(--mustard);
    background-color: var(--dark);
    padding: 0;
    width: 28px;
    height: 28px;
    opacity: 1;
    border: 1px solid var(--dark);
    transition: background-color 0.2s ease;
}
.image-modal .btn-close:hover{
    background-color: var(--mustard);
    color: var(--dark);
}
.image-modal .btn-close i{
    width: 20px;
    height: 20px;
    text-align: center;
    align-content: center;
}
.image-modal button.modal-btn-left,
.image-modal button.modal-btn-right {
    position: absolute;
    width: 28px;
    height: 28px;
    padding: 0;
    background-color: var(--dark);
    color: var(--mustard);
}
.image-modal button.modal-btn-left:active,
.image-modal button.modal-btn-right:active,
.image-modal button.modal-btn-left:focus-visible,
.image-modal button.modal-btn-right:focus-visible,
.image-modal button.modal-btn-left:hover,
.image-modal button.modal-btn-right:hover{
    background-color: var(--mustard);
    color: var(--dark);
}
.image-modal button.modal-btn-left {
    left: 1%;
    top: 50%;
}
.image-modal button.modal-btn-right {
    right: 1%;
    top: 50%;
}
.image-modal img {
    width: 100%;
    max-height: 900px;
    object-fit: cover;
}
.image-modal .modal-content{
    border-radius: 16px;
    overflow: hidden;
}

/* footer */
footer{
    background-color: var(--dark);
    padding-top: 64px;
    padding-bottom: 48px;
}
.footer-logo{
    width: 210px;
    display: block;
}
.footer-logo img{
    width: 100%;
    object-fit: contain;
}
footer ul{
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
}
footer ul a{
    display: block;
    color: #ffffff;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: transparent;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
footer ul a:hover{
    /* color: var(--mustard); */
    /* text-decoration-color: var(--mustard); */
    color: var(--red);
    text-decoration-color: var(--red);
}
footer ul a i{
    /* color: var(--mustard); */
}
.footer-menu{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    text-align: center;
    row-gap: 32px;
}
.footer-end{
    color: #FFFFFF;
}
.footer-end a{
    color: #FFFFFF;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: transparent;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.footer-end a:hover{
    /* color: var(--mustard); */
    /* text-decoration-color: var(--mustard); */
    color: var(--red);
    text-decoration-color: var(--red);
}
footer .section-divider div{
    background-color: #1F242F;
}

/* ----------------- */
/* Our services page */
/* ----------------- */
.frontend-breadcrumb{
    background-color: var(--light-grey);
    border-bottom: 1px solid rgba(13, 13, 13, 0.08);
    padding: 10px 0;
    ol{
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        list-style: none;
        margin: 0;
        padding: 0;
        gap: 6px;
        font-size: 13px;
    }
    li{
        display: flex;
        align-items: center;
        color: var(--txt-color);
        &:not(:last-child)::after{
            content: '/';
            margin-left: 6px;
            color: rgba(13, 13, 13, 0.3);
        }
        &.active{
            font-weight: 600;
            color: var(--dark);
        }
    }
    a{
        color: var(--txt-color);
        text-decoration: none;
        transition: color 0.2s ease;
        &:hover{
            color: var(--test-red);
        }
    }
}
.subpage-banner{
    background-color: var(--dark);
    background-image: url(/assets/frontend/background-pattern-ab3187c72fbfe584f173ed03afe19d1d14af0cfb54ba7893c7a153b1c543993b.png);
    background-position: top;
    background-size: auto;
    background-repeat: no-repeat;
    padding-top: 64px;
}
.subpage-banner .container{
    margin-top: 64px;
    margin-bottom: 64px;
}
.subpage-banner h1{
    color: #ffffff;
    font-size: 36px;
    font-weight: 700;
    line-height: 44px;
    position: relative;
    z-index: 1;
}
/* .subpage-banner h1::before{
    position: absolute;
    content: '';
    width: 110%;
    height: 100%;
    background-color: var(--test-red);
    z-index: -1;
    left: -10%;
    border-radius: 8px;
} */
.services-details h2{
    color: var(--dark);
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 32px
}
.services-details p{
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    color: var(--txt-color);
}
.img-slider-container{
    width: 100%;
    max-width: 560px;
    border-radius: 16px;
    overflow: hidden;
    height: 200px;
}
.img-slider-container-tall{
    height: 300px;
}
.img-slider-container img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-gallery-img {
    height: 60vh;
    object-fit: contain;
    background-color: #000;
}
#modalInternalCarousel .carousel-item {
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}
.service-modal .modal-header{
    background-color: var(--mustard);
    border-bottom: 0;
}
.service-modal .modal-header .btn{
    background-image: none;
    color: var(--mustard);
    background-color: var(--dark);
    padding: 0;
    width: 28px;
    height: 28px;
    opacity: 1;
    border: 1px solid var(--dark);
    transition: background-color 0.2s ease;

    &:hover{
        background-color: var(--mustard);
        i{
            color:var(--dark);
        }
    }
    i{
        width: 20px;
        height: 20px;
        text-align: center;
        align-content: center;
    }
}

.service-modal button.carousel-control-prev,
.service-modal button.carousel-control-next {
    position: absolute;
    width: 28px;
    height: 28px;
    padding: 0;
    background-color: var(--dark);
    color: var(--mustard);
    opacity: 1;
    font-size: 14px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    &:is(:hover, :active, :focus-visible){
        background-color: var(--mustard);
        color: var(--dark);
    }
}
.service-modal button.carousel-control-prev {
    left: 1%;
    top: 50%;
}
.service-modal button.carousel-control-next {
    right: 1%;
    top: 50%;
}

/* ------------------- */
/*    Projects page    */
/* ------------------- */
.masonry-container{
    column-count: 1;
    column-gap: 24px;
}
.masonry-container a{
    display: block;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
    transition: transform 0.2s ease;
    margin-bottom: 24px;
    width: 100%;
    height: auto;
}
.masonry-container a:hover{
    transform: scale(1.03);
}
.masonry-container img{
    width: 100%;
    /* height: 100%; */
    object-fit: cover;
    object-position: center;
}
/* CTA */
.txt-cta{
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 40px 24px;
    width: 100%;
}
.section-title.txt-cta p{
    font-size: 18px;
    color: var(--dark);
}

/* ---------------- */
/*   Contact page   */
/* ---------------- */
.contact-container{
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
}
.contact-item{
    background-color: var(--dark);
    background-image: url(/assets/frontend/background-pattern-ab3187c72fbfe584f173ed03afe19d1d14af0cfb54ba7893c7a153b1c543993b.png);
    background-position: center;
    background-size: auto;
    background-repeat: no-repeat;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    row-gap: 40px;
    height: 280px;
    min-width: 280px;
    max-width: 420px;
    padding: 24px;
    align-items: flex-start;
    flex: 1 0 0;
    justify-content: space-between;
}
.contact-item > i{
    color: #ffffff;
    background-color: var(--test-red);
    font-size: 20px;
    width: 48px;
    height: 48px;
    border-radius: 9px;
    align-content: center;
    text-align: center;
    flex-shrink: 0;
}
.contact-item h2{
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    line-height: 30px;
    margin-bottom: 8px;
}
.contact-item p{
    color: #ffffff;
    text-overflow: ellipsis;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
}
.contact-item a{
    color: #ffffff;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    position: relative;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: transparent;
    transition: text-decoration 0.2s ease;
    &:hover{
        text-decoration-color: var(--test-red);
    }
}
.map-container{
    width: 100%;
    height: 240px;
    border-radius: 16px;
    overflow: hidden;
    iframe{
        width: 100%;
        height: 100%;
    }
}

.table, .table td{
    text-align: left;
    border-bottom-style: none;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* 1. Give the carousel items a consistent height or aspect ratio */
.img-slider-container .carousel-inner,
.img-slider-container .carousel-item {
    /* You can use a fixed height like 400px, or a responsive aspect ratio */
    aspect-ratio: 4 / 3; /* Adjust this ratio (e.g., 16/9 or 1/1) to fit your design */
    width: 100%;
    overflow: hidden; /* Keeps any zooming from spilling out */
}

/* 2. Force the images to fill that exact space */
.img-slider-container .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* I noticed you already have "img-object-position-center" in your Ruby code,
       but adding this ensures the focus stays in the middle if cropped */
    object-position: center;
}

.img-slider-container-tall .carousel-inner,
.img-slider-container-tall .carousel-item {
    aspect-ratio: 8 / 9;
}

/* updates march 27 */
.section-content h3{
    font-size: 20px;
    line-height: 30px;
    color: var(--txt-color);
    font-weight: 700;
}
.openings-container{
    display: flex;
    flex-direction: column;
    row-gap: 24px;
    width: 100%;
    max-width: 768px;
    margin-left: auto;
    margin-right: auto;
}
.openings-container .opening{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    border: 1px solid var(--dark);
    border-radius: 16px;
    background-color: transparent;
    color: var(--txt-color);
    transition: background-color 0.2s ease;
    overflow: hidden;
    h3{
        color: var(--dark);
        transition: color 0.2s ease;
        font-size: 24px;
        line-height: 32px;
    }
    > div:first-child{
        padding: 24px;
    }
    .arrow{
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        padding: 16px;
        height: auto;
        transition: background-color 0.2s ease;
        border-left: 1px solid var(--dark);
    }
    p{
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }
    &:hover{
        background-color: var(--light-grey);
        h3{
            color: var(--test-red);
        }
        .arrow{
            background-color: var(--dark);
            color: #ffffff;
        }
    }
    &:focus-visible{
        outline-color: var(--test-red);
    }
}

/* form */
.resume-form-card{
    background-color: var(--dark);
    background-image: url(/assets/frontend/background-pattern-ab3187c72fbfe584f173ed03afe19d1d14af0cfb54ba7893c7a153b1c543993b.png);
    background-position: center;
    background-size: auto;
    background-repeat: no-repeat;
    border-radius: 16px;
    padding: 16px;
    form{
        padding: 24px;
        border-radius: 8px;
        background-color: #ffffff;
        margin-bottom: 0;
    }
}
.amf-field{
    margin-bottom: 18px;
}

.amf-label{
    display: flex;
    align-items: center;
    color: var(--txt-color);
    font-family: var(--roboto);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    margin-bottom: 8px;
    i{
        color: var(--test-red);
        width: 16px;
        height: 16px;
        text-align: center;
        flex-shrink: 0;
        margin-right: 8px;
    }
    .amf-req{
        margin-left: 2px;
        color: var(--test-red);
    }
}
.amf-input{
    width: 100%;
    background-color: rgba(0, 0, 0, 0.03);
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    color: var(--txt-color);
    font-family: var(--roboto);
    font-size: 16px;
    line-height: 24px;
    padding: 10px 14px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    outline: none;
}
.amf-input::placeholder{
    color: rgba(0, 0, 0, 0.35);
}
.amf-input:focus{
    border-color: var(--test-red);
    background-color: rgba(255, 255, 255, 0.10);
}
.amf-textarea{
    resize: vertical;
    min-height: 130px;
}
.amf-dropzone{
    position: relative;
    border: 2px dashed rgba(190, 58, 52, 0.2);
    border-radius: 8px;
    background-color: rgba(190, 58, 52, 0.04);
    padding: 32px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.amf-dropzone:hover,
.amf-dropzone.dragover{
    border-color: var(--test-red);
    background-color: rgba(190, 58, 52, 0.08);
}
.amf-dropzone input[type="file"]{
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.amf-dropzone-icon{
    display: block;
    font-size: 2rem;
    color: var(--test-red);
    margin-bottom: 10px;
    --fa-animation-duration: 1.8s;
}
.amf-dropzone-text{
    color: var(--txt-color);
    font-size: 15px;
    margin-bottom: 4px;
    strong{
        color: var(--test-red);
    }
}
.amf-dropzone-hint{
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    margin-bottom: 0;
}

/* ---- File name display ---- */
.amf-file-name {
    margin-top: 10px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.amf-file-name i {
    color: var(--test-red);
}

/* ---- Submit button (extends existing .btn.amf-btn) ---- */
.amf-btn-submit {
    min-width: 260px;
    font-size: 16px;
}

/* ---- Privacy note ---- */
.amf-privacy {
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    text-align: center;
    margin-bottom: 0;
}
.amf-privacy i {
    color: var(--test-red);
}

/* Projects and project details pages */
.project-card{
    width: 100%;
    display: flex;
    flex-direction: column;
    .image-container{
        width: 100%;
        /* height: 185px; */
        aspect-ratio: 16 / 9;
        border-radius: 16px;
        overflow: hidden;
        position: relative;
        transition: border 0.2s ease;
    }
    img{
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: relative;
        transition: transform 0.2s ease;
    }
    .location{
        display: block;
        position: absolute;
        padding: 2px 8px;
        top: 16px;
        background-color: rgba(13, 13, 13, 0.4);
        border: 1px solid rgba(13, 13, 13, 0.6);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        color: #ffffff;
        font-size: 14px;
        border-top-right-radius: 9999px;
        border-bottom-right-radius: 9999px;
    }
    .card-content{
        display: flex;
        flex-direction: column;
        padding: 24px 24px 24px 0;
        background-color: transparent;
        transition: background-color 0.2s ease, padding 0.2s ease;
        border-radius: 0 0 16px 16px;
        div:first-child{
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            column-gap: 8px;
        }
        div:last-child{
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        h3{
            font-size: 18px;
            font-weight: 700;
            color: var(--dark);
        }
        i{
            font-size: 24px;
            color: #ffffff;
            flex-shrink: 0;
            display: none;
        }
        .badge{
            display: block;
            background-color: transparent;
            border: 1px solid rgba(13, 13, 13, 0.6);
            color: var(--dark);
            font-size: 14px;
            font-weight: 400;
            border-radius: 9999px;
            transition: border-color 0.2s ease;
        }
    }
    &:hover{
        img{
            transform: scale(1.1);
        }
        .card-content {
            background-color: var(--test-red);
            padding-left: 24px;
            h3{
                color: #ffffff;
            }
            i{
                display: block;
            }
            .badge{
                color: #ffffff;
                border-color: #ffffff;
            }
        }
        .image-container{
            border-radius: 16px 16px 0 0;
        }
    }
}
.project-stats{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    padding: 16px 0;
    .project-stat{
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 12px 20px;
        background-color: var(--light-grey);
        border: 1px solid rgba(13, 13, 13, 0.1);
        border-radius: 12px;
        min-width: 140px;
    }
    .project-stat-label{
        font-size: 13px;
        font-weight: 400;
        color: var(--txt-color);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        display: flex;
        align-items: center;
        gap: 6px;
        i{
            color: var(--test-red);
        }
    }
    .project-stat-value{
        font-size: 16px;
        font-weight: 600;
        color: var(--dark);
    }
}
.project-desc-badges{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    a{
        display: block;
        padding: 2px 8px;
        top: 16px;
        background-color: rgba(13, 13, 13, 0.2);
        border: 1px solid rgba(13, 13, 13, 0.6);
        color: var(--dark);
        font-size: 14px;
        border-radius: 9999px;
        transition: background-color 0.2s ease;
        &:hover{
            background-color: rgba(190, 58, 52, 0.15);
            border-color: rgb(190, 58, 52, 0.8);
        }
    }
}
.project-masonry {
    margin-right: auto;
    margin-left: auto;
    .masonry {
        columns: 1;
        column-gap: 20px;
    }
    .masonry-item {
        display: block;
        width: 100%;
        margin-bottom: 20px;
        filter: drop-shadow(0px 2px 2px rgba(0, 0, 0, .3));
        transition: transform 0.2s ease, filter .25s ease-in-out;
        &:hover{
            transform: scale(1.03);
            filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, .3));
        }
    }
}
.masonry-item,
.masonry-img {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    object-fit: cover;
}
div[id^="service"] {
    scroll-margin-top: 110px;
}
.project-pill{
    display: inline-block;
    padding: 4px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    border: 1px solid var(--dark);
    border-radius: 9999px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.3s ease, border-color 0.3s ease;
    &::before{
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 0;
        height: 100%;
        background-color: var(--test-red);
        z-index: -1;
        transition: width 0.3s ease;
    }
    &:hover{
        color: #ffffff;
        border-color: var(--test-red);
        &::before{
            width: 100%;
        }
    }
}
/* update to services */
.related-projects {
    display: flex;
    flex-direction: column;
    h3{
        font-size: 16px;
        font-weight: 700;
    }
    ul{
        display: flex;
        flex-direction: row;
        gap: 8px;
        list-style: none;
        padding-left: 0;
        margin-bottom: 0;
        a{
            font-size: 16px;
            color: var(--txt-color);
            text-decoration: underline;
            transition: color 0.2s ease;
            &:hover{
                color: var(--test-red);
            }
        }
    }
}


@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}


@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* homepage carousel update */
.home-banner .carousel {
    .carousel-control-prev, .carousel-control-next{
        width: 28px;
        height: 48px;
        top: 50%;
        opacity: 1;
        background-color: var(--test-red);
        border-radius: 4px;
        border: 1px solid #ffffff;
    }
    .carousel-control-prev{
        margin-left: 4px;
    }
    .carousel-control-next{
        margin-right: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* ------------------- */
/*      404 page       */
/* ------------------- */
.error-404-section {
    background-color: var(--dark);
    background-image: url(/assets/frontend/background-pattern-ab3187c72fbfe584f173ed03afe19d1d14af0cfb54ba7893c7a153b1c543993b.png);
    background-position: top center;
    background-size: auto;
    background-repeat: no-repeat;
    /* min-height: calc(100vh - 80px); */
    display: flex;
    align-items: center;
    padding-top: 180px;
    padding-bottom: 96px;
    min-height: 100%;
}
.error-404-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}
.error-404-code {
    font-size: clamp(100px, 20vw, 200px);
    font-weight: 800;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px #ffffff;
    letter-spacing: -4px;
    user-select: none;
    opacity: 0.75;
}
.error-404-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 560px;
}
.error-404-content h1 {
    color: #ffffff;
    font-size: 36px;
    font-weight: 700;
    line-height: 44px;
    margin-bottom: 0;
}
.error-404-content > p {
    color: #9AA0A8;
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    margin-bottom: 0;
}
/* .error-404-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
} */
.error-404-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid #1F242F;
    width: 100%;
}
.error-404-links-label {
    color: #9AA0A8;
    font-size: 14px;
    margin-bottom: 0;
}
.error-404-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: center;
}
.error-404-links ul li a {
    color: var(--mustard);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
}
.error-404-links ul li a:hover {
    color: #ffffff;
}
@media screen and (min-width: 375px) {}

/* Phablet */
@media screen and (min-width: 425px) {

    /* large image container */
    .large-img-container {
        height: 320px;
    }

    /* small image container */
    .small-img-container {
        height: 320px;
    }

    /* homepage services */
    .home-services .service{
        min-width: 320px;
    }

    /* homepage grid */
    .home-grid {
        grid-auto-rows: 200px;
        grid-template-columns: repeat(2, 1fr);
    }

}

@media screen and (max-width: 575px) {}

@media screen and (min-width: 576px) {

    /* small image container */
    .small-img-container {
        height: 400px;
    }
    .amf-nav .navbar-brand{
        height: 80px;
    }
    .subpage-banner{
        padding-top: 98px;
    }

    /* projects page */
    .masonry-container{
        column-count: 2;
    }

    .map-container{
        height: 400px;
    }

    .resume-form-card{
        padding: 40px 36px;
    }

    .project-masonry .masonry{
        columns: 2;
    }
}

/* Tablet */
@media screen and (min-width: 768px) {
    /* setup */
    .row-gap-64 {
        row-gap: 96px;
    }
    .section-p {
        padding-top: 96px;
        padding-bottom: 96px;
    }
    .single-p {
        padding-bottom: 96px;
    }
    .section-title h2 {
        font-size: 36px;
        line-height: 44px;
    }
    .section-title p,
    .section-title ul,
    .section-content p,
    .section-content ul,
    .rich-text-section p {
        font-size: 18px;
        line-height: 28px;
    }

    .large-img-container {
        height: 400px;
    }

    /* homepage */
    .home-banner h1, .home-banner h2{
        font-size: 48px;
        line-height: 60px;
    }

    /* homepage grid */
    .home-grid {
        grid-auto-rows: 187px;
        grid-template-columns: repeat(3, 1fr);
    }
    .home-grid a:nth-child(1){
        grid-column: 1;
        grid-row: 1 / 3;
    }
    .home-grid a:nth-child(2){
        grid-column: 2 / 4;
    }
    .home-grid a:nth-child(3){
        grid-column-start: 2;
        grid-row: 2 / 4;
        grid-row-start: 2;
    }
    .home-grid a:nth-child(7){
        grid-column-start: 1;
        grid-row-start: 4;
        grid-column: 1 / 3;
    }
    .home-grid a:nth-child(10){
        grid-column-start: 3;
        grid-row-start: 4;
        grid-row: 4 / 6 ;
    }

    /* footer */
    .footer-menu{
        display: flex;
        flex-direction: row;
        justify-content: center;
        column-gap: 32px;
    }

    /* subpage */
    .subpage-banner .container{
        margin-top: 96px;
        margin-bottom: 96px;
    }
    .subpage-banner h1{
        font-size: 48px;
        line-height: 60px;
    }

    /* services */
    .services-details h2 {
        font-size: 30px;
        line-height: 38px
    }
    .img-slider-container{
        height: 400px;
    }

    /* CTA */
    .txt-cta{
        padding: 64px;
    }
    .section-title.txt-cta p{
        font-size: 20px;
    }

    .home-banner .carousel {
        .carousel-control-prev, .carousel-control-next{
            width: 48px;
        }
        .carousel-control-prev{
            margin-left: 2%;
        }
        .carousel-control-next{
            margin-right: 2%;
        }
    }
}


/* Laptop */
@media screen and (max-width:991px) {
    .amf-nav .navbar-nav{
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
        row-gap: 16px;
    }
    .amf-nav .nav-link{
        font-size: 32px;
        line-height: normal;
        text-align: center;
    }
}

@media screen and (min-width: 992px) {
    .mw-lg-576 {
        max-width: 576px;
    }

    .mw-lg-768 {
        max-width: 768px;
    }

    /* large image container */
    .large-img-container {
        height: 654px;
    }
    .large-img-container.responsive-xl{
        height: 400px;
    }

    /* homepage grid */
    .home-grid {
        grid-template-columns: repeat(7, 1fr);
    }
    .home-grid a:nth-child(1){
        grid-column: 1 / 3;
        grid-row: 1 / 3;
    }
    .home-grid a:nth-child(2){
        grid-column-start: 3;
        grid-column: unset;
    }
    .home-grid a:nth-child(3){
        grid-column-start: 4;
        grid-row: unset;
        grid-column: unset;
    }
    .home-grid a:nth-child(4){
        grid-column-start: 5;
        grid-column: 5 / 7;
    }
    .home-grid a:nth-child(5){
        grid-column-start: 7;
    }
    .home-grid a:nth-child(6){
        grid-row-start: 3;
        grid-column: 1 / 3;
    }
    .home-grid a:nth-child(7){
        grid-column: 3 / 5;
        grid-row: 2 / 4;
    }
    .home-grid a:nth-child(8){
        grid-column: 5 / 7;
        grid-row: 2 / 4;
    }
    .home-grid a:nth-child(9){
        grid-column-start: 7;
        grid-row-start: 2;
    }
    .home-grid a:nth-child(10){
        grid-column-start: 7;
        grid-row-start: 3;
        grid-row: unset;
    }

    /* projects */
    .masonry-container{
        column-count: 3;
    }
    .amf-nav .navbar-brand{
        height: 50px;
    }
    .subpage-banner {
        padding-top: 68px;
    }
    .project-masonry .masonry{
        columns: 3;
    }

    .home-banner .carousel {
        .carousel-control-prev{
            margin-left: 3%;
        }
        .carousel-control-next{
            margin-right: 3%;
        }
    }
}

@media screen and (max-width:1199px) {
    .amf-nav .nav-link{
        font-size: 16px;
    }
}
/* Small screen */
@media screen and (min-width: 1200px) {
    .masonry-container{
        column-count: 4;
    }

    /* large image container responsive xl */
    .large-img-container.responsive-xl{
        height: 654px;
    }

    .map-container{
        height: 480px;
    }

    .amf-nav .navbar-brand{
        height: 70px;
    }
    .subpage-banner {
        padding-top: 88px;
    }
    .project-masonry .masonry{
        columns: 4;
    }
}

/* Large screen */
@media screen and (min-width: 1400px) {
    .home-banner .carousel {
        .carousel-control-prev{
            margin-left: 4%;
        }
        .carousel-control-next{
            margin-right: 5%;
        }
    }
}

/* ultra large */
@media screen and (min-width:1536px) {

}
