/* Global responsive helpers */
:root {
    --rs-container-pad: clamp(12px, 3vw, 24px);
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
    height: auto;
}

table {
    width: 100%;
}

.table-responsive,
.rs-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body {
    overflow-x: hidden;
}

/* Containers */
@media (max-width: 1199px) {
    .container-fluid {
        padding-left: var(--rs-container-pad);
        padding-right: var(--rs-container-pad);
    }
}

@media (max-width: 991px) {
    .container,
    .container-fluid {
        padding-left: var(--rs-container-pad);
        padding-right: var(--rs-container-pad);
    }

    .rs-header-inner {
        flex-wrap: wrap;
        row-gap: 12px;
    }

    .rs-header-menu {
        width: 100%;
        order: 3;
    }

    .rs-header-right {
        margin-left: auto;
    }
}

/* Hide desktop nav on mobile */
@media (max-width: 991px) {
    .rs-header-menu {
        display: none !important;
    }

    .rs-header-hamburger {
        display: block !important;
    }
}

@media (min-width: 992px) {
    .rs-header-hamburger {
        display: none !important;
    }
}

/* About page: Mission / Vision / Values */
@media (max-width: 991px) {
    .rs-about-area .rs-about-tab {
        margin-top: 20px;
    }

    .rs-about-area .rs-about-tab .nav {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .rs-about-area .rs-about-tab .nav-link {
        width: 100%;
        text-align: center;
    }

    .rs-aobut-tab-content-wrapper {
        margin-top: 20px;
    }

    .rs-about-feature-list .value-list {
        padding: 0;
        margin: 0;
    }

    .rs-about-feature-list .value-list li {
        display: flex;
        gap: 10px;
        align-items: flex-start;
    }

    .rs-about-feature-list .value-list li i {
        margin-top: 4px;
    }
}

@media (max-width: 767px) {
    .rs-section-title h1,
    .rs-section-title h2,
    .rs-section-title h3,
    .rs-section-title2 h1,
    .rs-section-title2 h2,
    .rs-section-title2 h3 {
        line-height: 1.2;
    }

    .rs-hero-area,
    .rs-hero-two,
    .rs-hero-three,
    .rs-hero-four,
    .rs-hero-five {
        padding-top: 80px;
        padding-bottom: 80px;
    }
}

/* Index page hero + marquee fixes */
@media (max-width: 1199px) {
    .rs-banner-area.rs-banner-four {
        transform: none !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }
}

@media (max-width: 991px) {
    .rs-banner-area.rs-banner-four,
    .rs-banner-area.rs-banner-four .rs-banner-slider-wrapper,
    .rs-banner-area.rs-banner-four .rs-banner-item-wrapper {
        min-height: 100vh !important;
    }

    #videoIntroOverlay #introTextContainer {
        padding: 24px 20px !important;
        max-width: 720px !important;
    }

    #videoIntroOverlay #introSentence {
        font-size: clamp(26px, 5.2vw, 44px) !important;
        line-height: 1.35 !important;
    }

    .rs-banner-four .rs-banner-title span {
        white-space: normal !important;
    }
}

@media (max-width: 767px) {
    .rs-banner-area.rs-banner-four,
    .rs-banner-area.rs-banner-four .rs-banner-slider-wrapper,
    .rs-banner-area.rs-banner-four .rs-banner-item-wrapper {
        min-height: 85vh !important;
    }

    .rs-banner-area.rs-banner-four .rs-banner-title {
        font-size: clamp(28px, 7.4vw, 42px) !important;
    }

    .rs-banner-area.rs-banner-four .rs-banner-content-inner {
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box !important;
    }

    .rs-banner-area .rs-text-slide-area .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .rs-banner-area .rs-text-slide-wrapper {
        padding-right: 0 !important;
    }

    .rs-banner-area .rs-text-slide-inner {
        flex-wrap: nowrap;
    }

    .rs-banner-area .rs-text-slide-item {
        flex: 0 0 auto;
    }

    .rs-banner-area .rs-text-slide-title {
        font-size: clamp(11px, 3vw, 14px) !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 575px) {
    .section-space {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }

    #videoIntroOverlay #introTextContainer {
        padding: 18px 14px !important;
    }

    #videoIntroOverlay #introSentence {
        font-size: clamp(22px, 7vw, 34px) !important;
    }

    .rs-banner-area .ticker-separator {
        display: inline-flex !important;
        align-items: center;
        flex-shrink: 0;
    }

    .rs-banner-area .ticker-separator img {
        height: 20px !important;
        width: auto !important;
    }

    .rs-banner-area #infoIconBtn {
        width: 26px !important;
        height: 26px !important;
    }
}

@media (max-width: 575px) {
    .rs-section-title {
        font-size: clamp(22px, 6.2vw, 32px);
    }
}

/* About section */
@media (max-width: 991px) {
    .rs-about-four .rs-about-thumb-wrapper {
        margin-bottom: 24px;
    }

    .rs-about-four .rs-about-thumb.has-large-thumb {
        max-width: 560px;
        margin: 0 auto;
    }

    .rs-about-four .rs-about-content-wrapper {
        padding-top: 10px;
    }
}

@media (max-width: 767px) {
    .rs-about-four .rs-about-thumb.has-large-thumb {
        max-width: 100%;
    }

    .rs-about-four .rs-about-btn {
        text-align: center;
    }
}

/* Features tabs (rs-elements-portfolio-area) */
@media (max-width: 991px) {
    .rs-elements-portfolio-area .rs-services-tab-list ul {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }

    .rs-elements-portfolio-area .rs-services-tab-list ul li {
        width: 100%;
    }

    .rs-elements-portfolio-area .rs-services-tab-content-wrapper {
        margin-top: 24px;
    }
}

/* Access Safora section (rs-services-four) */
@media (max-width: 991px) {
    .rs-services-area.rs-services-four .rs-services-wrapper.section-space {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }

    .rs-services-area.rs-services-four .rs-about-tab .nav {
        display: flex;
        gap: 12px;
        flex-wrap: nowrap;
    }

    .rs-services-area.rs-services-four .rs-about-tab .nav-item {
        flex: 1 1 0;
    }

    .rs-services-area.rs-services-four .rs-about-tab .nav-link-custom {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .rs-banner-area .rs-text-slide-area {
        padding-top: 8px;
        padding-bottom: 8px;
    }
}

/* Benefits section (rs-services-twelve) */
@media (max-width: 991px) {
    .rs-services-area.rs-services-twelve .rs-services-wrapper {
        margin-top: 20px;
    }

    .rs-services-area.rs-services-twelve .rs-services-item {
        padding: 20px !important;
    }
}

@media (max-width: 575px) {
    .rs-services-area.rs-services-twelve .rs-services-item {
        padding: 16px !important;
    }
}

/* Industries slider */
@media (max-width: 991px) {
    .rs-portfolio-one .rs-portfolio-navigation {
        text-align: left !important;
        margin-top: 12px;
    }

    .rs-portfolio-one .rs-portfolio-item .rs-portfolio-title {
        font-size: 18px;
    }
}

@media (max-width: 575px) {
    .rs-portfolio-one .rs-portfolio-description {
        font-size: 13px;
    }
}

/* Testimonials */
@media (max-width: 991px) {
    .rs-testimonial-three {
        padding-top: 70px;
        padding-bottom: 70px;
    }

    .rs-testimonial-three .rs-testimonial-item {
        padding: 24px;
    }
}

@media (max-width: 767px) {
    /* Light background — matches other page sections */
    .rs-testimonial-three {
        background: #f7f8fa !important;
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }

    /* Remove double padding from wrapper — section padding is enough */
    .rs-testimonial-three .rs-testimonial-wrapper {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Hide desktop-only bg image */
    .rs-testimonial-three .rs-testimonial-bg-thumb {
        display: none !important;
    }

    /* Remove dark overlay */
    .rs-testimonial-three::before {
        display: none !important;
    }

    /* Section headings: dark */
    .rs-testimonial-three .rs-section-title {
        color: #1a1a1a !important;
        text-shadow: none !important;
    }

    .rs-testimonial-three .rs-section-subtitle {
        color: #555555 !important;
        text-shadow: none !important;
    }

    /* White card per item */
    .rs-testimonial-three .rs-testimonial-item {
        background: #ffffff !important;
        border: 1px solid #e8e8e8 !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07) !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    /* Dark text — 3-class specificity (0,3,0) beats global white rule (0,2,0) */
    .rs-testimonial-three .rs-testimonial-item .rs-testimonial-title {
        color: #1a1a1a !important;
        text-shadow: none !important;
    }

    .rs-testimonial-three .rs-testimonial-item .rs-testimonial-content p {
        color: #444444 !important;
        opacity: 1 !important;
        text-shadow: none !important;
    }

    .rs-testimonial-three .rs-testimonial-item .rs-testimonial-avater-title {
        color: #1a1a1a !important;
        text-shadow: none !important;
    }

    .rs-testimonial-three
        .rs-testimonial-item
        .rs-testimonial-avater-designation {
        color: #666666 !important;
        text-shadow: none !important;
    }

    /* Divider line */
    .rs-testimonial-three .rs-testimonial-item .rs-testimonial-description {
        border-bottom-color: #e8e8e8 !important;
    }

    /* Quote icon: brand red */
    .rs-testimonial-three .rs-testimonial-item .rs-testimonial-icon svg path {
        fill: #e30613 !important;
    }

    /* Avatar row: image + icon side by side */
    .rs-testimonial-three .rs-testimonial-avater-thumb {
        display: flex !important;
        align-items: center !important;
        gap: 14px !important;
        text-align: left !important;
    }

    .rs-testimonial-three .rs-testimonial-thumb {
        margin-bottom: 0 !important;
        flex-shrink: 0 !important;
    }

    /* Navigation */
    .rs-testimonial-three .rs-testimonial-navigation {
        justify-content: center !important;
        margin-top: 20px;
    }

    .rs-testimonial-three .rs-swiper-btn {
        width: 40px !important;
        height: 40px !important;
    }
}

@media (max-width: 575px) {
    .rs-testimonial-three .rs-testimonial-item {
        padding: 18px;
    }

    .rs-testimonial-three .rs-testimonial-content {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

    .rs-testimonial-three .rs-testimonial-description {
        flex-grow: 1;
    }

    .rs-testimonial-three .rs-testimonial-description p {
        font-size: 15px !important;
    }

    .rs-testimonial-three .rs-testimonial-avater-designation {
        font-size: 13px !important;
    }
}

/* Testimonial text contrast */
.rs-testimonial-three .rs-testimonial-content,
.rs-testimonial-three .rs-testimonial-content p,
.rs-testimonial-three .rs-testimonial-title,
.rs-testimonial-three .rs-testimonial-avater-title,
.rs-testimonial-three .rs-testimonial-avater-designation {
    color: #ffffff !important;
}

.rs-testimonial-three .rs-testimonial-content p {
    opacity: 0.9;
}

@media (max-width: 991px) {
    .rs-testimonial-three::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 1;
    }

    .rs-testimonial-three .rs-testimonial-wrapper {
        position: relative;
        z-index: 2;
    }

    .rs-testimonial-three .rs-testimonial-content,
    .rs-testimonial-three .rs-testimonial-content p,
    .rs-testimonial-three .rs-testimonial-title,
    .rs-testimonial-three .rs-testimonial-avater-title,
    .rs-testimonial-three .rs-testimonial-avater-designation {
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    }
}

/* Blog */
@media (max-width: 991px) {
    .rs-blog-two .rs-blog-title {
        min-height: auto !important;
    }
}

@media (max-width: 575px) {
    .rs-blog-two .rs-blog-item {
        padding: 0;
    }
}

/* FAQ */
@media (max-width: 767px) {
    .rs-faq-area .rs-accordion-item {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Header Two — single-line navbar fix on mobile */
@media (max-width: 991px) {
    .rs-header-two {
        padding: 12px 0 !important;
    }
    .rs-header-two .rs-header-inner {
        flex-wrap: nowrap !important;
        align-items: center !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    .rs-header-two .rs-header-right {
        gap: 12px !important;
        align-items: center !important;
        display: flex !important;
    }
    /* Compact "Book a Demo" button — visible but sized to fit beside the hamburger */
    .rs-header-two .rs-header-btn {
        display: block !important;
        flex-shrink: 0 !important;
    }
    .rs-header-two .rs-header-btn .rs-btn {
        font-size: 11px !important;
        padding: 7px 12px !important;
        height: auto !important;
        min-width: unset !important;
        white-space: nowrap !important;
        line-height: 1.3 !important;
    }
    .rs-header-two .rs-header-btn .rs-btn .icon-box {
        display: none !important;
    }
    /* Ensure hamburger is always on top and easily tappable */
    .rs-header-two .rs-header-hamburger {
        position: relative !important;
        z-index: 100 !important;
        flex-shrink: 0 !important;
    }
    .rs-header-two .rs-header-hamburger .sidebar-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 44px !important;
        min-height: 44px !important;
        cursor: pointer !important;
        pointer-events: auto !important;
    }
    .rs-header-two .rs-header-hamburger .bar-icon {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        pointer-events: auto !important;
    }
    .rs-header-two .rs-header-left {
        flex-shrink: 0 !important;
    }
}

/* Pricing cards visibility on mobile */
@media (max-width: 767px) {
    .rs-pricing-area .row.g-5 > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .rs-pricing-area .rs-pricing-item {
        width: 100%;
    }

    .rs-pricing-area .row.g-5 {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .rs-pricing-two .monthly-pricing {
        display: block !important;
    }

    .rs-pricing-two .yearly-pricing {
        display: none !important;
    }

    .rs-pricing-area .rs-pricing-item {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
}
