:root {
    --bg-primary: #050816;
    --bg-secondary: #0a0f2c;
    --bg-card: rgba(26, 31, 58, 0.7);
    --text-primary: #ffffff;
    --text-secondary: #cbd5e0;
    --accent: #6366f1;
    --accent-dark: #4f46e5;
    --gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-alt: linear-gradient(135deg, #f472b6 0%, #f5576c 100%);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Spotlight Effect */
.service-card, .portfolio-item, .benefit-card, .pricing-card {
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
}

.service-card::after, .portfolio-item::after, .benefit-card::after, .pricing-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(99, 102, 241, 0.15), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 3;
}

.service-card:hover::after, .portfolio-item:hover::after, .benefit-card:hover::after, .pricing-card:hover::after {
    opacity: 1;
}

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

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.logo .accent {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-cta {
    padding: 0.6rem 1.2rem;
    background: var(--gradient);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
    animation: pulse-glow 2s infinite;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
    filter: brightness(1.1);
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(124, 58, 237, 0); }
    100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 5px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    background: transparent;
}

/* Global Background Animation */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -10%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
    z-index: -1;
    pointer-events: none;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-50px, 50px) scale(1.1);
    }
}

.circuit-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.3;
    z-index: 0;
}

.circuit-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    height: 1px;
    animation: circuit-flow 8s linear infinite;
}

.circuit-line:nth-child(1) {
    top: 20%;
    width: 300px;
    animation-delay: 0s;
}

.circuit-line:nth-child(2) {
    top: 40%;
    width: 200px;
    animation-delay: 2s;
}

.circuit-line:nth-child(3) {
    top: 60%;
    width: 250px;
    animation-delay: 4s;
}

.circuit-line:nth-child(4) {
    top: 80%;
    width: 180px;
    animation-delay: 6s;
}

.circuit-line.vertical {
    width: 1px;
    height: 200px;
    background: linear-gradient(180deg, transparent, var(--accent), transparent);
    animation: circuit-flow-vertical 8s linear infinite;
}

.circuit-line.vertical:nth-child(5) {
    left: 30%;
    animation-delay: 1s;
}

.circuit-line.vertical:nth-child(6) {
    left: 60%;
    animation-delay: 3s;
}

.circuit-line.vertical:nth-child(7) {
    left: 80%;
    animation-delay: 5s;
}

@keyframes circuit-flow {
    0% {
        left: -300px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes circuit-flow-vertical {
    0% {
        top: -200px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-intro {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.hero-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
    object-fit: cover;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 0.5rem 0 0 0;
}

.gradient-text {
    background: linear-gradient(45deg, #00d4ff, #7c3aed, #ff006e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    font-weight: 900;
    animation: textShimmer 3s ease-in-out infinite;
    background-size: 200% auto;
}

@keyframes textShimmer {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    max-width: 600px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}

.stat-icon {
    font-size: 2rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    justify-content: space-between;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.btn-primary {
    background: linear-gradient(45deg, #7c3aed, #00d4ff);
    color: white;
    border: none;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
        transform: translateY(0);
    }
    50% { 
        box-shadow: 0 0 40px rgba(124, 58, 237, 0.8);
    }
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
    transition: left 0.5s;
}

.btn-secondary:hover::before {
    left: 100%;
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-terminal {
    width: 500px;
    background: #1e1e2e;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.terminal-header {
    background: #2d2d3d;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-button.close {
    background: #ff5f56;
}

.terminal-button.minimize {
    background: #ffbd2e;
}

.terminal-button.maximize {
    background: #27c93f;
}

.terminal-title {
    margin-left: auto;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Courier New', monospace;
}

.terminal-body {
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    min-height: 250px;
}

.terminal-body .code-line {
    opacity: 0;
    animation: typeIn 0.5s ease forwards;
    margin-bottom: 0.25rem;
}

.terminal-body .code-line:nth-child(1) { animation-delay: 0.5s; }
.terminal-body .code-line:nth-child(2) { animation-delay: 1s; }
.terminal-body .code-line:nth-child(3) { animation-delay: 1.5s; }
.terminal-body .code-line:nth-child(4) { animation-delay: 2s; }
.terminal-body .code-line:nth-child(5) { animation-delay: 2.5s; }
.terminal-body .code-line:nth-child(6) { animation-delay: 3s; }
.terminal-body .code-line:nth-child(7) { animation-delay: 3.5s; }

@keyframes typeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.terminal-cursor {
    display: inline-block;
    width: 10px;
    height: 20px;
    background: #00d4ff;
    animation: blink 1s step-end infinite;
    margin-left: 5px;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.keyword {
    color: #c792ea;
    font-weight: 600;
}

.function {
    color: #82aaff;
}

.comment {
    color: #676e95;
    font-style: italic;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.services {
    padding: 5rem 0;
    background: var(--bg-secondary);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.services::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.2);
    top: 10%;
    left: -100px;
    animation: rotate-ring 20s linear infinite;
    pointer-events: none;
}

.services::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 2px solid rgba(139, 92, 246, 0.2);
    bottom: 10%;
    right: -50px;
    animation: rotate-ring 15s linear infinite reverse;
    pointer-events: none;
}

@keyframes rotate-ring {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3), inset 0 0 20px rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
}

.tech-stack li {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Process Section */
.process {
    padding: 5rem 0;
    background: var(--bg-secondary);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.process::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    animation: pulse-background 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse-background {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.process-step {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border-left: 4px solid var(--accent);
    transition: all 0.3s ease;
}

.process-step:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.2);
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.step-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Benefits Section */
.benefits {
    padding: 5rem 0;
    background: var(--bg-primary);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.benefits::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, transparent 48%, rgba(99, 102, 241, 0.05) 49%, rgba(99, 102, 241, 0.05) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(139, 92, 246, 0.05) 49%, rgba(139, 92, 246, 0.05) 51%, transparent 52%);
    background-size: 60px 60px;
    animation: move-grid 10s linear infinite;
    pointer-events: none;
}

@keyframes move-grid {
    from { background-position: 0 0; }
    to { background-position: 60px 60px; }
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.benefit-card {
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.benefit-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.2);
}

.benefit-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.benefit-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.benefit-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Testimonials Section */
.testimonials {
    padding: 5rem 0;
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.testimonials::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: expand-circle 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes expand-circle {
    0%, 100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; }
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border-left: 4px solid var(--accent);
    position: relative;
}

.testimonial-quote {
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 5rem;
    color: var(--accent);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-text {
    margin: 1.5rem 0;
    color: var(--text-secondary);
    line-height: 1.8;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-author strong {
    color: var(--text-primary);
    font-size: 1.125rem;
}

.testimonial-author span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* FAQ Section */
.faq {
    padding: 5rem 0;
    background: var(--bg-primary);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.faq::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 50px,
            rgba(99, 102, 241, 0.03) 50px,
            rgba(99, 102, 241, 0.03) 51px
        );
    animation: slide-stripes 15s linear infinite;
    pointer-events: none;
}

@keyframes slide-stripes {
    from { transform: translateX(0); }
    to { transform: translateX(51px); }
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--accent);
    box-shadow: 0 5px 20px rgba(124, 58, 237, 0.2);
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.faq-icon {
    font-size: 1.5rem;
}

.faq-question h3 {
    font-size: 1.25rem;
    margin: 0;
}

.faq-answer {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

.portfolio {
    padding: 5rem 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.portfolio::before,
.portfolio::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    pointer-events: none;
}

.portfolio::before {
    top: 20%;
    animation: slide-line-horizontal 12s ease-in-out infinite;
}

.portfolio::after {
    bottom: 30%;
    animation: slide-line-horizontal 15s ease-in-out infinite reverse;
    animation-delay: 3s;
}

@keyframes slide-line-horizontal {
    0%, 100% { left: -400px; opacity: 0; }
    10%, 90% { opacity: 0.5; }
    50% { left: 50%; opacity: 1; }
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.portfolio-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(0, 212, 255, 0.1));
    opacity: 0;
    transition: opacity 0.4s;
}

.portfolio-item:hover::after {
    opacity: 1;
}

.portfolio-hint {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(10, 14, 39, 0.8);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0.8;
}

.portfolio-item:hover .portfolio-hint {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    opacity: 1;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.portfolio-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.4);
    border-color: rgba(124, 58, 237, 0.5);
}

.portfolio-image {
    height: 200px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.portfolio-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.placeholder-img {
    font-size: 4rem;
}

/* --- Unified background: use only the hero-style background/animation globally --- */
.services,
.process,
.benefits,
.testimonials,
.faq,
.portfolio,
.pricing,
.contact {
    background: transparent;
    position: relative;
    overflow: visible;
}

.services::before,
.services::after,
.process::before,
.benefits::before,
.testimonials::before,
.faq::before,
.portfolio::before,
.portfolio::after,
.pricing::before,
.pricing::after,
.contact::before,
.contact::after {
    display: none;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.portfolio-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: auto;
    position: relative;
    z-index: 10;
}

.project-link:hover {
    transform: translateX(5px);
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

/* Pricing Section */
.pricing {
    padding: 5rem 0;
    background: transparent;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.pricing::before,
.pricing::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border: 2px dashed rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    pointer-events: none;
}

.pricing::before {
    top: 15%;
    right: 10%;
    animation: float-shape 8s ease-in-out infinite;
}

.pricing::after {
    bottom: 20%;
    left: 5%;
    animation: float-shape 10s ease-in-out infinite reverse;
    animation-delay: 2s;
}

@keyframes float-shape {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -30px) rotate(90deg); }
    50% { transform: translate(-20px, 20px) rotate(180deg); }
    75% { transform: translate(40px, 10px) rotate(270deg); }
}

.pricing-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pricing-card:hover::before {
    opacity: 1;
}

.pricing-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.3);
}

.pricing-card.featured {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), var(--bg-card));
}

.pricing-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pricing-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.pricing-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact {
    padding: 5rem 0;
    background: transparent;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.contact::before,
.contact::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 200px;
    background: linear-gradient(180deg, transparent, var(--accent), transparent);
    pointer-events: none;
}

.contact::before {
    left: 20%;
    animation: slide-line-vertical 8s ease-in-out infinite;
}

.contact::after {
    right: 15%;
    animation: slide-line-vertical 10s ease-in-out infinite reverse;
    animation-delay: 2s;
}

@keyframes slide-line-vertical {
    0%, 100% { top: -200px; opacity: 0; }
    10%, 90% { opacity: 0.5; }
    50% { top: 50%; opacity: 1; }
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-response-time {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(99, 102, 241, 0.2));
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 600;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-link:hover {
    background: var(--accent);
    transform: translateX(10px);
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

.contact-form textarea {
    resize: vertical;
}

.consent-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.consent-checkbox input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.consent-checkbox a {
    color: var(--accent);
    text-decoration: underline;
}

.consent-checkbox a:hover {
    color: var(--text-primary);
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 2px solid var(--accent);
    padding: 1.5rem;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    animation: slideUp 0.5s ease;
}

.cookie-banner.hidden {
    display: none;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-content p {
    margin: 0;
    flex: 1;
    min-width: 250px;
}

.cookie-content a {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-content button {
    white-space: nowrap;
}

.footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(26, 31, 58, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.modal-close:hover {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.2);
    transform: rotate(90deg);
}

.modal-body h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #00d4ff, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-body p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.modal-screenshots {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.screenshot-item {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.screenshot-item img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.screenshot-description {
    padding: 1.5rem;
    width: 100%;
}

.screenshot-description h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.screenshot-description p {
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        padding-top: 180px; /* Уменьшил, так как меню перестроилось */
        padding-bottom: 4rem;
        min-height: auto; /* Высота по контенту, чтобы ничего не обрезалось и не наезжало */
        height: auto;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-intro {
        flex-direction: column;
        justify-content: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-image {
        display: none; /* Скрываем терминал на мобильных, чтобы не занимал место */
    }

    .code-terminal {
        width: 100%;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .services-grid,
    .portfolio-grid,
    .pricing-grid,
    .benefits-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .modal-body h2 {
        font-size: 1.5rem;
    }
}
