:root {
    --primary-color: #1e3a5f;
    --secondary-color: #0ea5e9;
    --accent-color: #f59e0b;
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #f8fafc;
    --bg-dark: #1e3a5f;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Bar */
.top-bar {
    background: var(--bg-dark);
    padding: 10px 0;
    font-size: 14px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: var(--white);
    text-decoration: none;
    margin-right: 20px;
    transition: var(--transition);
}

.top-bar a:hover {
    color: var(--secondary-color);
}

/* Header */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.site-header.sticky {
    box-shadow: var(--shadow-lg);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: auto;
    max-height: 60px;

}

/* Navigation */
.main-nav .nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu .active > a {
    color: var(--secondary-color);
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 250px;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    list-style: none;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
}

.dropdown-menu li a:hover {
    background: var(--bg-light);
    color: var(--secondary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
}

/* Footer */
.site-footer {
    background: var(--bg-dark);
    color: var(--white);
}

.footer-main {
    padding: 30px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--white);
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
    position: relative;
    left: 0 !important;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.7);
    margin: 10px 0;
}

.footer-links {
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    text-indent: 0 !important;
    position: relative;
    left: 0 !important;
}

.footer-links li {
    margin-bottom: 6px;
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
    position: relative;
    left: 0 !important;
}

.footer-contact {
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    text-indent: 0 !important;
    position: relative;
    left: 0 !important;
}

.footer-contact li {
    /* display: flex; */
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
    position: relative;
    left: 0 !important;
    align-items: flex-start;
}

.footer-contact li i {
    margin-right: 10px;
    flex-shrink: 0;
    width: 16px;
    text-align: left;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.footer-contact li span,
.footer-contact li a {
    margin-left: 0;
    padding-left: 0;
    text-align: left;
    flex: 1;
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--secondary-color);
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
}

.compliance-badges {
    display: flex;
    gap: 15px;
}

.compliance-badges img {
    height: 50px;
    width: auto;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

@media (max-width: 992px) {

    .header-cta {
        display: block !important;   /* 🔥 override everything */
        margin-top: 15px;
        padding: 0 15px;
        text-align: center;
    }

    .header-cta a {
        width: 100%;
        display: block;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* Keep top bar as a horizontal row on tablet and larger phones; small phones will use a separate grid rule */
    .top-bar-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .mobile-menu-toggle {
        display: flex;
      
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        max-height: 0;
        overflow: hidden;
        transition: var(--transition);
    }
    
    .main-nav.active {
        max-height: 500px;
    }
    
    .nav-menu {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }
    
    .nav-menu li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu a {
        display: block;
        padding: 15px 0;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 20px;
    }
    
    .header-cta {
        display: flex;
        align-items: center; /* vertical center button */
        margin: 15px 0;
    }
    
    .footer-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    @media (max-width: 992px) {

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: #fff;
        transition: right 0.3s ease;
        z-index: 999;
        padding-top: 90px;

        /* 🔥 یہ دو لائنیں مسئلہ حل کریں گی */
        overflow-y: auto;
        overflow-x: hidden;
    }

    .main-nav.active {
        right: 0;
    }
}
@media (max-width: 992px) {
    .nav-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
}
@media (max-width: 992px) {

    .has-dropdown > .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        background: #f8fafc;
    }

    .has-dropdown.active > .dropdown-menu {
        display: block;
    }
}
/* Mobile nav hidden by default */
@media (max-width: 992px) {

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        display: none;          /* 🔴 یہ سب سے اہم لائن */
        z-index: 999;
    }

    .main-nav.active {
        display: block;         /* menu toggle پر ہی کھلے */
    }
}
@media (max-width: 992px) {

    .dropdown-menu {
        display: none;
        padding-left: 15px;
    }

    .has-dropdown.dropdown-open > .dropdown-menu {
        display: block;
    }
}

@media (max-width: 992px) {

    .nav-menu a {
        padding: 3px 0;       /* touch friendly + compact */
        display: block;
    }

    .dropdown-menu li {
        margin-bottom: 4px;
    }
}


    /* Homepage Mobile Styles */
    .hero-section {
        padding: 60px 0 !important;
    }
    
    .hero-section > .container > div {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .hero-section h1 {
        font-size: 32px !important;
    }
    
    .hero-section p {
        font-size: 16px !important;
    }
    
    .hero-section > .container > div > div:first-child > div {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .hero-section .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Stats Section Mobile */
    section > .container > div[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    section > .container > div[style*="grid-template-columns: repeat(4"] > div {
        padding: 20px 15px !important;
    }

    section > .container > div[style*="grid-template-columns: repeat(4"] > div > div:first-child {
        font-size: 36px !important;
    }

    /* Why RCX Medix Section Mobile */
    .hero-section section > .container > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    section h2 {
        font-size: 28px !important;
    }
    
    section p {
        font-size: 16px !important;
    }
    
    section img {
        max-width: 100%;
        height: auto;
    }
    
    /* Services Grid Mobile */
    section > .container > div[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Demo Form Mobile */
    #demo-form .container > div {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    #demo-form h2 {
        font-size: 28px !important;
    }
    
    #demo-form form > div > input,
    #demo-form form > div > select,
    #demo-form form > div > textarea {
        font-size: 16px !important;
    }
}

/* Small phones: top bar two-column (phone/email left, social icons right) */
@media (max-width: 480px) {
    .top-bar-content {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 8px;
    }
    .top-bar .contact-info {
        display: flex;
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
    .top-bar .social-links {
        justify-self: end;
        display: flex;
        gap: 2px; /* enforce minimum 2px gap between icons */
    }
    .top-bar .social-links a {
        width: 28px;
        height: 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0;
    }
    .top-bar .social-links a svg {
        width: 18px;
        height: 18px;
    }
}

/* Responsive two-column helper */
.two-column-responsive {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.two-column-responsive.two-column-small-gap {
    gap: 20px;
}
@media (max-width: 768px) {
    .two-column-responsive {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .two-column-responsive .col-image {
        order: -1;
    }
    /* Reduce vertical spacing on mobile across two-column sections (keep banners/hero intact) */
    section:not(.page-banner):not(.hero-section) {
        padding: 30px 0 !important;
    }
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* === FORCE Testimonials Grid FIX === */
.testimonials-section .testimonials-slider {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 30px !important;
}

/* Desktop */
@media (min-width: 1024px) {
    .testimonials-section .testimonials-slider {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* === HERO SECTION === */
.hero-section .row {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    min-height: 600px;
}
.hero-section .col-lg-6 {
    padding: 0;
    flex: 0 0 50%;
    max-width: 50%;
}
.hero-section .hero-text {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero-section .hero-image {
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 600px;
}
.hero-section .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
}
.hero-section h1 {
    text-transform: none !important;
}
.hero-section .hero-text h1 {
    text-transform: none !important;
}
.page-banner h1,
.page-banner h2 {
    text-transform: none !important;
}
@media (max-width: 1024px) {
    .hero-section .hero-text h1 { font-size: 40px !important; }
    .hero-section .row { min-height: 500px; }
    .hero-section .hero-image { min-height: 500px; }
}
@media (max-width: 991px) {
    .hero-section .col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .hero-section .row { min-height: auto; }
    .hero-section .hero-text {
        padding: 30px 20px;
        text-align: left;
    }
    .hero-section .hero-text h1 { font-size: 32px !important; }
    .hero-section .hero-image {
        min-height: 450px;
    }
}
@media (max-width: 768px) {
    .hero-section .hero-text h1 { font-size: 28px !important; }
    .hero-section .hero-text p { font-size: 16px !important; }
    .hero-section .hero-image {
        min-height: 400px;
    }
    .hero-section .hero-image img {
        object-position: center 30%;
    }
}

/* === WHY RCX MEDIX SECTION === */
.why-rcx-section .why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.why-rcx-section .why-text h2 {
    font-size: 36px;
    line-height: 1.15;
    margin-bottom: 20px;
    color: #1e3a5f;
}
.why-rcx-section .why-text p {
    color: #666;
    font-size: 18px;
    line-height: 1.85;
    margin-bottom: 18px;
    max-width: 700px;
}
.why-rcx-section .why-text a.btn-primary {
    background: #0ea5e9;
    color: #ffffff;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
}
.why-rcx-section .why-image {
    align-self: start;
}
.why-rcx-section .why-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    display: block;
    object-fit: cover;
}
@media (max-width: 1024px) {
    .why-rcx-section .why-text h2 { font-size: 32px; }
    .why-rcx-section .why-text p { font-size: 16px; }
}
@media (max-width: 768px) {
    .why-rcx-section .why-grid {
        grid-template-columns: 1fr;
    }
    /* Make image appear above text like the banner on mobile */
    .why-rcx-section .why-image {
        order: -1;
        margin-bottom: 20px;
    }
    /* Ensure text stacks after image */
    .why-rcx-section .why-text { order: 0; }
    .why-rcx-section .why-text p { font-size: 15px; line-height: 1.6; }
}

/* === SERVICES GRID === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.service-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}
.service-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.service-card .service-body {
    padding: 22px;
    flex: 1 1 auto;
}
.service-card h4 {
    margin: 0 0 10px 0;
    color: #1e3a5f;
    font-size: 18px;
}
.service-card p {
    color: #666;
    margin: 0 0 14px 0;
    font-size: 15px;
}
.service-card a {
    margin-top: auto;
    display: inline-block;
    color: #0ea5e9;
    font-weight: 600;
    text-decoration: none;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .services-grid { grid-template-columns: 1fr; }
    .service-card img { height: 220px; }
} 
