/* Prevent horizontal scroll on any edge cases */
html, body { overflow-x: hidden; }

/* ═══════════════════════════════════════════════════════
   RPA GROUP (FIJI) — Home Page Styles
   rpa-home.css
═══════════════════════════════════════════════════════ */

/* ── RESET grey bgcolor block ─────────────────────── */
.bgcolor { display: none !important; }

/* ─────────────────────────────────────────────────────
   LOGO — image based with horizontal scroll animation
   Animation target: #rpa-logo-link  (the <a> element)
   The <a> has zero competing CSS, so transform is clean.
───────────────────────────────────────────────────── */
header .site-logo {
    padding: 16px 0 0 0 !important;
    width: 200px !important;
    float: left !important;
    overflow: visible !important;
    /* ONLY padding/width — NO transform transition here */
    transition: padding 0.3s ease, width 0.3s ease !important;
    will-change: auto !important;
    transform: none !important;
}
header .site-logo h1 { display: none !important; }

/* THE animation target — nothing else sets transform on this */
#rpa-logo-link,
.logo-link {
    display: inline-block !important;
    /* This is the ONLY transition on this element */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    will-change: transform;
    transform: translateX(0);   /* explicit initial state */
    text-decoration: none;
}

.logo-img {
    height: 62px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.65));
    transition: filter 0.3s ease, height 0.3s ease;
    /* NO transform on the img — only on the parent <a> */
    pointer-events: none;
}
.logo-img:hover {
    filter: drop-shadow(0 3px 14px rgba(227,6,19,0.5)) brightness(1.1);
}
header.smaller .site-logo { padding: 8px 0 0 0 !important; }
header.smaller .logo-img  { height: 40px; }

/* ── HERO SECTION ─────────────────────────────────── */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Video */
.hero-video-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Dark-blue overlay with blur effect */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(160deg,
            rgba(4, 10, 28, 0.90) 0%,
            rgba(6, 15, 42, 0.80) 45%,
            rgba(8, 18, 50, 0.72) 100%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Watermark logo */
.hero-watermark {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    user-select: none;
}
.hero-watermark img {
    width: clamp(320px, 48vw, 580px);
    opacity: 0.04;
    filter: brightness(4) saturate(0);
}

/* Hero content */
.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 140px 24px 100px;
    max-width: 880px;
    margin: 0 auto;
    width: 100%;
}

/* Badge */
.hero-badge {
    display: inline-block;
    font-size: 45px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #E30613;
    background: rgba(227, 6, 19, 0.08);
    border: 1px solid rgba(227, 6, 19, 0.3);
    padding: 8px 22px;
    margin-bottom: 26px;
}

/* Title */
.hero-title {
    font-size: clamp(38px, 6.5vw, 78px);
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    line-height: 1.05;
    margin: 0 0 16px;
    text-shadow: 0 3px 20px rgba(0,0,0,0.6);
}
.hero-title span { color: #E30613; }

/* Services list */
.hero-services {
    font-size: clamp(12px, 1.6vw, 16px);
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    color: rgba(190, 210, 235, 0.85);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0 0 22px;
}

/* Red divider */
.hero-divider {
    width: 60px;
    height: 3px;
    background: #E30613;
    margin: 0 auto 26px;
    transform-origin: center;
}

/* Description */
.hero-desc {
    font-size: 15px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-style: italic;
    color: rgba(205, 220, 240, 0.82);
    line-height: 1.85;
    max-width: 660px;
    margin: 0 auto 38px;
}
.hero-desc strong {
    display: block;
    margin-top: 12px;
    font-style: normal;
    font-weight: 600;
    color: rgba(220,235,255,0.9);
    font-size: 13px;
    letter-spacing: 1px;
}

/* Buttons */
.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-btn {
    padding: 14px 36px;
    font-size: 13px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.28s ease, color 0.28s ease, border-color 0.28s ease,
                transform 0.2s ease;
}
.hero-btn:hover { transform: translateY(-2px); }
.hero-btn-primary {
    background: #E30613;
    color: #fff;
    border: 2px solid #E30613;
}
.hero-btn-primary:hover {
    background: #c00010;
    border-color: #c00010;
    color: #fff;
}
.hero-btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.45);
}
.hero-btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    color: #fff;
}

/* Scroll indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 96px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.hero-scroll-indicator span {
    font-size: 10px;
    font-family: 'Open Sans', sans-serif;
    letter-spacing: 4px;
    color: rgba(255,255,255,0.38);
    text-transform: uppercase;
}
.scroll-line {
    width: 1px;
    height: 44px;
    background: linear-gradient(to bottom, #E30613 0%, transparent 100%);
    animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%,100% { opacity: 0.35; transform: scaleY(1); }
    50%      { opacity: 1;    transform: scaleY(1.2); }
}

/* Cloud / fade transition to next section */
.hero-cloud-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 160px;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(240, 242, 244, 0.45) 65%,
        rgba(240, 242, 244, 1) 100%
    );
}

/* ── HERO ANIMATIONS ──────────────────────────────── */
.hero-anim {
    opacity: 0;
    transform: translateY(22px);
}
.hero-anim.is-visible {
    animation: heroFadeUp 0.75s ease forwards;
}
@keyframes heroFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* hero-divider special: scale in */
.hero-divider.is-visible {
    animation: heroScaleX 0.6s ease forwards;
}
@keyframes heroScaleX {
    from { opacity: 0; transform: scaleX(0); }
    to   { opacity: 1; transform: scaleX(1); }
}

/* ── MISSION / VISION / VALUES tab fade ───────────── */
.tabcontent.tab-fade {
    animation: none;
}
.tabcontent.tab-fade.tab-entering {
    animation: tabFadeIn 0.42s ease forwards;
}
@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── BARGE HIRE — match Quarry (Concept) exactly ──── */
.Services_sec .Serviceside li.Barge {
    padding: 44px 0 159px 0 !important;
    background: url(../img/barge-bg.jpg) no-repeat !important;
    box-shadow: 1px 4px 7px -4px rgba(0,0,0,0.75) !important;
}
.Services_sec .Serviceside li.Barge a {
    text-decoration: none !important;
    background: url(../img/Barge-hover-icn.png) top center no-repeat !important;
    display: block !important;
}
.Services_sec .Serviceside li.Barge h4 {
    padding: 138px 0 0 0 !important;
    font-size: 18px !important;
    color: #018ac0 !important;
    text-transform: uppercase !important;
    font-family: 'Open Sans', sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
}
.Services_sec .Serviceside li.Barge a:hover h4 {
    color: #fff !important;
    background: url(../img/barge-icn.png) top center no-repeat !important;
}

/* 5 service items — even spacing */
.Services_sec .Serviceside ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.Services_sec .Serviceside li {
    float: none !important;
    width: 192px !important;
    margin: 0 !important;
}

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 900px) {
    .hero-content { padding: 130px 20px 110px; }
    .hero-title   { font-size: 44px; }
    .hero-desc    { font-size: 14px; }
}
@media (max-width: 600px) {
    .hero-title   { font-size: 34px; }
    .hero-services { font-size: 11px; letter-spacing: 1.5px; }
    .hero-badge   { font-size: 10px; letter-spacing: 2px; }
    .hero-btn     { padding: 12px 24px; font-size: 12px; }
    .hero-cloud-fade { height: 90px; }
}

/* ═══════════════════════════════════════════════════════
   SERVICES VIDEO SECTION
   Sits inside #Container between Services & Clients.
   Uses the standard full-bleed breakout technique so it
   ignores the parent's max-width without needing to leave
   the DOM flow. No horizontal scrollbar side effects.
═══════════════════════════════════════════════════════ */

/* Full-bleed wrapper — breaks out of #Container's width */
.svc-video-section {
    position: relative;
    /* Padding-bottom 16:9 trick */
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #030a1a;
    display: block;
    /* Entrance animation */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.85s ease, transform 0.85s ease;
}
.svc-video-section.svc-vid-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Video fills the 16:9 box */
.svc-video-section > video {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    z-index: 0;
}

/* Cinematic dark-blue overlay */
.svc-vid-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        160deg,
        rgba(2, 6, 18, 0.60) 0%,
        rgba(4, 10, 28, 0.42) 50%,
        rgba(2, 6, 18, 0.55) 100%
    );
    pointer-events: none;
}

/* Top fade — blends into Services section above */
.svc-vid-fade-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 12%;
    background: linear-gradient(to bottom,
        rgba(14, 20, 38, 1) 0%,
        transparent 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* Bottom fade — blends into Clients section below */
.svc-vid-fade-btm {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 12%;
    background: linear-gradient(to top,
        rgba(236, 236, 236, 1) 0%,
        transparent 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* Play/Pause + Sound controls — bottom-right */
.svc-vid-controls-bar {
    position: absolute;
    bottom: 14%;
    right: 2%;
    z-index: 3;
    display: flex;
    gap: 10px;
    align-items: center;
}
.svc-ctrl-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 13px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-radius: 24px;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.svc-ctrl-btn .fa { font-size: 14px; }
.svc-ctrl-btn:hover {
    background: rgba(227, 6, 19, 0.88);
    border-color: #E30613;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .svc-vid-controls-bar { bottom: 16%; right: 3%; gap: 6px; }
    .svc-ctrl-btn { padding: 7px 12px; font-size: 11px; }
    #svcSoundLabel { display: none; }
}


/* ═══════════════════════════════════════════════════════
   VIBER FLOATING ACTION BUTTON
═══════════════════════════════════════════════════════ */
.viber-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    text-decoration: none;
    border-radius: 50px;
    background: #7360F2;
    box-shadow: 0 4px 22px rgba(115,96,242,0.55), 0 2px 8px rgba(0,0,0,0.25);
    cursor: pointer;
    /* collapsed: show only the icon circle */
    width: 58px;
    height: 58px;
    transition: width 0.35s cubic-bezier(0.34,1.56,0.64,1),
                box-shadow 0.3s ease,
                background 0.25s ease;
    white-space: nowrap;
}
.viber-fab:hover {
    width: 168px;           /* expands to show label */
    background: #5e4de0;
    box-shadow: 0 6px 32px rgba(115,96,242,0.7), 0 3px 12px rgba(0,0,0,0.3);
}

/* Viber SVG icon circle */
.viber-fab-icon {
    flex-shrink: 0;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.viber-fab-icon svg {
    width: 34px;
    height: 34px;
    display: block;
}

/* "Quick Chat" label — hidden until hover */
.viber-fab-label {
    font-size: 13px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    padding-right: 18px;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.25s ease 0.1s, transform 0.25s ease 0.1s;
    pointer-events: none;
}
.viber-fab:hover .viber-fab-label {
    opacity: 1;
    transform: translateX(0);
}

/* Pulse ring animation */
.viber-fab::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    border: 2px solid rgba(115,96,242,0.5);
    animation: viberPulse 2.4s ease-out infinite;
    pointer-events: none;
}
@keyframes viberPulse {
    0%   { transform: scale(1);   opacity: 0.7; }
    70%  { transform: scale(1.18); opacity: 0;  }
    100% { transform: scale(1.18); opacity: 0;  }
}

/* Stop pulse on hover — clean */
.viber-fab:hover::after { animation: none; opacity: 0; }

@media (max-width: 480px) {
    .viber-fab         { bottom: 18px; right: 16px; width: 52px; height: 52px; }
    .viber-fab:hover   { width: 156px; }
    .viber-fab-icon    { width: 52px; height: 52px; }
    .viber-fab-icon svg { width: 30px; height: 30px; }
}

/* ═══════════════════════════════════════════════════════
   LOADER — RPA logo in center of spinning circles
═══════════════════════════════════════════════════════ */
#loader-logo {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1002;          /* above #loader (1001) */
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    /* Gentle fade-pulse to show it's loading */
    animation: loaderLogoPulse 2s ease-in-out infinite;
}
#loader-logo img {
    width: 80px;
    height: auto;
    display: block;
    /* Drop-shadow to stand out over dark loader bg */
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.25));
}
@keyframes loaderLogoPulse {
    0%, 100% { opacity: 0.75; }
    50%       { opacity: 1;    }
}
/* Hide logo once page is loaded (same timing as loader) */
.loaded #loader-logo {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}


/* ═══════════════════════════════════════════════════════
   WHO WE ARE — Red boxes replacing bullet list
═══════════════════════════════════════════════════════ */
.rpa-companies-block {
    margin: 32px auto 8px auto;
    max-width: 560px;
    text-align: center;
}
/* CHANGE 5: Red boxes — replaces .rpa-companies-list */
.rpa-red-boxes {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 0 0 28px 0;
}
.rpa-red-box {
    width: 100%;
    background: #E30613;
    color: #fff;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: center;
    padding: 14px 28px;
    box-shadow: 0 4px 18px rgba(227,6,19,0.28);
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    cursor: default;
}
.rpa-red-box:hover {
    background: #c00010;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(227,6,19,0.42);
}
.rpa-companies-desc {
    font-size: 14px !important;
    font-family: 'Open Sans', sans-serif !important;
    color: #9b9b9b !important;
    line-height: 1.85 !important;
    font-style: italic;
    max-width: 680px;
    margin: 0 auto !important;
    padding: 0 !important;
    text-align: center;
}
@media (max-width: 600px) {
    .rpa-companies-block { max-width: 100%; padding: 0 12px; }
    .rpa-red-box         { font-size: 13px; padding: 12px 16px; }
}

/* CHANGE 6: National & International button */
.nat-intl-wrap {
    text-align: center;
    margin: 36px 0 28px 0;
}
.nat-intl-btn {
    display: inline-block;
    padding: 15px 44px;
    font-size: 15px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #E30613;
    background: transparent;
    border: 2px solid #E30613;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: color 0.32s ease, box-shadow 0.32s ease, transform 0.2s ease;
    z-index: 0;
}
.nat-intl-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #E30613;
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
}
.nat-intl-btn:hover::before { transform: scaleX(1); }
.nat-intl-btn:hover {
    color: #fff;
    box-shadow: 0 6px 28px rgba(227,6,19,0.4);
    transform: translateY(-2px);
}
.nat-intl-btn .fa { font-size: 16px; vertical-align: middle; margin-right: 6px; }

/* CHANGE 2: Lighter header — deep navy blue, lighter than original black */
header {
    background: rgba(10, 28, 70, 0.88) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}
header.smaller {
    background: rgba(8, 22, 58, 0.96) !important;
}

/* CHANGE 1: New LOGO.png has black background — mix-blend-mode removes it */
.rpa-new-logo {
    mix-blend-mode: screen;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4)) !important;
}

/* CHANGE 3: Hero badge font size increased */
.hero-badge {
    font-size: 14px !important;
    letter-spacing: 3.5px !important;
    padding: 9px 26px !important;
}
@media (max-width: 600px) {
    .hero-badge { font-size: 11px !important; letter-spacing: 2px !important; }
}

/* CHANGE 4: Center hero description */
.hero-desc {
    text-align: center !important;
}


/* ═══════════════════════════════════════════════════════
   VIDEO SEEK BAR
═══════════════════════════════════════════════════════ */
.svc-seekbar-wrap {
    flex: 1;
    min-width: 120px;
    max-width: 320px;
    display: flex;
    align-items: center;
    padding: 0 4px;
}
.svc-seekbar-track {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
    cursor: pointer;
}
.svc-seekbar-fill {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 0%;
    background: #E30613;
    border-radius: 4px;
    pointer-events: none;
    transition: width 0.1s linear;
}
.svc-seekbar-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #E30613;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: left 0.1s linear;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.svc-seekbar-track:hover .svc-seekbar-thumb {
    width: 14px;
    height: 14px;
}
@media (max-width: 480px) {
    .svc-seekbar-wrap { min-width: 60px; max-width: 150px; }
}
