/* ======== GLOBAL STYLES & VARIABLES ======== */
:root {
    --primary-color: #6B7A99;
    --primary-dark: #5a678a;
    --primary-light: #8B9AB9;
    --dark-color: #2D3748;
    --text-color: #4A5568;
    --light-bg: #FDFDFD;
    --border-color: #E2E8F0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Arial', sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --header-height: 78px;
}

/* ======== ACCESSIBILITY: SKIP LINK ======== */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-dark);
    color: #fff;
    padding: 12px 24px;
    z-index: 9999;
    font-weight: 600;
    border-radius: 0 0 8px 0;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Use display font for headings */
h1, h2, h3, h4, .section-title, .hero-text h1, .algo-hero-text h1 {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

/* Better focus visibility for keyboard users */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Hamburger as a button (reset native styling) */
.hamburger {
    background: none;
    border: 0;
}

/* Basic Reset with Smooth Scrolling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section-title {
    text-align: center;
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 20px;
    margin-top: 0;
    position: relative;
    padding-bottom: 20px;
    padding-top: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

/* ======== HEADER / NAVIGATION ======== */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

header.scrolled {
    box-shadow: var(--shadow-md);
}

header .site-nav {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 24px;
    min-height: var(--header-height);
}

.logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.logo img {
    height: 60px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.04);
}

.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
    margin: 0;
    flex: 1 1 auto;
    justify-content: center;
    flex-wrap: nowrap;
    padding: 0;
}

/* Hide mobile CTA <li> on desktop — shown only inside mobile drawer */
.nav-cta-group-mobile-li { display: none; }
@media (max-width: 900px) {
    .nav-cta-group-mobile-li { display: block; border-bottom: 0 !important; }
    .nav-cta-group-mobile-li a { padding: 0 !important; }
}

.nav-links li a {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 10px 14px;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-links li a::before {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 14px;
    right: 14px;
    width: auto;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.nav-links li a:hover::before,
.nav-links li a.active::before {
    transform: scaleX(1);
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--primary-color);
    background: rgba(107, 122, 153, 0.06);
}

/* CTA buttons in nav (Ecommerce + Python Dev) */
.nav-cta-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border: 0;
    line-height: 1;
}

.nav-cta-ecom {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
    color: #fff;
}
.nav-cta-ecom span:first-child { /* cart emoji — make it clearly visible */
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 6px;
    border-radius: 50%;
    font-size: 0.85rem;
    line-height: 1;
}
.nav-cta-ecom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.45);
    color: #fff;
    filter: brightness(1.1);
}

.nav-cta-py {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #fff;
}
.nav-cta-py span:first-child {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 6px;
    border-radius: 50%;
    font-size: 0.85rem;
    line-height: 1;
}
.nav-cta-py:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.5);
    color: #fff;
    filter: brightness(1.05);
}

.nav-cta.active {
    outline: 2px solid #fff;
    outline-offset: -4px;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    border-radius: 6px;
    background: none;
    border: 0;
    transition: var(--transition);
}

.hamburger:hover {
    background: rgba(107, 122, 153, 0.1);
}

.hamburger .bar {
    width: 26px;
    height: 3px;
    background-color: var(--dark-color);
    border-radius: 3px;
    transition: var(--transition);
}

/* Hamburger animation — bars become X when active */
.hamburger.is-open .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.is-open .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-12px);
}
.hamburger.is-open .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ─── DESKTOP (1181px+) — full nav as designed ─── */

/* ─── LARGE TABLET / SMALL DESKTOP (1024 - 1180px) ─── */
@media (max-width: 1180px) {
    .nav-links { gap: 2px; }
    .nav-links li a {
        font-size: 0.9rem;
        padding: 9px 10px;
    }
    .nav-cta {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* ─── TABLET (901 - 1024px) ─── */
@media (max-width: 1024px) {
    header .site-nav { padding: 8px 18px; gap: 10px; }
    .nav-cta-group { gap: 6px; }
    .nav-cta span:first-child { display: none; } /* hide emoji */
    .nav-links li a { padding: 8px 8px; font-size: 0.86rem; }
    .logo img { height: 50px; }
}

/* ======== HERO SECTION ======== */
.hero {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 80px;
}

.hero-text {
    flex: 1;
    animation: fadeInLeft 0.8s ease-out;
}

.hero-image {
    flex: 1;
    animation: fadeInRight 0.8s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-image img {
    width: 100%;
    max-width: 550px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.hero-image img:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--dark-color);
    line-height: 1.2;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 32px;
    color: var(--text-color);
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 16px 36px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(107, 122, 153, 0.3);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(107, 122, 153, 0.4);
}

.hero-decor-images {
    margin-top: 50px;
    display: flex;
    gap: 24px;
}

.hero-decor-images img {
    height: 70px;
    opacity: 0.7;
    transition: var(--transition);
    filter: grayscale(20%);
}

.hero-decor-images img:hover {
    opacity: 1;
    transform: scale(1.1);
    filter: grayscale(0%);
}

/* ======== SERVICES SECTION ======== */
.services, .services-page {
    padding: 40px 0 80px;
    background: #f8f9fb;
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 36px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card h3 {
    color: var(--dark-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.card p {
    line-height: 1.7;
    color: var(--text-color);
}

/* ======== ABOUT PAGE ======== */
.page-content {
    padding: 40px 0 80px;
}

.about-flex {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.about-image img:hover {
    transform: scale(1.02);
}

/* ======== TEAM SECTION ======== */
.team {
    padding: 40px 0 80px;
    background-color: #fff;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.team-member-card {
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 24px;
    transition: var(--transition);
    position: relative;
}

.team-member-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-member-card:hover::after {
    opacity: 1;
}

.team-member-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.team-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    margin: 0 auto 24px;
    box-shadow: 0 8px 20px rgba(107, 122, 153, 0.2);
    transition: var(--transition);
}

.team-member-card:hover .team-photo {
    transform: scale(1.1);
    border-color: var(--primary-light);
}

.team-name {
    font-size: 1.4rem;
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 8px;
}

.team-role {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ======== CONTACT PAGE ======== */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.contact-form {
    padding: 50px;
}

.contact-form h2 {
    color: var(--dark-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 122, 153, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.contact-info {
    background: linear-gradient(135deg, #f8f9fb 0%, #e9ecf1 100%);
    padding: 50px 40px;
}

.contact-info h3 {
    color: var(--dark-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.contact-info p {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.map-embed {
    width: 100%;
    height: 250px;
    border: 0;
    border-radius: 12px;
    margin-top: 24px;
    box-shadow: var(--shadow-sm);
}

/* ======== PRODUCTS SECTION ======== */
.products-homepage {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
}

.products-homepage .product-grid {
    max-width: 1000px;
    margin: 0 auto;
}

.view-all-btn-container {
    text-align: center;
    margin-top: 50px;
}

/* ======== FOOTER (Premium dark theme) ======== */
footer.site-footer {
    background:
        radial-gradient(circle at 20% 0%, rgba(107,122,153,0.18) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(107,122,153,0.08) 0%, transparent 50%),
        linear-gradient(180deg, #0f172a 0%, #0a0f1d 100%);
    color: #cbd5e1;
    padding-top: 60px;
    font-size: 0.95rem;
    position: relative;
}
footer.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(107,122,153,0.5) 50%, transparent 100%);
}

/* Credibility boxes */
.footer-credit-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(107,122,153,0.25);
    border-left: 3px solid var(--primary-color);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
    transition: var(--transition);
}
.footer-credit-box:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--primary-light);
}
.footer-credit-title {
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 4px;
}
.footer-credit-line {
    color: #94a3b8;
    font-size: 0.82rem;
    line-height: 1.5;
}

.footer-about-text {
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 18px;
    font-size: 0.92rem;
}
.footer-brand { display: inline-block; margin-bottom: 18px; }

.footer-pill {
    display: inline-block;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 9px;
    border-radius: 50px;
    margin-left: 6px;
    font-weight: 700;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

/* Contact lines */
.footer-contact-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    line-height: 1.6;
}
.footer-contact-line a {
    color: #cbd5e1;
    word-break: break-word;
}
.footer-contact-line a:hover { color: #fff; }
.footer-contact-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(107,122,153,0.2);
    color: var(--primary-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}
.footer-contact-addr { font-size: 0.85rem; line-height: 1.6; color: #94a3b8; }

/* Ecom FAQ button */
.footer-faq-btn {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    padding: 12px 22px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
    transition: var(--transition);
}
.footer-faq-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37,99,235,0.5);
    color: #fff;
    filter: brightness(1.08);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.footer-col .footer-logo {
    height: 50px;
    margin-bottom: 20px;
}

/* Social icons in footer */
.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: #cfcfcf;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    border-color: var(--primary-light);
}

.footer-contact p,
.footer-contact a {
    color: #ccc;
    word-break: break-word;
}

.footer-contact a:hover {
    color: #fff;
}

/* ─── Latest blogs strip in footer ─── */
.footer-blogs {
    border-top: 1px solid rgba(107,122,153,0.18);
    padding: 32px 0;
    background: rgba(0,0,0,0.22);
    margin-top: 40px;
}
.footer-blogs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.footer-blogs-head h4 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    padding: 0;
    border: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.footer-blogs-head h4::after { display: none; }
.footer-blogs-tag {
    display: inline-block;
    background: linear-gradient(135deg, #6B7A99 0%, #8B9AB9 100%);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.footer-blogs-all {
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 14px;
    border-radius: 50px;
    transition: var(--transition);
}
.footer-blogs-all:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}
.footer-blogs-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 24px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-blogs-list li a {
    color: #cbd5e1;
    font-size: 0.9rem;
    display: inline-block;
    padding: 4px 0;
    transition: var(--transition);
}
.footer-blogs-list li a:hover {
    color: #fff;
    transform: translateX(4px);
}
@media (max-width: 768px) {
    .footer-blogs-list { grid-template-columns: 1fr; }
}

.footer-bottom-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.footer-bottom-grid p {
    margin: 0;
}

.footer-bottom-links a {
    color: #aaa;
    margin: 0 4px;
}

.footer-bottom-links a:hover {
    color: #fff;
}

.dot-sep {
    color: #666;
    margin: 0 6px;
}

@media (max-width: 576px) {
    .footer-bottom-grid {
        justify-content: center;
        text-align: center;
    }
}

.footer-col p {
    margin-bottom: 12px;
    line-height: 1.8;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #ccc;
    transition: var(--transition);
    display: inline-block;
}

.footer-col ul li a:hover {
    color: #fff;
    transform: translateX(5px);
}

/* ─── Popular tools strip ─── */
.footer-tools {
    border-top: 1px solid rgba(107,122,153,0.18);
    padding: 28px 0;
    background: rgba(0,0,0,0.12);
}
.footer-tools-head h4 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}
.footer-tools-head h4::after { display: none; }
.footer-tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-tool-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(107,122,153,0.25);
    color: #cbd5e1;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}
.footer-tool-pill:hover {
    background: rgba(107,122,153,0.18);
    border-color: var(--primary-light);
    color: #fff;
    transform: translateY(-2px);
}
.footer-tool-pill span {
    font-size: 1rem;
    line-height: 1;
}

.footer-bottom {
    text-align: center;
    padding: 24px 0 28px;
    border-top: 1px solid rgba(107,122,153,0.18);
    color: #94a3b8;
    background: rgba(0,0,0,0.3);
}
.footer-bottom strong { color: #cbd5e1; }
.footer-disclaimer {
    margin-top: 18px;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.6;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    padding: 14px 18px;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(107,122,153,0.12);
    border-radius: 10px;
}
.footer-disclaimer strong { color: #94a3b8; }

/* ─── Scroll-to-top button ─── */
.footer-scrolltop {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    border: 0;
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(107,122,153,0.4);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 998;
}
.footer-scrolltop.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.footer-scrolltop:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(107,122,153,0.55);
}

@media (max-width: 768px) {
    .footer-scrolltop { bottom: 100px; left: 20px; width: 42px; height: 42px; }
}

/* ======== QUERY CHAT WIDGET ======== */
.query-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 998;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 16px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(107, 122, 153, 0.4);
    opacity: 1;
    transform: translateY(0);
    transition: var(--transition);
}

.query-trigger:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(107, 122, 153, 0.5);
}

.query-popup-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 999;
    width: 360px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: var(--transition);
}

.query-popup-widget.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.query-popup-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.query-popup-header .header-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.query-popup-header .close-widget-btn {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    transition: var(--transition);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.query-popup-header .close-widget-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.query-popup-body {
    padding: 28px;
    text-align: center;
}

.query-popup-body p {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 24px;
    line-height: 1.6;
}

.popup-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.popup-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%);
}

.popup-btn.call-outline {
    background-color: #fff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    font-weight: 600;
}

.popup-btn.call-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* ======== VIDEO EMBED ======== */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 45%;
    height: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ======== ALGO TRADING PAGE ======== */
.algo-hero {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
}

.algo-hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.algo-hero-text {
    flex: 1;
    animation: fadeInLeft 0.8s ease-out;
}

.algo-hero-visual {
    flex: 1;
    animation: fadeInRight 0.8s ease-out;
}

.algo-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #fff;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.algo-hero-text h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--dark-color);
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.algo-hero-text p {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 28px;
    color: var(--text-color);
}

.algo-hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 36px;
}

.cta-button-outline {
    padding: 16px 36px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    display: inline-block;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    transition: var(--transition);
}

.cta-button-outline:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(107, 122, 153, 0.3);
}

.algo-trust-badges {
    display: flex;
    gap: 32px;
}

.trust-item {
    text-align: center;
}

.trust-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
}

.trust-label {
    font-size: 0.85rem;
    color: var(--text-color);
    font-weight: 500;
}

/* Code Block Visual */
.algo-code-block {
    background: #1e1e2e;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.algo-code-block:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.code-header {
    background: #313244;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.dot.red { background: #f38ba8; }
.dot.yellow { background: #f9e2af; }
.dot.green { background: #a6e3a1; }

.code-title {
    color: #a6adc8;
    font-size: 0.85rem;
    margin-left: 8px;
    font-family: 'Courier New', monospace;
}

.code-body {
    padding: 24px;
    margin: 0;
    overflow-x: auto;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #cdd6f4;
}

.code-body code {
    font-family: inherit;
}

.code-keyword { color: #cba6f7; }
.code-string { color: #a6e3a1; }
.code-func { color: #89b4fa; }

/* Algo Sections */
.algo-section {
    padding: 60px 0 80px;
}

/* Steps Section */
.algo-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-top: 20px;
}

.algo-step {
    text-align: center;
    padding: 32px 24px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
}

.algo-step:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.3rem;
    font-weight: 700;
}

.algo-step h3 {
    color: var(--dark-color);
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.algo-step p {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Instruments Grid */
.algo-instruments {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.instrument-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: var(--transition);
}

.instrument-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.instrument-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.instrument-card p {
    color: var(--text-color);
    line-height: 1.7;
}

/* Tech Stack Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tech-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px;
    text-align: center;
    transition: var(--transition);
}

.tech-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
}

.tech-item h4 {
    color: var(--dark-color);
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.tech-item p {
    color: var(--text-color);
    font-size: 0.95rem;
}

/* FAQ Section */
.algo-faq {
    max-width: 850px;
    margin: 0 auto;
}

.faq-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-light);
}

.faq-item h3 {
    color: var(--dark-color);
    font-size: 1.15rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.faq-item p {
    color: var(--text-color);
    line-height: 1.8;
}

/* CTA Section */
.algo-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    text-align: center;
    color: #fff;
}

.algo-cta h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.algo-cta p {
    font-size: 1.15rem;
    margin-bottom: 32px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 32px;
}

.algo-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Card Icon */
.card-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 992px) {
    .team-grid,
    .service-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content {
        gap: 50px;
    }

    .algo-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .algo-instruments,
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .algo-hero-content {
        gap: 40px;
    }
}

/* ─── MOBILE (≤ 900px) — hamburger appears, drawer menu ─── */
@media (max-width: 900px) {
    header .site-nav {
        padding: 8px 16px;
        min-height: 64px;
        gap: 10px;
        position: relative;
    }
    .logo img { height: 44px; max-width: 160px; }

    /* Hide desktop CTA group on mobile — they go inside the drawer */
    .nav-cta-group { display: none; }

    /* Hamburger visible */
    .hamburger {
        display: flex !important;
        margin-left: auto;
        z-index: 110;
    }

    /* Nav drawer — slides down full-width */
    .nav-links {
        display: flex !important;            /* keep flex but use max-height to hide */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        background: #fff;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        padding: 0;
        margin: 0;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.3s ease;
    }
    .nav-links.active {
        max-height: 80vh;
        overflow-y: auto;
        padding: 8px 0 16px;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
    }
    .nav-links li:last-child { border-bottom: 0; }

    .nav-links li a {
        padding: 14px 22px;
        border-radius: 0;
        display: block;
        font-size: 1rem;
        background: transparent;
    }
    .nav-links li a::before { display: none; }
    .nav-links li a.active,
    .nav-links li a:hover {
        background: rgba(107, 122, 153, 0.08);
        color: var(--primary-color);
        padding-left: 28px;
    }

    /* Mobile CTAs INSIDE drawer (rendered as bottom buttons) */
    .nav-links::after { content: ''; display: block; height: 8px; }
    .nav-links .nav-cta-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 14px 22px 4px;
        border-top: 1px solid var(--border-color);
        margin-top: 4px;
    }
    .nav-links .nav-cta-group-mobile a {
        padding: 12px 18px;
        border-radius: 50px;
        font-weight: 700;
        text-align: center;
        color: #fff;
        font-size: 0.92rem;
        text-decoration: none;
    }
    .nav-links .nav-cta-group-mobile a.ecom {
        background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
    }
    .nav-links .nav-cta-group-mobile a.py {
        background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    }

    /* Backdrop when drawer open */
    body.menu-open { overflow: hidden; }
    body.menu-open::after {
        content: '';
        position: fixed;
        inset: var(--header-height) 0 0 0;
        background: rgba(15, 23, 42, 0.4);
        z-index: 95;
        animation: fadeIn 0.25s ease;
    }
    @keyframes fadeIn {
        from { opacity: 0; }
        to   { opacity: 1; }
    }
}

/* ─── PHONE (≤ 768px) ─── */
@media (max-width: 768px) {
    .hero-content { flex-direction: column-reverse; text-align: center; gap: 40px; }
    .hero-text h1 { font-size: 2.4rem; }
    .hero-text p { font-size: 1.05rem; }
    .hero-decor-images { justify-content: center; }

    .about-flex { flex-direction: column; gap: 36px; }

    .section-title { font-size: 2rem; }

    .algo-hero-content { flex-direction: column-reverse; text-align: center; gap: 36px; }
    .algo-hero-text h1 { font-size: 2rem; }
    .algo-hero-buttons { justify-content: center; flex-wrap: wrap; }
    .algo-trust-badges { justify-content: center; }
    .algo-cta h2 { font-size: 1.8rem; }
    .algo-cta-buttons { flex-direction: column; align-items: center; }

    .service-cards { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .team-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .product-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }

    .query-popup-widget {
        width: calc(100vw - 32px);
        right: 16px;
        bottom: 84px;
    }
    .query-trigger {
        right: 16px;
        bottom: 16px;
        padding: 12px 22px;
        font-size: 0.9rem;
    }
    .footer-scrolltop { left: 16px; bottom: 80px; width: 40px; height: 40px; }

    .container { padding: 0 16px; }
}

/* ─── SMALL PHONE (≤ 576px) ─── */
@media (max-width: 576px) {
    .service-cards,
    .team-grid,
    .product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }

    .hero-text h1 { font-size: 1.9rem; line-height: 1.2; }
    .algo-hero-text h1 { font-size: 1.65rem; }
    .section-title { font-size: 1.7rem; padding-bottom: 14px; padding-top: 4px; }

    .algo-steps,
    .algo-instruments,
    .tech-grid { grid-template-columns: 1fr; }

    .algo-hero-buttons { flex-direction: column; align-items: stretch; gap: 10px; }
    .algo-hero-buttons .cta-button,
    .algo-hero-buttons .cta-button-outline { text-align: center; padding: 13px 24px; }

    .algo-trust-badges { flex-direction: column; gap: 14px; align-items: center; }

    .code-body { font-size: 0.74rem; padding: 14px; line-height: 1.6; }

    .contact-form, .contact-info { padding: 26px 20px; }
    .contact-form h2 { font-size: 1.5rem; }
    .form-group input, .form-group textarea { font-size: 0.95rem; padding: 12px 14px; }

    .card { padding: 24px 20px; }
    .card h3 { font-size: 1.25rem; }

    .cta-button { padding: 13px 26px; font-size: 0.96rem; }

    /* Hero decor images smaller */
    .hero-decor-images img { height: 50px; }

    /* Footer credibility boxes more compact */
    .footer-credit-box { padding: 10px 14px; }
    .footer-credit-title { font-size: 0.85rem; }
    .footer-credit-line { font-size: 0.78rem; }

    /* Footer disclaimer smaller */
    .footer-disclaimer { font-size: 0.72rem; padding: 12px 14px; }

    /* Smaller logo on tiny screens */
    .logo img { height: 40px; max-width: 140px; }
}

/* ─── EXTRA SMALL (≤ 380px) ─── */
@media (max-width: 380px) {
    header .site-nav { padding: 6px 12px; min-height: 58px; }
    .logo img { height: 36px; max-width: 120px; }
    .container { padding: 0 14px; }
    .hero-text h1 { font-size: 1.65rem; }
    .section-title { font-size: 1.5rem; }
    .card { padding: 20px 16px; }
}