/* ==========================================================================
   UI/UX enhancements — loaded after style.css and responsive.css on every page.
   Kept separate from the theme so each change is easy to find or undo.
   ========================================================================== */

/* ---------- Global ---------- */
html { scroll-behavior: smooth; }
/* anchored sections land below the sticky header instead of under it */
[id] { scroll-margin-top: 90px; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #800017;
    outline-offset: 2px;
}

/* ---------- Hero slider ---------- */
.intro-area-2 .intro-content:after {
    background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 45%, rgba(0,0,0,0) 75%);
}
.intro-area-2 .layer-1 h1 {
    text-shadow: 0 2px 12px rgba(0,0,0,0.45);
    margin-bottom: 16px;
}
.hero-sub {
    color: #fff;
    font-size: 19px;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 0 28px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.hero-actions .hero-btn {
    display: inline-block;
    padding: 13px 28px;
    margin: 0 12px 12px 0;
    border-radius: 3px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.hero-btn-primary { background: #800017; color: #fff; border: 2px solid #800017; }
.hero-btn-primary:hover, .hero-btn-primary:focus { background: #5e0011; border-color: #5e0011; color: #fff; }
.hero-btn-ghost { background: transparent; color: #fff; border: 2px solid #fff; }
.hero-btn-ghost:hover, .hero-btn-ghost:focus { background: #fff; color: #800017; }

/* ---------- Inner page banner (About, Services, Contact, Gallery) ---------- */
.breadcumb-overlay {
    background: linear-gradient(90deg, rgba(60,0,10,0.85) 0%, rgba(90,0,15,0.6) 55%, rgba(60,0,10,0.75) 100%);
}
.breadcrumb .section-headline h2 {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.breadcrumb ul li,
.breadcrumb ul li a {
    color: rgba(255,255,255,0.85);
}
.breadcrumb ul li:last-child { color: #fff; font-weight: 700; }
.breadcrumb ul li a:hover { color: #fff; text-decoration: underline; }

/* ---------- Contact form ---------- */
.contact-page .contact-btn {
    background: #800017;
    border-color: #800017;
}
.contact-page .contact-btn:hover,
.contact-page .contact-btn:focus {
    background: #5e0011;
    border-color: #5e0011;
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #800017;
    box-shadow: 0 0 0 3px rgba(128,0,23,0.12);
}

/* ---------- Service detail pages ---------- */
/* banners are set inline with no position, which pins them to the top-left corner */
.page-area[style] {
    background-position: center center !important;
    background-repeat: no-repeat !important;
}
/* photo row: three equal cards whatever the source image size */
.single-services-page .brd img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.single-services-page .brd { margin-bottom: 30px; }
/* logo next to the intro: same height as the text beside it (desktop only; stacks on smaller screens) */
@media (min-width: 992px) {
    .single-services-page .col-md-12 > .row:first-child {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
    }
    .single-services-page .col-md-12 > .row:first-child:before,
    .single-services-page .col-md-12 > .row:first-child:after { display: none; }
    .single-services-page .col-md-12 > .row:first-child > .col-md-3 { position: relative; }
    .single-services-page .col-md-12 > .row:first-child > .col-md-3 .single-well {
        position: absolute;
        top: 0;
        bottom: 40px; /* matches .single-well margin-bottom on the text column */
        left: 15px;
        right: 15px;
        margin: 0;
    }
    .single-services-page .col-md-12 > .row:first-child .well-img,
    .single-services-page .col-md-12 > .row:first-child .well-img img {
        height: 100%;
    }
    .single-services-page .col-md-12 > .row:first-child .well-img img {
        width: 100%;
        object-fit: contain;
        object-position: center top;
    }
}
@media (max-width: 991px) {
    .single-services-page .col-md-12 > .row:first-child .well-img img {
        max-width: 180px;
        margin: 0 auto;
    }
}

/* ---------- Service cards (home page) ---------- */
.img-hover-text12.sty2.has-link { cursor: pointer; }
.img-hover-text12.sty2 {
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.img-hover-text12.sty2 > img {
    width: 100%;
    transition: transform 0.5s ease;
}
.img-hover-text12.sty2:hover > img {
    opacity: 1;
    transform: scale(1.06);
}
.img-hover-text12.sty2 .distext,
.img-hover-text12.sty2:hover .distext {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 90px 22px 20px;
    border-radius: 0;
    text-align: left;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.85) 100%);
}
.img-hover-text12.sty2:hover .distext {
    background: linear-gradient(180deg, rgba(128,0,23,0) 0%, rgba(128,0,23,0.65) 45%, rgba(128,0,23,0.92) 100%);
}
.img-hover-text12.sty2 .distext h3 {
    font-size: 22px;
    line-height: 1.3;
    margin: 0 0 6px;
}
.img-hover-text12.sty2 .distext .hidtext { opacity: 1; }
.img-hover-text12.sty2 .hover-bgcolor2 { display: none; }
.img-hover-text12.sty2 .button24 > a {
    font-size: 12px;
    letter-spacing: 2px;
    opacity: 0.85;
}
.img-hover-text12.sty2 .button24 > a:after {
    content: " \2192";
    letter-spacing: 0;
    display: inline-block;
    transition: transform 0.25s;
}
.img-hover-text12.sty2:hover .button24 > a { opacity: 1; }
.img-hover-text12.sty2:hover .button24 > a:after { transform: translateX(4px); }

/* ---------- Footer bottom bar ---------- */
.footer-area-bottom .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}
.footer-area-bottom .row > div {
    flex: 1 1 0;
    width: auto;
}
.footer-area-bottom .row > div:nth-child(2) { text-align: center; }
.footer-area-bottom .row > div:last-child { text-align: right; }
.footer-area-bottom .row:before,
.footer-area-bottom .row:after { display: none; }
.copyright a {
    color: #fff;
    text-decoration: underline;
}
.copyright a:hover { color: #f3d6db; }
.footer-area-bottom .about-btn {
    background: #fff;
    color: #800017;
    border: 2px solid #fff;
    transition: background 0.25s, color 0.25s;
}
.footer-area-bottom .about-btn:hover,
.footer-area-bottom .about-btn:focus {
    background: transparent;
    color: #fff;
}

/* ---------- Tablet & mobile ---------- */
@media (max-width: 991px) {
    /* hero image is short here: anchor the text to its bottom so the buttons never get cut off */
    .intro-area-2 .slider-content {
        top: auto;
        bottom: 24px;
        margin-top: 0;
    }
    .intro-area-2 .layer-1 h1 { margin-bottom: 14px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
    /* theme pinned the layout to 300px; use the full phone width with a 16px gutter */
    .container {
        width: auto;
        padding-left: 16px;
        padding-right: 16px;
    }

    .intro-area-2 .layer-1 h1 { font-size: 24px; line-height: 32px; }
    .hero-sub { display: none; }
    .mobile-menu .logo { left: 15px; }
    .hero-actions .hero-btn { padding: 10px 18px; font-size: 12px; }

    /* two service cards per row instead of one very long column */
    .all-services > div {
        width: 50%;
        float: left;
        padding-left: 6px;
        padding-right: 6px;
        margin-top: 12px;
    }
    .all-services > div:nth-child(2n+1) { clear: left; }
    .img-hover-text12.sty2 .distext,
    .img-hover-text12.sty2:hover .distext { padding: 50px 12px 12px; }
    .img-hover-text12.sty2 .distext h3 { font-size: 15px; }
    .img-hover-text12.sty2 .button24 > a { font-size: 10px; letter-spacing: 1px; }

    .footer-area-bottom .row > div,
    .footer-area-bottom .row > div:last-child { flex: 1 1 100%; text-align: center; margin-bottom: 14px; }
}

/* ---------- Request Quotation (js/quote.js) ---------- */
.quote-btn {
    border: 0;
    margin-top: 10px;
    cursor: pointer;
    transition: background 0.25s;
}
.quote-btn:hover, .quote-btn:focus-visible { background: #5e0011; color: #fff; }
.quote-btn i { margin-right: 6px; }
.quote-btn-center { text-align: center; padding-top: 40px; clear: both; }

.quote-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000; /* above the header and menus, below the email chooser */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0,0,0,0.55);
}
.quote-modal[hidden] { display: none; }
body.quote-open { overflow: hidden; }
.quote-dialog {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 100%;
    overflow-y: auto;
    background: #fff;
    border-radius: 6px;
    border-top: 5px solid #800017;
    padding: 30px 30px 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.quote-dialog h3 { margin: 0 0 6px; color: #800017; }
.quote-intro { margin: 0 0 18px; color: #666; }
.quote-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: 0;
    background: none;
    font-size: 30px;
    line-height: 1;
    color: #888;
    cursor: pointer;
}
.quote-close:hover { color: #800017; }
.quote-form label {
    display: block;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 700;
    color: #444;
}
.quote-form input,
.quote-form select,
.quote-form textarea {
    display: block;
    width: 100%;
    margin-top: 5px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-weight: 400;
    font-size: 14px;
    color: #333;
    background: #fff;
}
.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
    border-color: #800017;
    box-shadow: 0 0 0 3px rgba(128,0,23,0.12);
    outline: none;
}
.quote-row { display: flex; gap: 14px; }
.quote-row label { flex: 1 1 0; }
.quote-submit {
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: 3px;
    background: #800017;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.25s;
}
.quote-submit:hover { background: #5e0011; }
.quote-note { margin: 10px 0 0; font-size: 12px; color: #888; text-align: center; }
.quote-note:empty { display: none; }
.quote-note-error { color: #c62828; font-size: 14px; }
.quote-submit:disabled { opacity: 0.7; cursor: wait; }

@media (max-width: 767px) {
    .quote-dialog { padding: 24px 18px 18px; }
    .quote-row { display: block; }
}

/* ---------- Submit Resume form: clean dropdowns ---------- */
.apply-page select.form-control {
    height: 50px;
    padding: 0 40px 0 16px;
    border: 1px solid #ccc;
    border-radius: 0;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23800017' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 16px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none;
    color: #333;
    font-size: 14px;
    cursor: pointer;
}
.apply-page select.form-control:invalid { color: #999; } /* placeholder look until a choice is made */
.apply-page select.form-control option { color: #333; }
.apply-page select.form-control:focus {
    border-color: #800017;
    box-shadow: 0 0 0 3px rgba(128,0,23,0.12);
    outline: none;
}

/* ---------- "Sent successfully" dialog (all forms) ---------- */
.form-success-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483001; /* above the quotation form */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0,0,0,0.55);
    animation: formSuccessFade 0.2s ease-out;
}
.form-success-dialog {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 6px;
    border-top: 5px solid #800017;
    padding: 34px 30px 28px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: formSuccessPop 0.25s ease-out;
}
.form-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #800017;
    color: #fff;
    font-size: 30px;
    line-height: 64px;
}
.form-success-dialog h3 { margin: 0 0 10px; color: #800017; font-size: 22px; }
.form-success-dialog p { margin: 0 0 24px; color: #555; font-size: 15px; line-height: 1.6; }
.form-success-ok {
    min-width: 140px;
    padding: 12px 30px;
    border: 0;
    border-radius: 3px;
    background: #800017;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.25s;
}
.form-success-ok:hover,
.form-success-ok:focus { background: #5e0011; outline: none; box-shadow: 0 0 0 3px rgba(128,0,23,0.25); }
@keyframes formSuccessFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes formSuccessPop { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
