:root {
    --bg-dark: #0a0b10;
    --primary-orange: #ff9d00;
    --primary-orange-hover: #ff6f00;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-main: #ffffff;
    --text-muted: #b0b0b0;
    --scrollbar-color: #ff9d00;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- MAGNETIC BUTTONS & ELEMENTS --- */
.magnetic {
    transition: transform 0.1s linear, box-shadow 0.3s ease;
    will-change: transform;
}

/* --- SCROLL PROGRESS BAR --- */
#scroll-progress {
    position: fixed; top: 0; left: 0; min-height: 3px; height: 3px; 
    background: var(--scrollbar-color); width: 0%; 
    z-index: 10001; transition: width 0.1s linear, background 0.5s ease, box-shadow 0.5s ease;
    box-shadow: 0 0 10px var(--scrollbar-color);
}

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

.text-center { text-align: center; }

h1, h2, h3 { line-height: 1.2; margin-bottom: 1rem; }
.section-title { font-size: 2.5rem; margin-top: 3rem; margin-bottom: 3rem; color: var(--primary-orange); }

/* --- GLASSMORPHISM --- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.glass-btn {
    display: inline-block;
    background: linear-gradient(135deg, rgba(255,157,0,0.8), rgba(255,111,0,0.8));
    color: white;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}
.glass-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255,157,0,0.3);
}

/* --- BACKGROUND SHAPES --- */
.bg-shapes {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    overflow: visible; z-index: -1; pointer-events: none;
}
.shape-wrapper {
    position: absolute; width: 100%; height: 100%; 
    will-change: transform;
}
.shape {
    position: absolute; opacity: 0.15;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(80px);
    -webkit-backdrop-filter: blur(80px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}
.shape-1 { width: 40rem; height: 40rem; top: 0; left: 0; background: #4a148c; animation: slow-float 20s infinite ease-in-out; }
.shape-2 { width: 30rem; height: 30rem; top: 0; left: 0; background: #ff6f00; border-radius: 20%; animation: slow-float 25s -5s infinite ease-in-out; }
.shape-3 { width: 15rem; height: 15rem; top: 0; left: 0; background: #0d47a1; animation: slow-rotate 15s infinite linear; }
.shape-4 { width: 20rem; height: 20rem; top: 0; left: 0; background: #00838f; animation: slow-float 18s -2s infinite ease-in-out; }

@keyframes slow-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5rem, -5rem) scale(1.1); }
}
@keyframes slow-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- HEADER & NAV --- */
.header {
    position: absolute; top: 0; width: 100%; z-index: 100;
    padding: 20px 0; transition: all 0.4s ease;
}
.header.scrolled {
    position: fixed; top: 0; padding: 10px 0;
    background: rgba(10, 11, 16, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.8rem; font-weight: 800; letter-spacing: 1px; display: inline-block; cursor: pointer; }
.logo span { color: var(--primary-orange); }
.nav-links { display: flex; list-style: none; gap: 2rem; align-items: center; }
.lang-btn { display: inline-block; margin-left: 20px; padding: 6px 15px; border-radius: 20px; font-size: 0.9rem; }
.menu-toggle { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.menu-toggle span { display: block; width: 25px; height: 3px; background: white; transition: 0.3s; }

/* --- LINKS --- */
.link-center { position: relative; text-decoration: none; color: white; font-size: 1.1rem; padding: 5px 0; }
.link-center::after {
    content: ''; position: absolute; width: 100%; height: 2px; bottom: 0; left: 0;
    background-color: var(--primary-orange);
    transform: scaleX(0); transform-origin: center; transition: transform 0.3s ease-in-out;
}
.link-center:hover::after { transform: scaleX(1); }

/* --- SECTIONS SPACING --- */
section { padding: 100px 0; }

/* --- HERO --- */
.hero { display: flex; align-items: center; justify-content: center; min-height: 100vh; text-align: center; }
.hero-content { padding: 4rem 2rem; max-width: 800px; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.hero h1 { font-size: 3.5rem; background: linear-gradient(120deg, #fff, #b0b0b0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.2rem; color: var(--text-muted); }

/* --- SERVICES GRID --- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.service-card { padding: 2rem; text-align: center; transition: all 0.3s ease; }
.service-card:hover { 
    transform: translateY(-10px) scale(1.03); 
    background: rgba(255,255,255,0.12); 
    box-shadow: 0 0 10px var(--primary-orange); 
}
.service-icon { font-size: 3rem; margin-bottom: 1rem; }
.service-card h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--primary-orange); }

/* --- ORBIT (PROJECTS) --- */
.orbit-container {
    position: relative; width: 45rem; height: 45rem;
    margin: 3rem auto; border: 2px dashed rgba(255, 255, 255, 0.15); border-radius: 50%;
}
.orbit-center {
    position: absolute; top: 50%; left: 50%; margin: -7.5rem 0 0 -7.5rem;
    width: 15rem; height: 15rem;
    display: flex; justify-content: center; align-items: center; z-index: 2;
    font-weight: bold; font-size: 1.5rem; color: var(--primary-orange);
    text-align: center; border-radius: 50%;
}
.item {
    position: absolute; top: 50%; left: 50%; margin: -6rem 0 0 -6rem;
    width: 12rem; height: 12rem; border-radius: 50%;
    overflow: hidden; cursor: pointer;
    animation: spin 20s var(--delay) linear infinite;
    border: 3px solid var(--primary-orange);
    transition: all 0.4s ease;
}
.item-inner {
    display: flex; align-items: center; width: 100%; height: 100%;
    padding: 6px; box-sizing: border-box;
}
.item-img {
    width: calc(12rem - 18px); height: calc(12rem - 18px); flex-shrink: 0;
    border-radius: 50%; overflow: hidden; transition: all 0.3s ease;
}
.item-img img { width: 100%; height: 100%; object-fit: cover; }
.item-details {
    opacity: 0; width: 0; overflow: hidden;
    white-space: nowrap; transition: all 0.4s ease; padding-left: 0;
    display: flex; flex-direction: column; justify-content: center;
}
.item-details h4 { margin-bottom: 5px; font-size: 1.1rem; color: var(--primary-orange); white-space: normal; line-height: 1.2;}
.item-details p { font-size: 0.9rem; color: var(--text-muted); white-space: normal; line-height: 1.3; margin-bottom: 0;}

.item:hover {
    animation-play-state: paused; z-index: 10;
    width: 26rem; margin-left: -13rem; border-radius: 6rem; /* pill shape */
}
.item:hover .item-details {
    opacity: 1; width: 14rem; padding-left: 15px; visibility: visible;
}

@keyframes spin {
    0% { transform: rotate(0deg) translate(var(--radius)) rotate(0deg); }
    100% { transform: rotate(1turn) translate(var(--radius)) rotate(-1turn); }
}

/* --- STATS COUNTERS --- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.stat-card { padding: 2rem; text-align: center; }
.stat-icon { font-size: 2.5rem; margin-bottom: 10px; }
.stat-number { font-size: 3rem; font-weight: 800; color: var(--primary-orange); transition: color 0.3s; }
.stat-number.finished { text-shadow: 0 0 15px var(--primary-orange); }
.stat-label { font-size: 1.1rem; color: var(--text-muted); }

/* --- ABOUT --- */
.about-card { padding: 3rem; text-align: center; font-size: 1.2rem; }

/* --- CONTACT SEC --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-card { padding: 2rem; position: relative; }
.form-group { margin-bottom: 1.5rem; text-align: left; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--text-muted); }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 12px 15px; border-radius: 10px;
    background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.2);
    color: white; font-family: 'Inter', sans-serif; font-size: 1rem; transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--primary-orange);
}
.form-group option { background: var(--bg-dark); }
.btn-submit { display: flex; justify-content: center; align-items: center; width: 100%; border: none; font-size: 1.1rem; }
.social-links { margin-top: 2rem; text-align: center; }

/* Success Overlay */
.form-success {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(10, 11, 16, 0.9); z-index: 10; border-radius: 20px;
}
.success-content { text-align: center; }
.success-icon { font-size: 4rem; color: #4caf50; margin-bottom: 1rem; }
.success-content h3 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.success-content button { margin-top: 1.5rem; border: none; }

/* MAP */
.map-wrapper { overflow: hidden; border-radius: 20px; line-height: 0; height: 100%; min-height: 400px; display: flex; }
.google-map {
    width: 100%; height: 100%; min-height: 400px;
    filter: grayscale(1) invert(0.9) opacity(0.8); transition: all 0.5s ease;
}
.map-wrapper:hover .google-map { filter: grayscale(0.3) invert(0.9) opacity(1); }

/* --- FOOTER --- */
.footer { padding: 2rem 0; border-top: 1px solid var(--glass-border); margin-top: 3rem; color: var(--text-muted); }

/* --- SCROLL REVEAL --- */
.reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); will-change: transform, opacity; }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { 
    background: var(--scrollbar-color); 
    border-radius: 10px; 
    border: 2px solid var(--bg-dark); 
    box-shadow: 0 0 10px var(--scrollbar-color);
}
html { scrollbar-width: thin; scrollbar-color: var(--scrollbar-color) var(--bg-dark); }

/* --- BACK TO TOP --- */
.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem; width: 50px; height: 50px;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 1.5rem; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.4s ease;
    border: none; color: white; z-index: 99;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-orange); }

/* --- MEDIA QUERIES --- */
@media (max-width: 1024px) {
    .orbit-container { width: 35rem; height: 35rem; }
    @keyframes spin {
        0% { transform: rotate(0deg) translate(17.5rem) rotate(0deg); }
        100% { transform: rotate(1turn) translate(17.5rem) rotate(-1turn); }
    }
}
@media (max-width: 768px) {
    .nav-links {
        position: fixed; right: -100%; top: 70px; flex-direction: column;
        background: rgba(10, 11, 16, 0.95); width: 100%; text-align: center;
        transition: 0.3s; padding: 2rem 0; box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }
    .nav-links.mobile-active { right: 0; }
    .menu-toggle { display: flex; }
    .menu-toggle.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active span:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    .contact-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.5rem; }
    .orbit-container { width: 22rem; height: 22rem; margin: 3rem auto; }
    .item { width: 6rem; height: 6rem; margin: -3rem 0 0 -3rem; border-width: 2px; }
    .item-img { width: calc(6rem - 8px); height: calc(6rem - 8px); }
    .item:hover { width: 15rem; margin-left: -7.5rem; border-radius: 3rem; }
    .item-details h4 { font-size: 0.9rem; }
    .item-details p { font-size: 0.75rem; }
    .item:hover .item-details { width: 8.5rem; padding-left: 10px; }
    .orbit-center { width: 8rem; height: 8rem; margin: -4rem 0 0 -4rem; font-size: 1rem; }
    @keyframes spin {
        0% { transform: rotate(0deg) translate(var(--mobile-radius)) rotate(0deg); }
        100% { transform: rotate(1turn) translate(var(--mobile-radius)) rotate(-1turn); }
    }
}

/* AI CHAT WIDGET */
.chat-toggle-btn {
    position: fixed; bottom: 20px; right: 20px; width: 60px; height: 60px;
    border-radius: 50%; background: var(--primary-orange); color: white;
    font-size: 24px; border: none; cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 157, 0, 0.4);
    z-index: 1000; transition: transform 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.chat-toggle-btn:hover { transform: scale(1.1); }

#ai-chat-widget {
    position: fixed; bottom: 90px; right: 20px; width: 350px;
    max-width: calc(100% - 40px); height: 500px;
    max-height: calc(100vh - 110px); display: flex; flex-direction: column;
    z-index: 1000; overflow: hidden; font-family: 'Inter', sans-serif;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#ai-chat-widget.hidden { opacity: 0; pointer-events: none; transform: translateY(20px); }

.chat-header {
    padding: 15px; background: rgba(0, 0, 0, 0.5);
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--glass-border);
}
.chat-header h3 { font-size: 16px; margin: 0; font-family: 'Inter', sans-serif;}
#close-chat { background: transparent; border: none; color: white; font-size: 24px; cursor: pointer; }

.chat-messages { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 3px; }

.message { padding: 10px 15px; border-radius: 15px; max-width: 85%; font-size: 14px; line-height: 1.4; word-wrap: break-word; }
.message.assistant { background: rgba(255, 255, 255, 0.1); align-self: flex-start; border-bottom-left-radius: 5px; }
.message.user { background: var(--primary-orange); align-self: flex-end; border-bottom-right-radius: 5px; }

.chat-input-area { padding: 15px; border-top: 1px solid var(--glass-border); display: flex; gap: 10px; background: rgba(10, 11, 16, 0.8); }
#chat-input {
    flex: 1; padding: 12px 15px; border-radius: 20px; border: none;
    background: rgba(255, 255, 255, 0.1); color: white; outline: none; font-size: 14px; transition: background 0.3s;
}
#chat-input:focus { background: rgba(255, 255, 255, 0.15); }
#chat-input::placeholder { color: rgba(255,255,255,0.6); }

#send-chat-btn {
    background: var(--primary-orange); color: white; border: none; padding: 10px 20px;
    border-radius: 20px; cursor: pointer; font-weight: bold; transition: background 0.3s;
}
#send-chat-btn:hover { background: #e68d00; }
