/* DevStudio - Theme with Complete Background Glitch Fix */
:root {
    --bg-dark: #070a12;
    --bg-card: rgba(15, 23, 42, 0.65);
    --bg-card-hover: rgba(26, 38, 66, 0.85);
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.35);
    --text-main: #f8fafc;
    --text-sub: #94a3b8;
    --text-dim: #64748b;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(99, 102, 241, 0.5);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --cubic-bounce: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: all 0.3s var(--cubic-bounce);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden; /* Prevents glow bleed from triggering horizontal scrollbars */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #05070d;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.35);
    border-radius: 10px;
    border: 2px solid #05070d;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

main.container {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem 1.5rem;
}

/* Fixed Ambient Background Wrapper (Prevents Stacking Context Glitches) */
.bg-glow-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    pointer-events: none;
    overflow: hidden;
    transform: translateZ(0); /* Hardware Acceleration Lock */
}

.bg-glow-1 {
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: min(800px, 100vw);
    height: 500px;
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(0,0,0,0) 70%);
    will-change: transform;
    animation: floatGlow 9s ease-in-out infinite alternate;
}

.bg-glow-2 {
    position: absolute;
    bottom: -150px;
    right: -100px;
    width: min(700px, 100vw);
    height: 700px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0,0,0,0) 70%);
    will-change: transform;
    animation: floatGlow 11s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
    0% { transform: translateX(-50%) translateY(0); }
    100% { transform: translateX(-50%) translateY(30px); }
}

/* Header Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 10, 18, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 75px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.brand-logo:hover {
    transform: scale(1.03);
}

.brand-icon {
    width: 26px;
    height: 26px;
    color: var(--accent);
    filter: drop-shadow(0 0 6px var(--accent-glow));
}

.brand-logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.8rem;
}

.nav-links a {
    color: var(--text-sub);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s var(--cubic-bounce);
    border-radius: 2px;
}

.nav-links a:hover, .nav-links a.active {
    color: #fff;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow:hover {
    box-shadow: 0 0 25px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-glow:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--text-sub);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* Page Views & Structural Spacing */
.page-view {
    display: none;
    opacity: 0;
    transform: translateY(18px) scale(0.99);
    transition: opacity 0.4s var(--cubic-bounce), transform 0.4s var(--cubic-bounce);
    padding: 2.5rem 0;
}

.page-view.active {
    display: block;
}

.page-view.fade-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.view-header {
    margin-bottom: 2.5rem;
}

.view-header h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    max-width: 850px;
    margin: 2.5rem auto 4.5rem auto;
}

.hero-title {
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.2rem;
    letter-spacing: -1px;
}

.gradient-text {
    background: linear-gradient(135deg, #a5f3fc 0%, var(--accent) 50%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-sub);
    margin-bottom: 2.2rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.pulse-tag-wrapper {
    margin-bottom: 1.2rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
}

.tag-accent {
    color: var(--accent);
    border-color: rgba(6, 182, 212, 0.3);
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(6, 182, 212, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

.floating-tech-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2.5rem;
}

.floating-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--text-sub);
    animation: floatBob 4s ease-in-out infinite alternate;
}

.floating-pill:nth-child(2n) { animation-delay: 0.5s; }
.floating-pill:nth-child(3n) { animation-delay: 1s; }

@keyframes floatBob {
    0% { transform: translateY(0); }
    100% { transform: translateY(-6px); }
}

/* Category Filter Tabs */
.tab-container {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-sub);
    padding: 9px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.88rem;
    transition: var(--transition);
}

.tab-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s var(--cubic-bounce);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.tab-btn:hover svg {
    transform: scale(1.12);
}

.tab-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 18px var(--primary-glow);
}

/* Card Grids */
.services-grid, .sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.8rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: opacity 0.3s ease, transform 0.35s var(--cubic-bounce), border-color 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 16px 35px rgba(0,0,0,0.45);
}

.service-card:hover::before {
    opacity: 1;
}

.card-header-inline {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 1.2rem;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.card-icon svg {
    width: 24px;
    height: 24px;
}

.service-card:hover .card-icon {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 18px var(--primary-glow);
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.service-card p {
    font-size: 0.92rem;
    color: var(--text-sub);
    margin-bottom: 1.2rem;
}

.service-card ul {
    list-style: none;
    margin-bottom: 1.8rem;
}

.service-card ul li {
    font-size: 0.88rem;
    color: var(--text-sub);
    margin-bottom: 8px;
    position: relative;
    padding-left: 18px;
}

.service-card ul li::before {
    content: "•";
    color: var(--accent);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1;
}

.card-btn {
    width: 100%;
}

/* Page Banner Call-to-Action */
.page-cta-banner {
    margin-top: 3.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.08));
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    backdrop-filter: blur(12px);
}

.page-cta-banner h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-cta-banner p {
    color: var(--text-sub);
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Contact & Address Section */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    backdrop-filter: blur(12px);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
}

.contact-info-card, .contact-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    backdrop-filter: blur(12px);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-icon-box {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-icon-box svg {
    width: 22px;
    height: 22px;
}

.contact-info-text h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 3px;
}

.contact-info-text a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    word-break: break-all;
}

.contact-info-text a:hover {
    text-decoration: underline;
}

.address-text {
    font-size: 0.88rem;
    color: var(--text-sub);
    line-height: 1.5;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 6px;
}

.form-group input, .form-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: #fff;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 14px var(--primary-glow);
}

/* Footer (Sticky Flex Setup) */
footer {
    flex-shrink: 0;
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 10, 18, 0.96);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loading-overlay.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Menu Drawer */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
}

@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex; }
    .btn-header { display: none; }
    .hero-title { font-size: 2.4rem; }
    .contact-wrapper { grid-template-columns: 1fr; }
    
    .nav-links {
        position: absolute;
        top: 75px;
        left: 0;
        right: 0;
        background: rgba(7, 10, 18, 0.98);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.2rem;
        display: none;
    }
    
    .nav-links.open { display: flex; }
}