/* ==========================================================================
   A3mal Platform - Main Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables
   -------------------------------------------------------------------------- */
   :root {
    /* Colors */
    --primary-color: #0d6efd; /* Vibrant Blue */
    --primary-hover: #0b5ed7;
    --secondary-color: #f59e0b; /* Orange/Warning */
    --secondary-hover: #d97706;
    --dark-bg: #1e293b; /* Dark text/headings */
    --darker-bg: #f8fafc; /* Very light background for contrast areas */
    --light-bg: #ffffff; /* Main white background */
    --white: #ffffff;
    --text-main: #475569; /* Gray text */
    --text-light: #94a3b8; /* Lighter text */
    --border-color: #e2e8f0;

    /* Status Colors */
    --danger: #ef4444;
    --success: #10b981;
    --info: #0ea5e9;
    --warning: #f59e0b;

    /* Fonts */
    --font-family: 'Tajawal', sans-serif;

    /* Shadow & Radius */
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    --box-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.06);
    --border-radius-sm: 8px;
    --border-radius: 12px;
    --border-radius-lg: 24px;
    
    /* Transitions */
    --transition: all 0.3s ease-in-out;
}

/* --------------------------------------------------------------------------
   Global Styles
   -------------------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--darker-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Utilities */
.text-center { text-align: center; }
.text-danger { color: var(--danger); }
.bg-light { background-color: var(--light-bg); }
.mt-5 { margin-top: 3rem; }
.light-text { color: var(--dark-bg); }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--dark-bg);
    margin-bottom: 0.5rem;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.section-header.light-text .section-title,
.section-header.light-text .section-desc {
    color: var(--dark-bg);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: var(--border-radius);
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    gap: 8px;
    font-family: var(--font-family);
}

.btn-large {
    padding: 14px 32px;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 86, 179, 0.3);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--dark-bg);
}

.btn-outline:hover {
    background-color: var(--white);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-warning {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-warning:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(245, 166, 35, 0.3);
}

/* --------------------------------------------------------------------------
   Top Bar
   -------------------------------------------------------------------------- */
.top-bar {
    background-color: var(--white);
    color: var(--text-main);
    padding: 10px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: 20px;
}

.contact-info a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a:hover {
    color: var(--secondary-color);
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.navbar {
    background-color: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 40px;
}

.nav-list {
    display: flex;
    gap: 25px;
}

.nav-link {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-toggle {
    display: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
    background: var(--darker-bg);
    padding: 100px 0 150px;
    position: relative;
    overflow: hidden;
    color: var(--text-main);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 20px;
    border: 1px solid rgba(13, 110, 253, 0.2);
    font-weight: 700;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-title span {
    color: var(--secondary-color);
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.hero-features span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.hero-features i {
    color: var(--primary-color);
    background: var(--white);
    border-radius: 50%;
    font-size: 1.1rem;
}

.hero-actions {
    display: flex;
    gap: 15px;
}

.hero-image {
    position: relative;
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.main-dashboard-img {
    border-radius: var(--border-radius);
    width: 100%;
}

.floating-element {
    position: absolute;
    background: var(--white);
    color: var(--primary-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    animation: float 4s ease-in-out infinite;
}

.float-1 {
    top: -20px;
    right: -20px;
    animation-delay: 0s;
}

.float-2 {
    bottom: 30px;
    left: -30px;
    animation-delay: 2s;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

.hero-shape {
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    z-index: 1;
}

.hero-shape svg path {
    fill: var(--light-bg);
}

/* --------------------------------------------------------------------------
   Trusted By / Sectors
   -------------------------------------------------------------------------- */
.trusted-by {
    padding: 60px 0;
}

.section-subtitle {
    color: var(--text-main);
    margin-bottom: 40px;
    font-size: 1.5rem;
}

.sectors-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    text-align: center;
}

.sector-item {
    transition: var(--transition);
}

.sector-item:hover {
    transform: translateY(-5px);
}

.sector-icon {
    width: 70px;
    height: 70px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.8rem;
    color: var(--primary-color);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.sector-item:hover .sector-icon {
    background-color: var(--primary-color);
    color: var(--white);
}

.sector-item span {
    font-weight: 700;
    color: var(--text-main);
}

/* --------------------------------------------------------------------------
   Problems Section
   -------------------------------------------------------------------------- */
.problems-section {
    padding: 100px 0;
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.problem-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.problem-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
    border-color: var(--danger);
}

.problem-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.problem-card h4 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.problem-card p {
    color: var(--text-light);
}

/* --------------------------------------------------------------------------
   Solutions Section
   -------------------------------------------------------------------------- */
.solutions {
    padding: 100px 0;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.solution-card {
    background: var(--white);
    padding: 30px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border-color);
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
    border-color: var(--primary-color);
}

.solution-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
}

.icon-blue { background: rgba(0, 86, 179, 0.1); color: #0056b3; }
.icon-green { background: rgba(40, 167, 69, 0.1); color: #28a745; }
.icon-purple { background: rgba(111, 66, 193, 0.1); color: #6f42c1; }
.icon-cyan { background: rgba(23, 162, 184, 0.1); color: #17a2b8; }
.icon-orange { background: rgba(245, 166, 35, 0.1); color: #f5a623; }

.solution-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.solution-text {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.solution-link {
    color: var(--primary-color);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.solution-link:hover {
    color: var(--primary-hover);
    gap: 8px;
}

/* --------------------------------------------------------------------------
   Custom Solutions
   -------------------------------------------------------------------------- */
.custom-dev {
    padding: 100px 0;
}

.custom-dev-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 50px;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
}

.custom-services {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.service-item {
    display: flex;
    gap: 20px;
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.service-item:hover {
    transform: translateX(-10px);
    box-shadow: var(--box-shadow-hover);
}

.service-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 86, 179, 0.1);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.service-info h4 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.service-info p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

.mockup-img {
    width: 100%;
    animation: float 5s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   Features (Why Choose Us)
   -------------------------------------------------------------------------- */
.features {
    padding: 100px 0;
    background-color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.feature-box {
    text-align: center;
    padding: 30px 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-box:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.feature-box h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feature-box p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */
.testimonials {
    padding: 100px 0;
    background-color: var(--dark-bg);
    color: var(--white);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stars {
    color: var(--warning);
    margin-bottom: 20px;
}

.quote {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 30px;
    line-height: 1.8;
}

.author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h5 {
    margin: 0 0 5px 0;
    color: var(--secondary-color);
}

.author-info span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* --------------------------------------------------------------------------
   Statistics
   -------------------------------------------------------------------------- */
.statistics {
    padding: 60px 0;
    background: var(--white);
    color: var(--primary-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    gap: 30px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.2rem;
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   FAQ Section
   -------------------------------------------------------------------------- */
.faq-section {
    padding: 100px 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.faq-question {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
}

.faq-question:hover, .faq-item.active .faq-question {
    color: var(--primary-color);
}

.faq-question i {
    transition: var(--transition);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer p {
    padding-bottom: 20px;
    color: var(--text-light);
}

/* --------------------------------------------------------------------------
   CTA Banner
   -------------------------------------------------------------------------- */
.cta-banner {
    padding: 100px 0;
}

.cta-container {
    background: var(--white);
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius-lg);
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-main);
    position: relative;
    overflow: hidden;
}

.cta-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg opacity="0.05" xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%230d6efd" stroke-width="2"/></svg>') repeat;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--dark-bg);
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-actions {
    display: flex;
    gap: 15px;
}

.cta-image {
    position: relative;
    z-index: 2;
    width: 400px;
}

.cta-image img {
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    transform: perspective(1000px) rotateY(-15deg);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    background-color: var(--white);
    color: var(--text-main);
    padding: 80px 0 20px;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 20px;
}

.footer-about p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--darker-bg);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-links h4, .footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
    color: var(--dark-bg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-links h4::after, .footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--secondary-color);
}

.footer-links ul li {
    margin-bottom: 15px;
}

.footer-links ul li a {
    color: var(--text-light);
}

.footer-links ul li a:hover {
    color: var(--secondary-color);
    padding-right: 5px;
}

.footer-contact ul li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: var(--text-light);
}

.footer-contact ul li i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-5px);
}

/* --------------------------------------------------------------------------
   Floating WhatsApp Button
   -------------------------------------------------------------------------- */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
    z-index: 999;
    transition: var(--transition);
    animation: pulse-whatsapp 2s infinite;
}

.floating-whatsapp:hover {
    background-color: #128C7E;
    color: white;
    transform: scale(1.1);
    animation: none;
}

.whatsapp-tooltip {
    position: absolute;
    right: 75px;
    background: white;
    color: var(--dark-bg);
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: var(--transition);
}

/* Tooltip arrow */
.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent white;
}

.floating-whatsapp:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (max-width: 768px) {
    .floating-whatsapp {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    
    .back-to-top {
        bottom: 80px; /* Move back to top button up so it doesn't overlap WA */
        right: 20px;
    }
}

/* --------------------------------------------------------------------------
   Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .solutions-grid { grid-template-columns: repeat(3, 1fr); }
    .features-grid { grid-template-columns: repeat(3, 1fr); }
    .sectors-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 992px) {
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-features { justify-content: center; }
    .hero-actions { justify-content: center; }
    
    .problems-grid { grid-template-columns: repeat(2, 1fr); }
    .custom-dev-wrapper { grid-template-columns: 1fr; }
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    
    .cta-container { flex-direction: column; text-align: center; }
    .cta-actions { justify-content: center; margin-bottom: 30px; }
    .cta-image { width: 100%; max-width: 400px; margin: 0 auto; }
    
    .footer-grid { grid-template-columns: 1fr 1fr; }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.4s;
    }
    
    .nav-menu.active { left: 0; }
    .nav-list { flex-direction: column; gap: 30px; text-align: center; }
    .mobile-toggle { display: block; }
}

@media (max-width: 768px) {
    /* Global Overflow Lock */
    html, body {
        overflow-x: hidden !important;
        width: 100%;
        max-width: 100vw;
    }

    /* Top Bar Fixes */
    .top-bar-content { flex-direction: column; gap: 5px; }
    .contact-info { flex-direction: column; align-items: center; gap: 5px; font-size: 0.85rem; }
    
    /* Navbar Mobile Fixes */
    .nav-actions .btn { display: none !important; }
    .logo-img { height: 40px !important; }
    
    .hero-title { font-size: 1.8rem !important; line-height: 1.4; }
    .section-title { font-size: 1.8rem !important; }
    
    .problems-grid, .solutions-grid, .features-grid, .testimonials-grid, .features-wrapper, .contrast-grid {
        grid-template-columns: 1fr !important;
    }
    
    .after-card {
        transform: scale(1) !important;
    }
    .sectors-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: 1fr; gap: 40px; }
    
    .footer-grid { grid-template-columns: 1fr; }
    
    /* Responsive Adjustments for Modals and ROI Calculator */
    .calculator-card { padding: 20px !important; }
    .savings-result { padding: 20px 10px !important; }
    .saved-amount { font-size: 2.5rem !important; }
    #currentLossDisplay { font-size: 1.1rem !important; }
    
    /* General Padding Adjustments */
    .hero { padding: 60px 0 100px; }
    .problems-section, .solutions, .custom-dev, .features, .testimonials { padding: 60px 0; }
    .trust-modal-content { padding: 30px !important; }
    
    /* Center and Stack Cards for Mobile to Prevent Overlap */
    .feature-box, .service-item {
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
        padding: 25px 15px !important;
    }
    .feature-icon, .service-icon {
        margin: 0 auto 15px auto !important;
    }
    .feature-box h4, .service-item h4 {
        margin-bottom: 10px !important;
    }
    .author {
        flex-direction: column !important;
        text-align: center !important;
        justify-content: center !important;
    }
    .author-icon {
        margin-left: 0 !important;
        margin-bottom: 15px !important;
    }
    .solution-card, .contrast-card, .problem-card {
        padding: 25px 15px !important;
        margin-bottom: 15px; /* Prevent vertical overlapping */
    }
}

/* --------------------------------------------------------------------------
   Trust Modal
   -------------------------------------------------------------------------- */
.trust-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 32, 39, 0.9);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.trust-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.trust-modal-content {
    background: var(--white);
    padding: 50px;
    border-radius: var(--border-radius-lg);
    max-width: 600px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: translateY(30px);
    transition: var(--transition);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.trust-modal-overlay.active .trust-modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    line-height: 1;
}

.close-modal:hover {
    color: var(--danger);
}

.trust-modal-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.trust-modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--dark-bg);
}

.trust-modal-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.6;
}

.trust-badge {
    cursor: pointer;
    transition: var(--transition);
}

.trust-badge:hover {
    color: var(--primary-color) !important;
}

/* --------------------------------------------------------------------------
   Social Proof Popup
   -------------------------------------------------------------------------- */
.social-proof-popup {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1000;
    transform: translateX(-150%);
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-right: 4px solid var(--success); /* right border for RTL */
}

.social-proof-popup.show {
    transform: translateX(0);
}

.social-proof-icon {
    font-size: 2.5rem;
    color: var(--success);
}

.social-proof-text h5 {
    margin: 0 0 3px 0;
    font-size: 0.95rem;
    color: var(--dark-bg);
}

.social-proof-text p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

.social-proof-text small {
    display: block;
    margin-top: 5px;
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 700;
}

@media (max-width: 768px) {
    .social-proof-popup {
        bottom: 20px;
        left: 20px;
        right: 20px;
        transform: translateY(150%);
        border-right: none;
        border-bottom: 4px solid var(--success);
    }
    .social-proof-popup.show {
        transform: translateY(0);
    }
}
