/*
Theme Name: C&C Systems Theme
Version: 6.0 - Grafite Tech+
*/

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

/* PALETTE */
:root {
    --bg-main: #1a1f27;
    --bg-alt: #11151b;
    --card-bg: #1f242d;
    --blue: #0C64C0;
    --blue-dark: #0A3E78;
    --blue-neon: #4db8ff;
    --blue-neon-soft: rgba(77,184,255,0.35);
    --white: #fff;
    --text: #e6e6e6;
    --muted: #9aa2b2;
}

/* BODY */
body {
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(135deg, #151922, #10131a);
    background-size: 18px 18px, 100% 100%;
    color: var(--text);
    line-height: 1.6;
}

/* HEADER */
header {
    padding: 20px 40px;
    background: rgba(10, 15, 25, 0.75);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(77,184,255,0.25);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo a {
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.5px;
}

/* HERO — tech, neon, elegante */
.hero {
    background: radial-gradient(circle at top left, #1f3a63, #0b1220 55%, #05070c 100%);
    color: var(--white);
    padding: 160px 20px 180px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 5;
}

/* GRIGLIA ANIMATA */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 220%;
    height: 220%;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridMove 28s linear infinite;
    opacity: 0.22;
}

@keyframes gridMove {
    from { transform: translate(0,0); }
    to { transform: translate(-220px, -220px); }
}

/* TITOLO NEON */
.hero h1 {
    font-size: 54px;
    margin-bottom: 24px;
    text-shadow:
        0 0 6px rgba(255,255,255,0.6),
        0 0 14px rgba(77,184,255,0.9),
        0 0 30px rgba(77,184,255,0.7);
    animation: neonPulse 3s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% {
        text-shadow:
            0 0 6px rgba(255,255,255,0.6),
            0 0 14px rgba(77,184,255,0.9),
            0 0 30px rgba(77,184,255,0.7);
    }
    50% {
        text-shadow:
            0 0 4px rgba(255,255,255,0.4),
            0 0 10px rgba(77,184,255,0.7),
            0 0 20px rgba(77,184,255,0.5);
    }
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
    max-width: 720px;
    margin: 0 auto 40px auto;
}

/* CTA GLASS */
.cta.primary,
.cta.glass {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.45);
    color: var(--white);
    padding: 16px 38px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.25s ease;
    display: inline-block;
}

.cta.primary:hover,
.cta.glass:hover {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.75);
    transform: translateY(-2px);
}

/* SEZIONI */
section {
    position: relative;
    z-index: 2;
    padding: 140px 20px;
}

.section-dark {
    background: var(--bg-main);
}

.section-darker {
    background: var(--bg-alt);
}

/* DIVIDER AZZURRO — versione tech+ */
.section-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blue-neon), transparent);
    opacity: 0.55;
    margin: 100px 0;
    position: relative;
    z-index: 3;
    animation: dividerPulse 4s ease-in-out infinite;
}

@keyframes dividerPulse {
    0% { opacity: 0.4; }
    50% { opacity: 0.9; }
    100% { opacity: 0.4; }
}

/* NON sotto la hero */
.hero + .section-divider {
    display: none;
}

/* TITOLI SEZIONE */
.section-title {
    font-size: 34px;
    margin-bottom: 10px;
    color: var(--white);
    text-align: center;
}

.section-subtitle {
    font-size: 17px;
    color: var(--muted);
    text-align: center;
    max-width: 720px;
    margin: 0 auto 60px auto;
}

/* SERVIZI */
.servizi .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 50px;
    max-width: 1400px;
    margin: 100px auto 0 auto;
}

/* CARD SERVIZI */
.card {
    background: var(--card-bg);
    padding: 40px 32px;
    border-radius: 14px;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: 0.25s ease;
}

/* BORDO NEON */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    padding: 2px;
    background: linear-gradient(120deg, var(--blue-neon), transparent, var(--blue-neon));
    pointer-events: none;
    animation: neonBorder 6s linear infinite;
    opacity: 0.55;
}

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

.card:hover {
    transform: translateY(-6px);
}

/* ICONA SERVIZIO */
.card img.icon {
    width: 80px;
    height: 80px;
    display: block;
    margin-bottom: 22px;
    object-fit: contain;
    opacity: 0.95;
    transition: 0.25s ease;
}

.card:hover img.icon {
    transform: scale(1.05);
    opacity: 1;
}

/* TESTO CARD */
.card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--white);
}

.card p {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.6;
}

/* PROBLEMI */
.problemi .grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    max-width: 1100px;
    margin: 80px auto 0 auto;
}

.problemi .box {
    background: var(--card-bg);
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--text);
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
    transition: 0.25s ease;
    font-size: 14px;
}

.problemi .box:hover {
    background: var(--blue);
    color: var(--white);
    transform: translateY(-4px);
}

/* POPUP TECH+ */
.tech-popup {
    position: absolute;
    background: rgba(10, 15, 25, 0.85);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 150, 255, 0.25);
    padding: 20px 24px;
    border-radius: 10px;
    width: 280px;
    color: #cce6ff;
    box-shadow: 0 0 20px rgba(0, 150, 255, 0.25);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 999999;
}

.tech-popup.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* TECH GRID */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
    justify-content: center;
}

.tech-item {
    padding: 14px 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 150, 255, 0.2);
    border-radius: 8px;
    color: #cce6ff;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.tech-item:hover {
    background: rgba(0, 150, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 0 12px rgba(0, 150, 255, 0.3);
}

/* CTA FINALE */
.cta-final {
    background: #0c1016;
    color: var(--white);
    padding: 180px 20px 260px 20px;
    text-align: center;
    position: relative;
    z-index: 20;
}

.cta-final h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.cta-final p {
    font-size: 17px;
    margin-bottom: 40px;
    color: var(--muted);
}

/* FOOTER */
.site-footer {
    width: 100%;
    padding: 40px;
    text-align: center;
    background: rgba(10, 15, 25, 0.7);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 150, 255, 0.2);
    color: #cce6ff;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.site-footer p {
    margin: 0;
    opacity: 0.85;
}

/* ANIMAZIONI */
.fade-in {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s ease forwards;
}

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

.slide-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s ease forwards;
}

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

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 36px;
    }
    .hero {
        padding: 120px 16px 140px 16px;
    }
    .tech-grid {
        flex-direction: column;
    }
    .tech-item {
        width: 100%;
        text-align: center;
    }
    .tech-popup {
        width: 90%;
        left: 5% !important;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.8rem;
    }
    section {
        padding: 60px 0;
    }
    .btn {
        width: 100%;
        text-align: center;
    }
}
/* CARD SERVIZI — versione GLASS+ più chiara e più evidente */
.card {
    background: rgba(255, 255, 255, 0.12); /* più chiaro */
    backdrop-filter: blur(14px); /* glass più forte */
    border: 1px solid rgba(255, 255, 255, 0.18); /* bordo interno più visibile */
    box-shadow: 0 0 18px rgba(77,184,255,0.08); /* leggero glow diffuso */
}

/* Hover GLASS+ */
.card:hover {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
    box-shadow: 0 0 26px rgba(77,184,255,0.12);
}
