/* Karkin overrides for CyberGuard / Designesia template integration */

/* IcoFont — template markup uses icofont-* without the base .icofont class */
i[class^="icofont-"],
i[class*=" icofont-"] {
    font-family: "icofont", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-style: normal;
    font-weight: normal;
    speak: none;
}

/* Hero feature icons — white on dark background */
#section-intro .slider-extra .hero-feature-icon {
    color: #fff;
    opacity: 0.95;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    line-height: 1;
}

#section-intro .slider-extra h4 {
    margin-bottom: 8px;
}

#section-intro .slider-extra p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
}

/* About page feature icons — brand color on light background */
.about-features .hero-feature-icon {
    color: var(--primary-color, #0044cc);
    opacity: 0.95;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    line-height: 1;
}

.about-features h4 {
    margin-bottom: 8px;
}

.about-features p {
    margin-bottom: 0;
    line-height: 1.6;
}

.about-prose p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: inherit;
}

.about-prose p:last-child {
    margin-bottom: 0;
}

.about-intro-continued {
    padding-left: 25px;
}

/* Language switcher in topbar */
#topbar .lang.k-lang-compact {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-right: 16px;
    padding-right: 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

#topbar .lang a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1;
}

#topbar .lang a.selected,
#topbar .lang a:hover {
    color: var(--primary-color, #00bcd4);
}

/* Main menu — match template weight/casing */
#mainmenu > li > a.menu-item {
    text-transform: none;
    letter-spacing: 0;
}

/* Products dropdown — template default is only 190px wide */
#mainmenu > li > ul {
    width: max-content;
    min-width: 320px;
    max-width: min(440px, 92vw);
    height: auto !important;
}

#mainmenu li li {
    width: 100%;
    float: none;
}

#mainmenu li li a {
    white-space: nowrap;
    padding: 10px 22px;
    line-height: 1.35;
    box-sizing: border-box;
}

@media (max-width: 991px) {
    #mainmenu > li > ul {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    #mainmenu li li a {
        white-space: normal;
    }
}

#topbar .topbar-widget a {
    white-space: nowrap;
}

#topbar .d-flex > .d-flex:first-child {
    flex-wrap: nowrap;
    overflow: hidden;
    min-width: 0;
}

.menu_side_area .btn-main span {
    white-space: nowrap;
}

/* Mobile nav: Contact Us (desktop uses header button) */
#mainmenu > li.menu-contact-mobile {
    display: none;
}

@media only screen and (max-width: 992px) {
    #mainmenu > li.menu-contact-mobile {
        display: list-item;
    }
}

/* Mobile floating language switcher — fixed side tab */
.k-lang-float {
    display: none;
}

@media (max-width: 992px) {
    .k-lang-float {
        display: block;
        position: fixed;
        top: 50%;
        inset-inline-end: 0;
        transform: translateY(-50%);
        z-index: 1001;
    }

    .k-lang-float__track {
        display: flex;
        flex-direction: column;
        background: rgba(var(--bg-dark-1-rgb, 18, 19, 44), 0.94);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-inline-end: none;
        border-radius: 12px 0 0 12px;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2);
        overflow: hidden;
    }

    [dir="rtl"] .k-lang-float__track {
        border-inline-end: 1px solid rgba(255, 255, 255, 0.1);
        border-inline-start: none;
        border-radius: 0 12px 12px 0;
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.2);
    }

    .k-lang-float__item {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 72px;
        padding: 16px 10px;
        color: rgba(255, 255, 255, 0.5);
        text-decoration: none;
        transition: color 0.2s ease, background 0.2s ease;
    }

    .k-lang-float__item + .k-lang-float__item::before {
        content: "";
        position: absolute;
        top: 0;
        inset-inline: 10px;
        height: 1px;
        background: rgba(255, 255, 255, 0.1);
    }

    .k-lang-float__item.is-active {
        color: #fff;
        background: rgba(var(--primary-color-rgb, 74, 129, 211), 0.25);
    }

    .k-lang-float__item.is-active::after {
        content: "";
        position: absolute;
        inset-inline-start: 0;
        top: 12px;
        bottom: 12px;
        width: 3px;
        border-radius: 0 3px 3px 0;
        background: var(--primary-color, #4a81d3);
    }

    [dir="rtl"] .k-lang-float__item.is-active::after {
        inset-inline-start: auto;
        inset-inline-end: 0;
        border-radius: 3px 0 0 3px;
    }

    .k-lang-float__item:not(.is-active):hover,
    .k-lang-float__item:not(.is-active):focus-visible {
        color: rgba(255, 255, 255, 0.92);
        background: rgba(255, 255, 255, 0.06);
        outline: none;
    }

    .k-lang-float__text {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        transform: rotate(180deg);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.08em;
        line-height: 1;
        white-space: nowrap;
    }

    .k-lang-float__item[lang="ar"] .k-lang-float__text {
        letter-spacing: 0;
        font-size: 12px;
        font-weight: 700;
    }
}

/* Inner pages */
.k-page-content {
    padding: 60px 0;
}

.k-page-content .k-container,
.k-detail-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.k-detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

.k-sidebar__block {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.k-sidebar__block h4 {
    margin-bottom: 16px;
    font-size: 18px;
}

.k-sidebar__links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.k-sidebar__links li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.k-sidebar__links li a {
    display: block;
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.75);
}

.k-sidebar__links li a:hover {
    color: var(--primary-color, #00bcd4);
}

.k-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Contact form feedback */
#messages.success {
    color: #4caf50;
    margin-bottom: 12px;
}

#messages.error {
    color: #f44336;
    margin-bottom: 12px;
}

#contact-form.is-submitting {
    opacity: 0.7;
    pointer-events: none;
}

.k-footer-contact-items {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 4px;
}

.k-footer-contact-items a {
    display: block;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
}

.k-footer-contact-items a:hover {
    opacity: 0.85;
}

/* Map */
.k-map iframe,
.k-map .google-map {
    width: 100%;
    min-height: 400px;
    border: 0;
    display: block;
}

/* Search overlay */
.k-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.k-search-overlay.is-open {
    display: flex;
}

.k-search-overlay__box {
    width: min(600px, 90vw);
    text-align: center;
}

.k-search-overlay__box h4 {
    margin-bottom: 20px;
}

.k-search-overlay__box input {
    width: 100%;
    padding: 16px 20px;
    font-size: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 8px;
}

.k-search-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
}

/* Product cards — images cover their half like the original template */
#products .k-product-card__image {
    aspect-ratio: 1;
}

#products .k-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
}

/* Product categories page — services-style grid */
#product-categories .k-category-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

#product-categories .k-category-card__img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

#product-categories .k-category-card h3 {
    margin-bottom: 0.75rem;
}

#product-categories .k-category-card p {
    opacity: 0.85;
}

@media (max-width: 767px) {
    #product-categories .k-category-card__image,
    #product-categories .k-category-card__img {
        min-height: 220px;
        height: 220px;
    }
}

/* Product category page — services-3 hover grid */
#product-category-page .k-product-hover-card {
    min-height: 280px;
}

#product-category-page .k-product-hover-card__img {
    display: block;
    width: 100%;
    min-height: 280px;
    object-fit: cover;
}

#product-category-page .k-pagination .pagination {
    justify-content: center;
    margin-bottom: 0;
}

@media (max-width: 767px) {
    #product-category-page .k-product-hover-card,
    #product-category-page .k-product-hover-card__img {
        min-height: 220px;
    }
}

/* Project hover cards — match template (1080×1080 square, object-fit cover for CMS uploads) */
#projects .hover > img.w-100,
#projects-page .hover > img.w-100 {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
}

.pb-120 {
    padding-bottom: 120px;
}

/* Single product page — service-single layout */
#product-page .k-product-sidebar__link {
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#product-page .k-product-sidebar__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

#product-page .k-product-sidebar__link h5 {
    padding-right: 2rem;
}

#product-page .col-lg-6,
#product-page .col-lg-9 {
    min-width: 0;
}

#product-page .k-product-page__media {
    min-height: 600px;
    margin-bottom: 50px;
}

#product-page .k-product-page__image {
    width: 100%;
    min-height: 600px;
    height: 100%;
    object-fit: cover;
    display: block;
}

#product-page .k-product-page__intro,
#product-page .k-product-page__intro p {
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

#product-page .relative i.icofont-check-circled {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 991px) {
    #product-page .k-product-page__media,
    #product-page .k-product-page__image {
        min-height: 400px;
    }
}

/* Clients row */
.k-clients-row img {
    max-height: 60px;
    object-fit: contain;
    filter: grayscale(1);
    transition: filter 0.3s;
}

.k-clients-row img:hover {
    filter: grayscale(0);
}

/* RTL adjustments */

/* Letter-spacing breaks Arabic cursive script — reset template defaults */
[dir="rtl"] {
    --h1-letter-spacing: 0;
    --h2-letter-spacing: 0;
    --h3-letter-spacing: 0;
    --h4-letter-spacing: 0;
    --h5-letter-spacing: 0;
    --h6-letter-spacing: 0;
    --mainmenu-letter-spacing: 0;
    --btn-letter-spacing: 0;
}

[dir="rtl"] body,
[dir="rtl"] body * {
    letter-spacing: 0 !important;
}

[dir="rtl"] .k-hero-carousel .carousel-caption {
    text-align: right;
}

/* Header — mirror EN/TR layout for Arabic */
[dir="rtl"] #topbar .lang.k-lang-compact {
    margin-right: 0;
    margin-left: 16px;
    padding-right: 0;
    padding-left: 16px;
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

[dir="rtl"] #topbar .social-icons {
    margin-left: 0 !important;
    margin-right: 12px;
}

[dir="rtl"] #topbar .topbar-widget {
    padding: 8px 0 8px 40px;
}

[dir="rtl"] #topbar .topbar-widget a {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
}

[dir="rtl"] #topbar .topbar-widget a > i {
    order: 1;
    margin: 0 0 0 8px;
}

[dir="rtl"] .icofont-phone {
    display: inline-block;
    transform: scaleX(-1);
}

[dir="rtl"] #topbar .topbar-widget a > .k-ltr-embed,
[dir="rtl"] #topbar .topbar-widget a > .k-topbar-text {
    order: 2;
    margin: 0;
}

[dir="rtl"] .k-ltr-embed {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
}

[dir="rtl"] .ms-30 {
    margin-right: 30%;
    margin-left: unset;
}

@media (min-width: 768px) {
    [dir="rtl"] .text-md-end {
        text-align: left !important;
    }
}

[dir="rtl"] .me-2 {
    margin-left: .5rem !important;
    margin-right: unset !important;
}

[dir="rtl"] .menu_side_area {
    margin-left: 0;
    margin-right: 20px;
}

[dir="rtl"] .menu_side_area .btn-line.me-2 {
    margin: 0 0 0 8px !important;
}

[dir="rtl"] #mainmenu {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 30px;
    float: none;
}

[dir="rtl"] #mainmenu > li {
    float: none !important;
    margin-right: 0;
    margin-left: 0;
}

[dir="rtl"] #mainmenu > li:last-child {
    margin-left: 0;
}

[dir="rtl"] #mainmenu > li.has-child > a.menu-item {
    display: inline-flex;
    align-items: center;
}

[dir="rtl"] #mainmenu > li.has-child:after {
    display: none;
}

[dir="rtl"] #mainmenu > li.has-child > a.menu-item::before {
    font-family: FontAwesome;
    content: "\f078";
    font-size: 8px;
    margin-left: 6px;
    color: rgba(255, 255, 255, 0.75);
}

[dir="rtl"] #mainmenu li ul {
    left: auto;
    right: 0;
}

[dir="rtl"] #mainmenu li li a {
    text-align: right;
}

[dir="rtl"] #menu-btn {
    float: left;
}

@media (max-width: 992px) {
    [dir="rtl"] #mainmenu {
        display: block;
        flex-direction: unset;
    }

    [dir="rtl"] #mainmenu > li {
        margin-left: 0;
    }

    [dir="rtl"] #mainmenu a.menu-item {
        text-align: right;
    }
}

@media (max-width: 991px) {
    .k-detail-layout {
        grid-template-columns: 1fr;
    }

    .k-hero-carousel .item {
        min-height: 70vh;
    }
}

.subfooter-credit {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.subfooter-credit svg.subfooter-heart {
    display: inline-block;
    flex-shrink: 0;
    margin: 0 5px;
    vertical-align: middle;
}