/*
  Quantum Data Nexus - styles.css
  Total Lines: ~2000+
*/

/* ---------------------------------- */
/*          1. Base & Reset           */
/* ---------------------------------- */
:root {
    --primary-bg: #0a0a1a;
    --secondary-bg: #10122e;
    --panel-bg: rgba(22, 26, 64, 0.6);
    --header-bg: rgba(10, 10, 26, 0.8);
    --footer-bg: #060714;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0c0;
    --accent-color-1: #00f2ff;
    --accent-color-2: #8a2be2;
    --border-color: rgba(0, 242, 255, 0.2);
    --glow-color: rgba(0, 242, 255, 0.5);
    --shadow-color: rgba(138, 43, 226, 0.3);
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto Mono', monospace;
    --transition-speed: 0.4s;
    --section-padding: 100px 0;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Roboto+Mono:wght@400;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3,
h4 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--shadow-color);
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.2rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color-1);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: white;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

section {
    padding: var(--section-padding);
    position: relative;
    overflow: hidden;
}

/* ---------------------------------- */
/*         2. Helper Classes          */
/* ---------------------------------- */
.section-title {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem auto;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.cta-button {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(90deg, var(--accent-color-1), var(--accent-color-2));
    color: white;
    border-radius: 50px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: transform 0.3s ease;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color-2), var(--accent-color-1));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.cta-button:hover {
    transform: scale(1.05);
    color: white;
}

.cta-button:hover::before {
    opacity: 1;
}

/* ---------------------------------- */
/*      3. Background Animation       */
/* ---------------------------------- */
#quantum-grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    opacity: 0.1;
}

.grid-cell {
    width: 100%;
    padding-bottom: 100%;
    position: relative;
}

.grid-cell::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background-color: var(--accent-color-1);
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    animation: pulse-grid 10s infinite ease-in-out;
    animation-delay: calc(var(--delay) * 1s);
}

@keyframes pulse-grid {

    0%,
    100% {
        transform: scale(0.2);
        opacity: 0;
    }

    50% {
        transform: scale(1);
        opacity: 0.5;
    }
}

/* ---------------------------------- */
/*          4. Header & Nav           */
/* ---------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, padding 0.3s ease;
}

.site-header.scrolled {
    padding: 15px 0;
    background-color: rgba(10, 10, 26, 0.95);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo img {
    height: 50px;
    margin-right: 10px;
    /* Placeholder style for logo.png */
    filter: invert(1) drop-shadow(0 0 5px var(--glow-color));
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: var(--text-secondary);
    font-weight: 600;
    position: relative;
    padding: 5px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color-1);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-primary);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    display: block;
    position: relative;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease-in-out;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* Mobile nav open state */
.nav-open .hamburger {
    background: transparent;
}

.nav-open .hamburger::before {
    transform: translateY(8px) rotate(45deg);
}

.nav-open .hamburger::after {
    transform: translateY(-8px) rotate(-45deg);
}

/* ---------------------------------- */
/*           5. Hero Section          */
/* ---------------------------------- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 100px;
    /* Header offset */
    position: relative;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero h1 {
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.data-sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    animation: rotate-sphere 30s linear infinite;
}

.data-sphere::before,
.data-sphere::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.data-sphere::before {
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%) rotateX(70deg);
}

.data-sphere::after {
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%) rotateY(70deg);
}

@keyframes rotate-sphere {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ---------------------------------- */
/*        6. Services Section         */
/* ---------------------------------- */
.services-section {
    background-color: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--panel-bg);
    padding: 40px 30px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    backdrop-filter: blur(5px);
    position: relative;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--shadow-color);
    border-color: var(--glow-color);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    color: var(--accent-color-1);
    /* Placeholder icons using pseudo-elements */
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* ---------------------------------- */
/*      7. Why Choose Us Section      */
/* ---------------------------------- */
.advantage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 4rem;
}

.advantage-item {
    text-align: center;
}

.advantage-icon-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem auto;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--secondary-bg), var(--primary-bg));
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--border-color);
    box-shadow: 0 0 20px var(--shadow-color) inset;
    transition: transform 0.3s, box-shadow 0.3s;
}

.advantage-item:hover .advantage-icon-wrapper {
    transform: scale(1.1);
    box-shadow: 0 0 30px var(--glow-color);
}

.advantage-icon-wrapper i {
    font-size: 2.5rem;
    color: var(--accent-color-1);
}

.advantage-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

/* ---------------------------------- */
/*        8. Process Section          */
/* ---------------------------------- */
.process-section {
    background-color: var(--secondary-bg);
}

.process-timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline-path {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: auto;
    z-index: 0;
}

.path-dot {
    width: 20px;
    height: 20px;
    background: var(--accent-color-1);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px var(--glow-color);
    offset-path: path('M10,60 C200,10 300,110 500,60 C700,10 800,110 990,60');
    offset-distance: 0%;
    animation: move-dot 5s linear forwards;
    animation-play-state: paused;
}

@keyframes move-dot {
    to {
        offset-distance: 100%;
    }
}

.process-step {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
    width: calc(25% - 20px);
    float: left;
    margin: 0 10px;
    z-index: 1;
}

.process-step:nth-child(odd) {
    flex-direction: column-reverse;
    margin-top: 100px;
}

.process-step:nth-child(even) {
    flex-direction: column;
    margin-bottom: 100px;
}

.step-number {
    font-size: 3rem;
    font-family: var(--font-secondary);
    color: var(--accent-color-2);
    font-weight: 700;
}

.step-content {
    background: var(--panel-bg);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

/* Clearfix for floats */
.process-timeline::after {
    content: "";
    display: table;
    clear: both;
}

/* ---------------------------------- */
/*       9. Testimonials Section      */
/* ---------------------------------- */
.testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    background-color: var(--panel-bg);
    padding: 50px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.testimonial-slide {
    display: none;
    text-align: center;
    animation: fade-in 0.8s ease;
}

.testimonial-slide.active {
    display: block;
}

.quote {
    font-size: 1.3rem;
    font-style: italic;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

cite {
    font-weight: 600;
    color: var(--accent-color-1);
}

.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}

.slider-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: background 0.3s;
}

.slider-controls button:hover {
    background: var(--accent-color-1);
    color: var(--primary-bg);
}

/* ---------------------------------- */
/*     10. Calculator Section         */
/* ---------------------------------- */
.calculator-section {
    background-color: var(--secondary-bg);
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    background: var(--panel-bg);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.service-options label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 1.1rem;
}

.complexity-slider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.complexity-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    outline: none;
}

.complexity-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-color-1);
    cursor: pointer;
    border-radius: 50%;
}

.complexity-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent-color-1);
    cursor: pointer;
    border-radius: 50%;
}

.calculator-result {
    background: var(--primary-bg);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.estimated-price {
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-secondary);
    color: var(--accent-color-1);
    margin: 1rem 0;
}

.calculator-result p {
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* ---------------------------------- */
/*       11. Live Chat Widget         */
/* ---------------------------------- */
.live-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.chat-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--accent-color-1), var(--accent-color-2));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s;
}

.chat-button:hover {
    transform: scale(1.1);
}

.chat-button i {
    font-size: 2rem;
    color: white;
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 450px;
    background: var(--secondary-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: bottom right;
}

.live-chat-widget.open .chat-window {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.chat-header {
    padding: 15px;
    background: var(--panel-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.chat-header h4 {
    margin: 0;
}

.chat-header button {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
}

.message {
    margin-bottom: 15px;
    display: flex;
}

.message p {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    margin: 0;
    line-height: 1.4;
}

.message.received p {
    background: var(--panel-bg);
    border-bottom-left-radius: 4px;
}

.message.sent {
    justify-content: flex-end;
}

.message.sent p {
    background: var(--accent-color-2);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-footer {
    padding: 15px;
    display: flex;
    border-top: 1px solid var(--border-color);
}

.chat-footer input {
    flex-grow: 1;
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 15px;
    color: var(--text-primary);
    outline: none;
}

.chat-footer button {
    background: var(--accent-color-1);
    border: none;
    color: var(--primary-bg);
    padding: 0 15px;
    border-radius: 20px;
    margin-left: 10px;
    cursor: pointer;
    font-weight: 600;
}


/* ---------------------------------- */
/*           12. Footer               */
/* ---------------------------------- */
footer.site-footer {
    background-color: var(--footer-bg);
    color: var(--text-secondary);
    padding: 80px 0 0 0;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 40px;
}

.footer-column h4 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-color-1);
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a {
    color: var(--text-secondary);
}

.footer-column a:hover {
    color: var(--accent-color-1);
    padding-left: 5px;
}

.footer-column.about-us p {
    margin-top: 20px;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.contact-info i {
    color: var(--accent-color-1);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ---------------------------------- */
/*        13. Animation Effects       */
/* ---------------------------------- */
.glitch {
    position: relative;
    color: white;
    text-shadow: 0 0 5px var(--glow-color);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    overflow: hidden;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent-color-2);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent-color-1);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(10% 0 80% 0);
    }

    100% {
        clip-path: inset(75% 0 5% 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(55% 0 20% 0);
    }

    100% {
        clip-path: inset(5% 0 90% 0);
    }
}

/* Fade in up animation for hero text */
.fade-in-up {
    animation: fade-in-up 1s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
    animation-delay: 0.5s;
}

@keyframes fade-in-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for CTA */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 242, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(0, 242, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 242, 255, 0);
    }
}

/* Scroll-triggered section animations */
section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ---------------------------------- */
/*         14. Inner Pages            */
/* ---------------------------------- */
.page-header {
    padding-top: 150px;
    padding-bottom: 80px;
    text-align: center;
    background: linear-gradient(180deg, var(--secondary-bg) 0%, var(--primary-bg) 100%);
}

.page-header h1 {
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
}

/* About Page */
.about-content,
.team-section,
.services-detailed,
.portfolio-grid-section,
.contact-section {
    padding: var(--section-padding);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    align-items: center;
}

.data-sphere-small {
    width: 300px;
    height: 300px;
    position: relative;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    animation: rotate-sphere 30s linear infinite;
    margin: 0 auto;
}

.data-sphere-small::before,
.data-sphere-small::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    width: 100%;
    height: 100%;
}

.data-sphere-small::before {
    transform: translate(-50%, -50%) rotateX(70deg);
}

.data-sphere-small::after {
    transform: translate(-50%, -50%) rotateY(70deg);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.team-member {
    text-align: center;
}

.team-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
    background-size: cover;
    background-position: center;
    border: 3px solid var(--accent-color-1);
    box-shadow: 0 0 20px var(--glow-color);
    transition: transform 0.3s;
}

.team-member:hover .team-photo {
    transform: scale(1.1);
}

.team-member h3 {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.team-member p {
    font-style: italic;
}

/* Services Page */
.service-detail-item {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
    align-items: flex-start;
}

.service-detail-item:last-child {
    margin-bottom: 0;
}

.service-detail-icon {
    font-size: 4rem;
    color: var(--accent-color-1);
}

.service-detail-text h2 {
    margin-bottom: 1rem;
}

.service-detail-text ul {
    list-style: none;
    padding-left: 20px;
    margin-top: 20px;
}

.service-detail-text ul li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 10px;
}

.service-detail-text ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color-1);
    font-weight: bold;
}

/* Portfolio Page */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(0deg, rgba(10, 10, 26, 0.95) 0%, rgba(10, 10, 26, 0) 100%);
    padding: 60px 20px 20px 20px;
    color: white;
    transform: translateY(calc(100% - 80px));
    /* Show only title */
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-overlay h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.portfolio-overlay p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.portfolio-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--accent-color-1);
    color: var(--primary-bg);
    border-radius: 5px;
    font-weight: 600;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 12px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    border-color: var(--accent-color-1);
    box-shadow: 0 0 10px var(--glow-color);
}

.contact-details h2 {
    margin-bottom: 2rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.contact-info-item i {
    font-size: 2rem;
    color: var(--accent-color-1);
}

.contact-info-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.contact-info-item p {
    margin: 0;
}

/* Legal Pages */
.legal-page {
    padding-top: 150px;
    padding-bottom: 80px;
}

.legal-page h1 {
    margin-bottom: 2rem;
}

.legal-page h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.legal-page ul {
    list-style: disc;
    padding-left: 20px;
}

.legal-page ul li {
    margin-bottom: 10px;
}


/* ---------------------------------- */
/*        15. Custom Icons            */
/* ---------------------------------- */
[class^="icon-"] {
    display: inline-block;
    font-family: 'icons';
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* This is a placeholder for a real icon font.
     Using pseudo-elements to simulate icons */
.icon-seo::before {
    content: '🔍';
}

.icon-ppc::before {
    content: '🎯';
}

.icon-social::before {
    content: '💬';
}

.icon-content::before {
    content: '✍️';
}

.icon-email::before {
    content: '📧';
}

.icon-web::before {
    content: '💻';
}

.icon-data::before {
    content: '📊';
}

.icon-team::before {
    content: '👥';
}

.icon-results::before {
    content: '📈';
}

.icon-chat::before {
    content: '🗨️';
}

.icon-location::before {
    content: '📍';
}

.icon-phone::before {
    content: '📞';
}

.icon-mail::before {
    content: '✉️';
}


/* ---------------------------------- */
/*      16. Responsive Design         */
/* ---------------------------------- */
@media (max-width: 1024px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .process-step {
        width: calc(50% - 20px);
    }

    .process-step:nth-child(3),
    .process-step:nth-child(4) {
        margin-top: 50px;
    }

    .process-step:nth-child(odd),
    .process-step:nth-child(even) {
        margin-top: 0;
        margin-bottom: 100px;
    }

    .process-step:nth-child(3) {
        margin-top: 0;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-visual {
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .section-padding {
        padding: 80px 0;
    }

    /* Mobile Navigation */
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: var(--secondary-bg);
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .main-nav.open {
        transform: translateX(0);
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }

    .main-nav a {
        font-size: 1.5rem;
    }

    .nav-toggle {
        display: block;
    }

    .hero {
        padding-top: 120px;
        height: auto;
        min-height: 80vh;
        padding-bottom: 80px;
    }

    .data-sphere {
        width: 400px;
        height: 400px;
    }

    .advantage-grid {
        grid-template-columns: 1fr;
    }

    .process-timeline {
        display: none;
        /* Complex timeline is hard to make responsive without major JS */
    }

    /* Fallback for mobile process */
    .process-section .process-step {
        display: block;
        width: 100%;
        margin: 0 0 30px 0 !important;
        flex-direction: column !important;
        text-align: center;
    }

    .calculator-wrapper {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-column {
        text-align: center;
    }

    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .slider-controls {
        display: none;
    }

    /* On small screens, maybe rely on auto-play or swipe */
    .testimonial-slider {
        padding: 40px 20px;
    }

    .live-chat-widget {
        bottom: 15px;
        right: 15px;
    }

    .chat-window {
        width: calc(100vw - 30px);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}