/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg: #020617;
    --bg-alt: #0f172a;
    --surface: rgba(30, 41, 59, 0.7);
    --text: #f1f5f9;
    --text-dim: #94a3b8;
    --accent: #38bdf8;
    --gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --border: rgba(255, 255, 255, 0.1);
    --nav-text: #f1f5f9;
    --accent-rgb: 56, 189, 248;
    --button-text: #ffffff;
    --elevation-shadow: rgba(2, 6, 23, 0.28);
    --accent-soft: rgba(var(--accent-rgb), 0.1);
    --accent-soft-strong: rgba(var(--accent-rgb), 0.15);
    --control-bg: rgba(2, 6, 23, 0.62);
    --chip-bg: rgba(2, 6, 23, 0.35);
    --footer-grad-start: rgba(15, 23, 42, 0.4);
    --code-bg: rgba(148, 163, 184, 0.15);
    --pre-bg: rgba(2, 6, 23, 0.55);
    --accent-shadow-soft: rgba(var(--accent-rgb), 0.3);
    --accent-shadow-strong: rgba(var(--accent-rgb), 0.5);
}

[data-theme="light"] {
    --bg: #ffffff;
    --bg-alt: #f0f9ff;
    --surface: rgba(255, 255, 255, 0.9);
    --text: #0f172a;
    --text-dim: #475569;
    --accent: #0284c7;
    --gradient: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    --border: rgba(0, 0, 0, 0.08);
    --nav-text: #0f172a;
    --accent-rgb: 2, 132, 199;
    --button-text: #ffffff;
    --elevation-shadow: rgba(15, 23, 42, 0.1);
    --accent-soft: rgba(var(--accent-rgb), 0.1);
    --accent-soft-strong: rgba(var(--accent-rgb), 0.12);
    --control-bg: rgba(255, 255, 255, 0.82);
    --chip-bg: rgba(255, 255, 255, 0.9);
    --footer-grad-start: rgba(2, 132, 199, 0.08);
    --code-bg: rgba(15, 23, 42, 0.08);
    --pre-bg: rgba(15, 23, 42, 0.05);
    --accent-shadow-soft: rgba(var(--accent-rgb), 0.24);
    --accent-shadow-strong: rgba(var(--accent-rgb), 0.35);
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    margin: 0;
    overflow-x: hidden;
}

.grey-text { color: var(--text-dim) !important; }

/* Typography */
h1, h2, h3, h4, h5 { font-family: 'Outfit', sans-serif; font-weight: 800; color: var(--text); margin-top: 0; }
.outfit-bold { font-family: 'Outfit', sans-serif; font-weight: 800; }
.text-gradient { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.text-dim { color: var(--text-dim) !important; }
.accent-text { color: var(--accent); letter-spacing: 1px; font-weight: 600; text-transform: uppercase; }
.blue-text { color: var(--accent) !important; }

/* =========================================
   2. NAVBAR STYLES
   ========================================= */
/* (See navbar.html / navbar.css for specific implementations) */
.navbar-fixed { position: fixed; top: 0; width: 100%; z-index: 9999 !important; height: 64px; }

/* =========================================
   3. HERO SECTION (Desktop Default)
   ========================================= */
.hero-carousel-wrap {
    position: relative;
    width: 100%;
    height: 95vh;
    min-height: 600px;
    display: flex; align-items: center;
    overflow: hidden;
}

#neural-canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; opacity: 0.3; pointer-events: none;
}

.carousel.carousel-slider { height: 100% !important; z-index: 1; }
.carousel-item { width: 100%; height: 100%; display: flex !important; align-items: center; justify-content: center; }

.hero-modern { width: 100%; height: 100%; display: flex; align-items: center; }

/* Desktop Grid Layout */
.hero-split-row {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Side by Side */
    gap: 40px;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text-col { text-align: left; padding-left: 20px; z-index: 5; }
.hero-text-col h1 { font-size: 4.5rem; line-height: 1.1; margin-bottom: 25px; }
.hero-subtext { font-size: 1.3rem; color: var(--text-dim); max-width: 600px; line-height: 1.6; margin-bottom: 30px; }

.hero-graphic-col {
    display: flex; justify-content: center; align-items: center;
    height: 400px; position: relative; z-index: 4;
}

/* Badge & Buttons */
.badge-pill {
    display: inline-block; padding: 8px 16px; border-radius: 50px;
    background: var(--accent-soft); border: 1px solid var(--accent);
    color: var(--accent); font-weight: 600; margin-bottom: 20px;
}
.btn-premium {
    background: var(--gradient); color: var(--button-text); padding: 15px 40px;
    border-radius: 12px; font-weight: 700; border: none; cursor: pointer;
    box-shadow: 0 10px 25px var(--accent-shadow-soft); transition: 0.3s;
}
.btn-premium:hover { transform: translateY(-3px); box-shadow: 0 15px 35px var(--accent-shadow-strong); }

/* Controls */
.carousel-controls {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 20px; z-index: 20;
    background: var(--control-bg); padding: 10px 20px; border-radius: 50px; border: 1px solid var(--border);
    backdrop-filter: blur(5px);
}
.nav-btn { background: none; border: none; color: var(--text); cursor: pointer; }
.carousel-dots { display: flex; gap: 10px; }
.dot { width: 10px; height: 10px; background-color: var(--text-dim); border-radius: 50%; opacity: 0.5; }
.dot.active { background-color: var(--accent); opacity: 1; transform: scale(1.3); }

/* =========================================
   4. CARDS & SECTIONS
   ========================================= */
.section { padding: 80px 0; }
.secondary-bg { background-color: var(--bg-alt); }

.flex-row { display: flex; flex-wrap: wrap; }

.glass-card, .pricing-card, .marketing-card-new, .blog-card, .project-card {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(12px);
    display: flex; flex-direction: column;
    height: 100%; 
    transition: 0.3s ease; overflow: hidden;
}
.glass-card:hover { border-color: var(--accent) !important; transform: translateY(-8px); }
.card-content { flex-grow: 1; padding: 30px !important; display: flex; flex-direction: column; }

.pricing-card { position: relative; padding-top: 40px !important; text-align: center; }
.pricing-card .badge-pill { position: absolute; top: 15px; left: 50%; transform: translateX(-50%); margin: 0; }
.price-tag { font-size: 3.5rem; font-weight: 800; margin: 15px 0; }
.btn-outline { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-weight: 600; text-align: center; margin-top: auto; }
.btn-outline:hover { background: var(--accent); color: var(--button-text); }
.glass-divider {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}
.check-list { text-align: left; margin: 20px 0; flex-grow: 1; }
.check-list i { color: var(--accent); margin-right: 10px; }

.client-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 50px; opacity: 0.6; padding: 20px 0; }
.client-logo img { height: 40px; filter: grayscale(100%); transition: 0.3s; }
.client-logo img:hover { filter: grayscale(0); }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 20px; margin-top: 40px; }
.tech-icon-box { background: var(--surface); padding: 25px; border-radius: 16px; border: 1px solid var(--border); transition: 0.3s; text-align: center; }
.tech-icon-box:hover { border-color: var(--accent); transform: translateY(-5px); }
.tech-icon-box img { height: 50px; margin-bottom: 10px; display: block; margin: 0 auto 10px auto; }

.form-wrap { padding: 40px; }
.input-field input, .input-field textarea { color: var(--text) !important; border-bottom: 1px solid var(--border) !important; }
.input-field label { color: var(--text-dim) !important; }
.select-wrapper input.select-dropdown { color: var(--text) !important; border-bottom: 1px solid var(--border) !important; }
.custom-footer { background: var(--bg-alt) !important; padding-top: 80px; border-top: 1px solid var(--border); }

/* Footer */
.custom-site-footer {
    background: linear-gradient(180deg, var(--footer-grad-start) 0%, var(--bg-alt) 100%);
    border-top: 1px solid var(--border);
    padding: 44px 0 28px;
}
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}
.footer-brand-block h5 { margin-bottom: 8px; }
.footer-brand-block p { margin: 0; max-width: 560px; }

.social-palette {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.social-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    background: var(--chip-bg);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.social-chip:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.22);
}
.social-chip svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}
.social-chip span {
    font-size: 0.88rem;
    letter-spacing: 0.3px;
}
.footer-bottom {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.footer-bottom p {
    margin: 0;
    font-size: 0.92rem;
}

/* Blog Detail */
.blog-page-wrap {
    padding-top: 88px;
    padding-bottom: 64px;
}
.blog-nav-row {
    margin-bottom: 22px;
}
.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 600;
}
.blog-back-link i {
    font-size: 20px;
}
.blog-hero-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 34px 24px;
    text-align: center;
    margin-bottom: 24px;
}
.blog-meta-line {
    margin-top: 12px;
    font-size: 0.95rem;
    color: var(--text-dim);
}
.blog-cover-wrap {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 28px;
}
.blog-cover-img {
    width: 100%;
    max-height: 520px;
    display: block;
    object-fit: cover;
}
.blog-article-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 30px 26px;
}
.blog-content {
    color: var(--text-dim);
    font-size: 1.08rem;
    line-height: 1.9;
}
.blog-content p:first-child {
    margin-top: 0;
}
.blog-content p:last-child {
    margin-bottom: 0;
}
.blog-content h2,
.blog-content h3,
.blog-content h4 {
    color: var(--text);
    margin-top: 26px;
    margin-bottom: 12px;
}
.blog-content a {
    color: var(--accent);
    text-decoration: underline;
}
.blog-content blockquote {
    margin: 22px 0;
    padding: 10px 16px;
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    color: var(--text);
}
.blog-content ul,
.blog-content ol {
    padding-left: 24px;
}
.blog-content code {
    background: var(--code-bg);
    border-radius: 6px;
    padding: 2px 6px;
    color: var(--text);
}
.blog-content pre {
    background: var(--pre-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    overflow-x: auto;
}

/* Animations */
@keyframes rotateCube { from { transform: rotateX(0) rotateY(0); } to { transform: rotateX(360deg) rotateY(360deg); } }
.cyber-cube { width: 150px; height: 150px; transform-style: preserve-3d; animation: rotateCube 15s linear infinite; }
.cube-face { position: absolute; width: 150px; height: 150px; border: 2px solid var(--accent); background: var(--accent-soft-strong); }
.front { transform: translateZ(75px); } .back { transform: rotateY(180deg) translateZ(75px); }
.right { transform: rotateY(90deg) translateZ(75px); } .left { transform: rotateY(-90deg) translateZ(75px); }
.top { transform: rotateX(90deg) translateZ(75px); } .bottom { transform: rotateX(-90deg) translateZ(75px); }
@keyframes spinRing { 100% { transform: rotate(360deg); } }
.tech-ring { width: 250px; height: 250px; border-radius: 50%; border: 2px dashed var(--accent); position: absolute; animation: spinRing 20s infinite linear; }
.tech-core { width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle, var(--accent) 0%, transparent 70%); animation: pulseCore 3s infinite; }
@keyframes pulseCore { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.3); opacity: 0.3; } }

/* =========================================
   6. RESPONSIVE MEDIA QUERIES (Cleaned & Consolidated)
   ========================================= */

@media only screen and (max-width: 992px) {
    /* --- NAVBAR: Switch to Mobile View --- */
    .desktop-links { display: none !important; }
    
    .sidenav-trigger { 
        display: flex !important; 
        position: absolute; left: 0; top: 0;
        height: 64px; align-items: center; padding: 0 15px; 
        z-index: 20; 
    }
    
    .nav-wrapper { justify-content: center; position: relative; } /* Center Logo */
    .brand-logo { position: relative !important; left: auto !important; transform: none !important; margin: 0; }

    /* --- HERO: Tablet/Mobile Overlap Layout --- */
    .container { width: 92% !important; }

    .hero-carousel-wrap {
        height: auto;
        min-height: 100vh; /* Force full screen height */
        padding-top: 64px;
        display: flex;
        align-items: center;
    }

    .carousel.carousel-slider,
    .carousel-item,
    .hero-modern {
        width: 100%;
        min-height: calc(100vh - 64px);
        height: calc(100vh - 64px) !important;
    }

    .carousel.carousel-slider {
        position: relative;
        z-index: 2;
    }

    /* Stack Graphic and Text using Grid Overlap */
    .hero-split-row {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr; /* Single cell */
        align-items: center;
        justify-items: center;
        width: 100%;
        min-height: 500px;
    }

    /* Graphic Layer (Background) */
    .hero-graphic-col {
        grid-area: 1 / 1 / 2 / 2;
        z-index: 1; /* Behind text */
        opacity: 0.35; /* Faded */
        transform: scale(0.9);
        width: 100%;
        height: 100%;
        display: flex; justify-content: center; align-items: center;
    }

    /* Text Layer (Foreground) */
    .hero-text-col {
        grid-area: 1 / 1 / 2 / 2;
        z-index: 5; /* On Top */
        padding: 0 15px;
        text-align: center !important;
        display: flex; flex-direction: column; align-items: center;
    }

    .hero-text-col h1 { 
        font-size: 2.8rem; 
        text-shadow: 0 0 25px var(--bg); /* Readability Glow */
    }
    .hero-subtext {
        color: var(--text);
        text-shadow: 0 0 10px var(--bg);
        margin: 0 auto 30px auto;
        text-align: center;
    }

    /* Adjust 3D elements for smaller screens */
    .cyber-cube { width: 140px; height: 140px; }
    .cube-face { width: 140px; height: 140px; }
    .tech-ring { width: 220px; height: 220px; }

    /* Fix controls position */
    .carousel-controls {
        width: 90%;
        bottom: 20px;
        justify-content: space-between;
    }

    /* Other Mobile Adjustments */
    .btn-premium, .btn-outline { width: 100%; display: block; margin-bottom: 10px; }
    .tech-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .client-grid { gap: 20px; }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .social-palette {
        width: 100%;
    }

    .blog-page-wrap {
        padding-top: 72px;
        padding-bottom: 48px;
    }
    .blog-hero-card {
        padding: 24px 16px;
    }
    .blog-hero-card h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    .blog-article-card {
        padding: 20px 16px;
    }
    .blog-content {
        font-size: 1rem;
        line-height: 1.75;
    }
}
