﻿/* ==========================================================
   RAHMATPAY - MOBILE RESPONSIVENESS REPAIR
   Step 04E | Royal Luxe theme preserved
   ========================================================== */

/* GLOBAL VIEWPORT PROTECTION */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: clip;
}

img,
svg,
video {
    max-width: 100%;
}

.container,
.container-wide,
main,
section {
    min-width: 0;
}

/* TABLET */

@media (max-width: 1024px) {

    .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
        gap: 35px;
    }

    .hero-content,
    .hero-visual {
        min-width: 0;
        width: 100%;
    }

    .hero-content h1 {
        font-size: clamp(3rem, 5.5vw, 4.8rem);
        overflow-wrap: break-word;
    }

    .hero-visual-card {
        width: min(100%, 435px);
        margin-inline: auto;
    }

    .orbit-one,
    .orbit-two {
        max-width: 100%;
    }
}

/* MOBILE - MAIN LAYOUT */

@media (max-width: 768px) {

    body {
        overflow-x: hidden;
    }

    .site-header {
        width: 100%;
    }

    .header-inner {
        width: 100%;
        min-height: 76px;
        padding-inline: 18px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .brand-logo {
        width: clamp(150px, 43vw, 190px);
        max-width: 70%;
        height: auto;
        max-height: 62px;
        object-fit: contain;
    }

    .hero-section {
        width: 100%;
        min-height: auto;
        padding: 58px 0 65px;
        overflow: hidden;
    }

    .hero-grid {
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 42px;
        padding-inline: 20px;
        align-items: center;
    }

    .hero-content {
        width: 100%;
        max-width: 620px;
        min-width: 0;
        margin-inline: auto;
        text-align: left;
    }

    .hero-eyebrow {
        display: inline-flex;
        max-width: 100%;
        margin-bottom: 20px;
        font-size: .61rem;
        line-height: 1.5;
        letter-spacing: .1em;
        white-space: normal;
    }

    .hero-content h1 {
        width: 100%;
        max-width: 100%;
        margin-block: 0;
        font-size: clamp(2.65rem, 10vw, 4.3rem);
        line-height: 1.04;
        letter-spacing: -.055em;
        overflow-wrap: normal;
        word-break: normal;
    }

    .hero-content h1 span {
        display: block;
        max-width: 100%;
        margin-top: 10px;
    }

    .hero-description {
        width: 100%;
        max-width: 540px;
        margin-top: 24px;
        font-size: .97rem;
        line-height: 1.8;
    }

    .hero-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 28px;
    }

    .hero-actions .btn {
        max-width: 100%;
        min-height: 52px;
        justify-content: center;
        white-space: normal;
    }

    .hero-note {
        max-width: 100%;
        line-height: 1.7;
    }

    /* FEATURE CARD MUST STACK BELOW HERO TEXT */

    .hero-visual {
        position: relative;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 0;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    .hero-visual-card {
        position: relative;
        width: 100%;
        max-width: 435px;
        min-width: 0;
        min-height: auto;
        margin-inline: auto;
        padding: 32px 23px;
        border-radius: 27px;
    }

    .visual-emblem {
        width: 125px;
        height: 125px;
        margin: 27px auto 24px;
    }

    .hero-visual-card h2 {
        max-width: 100%;
        font-size: clamp(1.8rem, 7vw, 2.35rem);
        line-height: 1.25;
        text-align: center;
        overflow-wrap: break-word;
    }

    .hero-visual-card p {
        max-width: 100%;
        line-height: 1.7;
        text-align: center;
    }

    .visual-values {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .visual-values > div {
        min-width: 0;
        text-align: center;
    }

    .visual-values > div > span:last-child {
        font-size: .68rem;
        overflow-wrap: break-word;
    }

    /* DECORATIVE ELEMENTS */

    .hero-orbit,
    .orbit-one,
    .orbit-two {
        pointer-events: none;
        max-width: 100%;
    }

    .floating-decoration {
        max-width: 42px;
        max-height: 42px;
    }

    /* CONTENT SECTIONS */

    .introduction-section,
    .values-section,
    .process-section,
    .principles-section,
    .contact-section {
        width: 100%;
        padding-block: 70px;
        overflow: hidden;
    }

    .introduction-heading,
    .introduction-copy,
    .principles-content,
    .contact-grid {
        min-width: 0;
        width: 100%;
    }

    .values-grid,
    .process-grid {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .value-card,
    .process-card {
        width: 100%;
        min-width: 0;
        min-height: auto;
    }

    .principles-panel {
        width: 100%;
        min-height: auto;
        padding: 35px 24px;
    }

    .principles-panel blockquote {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        line-height: 1.3;
    }

    .application-section {
        width: 100%;
        padding: 55px 18px;
        overflow: hidden;
    }

    .application-panel {
        width: 100%;
        max-width: 100%;
        padding: 42px 24px;
        border-radius: 26px;
    }

    .application-content h2 {
        font-size: clamp(2rem, 8vw, 3rem);
        line-height: 1.15;
    }

    .application-button {
        max-width: 100%;
        white-space: normal;
    }

    .contact-section {
        padding-inline: 20px;
    }

    .site-footer {
        width: 100%;
        overflow: hidden;
    }

    .footer-main {
        width: 100%;
        padding-inline: 20px;
    }

    .footer-bottom {
        padding-inline: 20px;
        flex-wrap: wrap;
    }

    .footer-logo {
        max-width: 100%;
    }
}

/* SMALL MOBILE */

@media (max-width: 480px) {

    .header-inner {
        min-height: 72px;
        padding-inline: 15px;
    }

    .brand-logo {
        width: 160px;
        max-height: 55px;
    }

    .hero-section {
        padding-top: 45px;
        padding-bottom: 52px;
    }

    .hero-grid {
        padding-inline: 18px;
        gap: 36px;
    }

    .hero-content h1 {
        font-size: clamp(2.5rem, 10.5vw, 3.3rem);
        line-height: 1.06;
    }

    .hero-description {
        font-size: .94rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
        min-height: 52px;
    }

    .hero-visual-card {
        padding: 27px 18px;
        border-radius: 23px;
    }

    .visual-emblem {
        width: 112px;
        height: 112px;
    }

    .hero-visual-card h2 {
        font-size: 1.9rem;
    }

    .visual-values > div > span:last-child {
        font-size: .62rem;
    }

    .section-title {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }

    .value-card {
        padding: 27px 23px;
    }

    .process-card {
        padding-inline: 5px;
    }

    .application-content h2 {
        font-size: 2.25rem;
    }
}

/* VERY NARROW DEVICES */

@media (max-width: 360px) {

    .brand-logo {
        width: 145px;
    }

    .hero-grid {
        padding-inline: 15px;
    }

    .hero-content h1 {
        font-size: 2.35rem;
    }

    .hero-visual-card {
        padding-inline: 15px;
    }

    .visual-values {
        gap: 4px;
    }

    .visual-values > div > span:last-child {
        font-size: .57rem;
    }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
    .rp-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
