/* --- CSS RESET & VARIABLES --- */
:root {
    --bg-dark: #050507;
    --bg-card: #0e0e12;
    --bg-glass: rgba(20, 20, 25, 0.7);
    --primary-color: #00f2ff;
    --primary-dim: rgba(0, 242, 255, 0.1);
    --secondary-color: #7000ff;
    --accent-color: #ff0055;
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --border-color: rgba(255, 255, 255, 0.1);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1200px;
    --header-height: 80px;
    --glow-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    color: var(--text-main);
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

/* --- UTILITIES --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0;
}

.text-center {
    text-align: center;
}

.text-gradient {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hidden {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(20px);
    transition: all 1s ease;
}

.show {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* --- HEADER & NAVIGATION --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background: rgba(5, 5, 7, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 60px;
    width: auto;
    filter: invert(1) drop-shadow(0 0 5px var(--primary-color));
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    position: relative;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-main);
    transition: var(--transition-fast);
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: var(--header-height);
}

.hero-bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
}

.hero-content {
    z-index: 2;
    max-width: 600px;
}

.hero-tag {
    display: inline-block;
    padding: 5px 15px;
    background: var(--primary-dim);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: var(--font-heading);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-3d-element {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 500px;
    height: 500px;
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cube-container {
    width: 300px;
    height: 300px;
    transform-style: preserve-3d;
    animation: rotateCube 20s infinite linear;
}

.cube-face {
    position: absolute;
    width: 300px;
    height: 300px;
    border: 2px solid var(--primary-color);
    background: rgba(0, 242, 255, 0.05);
    box-shadow: 0 0 20px var(--primary-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--primary-color);
}

.front {
    transform: rotateY(0deg) translateZ(150px);
}

.back {
    transform: rotateY(180deg) translateZ(150px);
}

.right {
    transform: rotateY(90deg) translateZ(150px);
}

.left {
    transform: rotateY(-90deg) translateZ(150px);
}

.top {
    transform: rotateX(90deg) translateZ(150px);
}

.bottom {
    transform: rotateX(-90deg) translateZ(150px);
}

@keyframes rotateCube {
    from {
        transform: rotateX(0deg) rotateY(0deg);
    }

    to {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-dim);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 255, 0.4), transparent);
    transition: 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--primary-color);
}

/* --- SERVICES SECTION --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--bg-card);
    padding: 40px 30px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-dim), transparent);
    z-index: -1;
    opacity: 0;
    transition: var(--transition-fast);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.service-card:hover::after {
    opacity: 1;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* --- CALCULATOR SECTION --- */
.calculator-section {
    background: linear-gradient(rgba(5, 5, 7, 0.9), rgba(5, 5, 7, 0.9)), url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&q=80');
    background-size: cover;
    background-attachment: fixed;
}

.calc-container {
    background: var(--bg-glass);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-family: var(--font-heading);
    color: var(--primary-color);
}

.form-input,
.form-select {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #fff;
    border-radius: 5px;
    font-family: var(--font-body);
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-dim);
}

.calc-result {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 242, 255, 0.1);
    border-left: 4px solid var(--primary-color);
    display: none;
}

.calc-result.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* --- TESTIMONIALS --- */
.testimonials-slider {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.testimonial-card {
    min-width: 350px;
    background: var(--bg-card);
    padding: 30px;
    border-radius: 10px;
    scroll-snap-align: center;
    border: 1px solid var(--border-color);
}

.client-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #333;
}

/* --- CONTACT PAGE SPECIFIC --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-dim);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* --- LEGAL PAGES --- */
.legal-content {
    background: var(--bg-card);
    padding: 60px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.legal-content h2 {
    margin-top: 40px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.legal-content p {
    color: #ccc;
    margin-bottom: 20px;
}

.breadcrumbs {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--primary-color);
}

/* --- FOOTER --- */
.footer {
    background: #000;
    border-top: 1px solid var(--border-color);
    padding-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-col h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 25px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
}

.social-icon:hover {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

/* --- CHAT WIDGET --- */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 20px var(--primary-dim);
    z-index: 900;
    transition: 0.3s;
}

.chat-widget:hover {
    transform: scale(1.1);
}

.chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 300px;
    height: 400px;
    background: var(--bg-card);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    z-index: 899;
    display: none;
    flex-direction: column;
}

.chat-window.open {
    display: flex;
}

.chat-header {
    background: var(--primary-color);
    color: #000;
    padding: 15px;
    font-weight: bold;
}

.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    font-size: 0.9rem;
    color: #ccc;
}

.chat-input-area {
    padding: 10px;
    border-top: 1px solid var(--border-color);
    display: flex;
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 5px;
}

/* --- MEDIA QUERIES --- */
@media (max-width: 991px) {
    .hero {
        flex-direction: column;
        padding-top: 120px;
        height: auto;
        padding-bottom: 50px;
    }

    .hero-content {
        text-align: center;
        margin-bottom: 50px;
    }

    .hero-3d-element {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin: 0 auto;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--bg-dark);
        width: 100%;
        height: 100%;
        text-align: center;
        transition: 0.3s;
        padding-top: 100px;
    }

    .nav-menu.active {
        left: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }

    h1 {
        font-size: 2.5rem;
    }
}