/*
Theme Name: Aquila Fortis Child
Template: williamson
Theme URI: https://aquilafortis.co.za/
Description: Custom child theme for Aquila Fortis.
Author: WebIgnite
Author URI: https://webignite.co.za/
Version: 1.0
*/
/* Services Container */
.services-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

/* Centered Top Row */
.top-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    width: 100%;
    flex-wrap: wrap;
}

/* Bottom Row (Centered Three Items) */
.bottom-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    width: 100%;
    flex-wrap: wrap;
}

/* Service Box */
.service-box {
    width: 31%;
    min-height: 550px;
    background-color: transparent;
    color: #e6e7e8;
    text-align: center;
    padding: 0;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

/* Image */
.service-box img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    margin: 0;
}

/* Info Bar */
.info-bar {
    background-color: #383c3e;
    padding: 16px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Title Inside Info Bar */
.title {
    font-size: 22px;
    font-weight: bold;
    color: #e6e7e8;
    display: block;
    margin-bottom: 5px;
}

/* Read More Button */
.read-more {
    background: #b09f5f;
    border: none;
    color: #e6e7e8;
    cursor: pointer;
    font-weight: normal;
    font-size: 16px;
    padding: 10px 15px;
    transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
    border-radius: 5px;
    text-align: center;
    width: auto;
}

.read-more:hover {
    background: #e6e7e8;
    color: #383c3e;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 999;
}

/* Modal Container */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #e6e7e8;
    color: #383c3e;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    z-index: 1000;
    display: none; /* ✅ REMAINS HIDDEN ON LOAD */
    text-align: left;
    max-height: 80vh;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden; /* ✅ SCROLL stays inside modal box */
}

/* Modal Title */
.modal-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    flex-shrink: 0;
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    color: #383c3e;
    transition: color 0.3s ease-in-out;
}

.modal-close:hover {
    color: #b09f5f;
}

/* Modal Content */
.modal-content {
    font-size: 16px;
    line-height: 1.5;
    overflow-y: auto;
    flex-grow: 1;
    max-height: calc(80vh - 60px);
    padding: 0 10px 10px 0;
    box-sizing: border-box;
}

/* Medium Screens (Tablet Landscape and Smaller Laptops) */
@media screen and (max-width: 1200px) {
    .service-box {
        width: 45%;
        min-height: 500px;
    }
}

/* Tablet Portrait and Small Laptops */
@media screen and (max-width: 900px) {
    .service-box {
        width: 80%;
        min-height: 480px;
    }
}

/* Mobile Adjustments */
@media screen and (max-width: 768px) {
    .services-container {
        gap: 30px;
    }

    .top-row,
    .bottom-row {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .service-box {
        width: 90%;
        min-height: 450px;
    }

    .read-more {
        font-size: 14px;
        padding: 8px 12px;
    }

    .modal {
        width: 95%;
        max-width: 500px;
        top: 55%;
        transform: translate(-50%, -55%);
        max-height: 70vh;
    }

    .modal-content {
        padding: 0 10px 10px 0;
        max-height: calc(70vh - 60px);
        overflow-y: auto;
    }

    .modal-close {
        font-size: 28px;
        top: 15px;
        right: 20px;
    }
}

@media screen and (max-width: 480px) {
    .service-box {
        width: 95%;
        min-height: 400px;
    }

    .modal {
        width: 95%;
        max-width: 400px;
        top: 50%;
        max-height: 70vh;
    }

    .modal-close {
        font-size: 30px;
        top: 10px;
        right: 10px;
    }
}

/* Promo Hover Effect
 * -------------------------------------------------------------- */
.home-promo-border-movement {
    position: relative;
    display: inline-block;
}

/* Ensure the image is above the border */
.home-promo-border-movement .sc_promo_image {
    position: relative;
    display: inline-block;
    z-index: 2; /* Keeps image above the border */
}

/* Static Grey Border (Only on Desktop) */
.home-promo-border-movement .sc_promo_image::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 30px;
    right: -30px;
    bottom: -30px;

    /* Grey border */
    border-right: 30px solid #383c3e; /* Grey */
    border-bottom: 30px solid #383c3e; /* Grey */
    border-left: none;
    border-top: none;

    z-index: 1; /* Moves border behind the image */
}

/* Border Color Fade-in Animation (Only on Desktop) */
.home-promo-border-movement .sc_promo_image::after {
    content: '';
    position: absolute;
    top: 30px;
    left: 30px;
    right: -30px;
    bottom: -30px;

    /* Initially transparent border */
    border-right: 30px solid transparent;
    border-bottom: 30px solid transparent;

    z-index: 1; /* Keeps it behind the image */

    /* Fade-in effect */
    transition: border-color 1s ease-in-out;
}

/* Both Borders Fade-in at the Same Time (Only on Desktop) */
.home-promo-border-movement .sc_promo_image.in-view::after {
    border-right-color: #b09f5f; /* Gold */
    border-bottom-color: #b09f5f; /* Gold */
}

/* Reset when hover ends */
.home-promo-border-movement .sc_promo_image.out-of-view::after {
    border-right-color: transparent;
    border-bottom-color: transparent;
}

/* Promo Scalability
 * -------------------------------------------------------------- */
/* 🔹 Ensure the background image scales properly */
.sc_promo_image {
    background-size: cover !important; /* Default: Cover for large screens */
    background-position: center center !important;
    background-repeat: no-repeat !important;
    width: 75% !important;
    height: 390px !important; /* Match default height */
}

/* 🔹 Remove Borders Completely on Mobile */
@media (max-width: 767px) {
    .sc_promo_image {
        background-size: contain !important; /* Prevents cropping */
        height: auto !important; /* Allows natural resizing */
    }

    .home-promo-border-movement .sc_promo_image::before,
    .home-promo-border-movement .sc_promo_image::after {
        border: none !important; /* Completely remove borders */
        content: none !important;
    }
}

.sc_layouts_row_type_compact .sc_layouts_logo img {
    max-height: 100px !important; /* Adjust as needed */
    width: auto; /* Maintain aspect ratio */
}

.breadcrumb-row {
    background-color: #1A1E1F !important;
    background-image: none !important;
}

html body .vc_custom_1740865793476 {
    background-color: #1A1E1F !important;
    background-image: none !important;
}

html body .sc_layouts_title_caption {
    color: #B09F5F !important;
}

.breadcrumbs .breadcrumbs_item a {
    color: #B09F5F !important;
}

.breadcrumbs .breadcrumbs_item a:hover {
    color: #9A8D50 !important; /* Optional: Slightly darker for hover effect */
}
html body .sc_layouts_menu .sc_layouts_menu_nav li a span {
    color: #FFFFFF !important;
}

html body .sc_layouts_menu .sc_layouts_menu_nav li a:hover span {
    color: #B09F5F !important;
}
