/* ═══════════════════════════════════════════════════════════════
   Raghvit Responsive System
   Mobile:  < 768px  |  Tablet: 768–991px  |  Desktop: ≥ 992px
   Load after raghvit-site.css
   ═══════════════════════════════════════════════════════════════ */

[x-cloak] {
    display: none !important;
}

.rs-site-shell img:not([width]),
.rs-site-shell video,
.rs-site-shell iframe {
    max-width: 100%;
}

/* ─── Hero 3D scene — proportional scale (same layout as desktop) ─── */
@media (max-width: 1199.98px) {
    .rs-hero-layout {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) !important;
        gap: 1.25rem !important;
        align-items: center !important;
    }

    .rs-hero-col-scene {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .rs-hero--premium .rs-hero-scene-shell {
        max-height: none;
    }
}

/* ─── Tablet (≤991px) ─── */
@media (max-width: 991.98px) {
    .rs-hero--premium {
        min-height: auto !important;
        padding: 4rem 0 2.75rem !important;
    }

    .rs-hero--premium h1 {
        font-size: clamp(1.85rem, 5.5vw, 2.75rem) !important;
        max-width: 100%;
    }

    .rs-hero--premium p {
        font-size: .98rem !important;
        max-width: 100%;
    }

    .rs-hero--premium + .rs-trust-strip {
        margin-top: 0 !important;
        padding-top: 1.25rem;
    }

    .rs-hero-secondary-cta {
        min-width: 0 !important;
    }

    .rs-section-cta-col {
        text-align: center !important;
        margin-top: .5rem;
    }

    .rs-section-cta-col .btn {
        width: 100%;
        max-width: 340px;
    }

    .rs-cta-band {
        padding: 2.75rem 0 !important;
        text-align: center;
    }

    .rs-cta-band .row {
        text-align: center;
    }

    .rs-cta-band .col-lg-4 {
        text-align: center !important;
    }

    .rs-cta-band .btn {
        width: 100%;
        max-width: 340px;
    }

    .rs-cta-lead {
        max-width: 100% !important;
        margin-left: auto;
        margin-right: auto;
    }

    .rs-services-section .row.align-items-end {
        text-align: center;
    }

    .rs-services-section .col-lg-5 {
        text-align: center !important;
    }

    .rs-process .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .rs-problem-section .row > [class*="col-"]:first-child {
        order: 1;
    }

    .rs-problem-section .row > [class*="col-"]:last-child {
        order: 2;
    }

    .rs-showcase-card--featured .rs-showcase-media {
        min-height: 220px;
    }

    .rs-showcase-card--featured .rs-showcase-media img {
        min-height: 220px;
    }

    .rs-contact-form-panel,
    .rs-contact-info-panel {
        padding: 1.25rem 1.1rem;
    }

    .rs-blog-toolbar {
        flex-direction: column;
        align-items: stretch !important;
        gap: 1rem;
    }

    .rs-blog-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: .35rem;
        -webkit-overflow-scrolling: touch;
    }

    .rs-blog-toc-col {
        position: static !important;
        top: auto !important;
        margin-bottom: 1.5rem;
    }
}

/* ─── Footer newsletter — mobile ─── */
@media (max-width: 767.98px) {
    .rs-footer > .container {
        padding-left: max(1.15rem, env(safe-area-inset-left, 0px));
        padding-right: max(1.15rem, env(safe-area-inset-right, 0px));
    }

    .rs-footer .row > [class*="col-"] {
        text-align: center;
    }

    .rs-footer-brand {
        justify-content: center;
    }

    .rs-footer-description {
        margin-left: auto;
        margin-right: auto;
    }

    .rs-footer-badges {
        justify-content: center;
    }

    .rs-footer-socials {
        justify-content: center;
    }

    .rs-footer .btn-link {
        text-align: center;
    }

    .rs-footer-col-contact {
        text-align: center;
    }

    .rs-footer-col-contact .rs-footer-contact-line {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: .25rem .5rem;
        text-align: center;
    }

    .rs-footer-col-contact .rs-footer-contact-line i {
        flex-shrink: 0;
    }

    .rs-footer-newsletter {
        text-align: center;
        margin-top: .5rem;
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    .rs-footer-newsletter h5 {
        font-size: clamp(1rem, 4.2vw, 1.15rem);
        line-height: 1.35;
    }

    .rs-footer-newsletter p {
        font-size: .88rem;
        line-height: 1.55;
        padding-left: .15rem;
        padding-right: .15rem;
    }

    .rs-newsletter-form {
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }

    .rs-footer-copyright-inner {
        flex-direction: column;
        text-align: center;
    }

    .rs-footer-copyright-text {
        justify-content: center;
    }

    .rs-footer-copyright-links {
        justify-content: center;
    }

    .rs-newsletter-form .form-control,
    .rs-newsletter-form .btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .rs-newsletter-alert,
    .rs-newsletter-error {
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ─── Mobile (≤767px) — hero & sections ─── */
@media (max-width: 767.98px) {
    .rs-navbar {
        min-height: 62px;
        padding: 0 .75rem !important;
    }

    .rs-brand img {
        width: 52px !important;
        height: 52px !important;
        transform: scale(1.06);
    }

    .rs-hero--premium {
        padding: 3.25rem 0 2rem !important;
    }

    .rs-hero--premium .rs-glass-chip {
        padding: .65rem .75rem;
    }

    .rs-hero--premium .rs-hero-metrics {
        grid-template-columns: 1fr !important;
        gap: .65rem;
    }

    /* Phone: text above, 3D below — same scaled scene inside */
    .rs-hero-layout {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .rs-hero-col-scene {
        max-width: min(560px, 100%);
        margin-left: auto;
        margin-right: auto;
    }

    .rs-hero-video-strip {
        padding: .65rem .5rem !important;
        gap: .45rem !important;
    }

    .rs-hero-video-tag {
        font-size: .66rem;
        padding: .38rem .62rem;
    }

    .rs-trust-strip .rs-trust-item {
        font-size: .82rem;
        padding: .65rem .75rem;
    }

    .rs-section {
        padding: 3rem 0 !important;
    }

    .rs-problem-section,
    .rs-services-section,
    .rs-showcase-section,
    .rs-solutions-section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .rs-section-title h2 {
        font-size: clamp(1.45rem, 6vw, 2rem);
    }

    .rs-process .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .rs-process-step {
        min-height: auto;
    }

    .rs-metric--premium {
        padding: 1.15rem;
    }

    .rs-metric--premium h2 {
        font-size: 1.75rem;
    }

    .rs-contact-chip {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .rs-solution-card,
    .rs-mini-card {
        padding: 1.1rem;
    }

    .rs-map {
        min-height: 260px;
        margin-top: .5rem;
    }

    .rs-map iframe {
        min-height: 260px;
    }

    .rs-contact-form {
        padding: 1rem;
    }

    .rs-feature-row {
        flex-direction: column !important;
        text-align: center !important;
    }

    .rs-feature-row > div {
        text-align: center !important;
    }

    .rs-price-item h1.display-5 {
        font-size: clamp(2rem, 10vw, 2.75rem) !important;
    }

    .rs-blog-page-header h1 {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }

    .rs-blog-card-meta {
        gap: .5rem;
    }

    .rs-blog-article-title {
        font-size: clamp(1.65rem, 7vw, 2.35rem);
    }

    .rs-footer .container {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .rs-footer-badges span {
        font-size: .72rem;
        padding: .35rem .6rem;
    }
}

/* ─── Small phones (≤575px) ─── */
@media (max-width: 575.98px) {
    .rs-trust-strip .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .rs-hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .rs-hero-actions .btn,
    .rs-hero-actions a {
        width: 100%;
    }

    .rs-showcase-media img {
        min-height: 180px;
    }

    .rs-problem-visual img {
        max-height: 280px;
        object-fit: contain;
    }
}

/* ─── Tablet landscape / iPad (768–1199px) ─── */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .rs-hero--premium h1 {
        font-size: clamp(1.65rem, 2.8vw, 2.35rem) !important;
    }

    .rs-hero-video-strip .rs-hero-video {
        max-width: min(480px, 72vw);
    }

    .rs-hero-video-side .rs-hero-video-tag {
        font-size: .68rem;
    }

    .rs-solutions-section .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ─── Large desktop (≥1200px) ─── */
@media (min-width: 1200px) {
    .rs-hero-layout {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) !important;
    }

    .rs-hero-video-strip .rs-hero-video {
        max-width: 560px;
    }
}

/* ─── Map aspect ratio (all sizes) ─── */
.rs-map {
    position: relative;
    overflow: hidden;
    border-radius: var(--rs-radius, 14px);
    min-height: 280px;
}

.rs-map iframe {
    display: block;
    width: 100% !important;
    height: 100%;
    min-height: 280px;
    border: 0;
}

@media (min-width: 992px) {
    .rs-map {
        min-height: 100%;
        aspect-ratio: auto;
        height: 100%;
    }

    .rs-map iframe {
        position: absolute;
        inset: 0;
        min-height: 100%;
        height: 100%;
    }
}

    .rs-contact-hero-actions .btn { width: 100%; }
}

@media (max-width: 767.98px) {
    .rs-about-join-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .rs-about-join-title {
        justify-content: center;
    }

    .rs-about-signature {
        text-align: center;
    }
}

/* ─── Utility classes ─── */
.rs-cta-lead {
    color: #d8e4f6;
    max-width: 780px;
    line-height: 1.75;
}

.rs-lead-muted {
    line-height: 1.8;
}

.rs-portfolio-thumb {
    width: 100%;
    height: clamp(160px, 28vw, 200px);
    object-fit: cover;
}
