/* Small additions on top of the original style.css (language switch + contact form feedback). */

.header-right .lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 34px;
    padding: 0 8px;
    margin-left: 7px;
    border: 1px solid rgb(24, 99, 239);
    border-radius: 17px;
    color: rgb(24, 99, 239);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    line-height: 1;
    align-self: center;
    transition: .3s;
}

.header-right .lang-btn:hover {
    background: rgb(24, 99, 239);
    color: #fff;
}

.header-right .lang-btn[lang="ar"] {
    font-family: 'Cairo', Arial, sans-serif;
}

.form-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 12px 0;
    font-weight: 500;
}

.form-alert.success {
    background: #e6f4ea;
    color: #1e6b34;
    border: 1px solid #b7dfc2;
}

.form-alert.error {
    background: #fdecea;
    color: #8a1c14;
    border: 1px solid #f5c2bd;
}

.con-input-box .field-error {
    color: #c0392b;
    margin-top: 4px;
}

.hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}


/* Services page: responsive grid (3 / 2 / 1 per row) instead of one long row */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    max-width: 1240px;
    margin: 30px auto 80px;
    padding: 0 20px;
}

.services-grid .card {
    margin: 0;
    overflow: hidden;
}

.services-grid .card-img-top {
    width: 100%;
    height: 240px;
    min-height: 0;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.services-grid .card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.services-grid h5 {
    font-size: 24px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.services-grid .service-text {
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.services-grid .service-text.expanded {
    display: block;
    -webkit-line-clamp: unset;
}

.services-grid .service-more {
    margin-top: 4px;
    background: none;
    border: 0;
    padding: 0;
    color: #F37F20;
    font-weight: 600;
    cursor: pointer;
}

.services-grid .service-more:hover {
    text-decoration: underline;
}

@media (max-width: 991.98px) {
    .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .services-grid { grid-template-columns: 1fr; gap: 20px; }
    .services-grid .card-img-top { height: 210px; }
}

/* Careers FAQ: rounded cards instead of flat bars */
.career-faq .career-title {
    font-family: inherit;
    font-size: 1.9rem;
    color: #0e3959;
    text-decoration: none;
    padding-bottom: 0;
    margin-bottom: 2rem;
}

.career-faq .career-title::after {
    content: "";
    display: block;
    width: 70px;
    height: 4px;
    margin: 14px auto 0;
    border-radius: 4px;
    background: #F37F20;
}

.career-faq .questions-container {
    max-width: 860px;
    padding: 0 16px;
}

.career-faq .question {
    border: 0;
    margin-bottom: 16px;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 18px rgba(14, 57, 89, 0.10);
    transition: box-shadow 0.3s ease;
}

.career-faq .question:hover {
    box-shadow: 0 8px 26px rgba(14, 57, 89, 0.18);
}

.career-faq .question button {
    gap: 16px;
    padding: 18px 24px;
    border-radius: 16px;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.5;
    text-align: start;
    background: linear-gradient(135deg, #1a6aa0 0%, #105483 55%, #0e3959 100%);
    transition: border-radius 0.3s ease, filter 0.3s ease;
}

.career-faq .question button:hover {
    filter: brightness(1.08);
}

.career-faq .question button:focus-visible {
    outline: 3px solid #F37F20;
    outline-offset: -3px;
}

.career-faq .question:has(p.show) button {
    border-radius: 16px 16px 0 0;
}

.career-faq .d-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    font-size: 15px;
}

.career-faq .question p {
    margin: 0;
    padding: 0 24px;
    font-size: 17px;
    line-height: 1.8;
    color: #3b4a5a;
    text-align: start;
    background: #f5f8fb;
    border-inline-start: 4px solid #F37F20;
}

.career-faq .question p.show {
    max-height: 1000px;
    margin: 0;
    padding: 20px 24px;
    color: #3b4a5a;
}

@media (max-width: 600px) {
    .career-faq .career-title { font-size: 1.5rem; }
    .career-faq .question button { font-size: 16px; padding: 14px 16px; }
    .career-faq .d-arrow { width: 30px; height: 30px; font-size: 13px; }
    .career-faq .question p { font-size: 15px; }
    .career-faq .question p.show { padding: 16px; }
}

/* Certificates page: any number of sections, only the first one sits below the header */
.certificates-page .certification-section + .certification-section {
    margin-top: 0;
    padding-top: 20px;
}

.certificates-page .certification-heading {
    margin-bottom: 40px;
}

.certificates-page .certification-text {
    margin-top: -10px;
}

/* Header menu: items that do not fit go into the "More" drop-down (public/js/menu-more.js) */
.header .menu li[hidden] {
    display: none !important;
}

@media (min-width: 992px) {
    .header .menu {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0 24px;
        text-align: center;
    }

    .header .menu > ul > li:not(:last-child) {
        margin-right: clamp(18px, 2.4vw, 40px);
    }

    html[dir="rtl"] body .header .menu > ul > li:not(:last-child) {
        margin-right: 0;
        margin-left: clamp(18px, 2.4vw, 40px);
    }

    .header .menu .sub-menu {
        text-align: start;
    }
}

/* Home slider: every slide has the same shape, so the slider does not jump between images */
.homepage-carousel .carousel-item img {
    aspect-ratio: 1920 / 686;
    object-fit: cover;
}
