/* ================================
   R Line Utility Theme Styles
   ================================ */

:root {
    --rline-blue: #002E6D;
    --rline-grey: #f5f7fa;
    --rline-text: #3C4757;
    --rline-white: #ffffff;
    --rline-shadow: rgba(0,0,0,0.12);
    --header-height: 100px;
}

/* --------------------------------
   Base
----------------------------------- */
body {
    margin: 0;
    font-family: 'Roboto', Arial, sans-serif;
    color: var(--rline-text);
    line-height: 1.6;
}



img {
    max-width: 100%;
    display: block;
}

h1, h2, h3 {
    margin: 0;
    font-weight: 700;
    color: var(--rline-blue);
}

.rline-text-3d {
    color: #fff;
    font-weight: 700;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.6),
        0 4px 8px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.1);
    letter-spacing: 0.5px;
}


.section {
    padding: 80px 20px;
    max-width: 1400px;
    margin: auto;
}

.section-title {
    font-size: 2.4rem;
    text-align: center;
    color: var(--rline-blue);
    margin-bottom: 40px;
}

.section-grey {
    background: var(--rline-grey);
}

/* --------------------------------
   Header
----------------------------------- */

.rline-header {
    background: var(--rline-blue);
    padding: 4px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999;
    transition: padding 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}


.rline-logo img {
    height: 36px;
    width: auto;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    transition: height 0.25s ease;
}




.rline-header-inner {
    max-width: 1400px;
    margin: auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.rline-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.rline-menu li a {
    color: var(--rline-white);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
}

.rline-menu li a:hover {
    opacity: 0.8;
}



@media (max-width: 782px) {
    body.admin-bar .rline-main {
        padding-top: 160px;
    }
}


/* Adjust header when WordPress admin bar is visible */
body.admin-bar .rline-header {
    top: 32px;  /* desktop admin bar height */
}

@media (max-width: 782px) {
    body.admin-bar .rline-header {
        top: 46px; /* mobile admin bar height */
    }
}

/* Hide hamburger on desktop */
.rline-hamburger {
    display: none;
}

/* Hide X close button on desktop by default */
.rline-close {
    display: none;
}

@media (max-width: 768px) {

    /* Container must stay flex row, not stacked */
    .rline-header-inner {
        flex-direction: row;
    }

    /* Mobile hamburger button */
    .rline-hamburger {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 10001;
        margin-left: auto; /* pushes hamburger to right */
    }

    .rline-hamburger span {
        display: block;
        width: 28px;
        height: 3px;
        margin: 5px 0;
        background: #ffffff;
        border-radius: 2px;
        transition: 0.3s ease;
    }

    /* Hide hamburger when menu open */
    .rline-nav.open ~ .rline-hamburger,
    .rline-hamburger.hide {
        display: none;
    }

    /* Slide-in menu container */
    .rline-nav {
        position: fixed;
        top: 0;
        left: -75%;
        width: 75%;
        height: 100vh;
        background: var(--rline-blue);
        padding-top: 80px;
        transition: left 0.3s ease;
        z-index: 10000;
    }

    .rline-nav.open {
        left: 0;
    }

    /* Close (X) button */
    .rline-close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        font-size: 2rem;
        color: #ffffff;
        cursor: pointer;
        display: block;
    }
    .rline-close:hover {
        opacity: 0.6;
    }

    /* Vertical menu layout */
    .rline-menu {
        flex-direction: column;
        gap: 22px;
        padding-left: 20px;
    }

    .rline-menu li a {
        font-size: 1.2rem;
    }
}



/* --------------------------------
   Hero Section
----------------------------------- */
.hero {
    position: relative;
    height: 80vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 46, 109, 0.55);
}

.hero-content {
    position: relative;
    color: var(--rline-white);
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 25px;
}

.hero-content h1,
.hero-content h3 {
    color: #ffffff !important;
}


.btn {
    background: var(--rline-white);
    padding: 14px 30px;
    color: var(--rline-blue);
    text-decoration: none;
    font-size: 1.2rem;
    border-radius: 6px;
    font-weight: 600;
}

.btn:hover {
    opacity: 0.85;
}

/* --------------------------------
   Equipment Grid
----------------------------------- */
.equip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.equip-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 6px 20px var(--rline-shadow);
}

.equip-item img {
    height: 260px;
    width: 100%;
    object-fit: cover;
    transition: 0.35s ease;
}

.equip-item:hover img {
    transform: scale(1.07);
    filter: brightness(70%);
}

.equip-item span {
    position: absolute;
    bottom: 18px;
    left: 20px;

    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0,0,0,1);

    background: rgba(0,0,0,0.25);
    padding: 6px 14px;
    border-radius: 8px;

    backdrop-filter: blur(3px);
}


/* --------------------------------
   Service Cards
----------------------------------- */
.services {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 28px;
}

/* Tablets (2 per row) */
@media (max-width: 992px) {
    .services {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Phones (1 per row) */
@media (max-width: 600px) {
    .services {
        grid-template-columns: 1fr;
    }
}

.gallery-card {
    height: 220px;
}

.rline-gallery-group{padding:15px;margin-bottom: 30px;}


.service-card {

    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    position: relative;
    background: var(--rline-white);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 10px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 20px var(--rline-shadow);
    overflow: hidden;
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease;
}


.service-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;               
    width: 100%;
    background: var(--rline-blue);
    z-index: 1;
}

/* Shine overlay (now visible!) */
.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    height: 6px; /* match thickness */
    width: 150%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.8),
        transparent
    );
    opacity: 0;
    z-index: 2;  /* ABOVE the blue bar */
    transition: opacity 0.3s ease;
}

.service-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
}


.service-card:hover::before {
    opacity: 1;
    animation: shineSweep 2.4s ease-out forwards;
}

@keyframes shineSweep {
    0% { left: -150%; }
    100% { left: 100%; }
}


.service-card h3 {
    margin-top: 8px;
    margin-bottom: 20px;
    font-size: 1.4rem;
    /* color: var(--rline-blue); */
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0,0,0,1);
    background: rgba(0,0,0,0.35);
    padding: 6px 14px;
    border-radius: 8px;
}

.service-card p {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0,0,0,1);
    background: rgba(0,0,0,0.35);
    padding: 6px 14px;
    border-radius: 8px;
    margin-bottom: 10px;
}


.service-card.tapped {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}

.service-card.tapped::before {
    opacity: 1;
    animation: shineSweep 1.6s ease-out forwards;
}

.service-card.touch-primed {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.service-content-h1 {
    font-size: 42px;
    text-decoration: underline;
}

.service-content-drill-div {
    width:30%;
    max-width:30%;
    margin-top:40px;
    margin-left:15px;
    font-size: 20px;
}

.service-content-div {
    margin-right: 15px;
    margin-top:40px;
    margin-left:15px;
    padding: 20px;
    font-size: 26px;
}

@media (max-width: 782px) {
    .service-content-h1 {
        font-size: 20px;
    }
    .service-content-div {
        font-size: 12px;
    }
    .service-content-drill-div {
        font-size: 12px;
    }
}

/* --------------------------------
   Footer
----------------------------------- */
.rline-footer {
    background: var(--rline-grey);
    padding: 40px 20px;
}

.footer-inner {
    max-width: 1400px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rline-footer img {
    max-width: 140px; 
    height: auto;
}


.footer-right a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--rline-blue);
    font-weight: 600;
}



/* --------------------------------
    MODAL CSS
----------------------------------- */


/* Overlay */
#rline-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: 0.95s ease;
    z-index: 9980;
}

/* Show overlay */
#rline-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}


#rline-modal {
    position: fixed;
    top: calc(var(--header-height) + 2%); /* dynamic spacing */
    left: 6%;
    width: 88%;
    height: calc(92% - var(--header-height));
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.92);
    transition: 0.95s ease;
    z-index: 9990;
    overflow-y: auto;
    padding: 0px;
    background-size: 100% 100%;
    background-position: center center;
    background-repeat: no-repeat;
}


/* Visible modal */
#rline-modal.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Close button */
#rline-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #808080;
    z-index: 3;
}

#rline-modal-close:hover {
    opacity: 0.7;
    color: #cccccc !important;
}

#rline-modal-content {
    position: relative;
    z-index: 2;
    padding: 40px;
}



/* --------------------------------
    CONTACT US SLIDE OUT
----------------------------------- */
#rline-slide-panel {
    position: fixed;
    top: 0;
    left: -420px;
    width: 420px;
    height: 100vh;
    background: #ffffff;
    box-shadow: 4px 0 12px rgba(0,0,0,0.25);
    z-index: 999999;
    transition: left 0.95s ease;
    overflow-y: auto;
}

#rline-slide-close {
    position: absolute; 
    top: 20px;
    right: -50px; 
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
    font-size: 26px;
    cursor: pointer;
    z-index: 1000005 !important;
    color: #333;
    display: none; 
    align-items: center;
    justify-content: center;
    transition: right 0.95s ease;
}


#rline-slide-panel.active #rline-slide-close {
    display: flex;
    right: 15px; 
}


#rline-slide-inner {
    padding: 80px 20px 20px;
}


#rline-slide-panel.active {
    left: 0;
}


#rline-slide-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999998;
    display: none;
}

#rline-slide-overlay.active {
    display: block;
}


/* --------------------------------
   CLIENT SECTION / SCROLLING
----------------------------------- */


.client-section {
    text-align: center;
}

.client-slider {
    overflow: hidden;
    width: 100%;
    padding: 30px 0;
}

.client-track {
    display: flex;
    will-change: transform;
    animation: slide 34s linear infinite;
    align-items: center;
    width: max-content;
    transform: translate3d(0,0,0);
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.client-track img {
    height: 70px;
    width: auto;
    transition: 0.3s ease;
    margin-right: 60px;
}

.client-track img:last-child {
    margin-right: 0;
}


.client-track img:hover {
    opacity: 1;
    transform: scale(1.08);
    filter: drop-shadow(0 6px 8px rgba(0,0,0,0.8));
}

.client-center-active {
    opacity: 1 !important;
    transform: scale(1.08) !important;
    filter: drop-shadow(0 6px 8px rgba(0,0,0,0.8)) !important;
    transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
}


.client-group {
    display: flex;
}


/* Infinite slide */
@keyframes slide {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* --------------------------------
   Responsive Fixes
----------------------------------- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.6rem;
    }

    .rline-header-inner {
        flex-direction: column;
        gap: 12px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}