:root {
    --primary: #2f7626;
    --secondary: #ff0080;
    --secondary-light: #ff00809e;
    --background: #0a0a0f;
    --surface: #1a1a2e;
    --text: #eee6ff;
    --text-secondary: #40b63c;
    --accent: #00ff88;
    --transition: all 0.3s ease;
    --shadow-button: 2px 5px 20px var(--secondary);
    --shadow-button-light: 2px 5px 20px var(--secondary-light);
    --text2: #eee6ff6d;
    --shadow-text: 2px 5px 20px var(--text2);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 20px 50px rgba(64, 182, 60, 0.4);
}

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

body {
    background-color: var(--surface);
    color: var(--text);
    min-height: 100vh;
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: 40px;
}

/* === ANIMAZIONE CIRCUITI === */
.circuit-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.6;
}

.circuit-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.circuit-line.horizontal {
    height: 2px;
    width: 300px;
}

.circuit-line.horizontal-1 {
    top: 15%;
    left: -300px;
    animation: moveRight 8s infinite;
}

.circuit-line.horizontal-2 {
    top: 35%;
    right: -300px;
    animation: moveLeft 10s infinite;
    background: linear-gradient(90deg, transparent, #ff6b00, transparent);
}

.circuit-line.horizontal-3 {
    top: 55%;
    left: -300px;
    animation: moveRight 12s infinite;
    background: linear-gradient(90deg, transparent, #00ff88, transparent);
}

.circuit-line.horizontal-4 {
    bottom: 25%;
    right: -300px;
    animation: moveLeft 7s infinite;
    background: linear-gradient(90deg, transparent, #ff0099, transparent);
}

.circuit-line.vertical {
    width: 2px;
    height: 200px;
}

.circuit-line.vertical-1 {
    left: 20%;
    top: -200px;
    animation: moveDown 9s infinite;
    background: linear-gradient(180deg, transparent, #00d4ff, transparent);
}

.circuit-line.vertical-2 {
    right: 25%;
    bottom: -200px;
    animation: moveUp 11s infinite;
    background: linear-gradient(180deg, transparent, #ff6b00, transparent);
}

.circuit-line.vertical-3 {
    left: 60%;
    top: -200px;
    animation: moveDown 6s infinite;
    background: linear-gradient(180deg, transparent, #00ff88, transparent);
}

@keyframes moveRight {
    0% {
        transform: translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateX(calc(100vw + 300px));
        opacity: 0;
    }
}

@keyframes moveLeft {
    0% {
        transform: translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateX(calc(-100vw - 300px));
        opacity: 0;
    }
}

@keyframes moveDown {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(calc(100vh + 200px));
        opacity: 0;
    }
}

@keyframes moveUp {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(calc(-100vh - 200px));
        opacity: 0;
    }
}

/* === NODI DEI CIRCUITI === */
.circuit-nodes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.node {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.node-1 {
    top: 20%;
    left: 15%;
    background: #00d4ff;
    box-shadow: 0 0 20px #00d4ff;
    animation-delay: 0s;
}

.node-2 {
    top: 40%;
    right: 20%;
    background: #ff6b00;
    box-shadow: 0 0 20px #ff6b00;
    animation-delay: 0.5s;
}

.node-3 {
    bottom: 30%;
    left: 25%;
    background: #00ff88;
    box-shadow: 0 0 20px #00ff88;
    animation-delay: 1s;
}

.node-4 {
    top: 60%;
    left: 50%;
    background: #ff0099;
    box-shadow: 0 0 20px #ff0099;
    animation-delay: 1.5s;
}

.node-5 {
    bottom: 40%;
    right: 35%;
    background: #00d4ff;
    box-shadow: 0 0 20px #00d4ff;
    animation-delay: 0.8s;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.8);
        opacity: 0.6;
    }
}

/* === BANNER TEXT === */
.banner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    text-shadow: var(--shadow-text);
    width: 90%;
    max-width: 800px;
}

.banner-text h1 {
    color: var(--text-secondary);
    font-size: 3.4rem;
    padding-bottom: 40px;
}

.banner-text p {
    color: var(--text);
    font-size: 1.6rem;
    padding-bottom: 40px;
}

.btn-banner {
    display: flex;
    gap: 40px;
    justify-content: center;
}

.btn-portfolio,
.btn-preventivo {
    width: 220px;
    height: 60px;
    font-size: 18px;
    border-radius: 40px;
    font-weight: bold;
    transition: var(--transition);
}

.btn-portfolio {
    background-color: var(--primary);
    color: var(--surface);
}

.btn-portfolio:hover {
    background-color: var(--text-secondary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-button);
}

.btn-preventivo {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-preventivo:hover {
    color: var(--text-secondary);
    border: 2px solid var(--text-secondary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-button);
}

/* === CONTAINER === */
.container {
    max-width: 1400px;
    margin: auto;
    padding: 40px 20px;

}

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

.header-body h3 {
    color: var(--primary);
    text-align: center;
    font-size: 2.4rem;
    margin: 20px;
}

.header-body p {
    margin: 40px;
    font-size: 1.3rem;
}

/* === TABS === */
.tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.tab-btn {
    width: 180px;
    height: 60px;
    border-radius: 40px;
    background-color: var(--text-secondary);
    color: var(--surface);
    font-size: 1.3rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
}

.tab-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-button-light);
}

.tab-btn.active {
    background-color: var(--accent);
    color: var(--background);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;

}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* === PROJECTS GRID === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    justify-content: center;
    /* orizzontale */
    align-items: center;
    /* verticale */
    margin-bottom: 40px;
}

.project-card {
    background: var(--surface);
    border: 1px solid rgba(64, 182, 60, 0.2);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height:500px;
    text-align: justify;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--text-secondary);
}

.project-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

.img-molisando {
    background-image: url('/Immagini/Portfolio/Molisando.png');
    background-size: cover;
    background-position: center;
}

.img-gaetanosimone {
    background-image: url('/Immagini/Portfolio/gaetanosimonearchitetto.png');
    background-size: cover;
    background-position: center;
}

.img-residencepalamenga {
    background-image: url('/Immagini/Portfolio/residencepalamenga.png');
    background-size: cover;
    background-position: center;
}

.img-fitness-tracker {
    background-image: url('/Immagini/Portfolio/Fitness\ Tracker.png');
    background-size: cover;
    background-position: center;
}

.img-gestione-reputazione {
    background-image: url('/Immagini/Portfolio/Gestione\ reputazione.png');
    background-size: cover;
    background-position: center;
}

.img-pizzafy {
    background-image: url('/Immagini/Portfolio/pizzafy.jpeg');
    background-size: cover;
    background-position: center;
}

.img-pizzafy2 {
    background-image: url('/Immagini/Portfolio/pizzafy2.png');
    background-size: cover;
    background-position: center;
}

.img-MeucciWebRadio {
    background-image: url('/Immagini/Portfolio/MeucciWebRadio.png');
    background-size: cover;
    background-position: center;
}

.img-fitAi {
    background-image: url('/Immagini/Portfolio/fitAI.png');
    background-size: cover;
    background-position: center;
}

.img-calcolatrice {
    background-image: url('/Immagini/Portfolio/Calcolatrice.PNG');
    background-size: cover;
    background-position: center;
}

.img-pizzafy {
    width: 100%;
}

.img-FitAI {
    width: 100%;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(64, 182, 60, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-image::before {
    opacity: 1;
}

.project-info {
    padding: 25px;
}

.project-title {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 10px;
    font-weight: 600;
}

.project-description {
    color: var(--text2);
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-links {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary);
    color: var(--text);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-button-light);
    background: var(--text-secondary);
}

@media (max-width: 1280px) {
    .hero {
        margin-top: 0;
    }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .circuit-line.horizontal {
        width: 200px;
    }

    .circuit-line.vertical {
        height: 150px;
    }

    .banner-text h1 {
        font-size: 2.5rem;
    }

    .banner-text p {
        font-size: 1.4rem;
    }

    .hero {
        min-height: 100vh;
        margin-top: 0;
    }

    .header-body h3 {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        gap: 10px;
    }

    .tab-btn {
        width: 150px;
        height: 50px;
        font-size: 1.1rem;
    }
}