.ad-slider {
    --ad-bg: #225D77;
    --radius: 24px;
    --min-h: 557px;
    background: var(--ad-bg);
    color: #fff;
    width: min(100%, var(--max-w));
    min-height: var(--min-h);
    margin-inline: auto;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden
}

.ad-slides {
    position: absolute;
    inset: 0
}

.ad-slide {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .6s ease
}

.ad-slide.is-active {
    opacity: 1;
    visibility: visible
}

.ad-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center
}

.ad-dots {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2
}

.ad-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .5);
    cursor: pointer
}

.ad-dot.is-active {
    background: #fff
}

.ad-prev, .ad-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .25);
    color: #fff;
    cursor: pointer;
    z-index: 2
}

.ad-prev {
    left: 8px
}

.ad-next {
    right: 8px
}

.ad-prev:hover, .ad-next:hover {
    background: rgba(0, 0, 0, .35)
}

.ad-dot:focus, .ad-prev:focus, .ad-next:focus {
    outline: 2px solid #fff;
    outline-offset: 2px
}

@media (min-width: 1200px) {
    .ad-slider {
        border-radius: 20px
    }
}

@media (min-width: 761px) and (max-width: 1024px) {
    .ad-slider {
        --max-w: 920px;
        --min-h: 420px;
        border-radius: 20px
    }
}

@media (max-width: 760px) and (min-width: 569px) {
    .ad-slider {
        --max-w: 720px;
        --min-h: 360px;
        border-radius: 18px
    }
}

@media (max-width: 568px) {
    .ad-slider {
        --max-w: 100%;
        --min-h: 165px;
        border-radius: 16px
    }
}

.ad-banner1 {
    --ad-bg: #225D77;
    --radius: 24px;
    --min-h: 557px;
    background: var(--ad-bg);
    color: #fff;
    width: min(100%, var(--max-w));
    min-height: var(--min-h);
    margin-inline: auto;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 700;
    line-height: 100%;
    font-size: 80px;
    padding: 1rem 1.25rem
}

@media (min-width: 1200px) {
    .ad-banner1 {
        border-radius: 20px
    }
}

@media (min-width: 761px) and (max-width: 1024px) {
    .ad-banner1 {
        --max-w: 920px;
        --min-h: 420px;
        font-size: 54px;
        border-radius: 20px;
        padding: 16px 20px
    }
}

@media (max-width: 760px) and (min-width: 569px) {
    .ad-banner1 {
        --max-w: 720px;
        --min-h: 360px;
        font-size: 44px;
        border-radius: 18px;
        padding: 14px 16px
    }
}

@media (max-width: 568px) {
    .ad-banner1 {
        --max-w: 100%;
        --min-h: 280px;
        font-size: 32px;
        border-radius: 16px;
        padding: 12px 14px;
        line-height: 120%;
        word-break: break-word;
        hyphens: auto
    }
}


.ad-banner2 {
    --ad-bg: #C59D63;
    --radius: 24px;
    --min-h: 557px;
    background: var(--ad-bg);
    color: #fff;
    width: min(100%, var(--max-w));
    min-height: var(--min-h);
    margin-inline: auto;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 700;
    line-height: 100%;
    font-size: 80px;
    padding: 1rem 1.25rem
}

@media (min-width: 1200px) {
    .ad-banner2 {
        border-radius: 20px
    }
}

@media (min-width: 761px) and (max-width: 1024px) {
    .ad-banner2 {
        --max-w: 920px;
        --min-h: 420px;
        font-size: 54px;
        border-radius: 20px;
        padding: 16px 20px
    }
}

@media (max-width: 760px) and (min-width: 569px) {
    .ad-banner2 {
        --max-w: 720px;
        --min-h: 360px;
        font-size: 44px;
        border-radius: 18px;
        padding: 14px 16px
    }
}

@media (max-width: 568px) {
    .ad-banner2 {
        --max-w: 100%;
        --min-h: 280px;
        font-size: 32px;
        border-radius: 16px;
        padding: 12px 14px;
        line-height: 120%;
        word-break: break-word;
        hyphens: auto
    }
}


#toast-container {
    z-index: 200000 !important;
}

#toast-container > .toast-success {
    background-color: #198754 !important;
    color: #fff !important;
}

#toast-container > .toast-error {
    background-color: #dc3545 !important;
    color: #fff !important;
}

#toast-container > .toast-warning {
    background-color: #ffc107 !important;
    color: #111 !important;
}

#toast-container > .toast-info {
    background-color: #0dcaf0 !important;
    color: #111 !important;
}

#toast-container > .toast {
    border-radius: .5rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15) !important;
    background-image: none !important;
}

#toast-container .toast-progress {
    background: rgba(255, 255, 255, .7) !important;
}


.splide { border-radius: 20px; overflow: hidden; }
.splide__slide img { width: 100%; height: 100%; object-fit: contain; background: #225D77; }




/* Custom Colors and Variables */
:root {
    --primary-dark: #225D77; /* Deep Blue/Teal (Maskan primary) */
    --primary-light: #C59D63; /* Maskan's Gold/Tan (Accent) */
    --secondary-light: #5A6A74; /* Darker grey for snippets */
    --success-soft: #d4edda;
    --success-dark: #155724;
    --warning-soft: #fff3cd;
    --warning-dark: #856404;
    --info-soft: #cce5ff;
    --info-dark: #004085;
    --danger-soft: #f8d7da;
    --danger-dark: #721c24;
}

.text-primary-dark { color: var(--primary-dark) !important; }
.text-secondary-light { color: var(--secondary-light) !important; }

/* Button Style */
.btn-primary-dark-solid {
    background-color: var(--primary-dark);
    color: #fff;
    border-color: var(--primary-dark);
    transition: background-color 0.2s, transform 0.2s;
    padding-left: 2rem;
    padding-right: 2rem;
}

.btn-primary-dark-solid:hover {
    background-color: #1a495c;
    border-color: #1a495c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Grid Customization for 4 columns on extra-large screens only */
@media (min-width: 1200px) {
    .featured-projects-section .row-cols-xl-4 > * {
        flex: 0 0 auto;
        width: 25%;
    }
}


/* Card Styling (High Lift & Sexy Shadow) */
.project-card {
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    cursor: pointer;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.2) !important;
}

/* ************************************************* */
/* *** CORE CHANGE: Ensuring a 1:1 Image Ratio *** */
/* ************************************************* */

.project-fig {
    position: relative;
    /* Remove fixed height */
    height: 0;
    /* Padding-top equal to 100% of the container width creates the 1:1 aspect ratio */
    padding-top: 100%;
    overflow: hidden;
}



.project-card:hover .project-img {
    transform: scale(1.1);
}

/* ************************************************* */
/* *** End of Core Image Change *** */
/* ************************************************* */

.project-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.9rem;
    padding: 0.5em 1em;
    border-radius: 50rem;
    font-weight: 700;
    z-index: 10;
    letter-spacing: 0.5px;
}

/* Overlay for full description on hover */
.project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: .5rem;
    padding: 1.25rem;
    background: linear-gradient(to top, rgba(34, 93, 119, 0.9), rgba(34, 93, 119, 0.1));
    color: #fff;
    opacity: 0;
    transition: opacity .4s ease-in-out;
    z-index: 5;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-desc {
    /* This is the full description on the hover overlay */
    margin: 0;
    font-size: .9rem;
    line-height: 1.4;
    max-height: 4.2em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.project-domain-link {
    align-self: flex-start;
    background: var(--primary-light);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: .85rem;
    padding: .4rem .8rem;
    border-radius: .5rem;
    transition: background-color 0.2s;
}

.project-domain-link:hover {
    background-color: #a3814f;
    color: #fff;
    text-decoration: none;
}

/* Short Description Snippet (inside card body) */
.project-snippet {
    font-size: 0.875rem;
    line-height: 1.3;
    margin-bottom: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Show only 2 lines */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.project-img {
    position: absolute;
    top: 0;
    left: 0;
    /*width: 100%;*/
    /*height: 100%;*/
    object-fit: contain;
    background-color: #ffffff;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.project-card:hover .project-img {
    transform: none;
}


.featured-projects-section .featured-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    margin-left: auto;
    margin-right: auto;
}

.featured-projects-section .brand-text {
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 0 !important;
    color:rgba(34, 93, 119, 1) ;
}

.featured-projects-section .brand-ink {
    width: 330px;
    height: 11px;
    display: block;
    margin-top: 0;
}

.featured-projects-section .brand-ink path {
    fill: var(--primary-light);
}

.featured-projects-section .lead {
    margin-top: 0.5rem !important;
}
