/* --- CSS VARIABLES & THEME SETUP --- */
:root {
    /* Core Brand Colors */
    --primary-color: #4361ee;
    --primary-dark: #3a0ca3;
    --secondary-color: #7209b7;
    --accent-color: #f72585;
    --success-color: #4cc9f0;

    /* Backgrounds */
    --bg-body: #0b0c15;
    --bg-card: #161823;
    --bg-light: #ffffff;
    --bg-glass: rgba(22, 24, 35, 0.85);

    /* Typography */
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --text-dark: #1a1a1a;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Poppins', sans-serif;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --border-radius: 12px;

    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- RESET & GLOBAL STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: #ffffff;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- 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(135deg, var(--success-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- ANIMATIONS & KEYFRAMES --- */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(67, 97, 238, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(67, 97, 238, 0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate3D {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

@keyframes gradient-move {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Scroll Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.5);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: white;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* --- HEADER --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 12, 21, 0.2);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
}

.header.scrolled {
    background: rgba(11, 12, 21, 0.95);
    padding: 10px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo-link img {
    height: 60px;
    filter: brightness(1) invert(1);
    /* Ensure logo is white */
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: 0.4s;
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 999;
    padding: 100px 40px;
    transition: 0.5s ease;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav ul {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav a {
    font-size: 1.2rem;
    color: white;
    font-weight: 600;
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    padding-top: 160px;
    padding-bottom: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-color) 0%, rgba(0, 0, 0, 0) 70%);
    opacity: 0.2;
    z-index: -1;
    animation: pulse-glow 5s infinite;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.hero-text h1 {
    font-size: 4rem;
    margin-bottom: 25px;
    line-height: 1.1;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 3D Cube Animation */
.cube-wrapper {
    perspective: 1000px;
    width: 200px;
    height: 200px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate3D 15s infinite linear;
}

.face {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 2px solid var(--success-color);
    background: rgba(76, 201, 240, 0.1);
    box-shadow: 0 0 20px rgba(76, 201, 240, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.front {
    transform: rotateY(0deg) translateZ(100px);
}

.back {
    transform: rotateY(180deg) translateZ(100px);
}

.right {
    transform: rotateY(90deg) translateZ(100px);
}

.left {
    transform: rotateY(-90deg) translateZ(100px);
}

.top {
    transform: rotateX(90deg) translateZ(100px);
}

.bottom {
    transform: rotateX(-90deg) translateZ(100px);
}

/* --- 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;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--success-color);
    margin-bottom: 25px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.service-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- CALCULATOR SECTION --- */
.calculator-section {
    background: linear-gradient(135deg, #10121b, #1a1c29);
    position: relative;
}

.calc-wrapper {
    background: var(--bg-glass);
    padding: 40px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.calc-inputs label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-main);
    font-weight: 500;
}

.range-wrap {
    margin-bottom: 25px;
}

.range-wrap input {
    width: 100%;
    background: var(--bg-body);
    height: 8px;
    border-radius: 5px;
    appearance: none;
    outline: none;
}

.range-wrap input::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.calc-results {
    background: var(--primary-color);
    padding: 30px;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.result-box h4 {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.result-number {
    font-size: 3rem;
    font-weight: 800;
    color: white;
}

/* --- LEGAL PAGE SPECIFICS --- */
.page-header {
    padding-top: 150px;
    padding-bottom: 60px;
    background: linear-gradient(to bottom, #161823, var(--bg-body));
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
}

.breadcrumbs {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.breadcrumbs i {
    margin: 0 10px;
    font-size: 0.8rem;
}

.page-content {
    padding-bottom: 100px;
}

.content-wrapper {
    background: var(--bg-card);
    padding: 50px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.content-wrapper h2 {
    color: var(--primary-color);
    margin-top: 40px;
    font-size: 1.8rem;
}

.content-wrapper p,
.content-wrapper li {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.content-wrapper ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

/* --- CONTACT FORM --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-info-panel {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--border-radius);
}

.contact-method {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.method-icon {
    width: 50px;
    height: 50px;
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 20px;
}

.contact-form {
    background: var(--bg-card);
    padding: 50px;
    border-radius: var(--border-radius);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg-body);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    color: white;
    font-family: var(--font-body);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* --- FOOTER --- */
.footer {
    background: #05060a;
    padding: 80px 0 30px;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-color);
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    transition: 0.3s;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        display: none;
        /* Hide complex 3D on small screens or adjust */
    }

    .nav {
        display: none;
    }

    .header-actions .btn {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .calc-wrapper,
    .contact-wrapper,
    .footer-top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }

    .section-padding {
        padding: 60px 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}