/* ==========================================================================
   Ranjan Industries — Responsive Enhancements + Service Inquiry Popup
   Loaded after style.css so these rules win without !important wherever
   possible. Section A is the popup component; Section B contains responsive
   tweaks that apply to every page.
   ========================================================================== */


/* =========================================================
   A00. Remove header shadow / outline on sticky scroll
        + ensure sub-menu dropdowns are never clipped
   ========================================================= */
.sticky-wrapper.sticky {
    box-shadow: none;
}
.header-layout3 .sticky-wrapper.sticky .menu-area {
    border: none;
}

/* The pill-shaped menu-area must NOT clip its children so
   the Products/Downloads sub-menu dropdowns are visible. */
.header-layout3 .menu-area,
.header-layout3 .sticky-wrapper.sticky .menu-area {
    overflow: visible;
}

/* Ensure sub-menus sit above hero banners and other z-index layers. */
.main-menu ul li:hover > ul.sub-menu {
    z-index: 999;
}


/* =========================================================
   A0. Header "Service Request" Button
   ========================================================= */
.ri-header-service-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    margin-right: 10px;
    border: 2px solid #ffd400;
    background: transparent;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}
.ri-header-service-btn i {
    color: #ffd400;
    font-size: 13px;
    transition: color 0.2s ease;
}
.ri-header-service-btn:hover {
    background: #ffd400;
    color: #0c2745;
    transform: translateY(-1px);
}
.ri-header-service-btn:hover i {
    color: #0c2745;
}
/* When the header has scrolled and turned light (sticky-active),
   keep the text readable. */
.sticky-active .ri-header-service-btn {
    color: #0c2745;
    border-color: #ffd400;
}
.sticky-active .ri-header-service-btn i {
    color: #f0a500;
}

/* Pulsing "Service Request" link inside the mobile menu */
.th-mobile-menu li a[data-ri-popup-open] {
    color: #ffd400 !important;
    font-weight: 700;
}


/* =========================================================
   A. Service Inquiry Popup
   ========================================================= */
.ri-service-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.ri-service-popup.is-open {
    display: flex;
}
.ri-service-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 26, 48, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
    animation: riPopupFade 0.3s ease forwards;
}
.ri-service-popup__dialog {
    position: relative;
    width: 100%;
    max-width: 920px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: riPopupRise 0.35s cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
    margin: auto;
}
.ri-service-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    color: #0c2745;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.ri-service-popup__close:hover {
    background: #ffd400;
    color: #0c2745;
    transform: rotate(90deg);
}

.ri-service-popup__grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    min-height: 480px;
}

/* Left media panel */
.ri-service-popup__media {
    background:
        linear-gradient(160deg, rgba(11, 41, 78, 0.85) 0%, rgba(11, 41, 78, 0.65) 100%),
        url('../images/banner-1.png') center/cover no-repeat;
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 40px 32px;
}
.ri-service-popup__media-inner { width: 100%; }
.ri-service-popup__eyebrow {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #ffd400;
    background: rgba(255, 212, 0, 0.12);
    padding: 6px 12px;
    border-radius: 50px;
    margin-bottom: 18px;
}
.ri-service-popup__media-title {
    color: #ffffff;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
    margin: 0 0 22px;
}
.ri-service-popup__points {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}
.ri-service-popup__points li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    color: #e8eef7;
}
.ri-service-popup__points i {
    color: #ffd400;
    font-size: 14px;
    margin-top: 4px;
    flex-shrink: 0;
}
.ri-service-popup__contact {
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 15px;
    color: #ffffff;
}
.ri-service-popup__contact i {
    color: #ffd400;
    margin-right: 8px;
}
.ri-service-popup__contact a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}
.ri-service-popup__contact a:hover { color: #ffd400; }

/* Right form panel */
.ri-service-popup__form-wrap {
    padding: 40px 36px;
    background: #ffffff;
}
.ri-service-popup__title {
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    color: #0c2745;
    margin: 0 0 6px;
}
.ri-service-popup__sub {
    font-size: 14px;
    color: #5b6b80;
    margin: 0 0 22px;
}

.ri-service-popup__choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}
.ri-service-popup__choice-item {
    cursor: pointer;
    margin: 0;
}
.ri-service-popup__choice-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.ri-service-popup__choice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    padding: 16px 10px;
    border: 2px solid #e3e8f0;
    border-radius: 12px;
    color: #0c2745;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
    min-height: 78px;
}
.ri-service-popup__choice-card i {
    font-size: 22px;
    color: #0c2745;
    transition: color 0.2s ease;
}
.ri-service-popup__choice-item:hover .ri-service-popup__choice-card {
    border-color: #ffd400;
}
.ri-service-popup__choice-item input:checked + .ri-service-popup__choice-card {
    border-color: #ffd400;
    background: #fffaeb;
    color: #0c2745;
}
.ri-service-popup__choice-item input:checked + .ri-service-popup__choice-card i {
    color: #f0a500;
}

.ri-service-popup__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.ri-service-popup__field { margin-bottom: 12px; }
.ri-service-popup__field input,
.ri-service-popup__field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e3e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #0c2745;
    background: #f8fafc;
    transition: border-color 0.2s ease, background 0.2s ease;
    box-shadow: none;
}
.ri-service-popup__field input:focus,
.ri-service-popup__field textarea:focus {
    outline: none;
    border-color: #ffd400;
    background: #ffffff;
}
.ri-service-popup__field textarea {
    resize: vertical;
    min-height: 84px;
}

.ri-service-popup__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 22px;
    border: 0;
    border-radius: 10px;
    background: #ffd400;
    color: #0c2745;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    margin-top: 4px;
}
.ri-service-popup__submit:hover {
    background: #f0a500;
    color: #ffffff;
    transform: translateY(-1px);
}
.ri-service-popup__msg {
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.4;
    min-height: 1em;
    color: #5b6b80;
}
.ri-service-popup__msg.success { color: #1c8a4d; }
.ri-service-popup__msg.error   { color: #c0392b; }

@keyframes riPopupFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes riPopupRise {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}
body.ri-popup-open { overflow: hidden; }


/* =========================================================
   B. Site-wide Responsive Refinements
   ========================================================= */

/* Make all media fluid by default */
img, video, iframe {
    max-width: 100%;
    height: auto;
}
.contact-map iframe {
    width: 100%;
    height: 100%;
    min-height: 340px;
    border: 0;
}

/* Hero text safety */
.hero-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ---- Tablet: 992px and below ---- */
@media (max-width: 991.98px) {
    .ri-service-popup__grid {
        grid-template-columns: 1fr;
    }
    .ri-service-popup__media {
        padding: 28px 26px;
        min-height: auto;
    }
    .ri-service-popup__media-title {
        font-size: 20px;
        margin-bottom: 14px;
    }
    .ri-service-popup__points li { font-size: 13px; }
    .ri-service-popup__form-wrap { padding: 28px 26px; }

    .hero-title {
        font-size: 42px !important;
        line-height: 1.15 !important;
    }
    .sec-title {
        font-size: 32px !important;
        line-height: 1.2 !important;
    }
    .breadcumb-wrapper {
        padding-top: 120px;
        padding-bottom: 60px;
    }
    .footer-wrapper .row > [class*="col-"] {
        margin-bottom: 12px;
    }
}

/* ---- Mobile: 767px and below ---- */
@media (max-width: 767.98px) {
    .ri-service-popup { padding: 12px; }
    .ri-service-popup__dialog { border-radius: 14px; }
    .ri-service-popup__close {
        top: 8px;
        right: 8px;
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
    .ri-service-popup__media {
        padding: 24px 20px;
    }
    .ri-service-popup__media-title { font-size: 18px; }
    .ri-service-popup__form-wrap { padding: 24px 20px; }
    .ri-service-popup__title { font-size: 20px; }
    .ri-service-popup__row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .ri-service-popup__choice {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .ri-service-popup__choice-card {
        padding: 12px 8px;
        font-size: 12px;
        min-height: 70px;
    }
    .ri-service-popup__choice-card i { font-size: 20px; }

    .hero-title {
        font-size: 32px !important;
        line-height: 1.15 !important;
    }
    .hero-text {
        font-size: 15px !important;
        line-height: 1.55 !important;
    }
    .sec-title {
        font-size: 26px !important;
        line-height: 1.25 !important;
    }
    .sub-title {
        font-size: 14px !important;
    }
    .th-btn,
    .th-btn.style1 {
        padding: 12px 22px !important;
        font-size: 13px !important;
    }
    .breadcumb-wrapper {
        padding-top: 100px;
        padding-bottom: 50px;
    }
    .breadcumb-title {
        font-size: 28px !important;
    }
    .header-logo img,
    .mobile-logo img {
        height: 50px !important;
    }
    .copyright-text {
        font-size: 13px;
        text-align: center;
    }
    .footer-info,
    .footer-info-title {
        word-break: break-word;
    }
    .footer-info a { word-break: break-all; }
    .service-process-wrap {
        flex-direction: column;
        gap: 20px;
    }
    .contact-media {
        flex-direction: column;
        text-align: center;
    }
    .contact-form2 .row {
        margin-left: -8px;
        margin-right: -8px;
    }
    .contact-map iframe { min-height: 280px; }

    /* Tame oversized horizontal-scroll containers */
    .container,
    .th-container,
    .th-container2 {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ---- Small mobile: 480px and below ---- */
@media (max-width: 479.98px) {
    .ri-service-popup__choice {
        grid-template-columns: 1fr;
    }
    .ri-service-popup__choice-card {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 12px 14px;
        text-align: left;
        min-height: auto;
    }
    .hero-title {
        font-size: 26px !important;
    }
    .sec-title {
        font-size: 22px !important;
    }
    .th-btn,
    .th-btn.style1 {
        padding: 10px 18px !important;
        font-size: 12px !important;
    }
}

/* Prevent horizontal overflow project-wide */
html, body { overflow-x: hidden; }


/* =========================================================
   Toll-Free Floating Button
   ========================================================= */
.ri-tollfree-float {
    position: fixed;
    bottom: 154px;          /* stacks above WhatsApp button (90px + 54px + 10px gap) */
    right: 18px;
    z-index: 9000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px 9px 12px;
    background: #0c2745;
    color: #ffffff;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 4px 18px rgba(12, 39, 69, 0.35);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}
.ri-tollfree-float i {
    width: 32px;
    height: 32px;
    background: #ffd400;
    color: #0c2745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.ri-tollfree-float__number {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1;
}
.ri-tollfree-float__label {
    font-size: 10px;
    font-weight: 500;
    color: #ffd400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: block;
    line-height: 1;
    margin-top: 2px;
}
.ri-tollfree-float div {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.ri-tollfree-float:hover {
    background: #ffd400;
    color: #0c2745;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(12, 39, 69, 0.25);
}
.ri-tollfree-float:hover i {
    background: #0c2745;
    color: #ffd400;
}
.ri-tollfree-float:hover .ri-tollfree-float__label {
    color: #0c2745;
}

@media (max-width: 767.98px) {
    .ri-tollfree-float {
        bottom: 138px;
        right: 12px;
        padding: 8px 12px 8px 10px;
        gap: 6px;
    }
    .ri-tollfree-float i {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .ri-tollfree-float__number { font-size: 13px; }
    .ri-tollfree-float__label  { font-size: 9px; }
}


/* =========================================================
   WhatsApp Floating Button
   ========================================================= */
.ri-whatsapp-float {
    position: fixed;
    bottom: 90px;           /* sits just above the scroll-to-top button */
    right: 28px;
    z-index: 9000;
    width: 54px;
    height: 54px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ri-whatsapp-float i {
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
}
.ri-whatsapp-float:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55);
}

/* Tooltip label */
.ri-whatsapp-float__tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #0c2745;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.ri-whatsapp-float__tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #0c2745;
}
.ri-whatsapp-float:hover .ri-whatsapp-float__tooltip {
    opacity: 1;
}

/* Pulsing ring animation to draw attention */
.ri-whatsapp-float::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25d366;
    opacity: 0.5;
    animation: riWaPulse 2s ease-out infinite;
}
@keyframes riWaPulse {
    0%   { transform: scale(1);   opacity: 0.5; }
    70%  { transform: scale(1.6); opacity: 0;   }
    100% { transform: scale(1.6); opacity: 0;   }
}

@media (max-width: 767.98px) {
    .ri-whatsapp-float {
        bottom: 80px;
        right: 18px;
        width: 48px;
        height: 48px;
    }
    .ri-whatsapp-float i { font-size: 22px; }
    .ri-whatsapp-float__tooltip { display: none; }
}
