/*
Theme Name: Machina IT
Description: Modern IT services theme with matrix background
Version: 1.0
Author: Machina IT
*/

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

:root {
    --green: #00ff41;
    --green-dim: #00cc33;
    --green-dark: #003b00;
    --bg: #0a0a0a;
    --glass: rgba(0, 20, 0, 0.7);
    --glass-border: rgba(0, 255, 65, 0.2);
    --text: #e0e0e0;
    --accent: #00ff41;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Matrix canvas */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.18;
}

/* Layout wrapper */
.site-wrapper {
    position: relative;
    z-index: 1;
}

/* Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green);
    text-decoration: none;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}

.site-logo span {
    color: var(--text);
}

.site-nav a {
    color: var(--text);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s;
}

.site-nav a:hover {
    color: var(--green);
}

.nav-cta {
    background: transparent;
    border: 1px solid var(--green) !important;
    color: var(--green) !important;
    padding: 0.5rem 1.2rem;
    border-radius: 3px;
    transition: all 0.3s !important;
}

.nav-cta:hover {
    background: var(--green) !important;
    color: #000 !important;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
}

.hero-inner {
    max-width: 800px;
}

.hero-tag {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--green);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    padding: 0.3rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 2px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #fff;
}

.hero h1 .highlight {
    color: var(--green);
}

.hero p {
    font-size: 1.15rem;
    color: #aaa;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    background: var(--green);
    color: #000;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.3s;
    border: 2px solid var(--green);
}

.btn-primary:hover {
    background: transparent;
    color: var(--green);
    box-shadow: 0 0 20px rgba(0,255,65,0.3);
}

.btn-secondary {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    background: transparent;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.3s;
}

.btn-secondary:hover {
    border-color: var(--green);
    color: var(--green);
}

/* Section commons */
section {
    padding: 6rem 2rem;
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--green);
    letter-spacing: 4px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: #888;
    font-size: 1rem;
    max-width: 600px;
}

/* Services */
#uslugi {
    background: rgba(0,10,0,0.4);
}

.services-header {
    text-align: center;
    margin-bottom: 4rem;
}

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

.service-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--green);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.service-card:hover {
    border-color: var(--green);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,255,65,0.1);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    display: block;
}

.service-card h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.service-card p {
    color: #888;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* About */
#o-nas {
    background: transparent;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.stat-box {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--green);
    font-family: 'Courier New', monospace;
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.terminal-box {
    background: #0d1117;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    width: 100%;
    max-width: 420px;
}

.terminal-header {
    display: flex;
    gap: 6px;
    margin-bottom: 1rem;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot-red { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #28ca41; }

.terminal-line {
    color: #aaa;
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

.terminal-line .prompt { color: var(--green); }
.terminal-line .cmd { color: #fff; }
.terminal-line .out { color: #888; }
.cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--green);
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

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

/* Contact */
#kontakt {
    background: rgba(0,10,0,0.4);
}

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

.contact-info h2 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1rem;
}

.contact-info p {
    color: #888;
    margin-bottom: 2rem;
}

.contact-details {
    list-style: none;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--glass-border);
    color: #aaa;
    font-size: 0.95rem;
}

.contact-details li:last-child {
    border-bottom: none;
}

.contact-details .icon {
    color: var(--green);
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.contact-form {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 2.5rem;
}

.contact-form h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 0.4rem;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--green);
    box-shadow: 0 0 10px rgba(0,255,65,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group select option {
    background: #0d1117;
}

.form-submit {
    width: 100%;
    padding: 0.9rem;
    background: var(--green);
    color: #000;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.5rem;
}

.form-submit:hover {
    background: transparent;
    color: var(--green);
    box-shadow: 0 0 20px rgba(0,255,65,0.2);
    border: 1px solid var(--green);
}

.form-success {
    display: none;
    text-align: center;
    padding: 1.5rem;
    color: var(--green);
    font-family: 'Courier New', monospace;
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 200;
}

.chat-toggle {
    width: 56px;
    height: 56px;
    background: var(--green);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,255,65,0.4);
    transition: all 0.3s;
    font-size: 1.4rem;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0,255,65,0.5);
}

.chat-toggle .icon-chat { display: block; }
.chat-toggle .icon-close { display: none; }
.chat-toggle.open .icon-chat { display: none; }
.chat-toggle.open .icon-close { display: block; }

.chat-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    background: #0d1117;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: none;
    flex-direction: column;
}

.chat-panel.open {
    display: flex;
}

.chat-head {
    background: rgba(0,20,0,0.9);
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--glass-border);
}

.chat-head h4 {
    color: var(--green);
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.chat-head p {
    color: #666;
    font-size: 0.78rem;
}

.chat-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

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

.chat-messages {
    padding: 1rem;
    min-height: 180px;
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.chat-msg {
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    max-width: 85%;
    line-height: 1.5;
}

.chat-msg.bot {
    background: rgba(0,255,65,0.08);
    border: 1px solid rgba(0,255,65,0.15);
    color: #ccc;
    align-self: flex-start;
}

.chat-msg.user {
    background: rgba(0,100,255,0.15);
    border: 1px solid rgba(0,100,255,0.2);
    color: #ccc;
    align-self: flex-end;
}

.chat-input-area {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.3);
}

.chat-input-area input {
    flex: 1;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    font-family: inherit;
}

.chat-input-area input:focus {
    border-color: var(--green);
}

.chat-send {
    background: var(--green);
    color: #000;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 700;
}

.chat-send:hover {
    background: var(--green-dim);
}

/* Footer */
.site-footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: #444;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

.site-footer span {
    color: var(--green);
}

/* Responsive */
@media (max-width: 768px) {
    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .site-nav {
        display: none;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
}
