/* CSS Reset and Variables */
:root {
    --bg-dark: #07090f;
    --bg-panel: #11141e;
    --text-main: #f0f2f8;
    --text-muted: #a0a6b5;
    --neon-blue: #00e1ff;
    --neon-green: #00ff88;
    --primary-gradient: linear-gradient(135deg, #00e1ff 0%, #00ff88 100%);
    --glass-bg: rgba(17, 20, 30, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.text-center {
    text-align: center;
}

/* Typography & Utilities */
.highlight-green {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Buttons */
.btn-primary, .btn-primary-outline, .btn-secondary {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

.btn-primary-outline {
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
    background: transparent;
}
.btn-primary-outline:hover {
    background: var(--neon-green);
    color: #000;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s ease, padding 0.3s ease;
    padding: 1.5rem 0;
}

.navbar.scrolled {
    background: rgba(7, 9, 15, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    display: flex;
    align-items: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo .kalb { color: var(--text-main); }
.logo .tech { color: var(--neon-blue); }

.logo-img {
    height: 35px;
    width: auto;
    display: block;
}

.logo-img-footer {
    height: 45px;
    width: auto;
    display: block;
    filter: grayscale(100%) brightness(200%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.logo-img-footer:hover {
    filter: none;
    opacity: 1;
}

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

.nav-links li a {
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links li a:hover {
    color: var(--neon-blue);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    margin: 4px 0;
    transition: 0.4s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    background: radial-gradient(circle at 50% 120%, rgba(0, 225, 255, 0.1) 0%, rgba(7, 9, 15, 1) 50%);
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
    opacity: 0.35; /* Fading the video to keep text readable */
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(7,9,15,0.7) 0%, rgba(7,9,15,0.95) 100%);
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

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

.hero-cta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

/* Metrics Bar */
.metrics-bar {
    display: flex;
    gap: 3rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

.metric h3 {
    font-size: 2.5rem;
    color: var(--neon-blue);
    margin-bottom: 0.2rem;
}

.metric p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* About Section */
.about {
    padding: 6rem 0;
    position: relative;
    background: linear-gradient(180deg, var(--bg-dark), rgba(17, 20, 30, 0.4));
}

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

.about-content .badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(0, 255, 136, 0.1);
    color: var(--neon-green);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.about-content h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.about-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.about-content strong {
    color: var(--text-main);
}

.about-features {
    margin-top: 2rem;
    display: grid;
    gap: 1rem;
}

.about-features .feature {
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.about-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 500px;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

/* Values Core (Mision, Vision, Politica) */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.value-card {
    padding: 3rem 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.value-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.icon-wrapper-large {
    width: 80px;
    height: 80px;
    background: rgba(0, 225, 255, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.value-card h3 {
    margin-bottom: 1rem;
    color: var(--text-main);
    letter-spacing: 1px;
}

.value-card p {
    color: var(--text-muted);
}

/* Services Section */
.services {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

.service-card {
    padding: 0; /* Changed padding to 0 for image border */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-img-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.service-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    opacity: 0.7; /* Consistenza per tutte le foto */
    filter: brightness(0.9) contrast(1.1); /* Efecto cinemático para fotos reales */
}

.service-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(17, 20, 30, 0.8), transparent);
}

.service-card:hover .service-img-wrapper img {
    transform: scale(1.1);
    opacity: 1;
}

.service-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

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

.icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(0, 225, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-blue);
    margin-bottom: 1.5rem;
    position: absolute;
    top: 140px; /* Overlapping the image */
    right: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    border: 1px solid rgba(0, 225, 255, 0.2);
    z-index: 2;
    backdrop-filter: blur(5px);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    margin-top: 1rem; /* Added margin to clear icon space */
}


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

.learn-more {
    color: var(--neon-green);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}
.learn-more:hover {
    color: var(--text-main);
}

/* Contact Section */
.contact-section {
    padding: 6rem 0;
    background: var(--bg-panel);
    border-top: 1px solid var(--glass-border);
}

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

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.contact-details {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-details li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-details .icon {
    font-size: 1.5rem;
    background: rgba(0, 255, 136, 0.1);
    padding: 0.8rem;
    border-radius: 12px;
}

.contact-details strong {
    display: block;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.contact-details span, .contact-details a {
    color: var(--text-muted);
}

.contact-details a:hover {
    color: var(--neon-blue);
}

.contact-form {
    padding: 2.5rem;
}

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

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

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--neon-blue);
    background: rgba(0, 225, 255, 0.05);
}

.w-100 {
    width: 100%;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-top: 1rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.3rem;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.4;
}

/* Footer */
footer {
    background: #040509;
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links h4, .footer-contact h4 {
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--neon-blue);
}

.footer-contact .social-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text-muted);
    transition: all 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    color: var(--neon-blue);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    color: rgba(255,255,255,0.3);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 1.5rem;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

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

@media (max-width: 900px) {
    .metrics-bar { flex-direction: column; gap: 1.5rem; }
    .about-grid, .contact-grid, .values-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 3rem; }
    .about-image { height: 300px; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%; left: 0; width: 100%;
        flex-direction: column;
        background: var(--bg-panel);
        padding: 2rem 0;
        border-bottom: 1px solid var(--glass-border);
    }
    .nav-links.active { display: flex; }
    .menu-toggle { display: flex; }
    .hero-cta { flex-direction: column; }
    .cta-glass { padding: 2rem; }
    .cta-glass h2 { font-size: 2rem; }
}
