/*background as fill for an image of map*/
.map-image {
    background-image: url('../img/dotted_map.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;    
}
.text-italic {
    font-style: italic;
}

.wazen-close-button {
    width: 32px;
    height: 32px;
}
/* Navigation Active States */
#mainNav li.active > a,
#mainNav a.active {
    color: #7b98bf !important;
    font-weight: 600;
    position: relative;
}

#mainNav li.active > a:after,
#mainNav a.active:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #7b98bf;
}

/* Dropdown arrow styling */
.dropdown-toggle .fa-chevron-down {
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

/* Contact page specific styles */
.contact-form .form-control {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px 20px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: #7b98bf;
    box-shadow: 0 0 0 0.2rem rgba(123, 152, 191, 0.25);
}

.contact-form .form-control::placeholder {
    color: #aaa;
    font-weight: normal;
}

.contact-icon .bg-blue {
    background-color: #7b98bf !important;
}

.map-container iframe {
    filter: grayscale(20%) contrast(120%);
    transition: filter 0.3s ease;
}

.map-container iframe:hover {
    filter: grayscale(0%) contrast(100%);
}

/* Masonry Grid Styles for Trainings Page */
.masonry-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center the masonry items */
}

.masonry-item {
    flex: 0 0 auto;
    margin-bottom: 20px;
}

.masonry-item .card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.masonry-item .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

.bg-gradient-dark {
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 70%, rgba(0,0,0,0.9) 100%);
}

.masonry-item img {
    transition: transform 0.3s ease;
}

.masonry-item .card:hover img {
    transform: scale(1.05);
}

/* Responsive masonry adjustments */
@media (max-width: 991.98px) {
    .masonry-item {
        margin-bottom: 15px;
    }
    
    .masonry-item img {
        height: 250px !important;
    }
}

@media (max-width: 767.98px) {
    .masonry-grid .col-lg-8,
    .masonry-grid .col-lg-6,
    .masonry-grid .col-lg-4,
    .masonry-grid .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .masonry-item img {
        height: 200px !important;
    }
}

/*home cover bg center */

.home-cover-bg {
    position: relative;
    z-index: 0;
}

    .home-cover-bg::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url(../img/home/home_cover_bg.png) center center no-repeat;
        background-size: 75%;
        opacity: 1; /* adjust as needed */
        z-index: -1; /* keeps it behind the content */
    }


/*counter text which has an accent on left side */
.counter-text {
    border-left: 4px solid #7b98bf; /* Accent color */
    padding-left: 30px;
    margin: 0 0 0 0px;
    font-weight: bold;
    font-size: 1.2em;
    color: #7b98bf;
}

.img-rounded {
    border-radius: 20px;
}

.headingaccent::after {
    content: "";
    display: block;
    width: 90px;
    height: 3px;
    background-color: #7b98bf; /* change to your preferred accent color */
    margin: 15px auto 0 auto; /* spacing between text and line */
}

.headingaccent_left::after {
    content: "";
    display: block;
    width: 90px;
    height: 3px;
    background-color: #7b98bf; /* change to your preferred accent color */
    margin: 15px 0 0 0; /* spacing between text and line */
}

.headingaccent_white::after {
    content: "";
    display: block;
    width: 90px;
    height: 3px;
    background-color: #FFF; /* change to your preferred accent color */
    margin: 15px auto 0 auto; /* spacing between text and line */
}

/*btn-hover - when user hovers this type we create hover button effect*/
.btn-hover {
    position: relative;
    overflow: hidden;
    border: 1px solid #7b98bf;
    transition: all 0.3s ease;
}

    .btn-hover:before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background-color: #7b98bf;
        z-index: -1;
        transition: all 0.3s ease;
    }

    .btn-hover:hover {
        color: #fff;
        background-color: transparent;
    }

        .btn-hover:hover:before {
            left: 0;
        }

.btn-hover2 {
    position: relative;
    overflow: hidden;
    border: 1px solid #7b98bf;
    transition: all 0.3s ease;
}

    .btn-hover2:before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background-color: #7b98bf;
        z-index: -1;
        transition: all 0.3s ease;
    }

    .btn-hover2:hover {
        color: #fff;
        background-color: #7b98bf;
    }

        .btn-hover2:hover:before {
            left: 0;
        }

.testimonial-box {
    min-height: 300px;
    max-height: 300px;
}

/* Interactive Semi-Circle Services Widget */
.interactive-semi-circle-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 10px 0 40px;
}

.interactive-semi-circle {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 2 / 1;
    height: auto;
    --radius: 46vw;
    max-height: 480px;
    min-height: 340px;
}

.interactive-semi-circle .semi-arc-line {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: calc(min(var(--radius)*2, 1200px));
    height: calc(min(var(--radius), 600px));
    transform: translateX(-50%);
    border: 4px solid #c9d5e4;
    border-top-left-radius: 1200px;
    border-top-right-radius: 1200px;
    border-bottom: none;
    background: linear-gradient(to top,#ffffff,#ffffff 60%);
    z-index: 1;
}

.interactive-semi-circle .semi-circle-base { display:none; }

.services-center {
    position: absolute;
    left: 50%;
    top: 44%;
    transform: translate(-50%, -50%);
    max-width: 700px;
    text-align: center;
    z-index: 2;
    padding: 10px 10px 0;
}
.services-center .services-logo { max-width: 200px; width:100%; height:auto; margin:0 auto 14px; display:block; }
.services-center .center-desc { font-size:24px; line-height:1.4; color:#2b4c72; margin:0; }

.service-detail { display:none; }

.service-bubble {
    --size: 150px;
    position: absolute;
    left:50%; bottom:0;
    width:var(--size); height:var(--size);
    margin-left:calc(var(--size)/-2);
    transform: translate(-50%,0) scale(.25);
    border-radius:50%;
    background:#ffffff; color:#fff;
    font-size:11px; font-weight:600; text-align:center;
    padding:10px 8px 8px; cursor:pointer; outline:none;
    display:flex; flex-direction:column; justify-content:center; align-items:center; gap:6px;
    transition: transform 1s cubic-bezier(.19,1,.22,1), box-shadow .4s, filter .4s;
    z-index:2; opacity:0; border:none;
    box-shadow:0 10px 20px -6px rgba(0,0,0,.18),0 3px 6px rgba(0,0,0,.12);
}

.color-educational { background:#2a80e4; }
.color-sustainable { background:#04224d; }
.color-outreach { background:#23aa55; }
.color-youth { background:#e8ab2f; }
.color-advocacy { background:#0d8dd9; }
.color-esg { background:#ff9d52; }
.color-events { background:#1d4f80; }
.color-immersive { background:#f25555; }

.service-bubble img { width:50px; height:auto; filter:brightness(0) invert(1); }
.service-bubble span { display:block; line-height:1.05; font-size: 14px }

.service-bubble.active, .service-bubble:hover { box-shadow:0 14px 28px -6px rgba(0,0,0,.32),0 6px 12px rgba(0,0,0,.24); filter:brightness(1.05); }

/* Pulse on active */
.service-bubble.active::after {
    content:""; position:absolute; inset:0; border-radius:50%;
    box-shadow:0 0 0 0 rgba(255,255,255,0.55);
    animation: pulseRing 2.2s ease-out infinite;
}
@keyframes pulseRing {
    0% { box-shadow:0 0 0 0 rgba(255,255,255,0.55); }
    70% { box-shadow:0 0 0 18px rgba(255,255,255,0); }
    100% { box-shadow:0 0 0 0 rgba(255,255,255,0); }
}

/* Description fade */
#centerDesc { transition: opacity .35s ease, transform .35s ease; }
#centerDesc.fade { opacity:0; transform: translateY(6px); }

/* Position animation states */
.interactive-semi-circle.ready .service-bubble { opacity: 1; }

@media (max-width: 992px){ .service-bubble { --size:96px; font-size:10px;} .services-center .services-logo { max-width:120px;} }
@media (max-width: 768px){ .service-bubble { --size:84px; font-size:10px;} .services-center { top:56%; max-width:260px;} }
@media (max-width: 560px){ .interactive-semi-circle { --radius:70vw;} .service-bubble { --size:72px; font-size:9px;} .services-center .services-logo { max-width:100px;} }

/* Mobile grid layout for service bubbles - 3 per row */
@media (max-width: 768px) {
    .interactive-semi-circle-wrapper {
        padding: 20px 0 30px;
    }

    .interactive-semi-circle {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        min-height: auto;
        max-height: none;
        aspect-ratio: auto;
        padding: 20px 10px;
        justify-items: center;
    }

    /* Hide the semi-circle arc on mobile */
    .interactive-semi-circle .semi-arc-line {
        display: none;
    }

    .services-center {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        max-width: 100%;
        text-align: center;
        margin-bottom: 30px;
        padding: 15px;
        grid-column: 1 / -1; /* Span all columns */
    }

    .services-center .services-logo {
        max-width: 100px;
        margin-bottom: 15px;
    }

    .services-center .center-desc {
        font-size: 18px;
        line-height: 1.4;
    }

    .service-bubble {
        position: relative;
        left: auto;
        bottom: auto;
        width: var(--size);
        height: var(--size);
        margin: 0;
        transform: scale(1) !important;
        opacity: 1 !important;
        --size: 90px;
        font-size: 11px;
        padding: 12px 8px;
        gap: 8px;
        flex-shrink: 0;
        justify-self: center;
    }

    .service-bubble img {
        width: 40px;
        height: auto;
    }

    .service-bubble span {
        font-size: 12px;
        line-height: 1.2;
    }

    .service-bubble:hover,
    .service-bubble:focus {
        transform: scale(1.05) !important;
        box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    }

    .service-bubble:active {
        transform: scale(0.98) !important;
    }

    /* Adjust for smaller mobile - still 3 per row but smaller bubbles */
    @media (max-width: 480px) {
        .interactive-semi-circle {
            gap: 12px;
            padding: 15px 5px;
        }

        .service-bubble {
            --size: 70px;
            font-size: 9px;
            padding: 8px 5px;
            gap: 5px;
        }

        .service-bubble img {
            width: 30px;
        }

        .service-bubble span {
            font-size: 10px;
        }

        .services-center .services-logo {
            max-width: 80px;
        }

        .services-center .center-desc {
            font-size: 16px;
        }
    }

    /* Very small screens - 2 per row */
    @media (max-width: 360px) {
        .interactive-semi-circle {
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }

        .service-bubble {
            --size: 65px;
            font-size: 8px;
            padding: 6px 4px;
            gap: 4px;
        }

        .service-bubble img {
            width: 25px;
        }

        .service-bubble span {
            font-size: 9px;
        }
    }
}

/* Entrance handled via JS applying transform; keep smooth transitions */
.service-bubble { transition: transform 1s cubic-bezier(.19,1,.22,1), box-shadow .4s, filter .4s, opacity .6s ease; }

/* Focus ring for accessibility */
.service-bubble:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #7b98bf; }

/* Touch-friendly improvements for mobile */
@media (max-width: 768px) {
    .service-bubble {
        min-height: 44px; /* iOS touch target minimum */
        transform: scale(1); /* Ensure bubbles are always visible on mobile */
        opacity: 1 !important;
    }
    
    .service-bubble:hover,
    .service-bubble:focus {
        transform: scale(1.1);
        box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    }
    
    .service-bubble:active {
        transform: scale(0.95);
    }
    
    /* Improve tap targets on small screens */
    @media (max-width: 480px) {
        .service-bubble {
            min-height: 48px; /* Larger touch targets for small screens */
        }
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .service-bubble {
        transition: none;
    }
    
    .service-bubble.active::after {
        animation: none;
    }
    
    #centerDesc {
        transition: none;
    }
}

.text-left {
    text-align: left;
}

.bg-grey {
    background-color: #f8f8f8;
}

.media-card {
    border: 3px solid #3b6291!important;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.media-card__image {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.blog-posts .col-md-4 {
    display: flex;
}

.blog-posts .col-md-4 .media-card {
    flex: 1;
}

.media-card .post-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.media-card .post-meta {
    margin-top: auto;
}

.media-card__title {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-card__excerpt {
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-outline-primary {
    color: #3b6291;
    border-color: #3b6291;
}

    .btn-outline-primary:hover {
        background-color: #3b6291;
        color: #fff;
        border-color: #3b6291;
    }

.margin-top-250 {
    margin-top: 250px;}

/* RTL support adjustments */
/*[dir="rtl"] body {
    text-align: right;
}

[dir="rtl"] .text-left {
    text-align: right;
}

[dir="rtl"] .text-right {
    text-align: left;
}

[dir="rtl"] .headingaccent_left::after {
    margin: 15px 0 0 auto;
}

[dir="rtl"] .headingaccent::after,
[dir="rtl"] .headingaccent_white::after {
    margin-left: auto;
    margin-right: auto;
}

[dir="rtl"] .counter-text {
    border-left: none;
    border-right: 4px solid #7b98bf;
    padding-left: 0;
    padding-right: 30px;
}

[dir="rtl"] .btn-hover:before,
[dir="rtl"] .btn-hover2:before {
    left: auto;
    right: -100%;
}

[dir="rtl"] .btn-hover:hover:before,
[dir="rtl"] .btn-hover2:hover:before {
    right: 0;
    left: auto;
}

[dir="rtl"] .float-end {
    float: left !important;
}

[dir="rtl"] .float-start {
    float: right !important;
}

[dir="rtl"] .btn .fa-arrow-right,
[dir="rtl"] .btn i.fa-arrow-right {
    display: inline-block;
    transform: scaleX(-1);
}

[dir="rtl"] .pagination .fa-angle-left,
[dir="rtl"] .pagination .fa-angle-right {
    display: inline-block;
    transform: scaleX(-1);
}

[dir="rtl"] .breadcrumb li+li:before {
    content: "\f104";*/ /* FontAwesome left arrow */
    /*font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

[dir="rtl"] .post-meta span,
[dir="rtl"] .post-meta a {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .media-card__title,
[dir="rtl"] .media-card__excerpt {
    text-align: right;
}

[dir="rtl"] .post-date {
    right: auto;
    left: 0;
}

[dir="rtl"] .post-date span.day,
[dir="rtl"] .post-date span.month {
    display: block;
}

[dir="rtl"] .services-center,
[dir="rtl"] .service-bubble span {
    text-align: center;
}

[dir="rtl"] .interactive-semi-circle .semi-arc-line {
    transform: translateX(50%) scaleX(-1);
}

[dir="rtl"] .service-bubble {
    transform-origin: center;
}

[dir="rtl"] .accordion .card-header {
    text-align: right;
}

[dir="rtl"] .accordion .card-body ul {
    padding-right: 1.5rem;
    padding-left: 0;
}

[dir="rtl"] .accordion .card-body ul li {
    text-align: right;
}

[dir="rtl"] .map-image,
[dir="rtl"] .home-cover-bg::before {
    transform: scaleX(-1);
}

[dir="rtl"] .list-icons .fa-angle-right,
[dir="rtl"] .list-icons .fa-chevron-right,
[dir="rtl"] .list-icons .fa-long-arrow-alt-right {
    transform: scaleX(-1);
}

[dir="rtl"] .feature-box,
[dir="rtl"] .featured-box-blue {
    text-align: right;
}

[dir="rtl"] .header-nav-top .nav {
    justify-content: flex-end;
}

[dir="rtl"] .ms-0 {
    margin-right: 0 !important;
    margin-left: 0 !important;
}

[dir="rtl"] .ms-1 {
    margin-right: 0.25rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .ms-3 {
    margin-right: 1rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .ms-4 {
    margin-right: 1.5rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .ms-5 {
    margin-right: 3rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .me-0 {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

[dir="rtl"] .me-1 {
    margin-left: 0.25rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .me-3 {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .me-4 {
    margin-left: 1.5rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .me-5 {
    margin-left: 3rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

@media (min-width: 992px) {
    [dir="rtl"] .ps-lg-5 {
        padding-right: 3rem !important;
        padding-left: 0 !important;
    }
}

[dir="rtl"] .pe-5 {
    padding-left: 3rem !important;
    padding-right: 0 !important;
}

/* ----------------------------
   Mobile-friendly overrides
   (keep global + minimal)
----------------------------- */

/* Prevent common horizontal overflow on small screens */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Make embedded media responsive by default */
img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

iframe {
    max-width: 100%;
}

/* Safer long text wrapping (phone/email/URLs) */
a,
p,
li {
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Header top: allow wrapping on phones so phone number/lang switcher don't overflow */
@media (max-width: 575.98px) {
    #header .header-top .header-row {
        flex-wrap: wrap;
        row-gap: 0.25rem;
    }

    #header .header-nav-top .nav {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    #header .header-nav-top .nav > li > a,
    #header .header-nav-top .nav > li > span {
        padding: 6px 8px;
        letter-spacing: normal;
    }

    a.telephone {
        white-space: normal;
    }

    .mobile-center {
        text-align: center !important;
    }
    .nav-tabs .nav-item{
        width:50%!important
    }

    .m-m-left {
        margin-left: 0px !important;
    }

    .m-p-10 {
        padding: 10px !important;
    }

    .m-m-botton-10{
        margin-bottom: 10px !important;    
    }

    .m-m-botton-20 {
        margin-bottom: 20px !important;
    }
    .margin-top-250 {
        margin-top: 0px!important;
    }
    .pe-5 {
        padding-right: 12px !important;
    }

    .w-75 {
        width: 25% !important;
    }

    .float-end {
        float: none !important;
    }
    /* Fix hero section text on mobile */
    .home-cover-bg h1.text-12 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
        width: 100% !important;
    }

    .home-cover-bg p.text-4-5 {
        font-size: 1.1rem !important;
        width: 100% !important;
    }

    .home-cover-bg .btn-xl {
        font-size: 0.9rem !important;
        padding: 12px 20px !important;
        margin: 5px 0 !important;
        display: block;
        width: 100%;
        max-width: 280px;
    }

    /* Fix featured boxes on mobile */
    .featured-box-blue {
        margin-bottom: 1rem;
        text-align: center;
    }

    .featured-box-blue img {
        width: 20% !important;
        margin-bottom: 1rem;
    }

    .featured-box-blue h4 {
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem;
    }

    .featured-box-blue p {
        font-size: 1rem !important;
        margin-bottom: 1rem;
    }

    /* Fix accordion on mobile */
    .accordion .card-header .card-title a {
        font-size: 1rem !important;
        padding: 15px;
    }

    .accordion .card-body {
        padding: 15px;
    }

    .accordion .card-body p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    .accordion .card-body ul {
        padding-left: 1rem;
    }

    .accordion .card-body ul li {
        font-size: 0.95rem !important;
        margin-bottom: 0.5rem;
    }

    /* Fix counters section on mobile */
    .counters .col-md-4 {
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .counter {
        font-size: 2rem !important;
    }

    .counter-text {
        font-size: 1rem !important;
        border-left: none;
        border-right: 0px solid #7b98bf;
        padding-left: 0;
        padding-right: 20px;
        margin: 10px 0 0 0;
    }

    /* Fix how it works section on mobile */
    .interactive-semi-circle-wrapper {
        padding: 20px 0 60px;
    }

    .interactive-semi-circle {
        --radius: 90vw;
        min-height: 400px;
        max-height: 500px;
        aspect-ratio: 1 / 1.2;
    }

    .interactive-semi-circle .semi-arc-line {
        width: calc(min(var(--radius)*1.8, 320px));
        height: calc(min(var(--radius)*0.9, 160px));
        border-width: 3px;
    }

    .services-center {
        top: 45%;
        max-width: 180px;
        padding: 8px;
        display:none
    }

    .services-center .services-logo {
        max-width: 70px;
        margin-bottom: 10px;
    }

    .services-center .center-desc {
        font-size: 14px;
        line-height: 1.3;
    }

    .service-bubble {
        --size: 120px;
        font-size: 8px;
        padding: 6px 4px 4px;
        gap: 3px;
    }

    .service-bubble img {
        width: 40px;
        height: auto;
    }

    .service-bubble span {
        font-size: 11px;
        line-height: 1.0;
    }

    /* Fix membership pricing on mobile */
    .pricing-table .col-sm-6 {
        margin-bottom: 1rem;
    }

    .plan {
        margin-bottom: 1rem;
    }

    .plan-header h3 {
        font-size: 1.25rem !important;
    }

    .plan-header p {
        font-size: 0.9rem !important;
    }

    .plan-price .price {
        font-size: 1.5rem !important;
    }

    .plan-features ul {
        font-size: 0.85rem !important;
    }

    /* Fix balanced section on mobile */
    .text-9 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    .text-4 {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    /* Fix buttons on mobile */
    .btn-xl {
        font-size: 1rem !important;
        padding: 15px 25px !important;
    }

    /* Fix text sizes across mobile */
    .text-11 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }

    .text-5 {
        font-size: 1.25rem !important;
    }

    .text-4-5 {
        font-size: 1.1rem !important;
    }

    .text-4 {
        font-size: 1rem !important;
    }

    /* Fix container spacing on mobile */
    .container-xl-custom {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Fix image responsiveness */
    .img-fluid {
        max-width: 100%;
        height: auto;
    }

    .img-rounded {
        border-radius: 10px;
        margin-bottom: 1rem;
    }
}

/* Loading overlay: keep the loader image from overflowing on small screens */
.loading-overlay .bounce-loader img {
    width: 300px;
    max-width: 80vw;
    height: auto;
}

/* Tables/code blocks: avoid layout breakage on mobile */
table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Calendar month grid: tighten spacing on phones */
@media (max-width: 575.98px) {
    .calendar-grid-header-cell {
        padding: 0.55rem 0.35rem;
        font-size: 0.65rem;
    }

    .calendar-grid-cell {
        min-height: 92px;
        padding: 0.45rem;
    }

    [data-display-mode="comfort"] .calendar-grid-cell {
        min-height: 120px;
    }

    [data-display-mode="compact"] .calendar-grid-cell {
        min-height: 86px;
    }

    .calendar-grid-date {
        font-size: 0.8rem;
        margin-bottom: 0.35rem;
    }

    .calendar-event-chip {
        padding: 0.35rem 0.4rem;
        font-size: 0.68rem;
        border-radius: 8px;
    }

    .calendar-nav-controls .btn {
        min-width: 44px;
    }
}

/* Testimonials: allow cards to grow naturally on phones */
@media (max-width: 575.98px) {
    .testimonial-box {
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
    }
}

/* Contact map: responsive height with full-bleed iframe */
.map-container {
    width: 100%;
    height: 400px;
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 575.98px) {
    .map-container {
        height: 280px;
    }
}