.text-color-black{
    color: #626262 !important;
}
.text-color-blue{
    color: var(--primary-color) !important;
}
.text-color-sky{
    color: var(--heading-color) !important;
}

@media (max-width: 767.98px) {
    .renvia-about_one .renvia-image-box {
        min-height: auto;
    }
    .renvia-about_one .renvia-image-box .renvia-image.image_two {
        display: none;
    }
}

/* Home — Selected Project: leading line on small screens only; center label between both lines */
@media (max-width: 767.98px) {
    .renvia-project_one .renvia-content-box .section-title {
        text-align: center;
    }
    .renvia-project_one .renvia-project-section-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
}
@media (min-width: 768px) {
    .renvia-project_one .renvia-project-subtitle-line-before {
        display: none !important;
    }
}

/* Home About (index) — mobile: label + title, then image, then copy; lg+: image left, text right */
.about-home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "head"
        "img"
        "main";
    gap: 1.25rem;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: start;
}
.about-home-image {
    grid-area: img;
    min-width: 0;
}
.about-home-heading {
    grid-area: head;
    min-width: 0;
}
.about-home-main {
    grid-area: main;
    min-width: 0;
}
@media (min-width: 992px) {
    .about-home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "img head"
            "img main";
        gap: 1.5rem 2.5rem;
    }
}

/* Projects listing pagination — current page */
.theme-pagination ul li a.active {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: transparent;
}

/* Projects page — Magnific inline lightbox (long description + gallery) */
.project-lightbox-mfp .mfp-content {
    max-width: 920px;
    margin: auto;
}
.project-lightbox-inline {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    max-height: min(88vh, 900px);
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.project-lightbox-inner {
    padding: 28px 28px 32px;
}
.project-lightbox-title {
    font-size: 1.35rem;
    margin-bottom: 16px;
    color: var(--heading-color);
}
.project-lightbox-body {
    color: var(--text-color, #626262);
    line-height: 1.65;
}
.project-lightbox-thumb {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    border: 3px solid;
    box-shadow: 0px 0px 10px #000;
}

/* Project lightbox — gallery thumbs open full-screen image gallery */
.project-gallery-image-link {
    display: block;
    cursor: zoom-in;
}
.project-gallery-image-link:hover .project-lightbox-thumb {
    opacity: 0.92;
}
/* Full-screen image viewer on top of Magnific project modal (does not replace it) */
.project-gallery-overlay {
    position: fixed;
    inset: 0;
    /* Above Magnific (.mfp-wrap ~1043) and theme layers — must not sit inside smooth-scroll stacking context */
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 56px;
    background: rgba(0, 0, 0, 0.88);
    box-sizing: border-box;
}
.project-gallery-overlay[hidden] {
    display: none !important;
}
.project-gallery-overlay-inner {
    position: relative;
    max-width: min(96vw, 1100px);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.project-gallery-overlay-img {
    max-width: 100%;
    max-height: calc(88vh - 80px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}
.project-gallery-overlay-caption {
    color: #fff;
    font-size: 0.95rem;
    text-align: center;
    max-width: 100%;
}
.project-gallery-overlay-close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.project-gallery-overlay-close:hover {
    background: rgba(255, 255, 255, 0.22);
}
.project-gallery-overlay-prev,
.project-gallery-overlay-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.project-gallery-overlay-prev {
    left: 12px;
}
.project-gallery-overlay-next {
    right: 12px;
}
.project-gallery-overlay-prev:hover,
.project-gallery-overlay-next:hover {
    background: rgba(255, 255, 255, 0.22);
}
@media (max-width: 767.98px) {
    .project-gallery-overlay {
        padding: 56px 12px 24px;
    }
    .project-gallery-overlay-prev {
        left: 4px;
    }
    .project-gallery-overlay-next {
        right: 4px;
    }
}

/* Service cards: cap short description to 3 lines, ellipsis if longer */
.renvia-service-card.style-one .content p.service-card-short-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Service detail — HTML from CKEditor */
.service-details-body.ck-content {
    color: var(--text-color, #626262);
    line-height: 1.75;
}
.service-details-body.ck-content p {
    margin-bottom: 1rem;
}
.service-details-body.ck-content h1,
.service-details-body.ck-content h2,
.service-details-body.ck-content h3,
.service-details-body.ck-content h4 {
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--heading-color);
}
.service-details-body.ck-content ul,
.service-details-body.ck-content ol {
    margin-bottom: 1rem;
    padding-left: 1.25rem;
}
.service-details-body.ck-content img {
    max-width: 100%;
    height: auto;
}
.service-details-body.ck-content blockquote {
    border-left: 4px solid var(--primary-color, #c9a227);
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
}
.service-details-body.ck-content table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}
.service-details-body.ck-content table td,
.service-details-body.ck-content table th {
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.5rem 0.75rem;
}

/* Contact form — honeypot for bots (hidden from users) */
.contact-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
.contact-wrapper {
    position: relative;
}

/* Floating back-to-top (outside #smooth-wrapper so position:fixed is correct with ScrollSmoother) */
.back-to-top-btn {
    position: fixed;
    right: 22px;
    bottom: 28px;
    z-index: 10050;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white-color, #fff);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.28s ease, visibility 0.28s ease, transform 0.28s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.back-to-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top-btn:hover {
    background-color: var(--heading-color);
    color: var(--white-color, #fff);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}
.back-to-top-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}
.back-to-top-btn:focus:not(:focus-visible) {
    outline: none;
}
.back-to-top-btn i {
    font-size: 1.1rem;
    line-height: 1;
}
@media (max-width: 575.98px) {
    .back-to-top-btn {
        right: 16px;
        bottom: 20px;
        width: 44px;
        height: 44px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .back-to-top-btn {
        transition: none;
    }
}

/* Services page — sticky tab bar (CSS only; GSAP ScrollTrigger pin was removed — it added bad pinSpacing with ScrollSmoother) */
.services-sticky-scope {
    position: relative;
    overflow: visible;
}
.services-nav-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background-color: var(--gray-color);
    padding-bottom: 1rem;
    margin-bottom: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}
.services-sticky-scope .services-tab-content {
    min-height: 0;
    margin-top: 0;
    padding-top: 0.5rem;
}

/* Services page — category nav tabs (Bootstrap) above service cards */
.services-nav-tabs-scroll {
    overflow: visible;
}
@media (max-width: 767.98px) {
    .services-nav-tabs-scroll {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .services-nav-tabs-scroll::-webkit-scrollbar {
        height: 5px;
    }
    .services-nav-tabs-scroll::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }
    .services-nav-tabs-scroll .services-nav-tabs {
        -ms-flex-wrap: nowrap;
        flex-wrap: nowrap;
        -webkit-box-pack: start;
        -ms-flex-pack: start;
        justify-content: flex-start;
        width: -webkit-max-content;
        width: -moz-max-content;
        width: max-content;
        gap: 0.45rem;
    }
    .services-nav-tabs-scroll .services-nav-tabs .nav-item {
        -ms-flex-negative: 0;
        flex-shrink: 0;
    }
    .services-nav-tabs-scroll .services-nav-tabs .nav-link {
        white-space: nowrap;
    }
}
.services-nav-tabs {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    gap: 0.35rem 0.5rem;
}
.services-nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    color: var(--text-color, #626262);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.65rem 1rem;
    background: transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.services-nav-tabs .nav-link:hover {
    color: var(--heading-color);
    border-bottom-color: rgba(0, 0, 0, 0.12);
}
.services-nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: transparent;
}

/* Home — Selected Project cards: arrow after image on mobile; desktop keeps text + arrow left, image right */
.renvia-project_one .renvia-project-item.style-one .project-content-arrow {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--white-color);
    text-decoration: none;
}
.renvia-project_one .renvia-project-item.style-one .project-content-arrow i {
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
}
@media (max-width: 767.98px) {
    .renvia-project_one .renvia-proiect-list .renvia-project-item.style-one {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: start;
        -ms-flex-align: start;
        align-items: flex-start;
    }
    .renvia-project_one .renvia-proiect-list .renvia-project-item.style-one .project-content {
        -webkit-box-ordinal-group: 2;
        -ms-flex-order: 1;
        order: 1;
    }
    .renvia-project_one .renvia-proiect-list .renvia-project-item.style-one .project-thumbnail {
        -webkit-box-ordinal-group: 3;
        -ms-flex-order: 2;
        order: 2;
        margin-left: 0;
        margin-top: 30px;
        max-width: 100%;
    }
    .renvia-project_one .renvia-proiect-list .renvia-project-item.style-one .project-content-arrow {
        -webkit-box-ordinal-group: 4;
        -ms-flex-order: 3;
        order: 3;
        margin-top: 20px;
    }
}
/* Home — Core Features: mobile order = subtitle + title, then image, then paragraph/stats (xl+ keeps image | text columns) */
.renvia-feature_one .feature-one-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    width: 100%;
}
.renvia-feature_one .feature-one-heading-col,
.renvia-feature_one .feature-one-image-col,
.renvia-feature_one .feature-one-body-col {
    width: 100%;
    min-width: 0;
}
@media (min-width: 1200px) {
    .renvia-feature_one .feature-one-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto 1fr;
        -webkit-column-gap: 30px;
        column-gap: 30px;
        row-gap: 0;
        -webkit-box-align: start;
        -ms-flex-align: start;
        align-items: start;
    }
    .renvia-feature_one .feature-one-heading-col {
        grid-column: 2;
        grid-row: 1;
        padding-left: 85px;
        width: auto;
    }
    .renvia-feature_one .feature-one-image-col {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: auto;
        -ms-flex-item-align: center;
        align-self: center;
    }
    .renvia-feature_one .feature-one-body-col {
        grid-column: 2;
        grid-row: 2;
        width: auto;
    }
}

@media (min-width: 768px) {
    .renvia-project_one .renvia-proiect-list .renvia-project-item.style-one {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        -webkit-box-align: start;
        -ms-flex-align: start;
        align-items: start;
        -webkit-column-gap: 30px;
        column-gap: 30px;
        row-gap: 0;
    }
    .renvia-project_one .renvia-proiect-list .renvia-project-item.style-one .project-content {
        grid-column: 1;
        grid-row: 1;
    }
    .renvia-project_one .renvia-proiect-list .renvia-project-item.style-one .project-content-arrow {
        grid-column: 1;
        grid-row: 2;
        margin-top: 0;
        -ms-flex-item-align: start;
        align-self: start;
    }
    .renvia-project_one .renvia-proiect-list .renvia-project-item.style-one .project-thumbnail {
        grid-column: 2;
        grid-row: 1 / span 2;
        margin-left: 0;
        margin-top: 0;
        -ms-flex-item-align: center;
        align-self: center;
        max-width: 295px;
    }
}

/* Newsletter — footer flash + offcanvas form */
/* Newsletter — toast (fixed outside #smooth-wrapper in footer.php) */
.newsletter-toast-container {
    z-index: 10060;
    left: 50%;
    right: auto;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    width: min(100% - 2rem, 420px);
    max-width: 100%;
    margin: 0;
    top: auto;
    bottom: 1.25rem;
    pointer-events: none;
}
.newsletter-toast-container .toast {
    pointer-events: auto;
    width: 100%;
}
.newsletter-toast-el .toast-body {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    font-weight: 500;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}
.newsletter-toast-icon {
    -ms-flex-negative: 0;
    flex-shrink: 0;
    margin-top: 0.1rem;
}
@media (max-width: 767.98px) {
    .newsletter-toast-container {
        top: 1rem;
        bottom: auto;
    }
}
@media (prefers-reduced-motion: reduce) {
    .newsletter-toast-el {
        -webkit-transition-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

.panel-newsletter-box .panel-newsletter-form .form-group.panel-newsletter-field {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 10px;
}
.panel-newsletter-box .panel-newsletter-form .form_control {
    width: 100%;
    border-radius: 8px;
    padding: 12px 14px;
}
.panel-newsletter-box .panel-newsletter-form .panel-newsletter-submit {
    width: 100%;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    border-radius: 8px;
    padding: 12px 16px;
}
@media (min-width: 380px) {
    .panel-newsletter-box .panel-newsletter-form .form-group.panel-newsletter-field {
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
        -ms-flex-direction: row;
        flex-direction: row;
        -webkit-box-align: stretch;
        -ms-flex-align: stretch;
        align-items: stretch;
    }
    .panel-newsletter-box .panel-newsletter-form .form_control {
        -webkit-box-flex: 1;
        -ms-flex: 1 1 auto;
        flex: 1 1 auto;
        min-width: 0;
    }
    .panel-newsletter-box .panel-newsletter-form .panel-newsletter-submit {
        width: auto;
        -ms-flex-negative: 0;
        flex-shrink: 0;
    }
}
