/* components.css - Reusable Components (cards, buttons, modal, table) */

/* Intro Card */
.intro-card {
    background: rgba(0, 20, 40, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    padding: 40px 35px;
    backdrop-filter: blur(15px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.intro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 212, 255, 0.15),
        transparent
    );
    transition: left 0.6s ease;
}

.intro-card:hover::before {
    left: 100%;
}

.intro-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow:
        0 15px 50px rgba(0, 212, 255, 0.3),
        inset 0 0 30px rgba(0, 212, 255, 0.08);
}

.intro-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
    position: relative;
}

.intro-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    box-shadow: 0 0 10px var(--primary-color);
}

.intro-description {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
    letter-spacing: 0.5px;
}

.highlight {
    color: var(--primary-color);
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
}

.intro-card:hover .highlight {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
}

/* Skill Card */
.skill-card {
    background: rgba(0, 20, 40, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    padding: 35px 30px;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 212, 255, 0.1),
        transparent
    );
    transition: left 0.6s ease;
}

.skill-card:hover::before {
    left: 100%;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow:
        0 10px 40px rgba(0, 212, 255, 0.2),
        inset 0 0 20px rgba(0, 212, 255, 0.05);
}

.card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.card-description {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 60px;
}

.card-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.card-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    transition: width 1s ease-out;
    position: relative;
}

.card-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: barShine 2s ease-in-out infinite;
}

@keyframes barShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Portfolio Item */
.portfolio-item {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.portfolio-item .card-title {
    margin-bottom: 0;
    text-align: center;
}

/* Portfolio Card Wrapper */
.portfolio-card-wrapper {
    position: relative;
    width: 100%;
    height: 350px;
}

/* Portfolio Card */
.portfolio-card {
    background: rgba(0, 10, 20, 0.95);
    border: 1px solid rgba(0, 212, 255, 0.2);
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    width: 100%;
    height: 100%;
    clip-path: polygon(
        0 20px,
        20px 0,
        calc(100% - 20px) 0,
        100% 20px,
        100% calc(100% - 20px),
        calc(100% - 20px) 100%,
        20px 100%,
        0 calc(100% - 20px)
    );
}

/* Dot moving along border - Tron style */
.portfolio-dot {
    position: absolute;
    z-index: 10;
    transform: translate(-50%, -50%);
    animation: moveDot 28s linear infinite;
    pointer-events: none;
}

/* Core - centro luminoso */
.dot-core {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow:
        0 0 4px #fff,
        0 0 8px var(--primary-color);
    transition: box-shadow 0.3s ease;
}

/* Glow - alone esterno pulsante */
.dot-glow {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle,
        rgba(0, 212, 255, 0.8) 0%,
        rgba(0, 212, 255, 0.4) 30%,
        rgba(0, 212, 255, 0) 70%
    );
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulseGlow 1.5s ease-in-out infinite;
    transition: width 0.3s ease, height 0.3s ease, background 0.3s ease;
}

/* Trail - scia che segue */
.dot-trail {
    display: none;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
}

@keyframes rotateTrail {
    /* Angolo top-left (diagonale) - 4% */
    0%, 3.9% { transform: translate(-100%, -50%) rotate(-45deg); }
    /* Top edge - verso destra - 21% */
    4%, 24.9% { transform: translate(-100%, -50%) rotate(0deg); }
    /* Angolo top-right (diagonale) - 4% */
    25%, 28.9% { transform: translate(-100%, -50%) rotate(45deg); }
    /* Right edge - verso il basso - 21% */
    29%, 49.9% { transform: translate(-100%, -50%) rotate(90deg); }
    /* Angolo bottom-right (diagonale) - 4% */
    50%, 53.9% { transform: translate(-100%, -50%) rotate(135deg); }
    /* Bottom edge - verso sinistra - 21% */
    54%, 74.9% { transform: translate(-100%, -50%) rotate(180deg); }
    /* Angolo bottom-left (diagonale) - 4% */
    75%, 78.9% { transform: translate(-100%, -50%) rotate(225deg); }
    /* Left edge - verso l'alto - 21% */
    79%, 99.9% { transform: translate(-100%, -50%) rotate(270deg); }
    /* Chiusura */
    100% { transform: translate(-100%, -50%) rotate(315deg); }
}

@keyframes moveDot {
    /* Start: angolo top-left (diagonale) - 4% del tempo */
    0% {
        top: 20px;
        left: 0;
    }
    /* Fine diagonale top-left */
    4% {
        top: 0;
        left: 20px;
    }
    /* Top edge - 21% del tempo */
    25% {
        top: 0;
        left: calc(100% - 20px);
    }
    /* Diagonale top-right - 4% del tempo */
    29% {
        top: 20px;
        left: 100%;
    }
    /* Right edge - 21% del tempo */
    50% {
        top: calc(100% - 20px);
        left: 100%;
    }
    /* Diagonale bottom-right - 4% del tempo */
    54% {
        top: 100%;
        left: calc(100% - 20px);
    }
    /* Bottom edge - 21% del tempo */
    75% {
        top: 100%;
        left: 20px;
    }
    /* Diagonale bottom-left - 4% del tempo */
    79% {
        top: calc(100% - 20px);
        left: 0;
    }
    /* Left edge - 21% del tempo */
    100% {
        top: 20px;
        left: 0;
    }
}

.portfolio-card-wrapper:hover .portfolio-card {
    border-color: rgba(0, 212, 255, 0.4);
}

/* L'accelerazione del dot è gestita via JavaScript con playbackRate */


.portfolio-card-wrapper:hover .dot-glow {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle,
        rgba(0, 212, 255, 1) 0%,
        rgba(0, 212, 255, 0.5) 30%,
        rgba(0, 212, 255, 0) 70%
    );
}

.portfolio-card-wrapper:hover .dot-core {
    box-shadow:
        0 0 6px #fff,
        0 0 12px var(--primary-color),
        0 0 20px var(--primary-color);
}

.portfolio-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s ease;
    clip-path: polygon(
        0 20px,
        20px 0,
        calc(100% - 20px) 0,
        100% 20px,
        100% calc(100% - 20px),
        calc(100% - 20px) 100%,
        20px 100%,
        0 calc(100% - 20px)
    );
}

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

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    padding: 6px 14px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    color: var(--primary-color);
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
}

.portfolio-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.portfolio-link:hover::after {
    width: 100%;
}

.portfolio-link:hover {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    transform: translateX(5px);
}

/* Clienti Table */
.clienti-table-container {
    width: 100%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    overflow-x: visible;
}

.clienti-table {
    width: 100%;
    background: rgba(0, 20, 40, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.2);
    border-collapse: collapse;
    backdrop-filter: blur(15px);
}

.clienti-table thead {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(0, 102, 255, 0.3));
    border-bottom: 2px solid rgba(0, 212, 255, 0.5);
}

.clienti-table th {
    padding: 18px 15px;
    text-align: left;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary-color);
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.clienti-table tbody tr {
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
}

.clienti-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateX(5px);
}

.clienti-table td {
    padding: 18px 15px;
    color: var(--text-secondary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    text-align: left;
    vertical-align: middle;
}

.project-name {
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
}

.client-name {
    font-style: italic;
    color: #555555;
    font-size: 0.95rem;
    filter: blur(4px);
    user-select: none;
    transition: filter 0.3s ease;
}

.client-name:hover {
    filter: blur(2px);
}

.status-badge {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
    font-family: 'Space Grotesk', sans-serif;
    white-space: nowrap;
}

.status-production {
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.status-development {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.status-planned {
    color: #ffaa00;
    text-shadow: 0 0 10px rgba(255, 170, 0, 0.5);
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 1s ease-out;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.progress-text {
    font-weight: 600;
    color: #ffffff;
    min-width: 45px;
}

.access-btn {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 8px 20px;
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

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

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

.access-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    transform: translateX(3px);
}

/* Clienti Table Mobile */
@media (max-width: 768px) {
    .clienti-table-container {
        padding: 0 10px;
        overflow-x: auto;
    }

    .clienti-table {
        min-width: 100%;
    }

    .clienti-table th {
        padding: 12px 8px;
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    .clienti-table td {
        padding: 12px 8px;
        font-size: 0.8rem;
    }

    .project-name {
        white-space: normal;
        word-break: break-word;
    }

    .status-badge {
        font-size: 0.75rem;
    }

    .access-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

/* Clienti Modal */
.clienti-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.clienti-modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: rgba(0, 20, 40, 0.95);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    padding: 50px 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow:
        0 20px 60px rgba(0, 212, 255, 0.4),
        inset 0 0 30px rgba(0, 212, 255, 0.1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    transform: rotate(90deg);
    color: #ffffff;
}

.modal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.modal-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 30px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-input {
    background: rgba(0, 20, 40, 0.6);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    padding: 15px 20px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    color: #ffffff;
    transition: all 0.3s ease;
}

.modal-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.modal-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.modal-submit {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #000000;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.modal-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.6);
}

.modal-error {
    color: #ff3333;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 10px;
    min-height: 20px;
}

/* Responsive for components */
@media (max-width: 768px) {
    .intro-card {
        padding: 30px 25px;
    }

    .intro-title {
        font-size: 1.2rem;
    }

    .intro-description {
        font-size: 1.05rem;
    }

    .skill-card {
        padding: 25px 20px;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .portfolio-item {
        gap: 15px;
    }

    .portfolio-card-wrapper {
        width: 100%;
        height: 0;
        padding-bottom: 56.25%; /* Rapporto 16:9 */
        position: relative;
    }

    .portfolio-card {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* Contatti Center Container */
.contatti-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    min-height: 350px;
}

.rolling-text {
    position: relative;
    height: 50px;
    min-width: 280px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.rolling-item {
    position: absolute;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    opacity: 0;
    text-shadow:
        0 0 10px rgba(0, 212, 255, 0.8),
        0 0 20px rgba(0, 212, 255, 0.5),
        0 0 40px rgba(0, 212, 255, 0.3);
    animation: rollingNeon 18s infinite;
}

@keyframes rollingNeon {
    0%, 2% {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(4px);
    }
    5%, 12% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
    15%, 100% {
        opacity: 0;
        transform: translateY(-20px);
        filter: blur(4px);
    }
}

@media (max-width: 768px) {
    .contatti-center {
        min-height: auto;
        gap: 30px;
    }

    .rolling-text {
        min-width: 240px;
        height: 50px;
        flex: none;
    }

    .rolling-item {
        font-size: 0.95rem;
    }
}

/* Contact Cards */
.contact-cards {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.contact-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 20, 40, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    padding: 35px 50px;
    backdrop-filter: blur(15px);
    transition: all 0.4s ease;
    text-decoration: none;
    cursor: pointer;
    min-width: 250px;
    position: relative;
    overflow: hidden;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 212, 255, 0.15),
        transparent
    );
    transition: left 0.6s ease;
}

.contact-card:hover::before {
    left: 100%;
}

.contact-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow:
        0 15px 50px rgba(0, 212, 255, 0.3),
        inset 0 0 30px rgba(0, 212, 255, 0.08);
    text-shadow:
        0 0 20px rgba(0, 212, 255, 0.9),
        0 0 40px rgba(0, 212, 255, 0.6);
}

.contact-card.revealed {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: #ffffff;
    background: rgba(0, 40, 60, 0.6);
    border-color: rgba(0, 212, 255, 0.5);
}

.contact-card.revealed .contact-label {
    display: none;
}

@media (max-width: 768px) {
    .contact-cards {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        min-height: 30vh;
    }

    .contact-card {
        width: auto;
        max-width: none;
        padding: 25px 30px;
        font-size: 1rem;
        white-space: nowrap;
    }

    .contact-card.revealed {
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

/* Footer */
.site-footer {
    position: relative;
    width: 100%;
    padding: 20px 20px;
    margin-top: auto;
    background: linear-gradient(180deg, rgba(0, 10, 20, 0.4) 0%, rgba(0, 20, 40, 0.8) 100%);
    backdrop-filter: blur(15px);
    flex-shrink: 0;
    overflow: hidden;
}

.footer-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse at top center, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.footer-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 212, 255, 0.3) 15%,
        var(--primary-color) 50%,
        rgba(0, 212, 255, 0.3) 85%,
        transparent 100%
    );
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5),
                0 0 30px rgba(0, 212, 255, 0.3);
    animation: footerLinePulse 3s ease-in-out infinite;
}

@keyframes footerLinePulse {
    0%, 100% {
        opacity: 0.7;
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.5),
                    0 0 30px rgba(0, 212, 255, 0.3);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.8),
                    0 0 40px rgba(0, 212, 255, 0.5);
    }
}

.footer-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    z-index: 1;
}

.footer-copyright {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    display: inline-flex;
}

.footer-letter {
    color: rgba(0, 212, 255, 0.3);
    animation: letterGlow 4s ease-in-out infinite;
    animation-delay: calc(var(--letter-index) * 0.1s);
}

@keyframes letterGlow {
    0%, 100% {
        color: rgba(0, 212, 255, 0.3);
        text-shadow: none;
    }
    50% {
        color: var(--primary-color);
        text-shadow: 0 0 10px rgba(0, 212, 255, 0.8),
                     0 0 20px rgba(0, 212, 255, 0.4);
    }
}

.footer-disclaimer {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 15px 15px;
    }

    .footer-copyright {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }

    .footer-disclaimer {
        font-size: 0.8rem;
    }
}

/* ============================================
   PORTFOLIO LIGHTBOX - Advanced Image Viewer
   ============================================ */

.portfolio-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20000;
    opacity: 0;
    pointer-events: none;
    perspective: 1500px;
    overflow: hidden;
}

.portfolio-lightbox.active {
    opacity: 1;
    pointer-events: all;
}

/* Canvas per particelle */
.lightbox-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Backdrop sfumato */
.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center,
        rgba(0, 20, 40, 0.95) 0%,
        rgba(0, 0, 0, 0.98) 100%
    );
    z-index: 0;
}

/* Glitch lines effect */
.lightbox-glitch-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 212, 255, 0.03) 2px,
            rgba(0, 212, 255, 0.03) 4px
        );
    opacity: 0;
}

/* Scan line effect */
.lightbox-scan-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(0, 212, 255, 0.4) 50%,
        transparent 100%
    );
    box-shadow:
        0 0 20px rgba(0, 212, 255, 0.6),
        0 0 40px rgba(0, 212, 255, 0.3);
    z-index: 3;
    pointer-events: none;
    opacity: 0.7;
}

/* Close button */
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(0, 20, 40, 0.8);
    border: 2px solid rgba(0, 212, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    border-color: var(--primary-color);
    box-shadow:
        0 0 20px rgba(0, 212, 255, 0.6),
        inset 0 0 20px rgba(0, 212, 255, 0.1);
    transform: rotate(90deg) scale(1.1);
}

.close-line {
    position: absolute;
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.close-line:first-child {
    transform: rotate(45deg);
}

.close-line:last-child {
    transform: rotate(-45deg);
}

/* Main container */
.lightbox-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    z-index: 10;
    max-width: 90vw;
    max-height: 85vh;
}

/* Frame con angoli tech */
.lightbox-frame {
    position: relative;
    padding: 15px;
    transform-style: preserve-3d;
}

/* Angoli del frame */
.frame-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    z-index: 5;
}

.frame-corner::before,
.frame-corner::after {
    content: '';
    position: absolute;
    background: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color), 0 0 30px rgba(0, 212, 255, 0.5);
}

.frame-corner::before {
    width: 100%;
    height: 3px;
}

.frame-corner::after {
    width: 3px;
    height: 100%;
}

.frame-corner-tl {
    top: 0;
    left: 0;
}

.frame-corner-tl::before { top: 0; left: 0; }
.frame-corner-tl::after { top: 0; left: 0; }

.frame-corner-tr {
    top: 0;
    right: 0;
}

.frame-corner-tr::before { top: 0; right: 0; }
.frame-corner-tr::after { top: 0; right: 0; }

.frame-corner-bl {
    bottom: 0;
    left: 0;
}

.frame-corner-bl::before { bottom: 0; left: 0; }
.frame-corner-bl::after { bottom: 0; left: 0; }

.frame-corner-br {
    bottom: 0;
    right: 0;
}

.frame-corner-br::before { bottom: 0; right: 0; }
.frame-corner-br::after { bottom: 0; right: 0; }

/* Linee del frame */
.frame-line {
    position: absolute;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 212, 255, 0.3) 20%,
        rgba(0, 212, 255, 0.5) 50%,
        rgba(0, 212, 255, 0.3) 80%,
        transparent 100%
    );
    z-index: 4;
}

.frame-line-top,
.frame-line-bottom {
    height: 2px;
    left: 30px;
    right: 30px;
    transform-origin: center;
}

.frame-line-top { top: 0; }
.frame-line-bottom { bottom: 0; }

.frame-line-left,
.frame-line-right {
    width: 2px;
    top: 30px;
    bottom: 30px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(0, 212, 255, 0.3) 20%,
        rgba(0, 212, 255, 0.5) 50%,
        rgba(0, 212, 255, 0.3) 80%,
        transparent 100%
    );
    transform-origin: center;
}

.frame-line-left { left: 0; }
.frame-line-right { right: 0; }

/* Image wrapper */
.lightbox-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow:
        0 0 60px rgba(0, 212, 255, 0.3),
        0 20px 80px rgba(0, 0, 0, 0.8),
        inset 0 0 100px rgba(0, 212, 255, 0.05);
}

.lightbox-image {
    display: block;
    max-width: 80vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    transform-origin: center center;
    will-change: transform;
}

/* Glare effect */
.image-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.15) 45%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.15) 55%,
        transparent 60%
    );
    pointer-events: none;
    z-index: 2;
}

/* Reflection effect */
.image-reflection {
    position: absolute;
    bottom: -50%;
    left: 0;
    width: 100%;
    height: 50%;
    background: inherit;
    transform: scaleY(-1);
    opacity: 0.1;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 100%);
    pointer-events: none;
    filter: blur(2px);
}

/* Banner "Visita il sito" */
.lightbox-banner {
    position: relative;
    padding: 20px 60px;
    background: rgba(0, 20, 40, 0.9);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    overflow: hidden;
    box-shadow:
        0 0 30px rgba(0, 212, 255, 0.4),
        0 10px 40px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(0, 212, 255, 0.1);
}

.banner-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center,
        rgba(0, 212, 255, 0.2) 0%,
        transparent 60%
    );
    pointer-events: none;
}

.banner-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
}

.banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.6));
}

.banner-link {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--primary-color);
    text-decoration: none;
    text-shadow:
        0 0 10px rgba(0, 212, 255, 0.8),
        0 0 20px rgba(0, 212, 255, 0.5),
        0 0 40px rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
}

.banner-link:hover {
    color: #ffffff;
    text-shadow:
        0 0 15px rgba(0, 212, 255, 1),
        0 0 30px rgba(0, 212, 255, 0.8),
        0 0 60px rgba(0, 212, 255, 0.5);
    letter-spacing: 6px;
}

.banner-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Tech overlay decorations */
.lightbox-tech-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.tech-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 212, 255, 0.3) 50%,
        transparent 100%
    );
    transform-origin: left center;
}

.tech-line-1 {
    top: 15%;
    left: 5%;
    width: 20%;
}

.tech-line-2 {
    top: 85%;
    right: 5%;
    width: 25%;
    transform-origin: right center;
}

.tech-line-3 {
    top: 50%;
    left: 2%;
    width: 8%;
}

.tech-circle {
    position: absolute;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
}

.tech-circle-1 {
    top: 10%;
    right: 10%;
    width: 80px;
    height: 80px;
    animation: techCirclePulse 3s ease-in-out infinite;
}

.tech-circle-2 {
    bottom: 15%;
    left: 8%;
    width: 50px;
    height: 50px;
    animation: techCirclePulse 3s ease-in-out infinite 1.5s;
}

@keyframes techCirclePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
        border-color: rgba(0, 212, 255, 0.3);
    }
    50% {
        transform: scale(1.2);
        opacity: 0.6;
        border-color: rgba(0, 212, 255, 0.6);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .lightbox-close {
        top: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .close-line {
        width: 20px;
    }

    .lightbox-container {
        gap: 35px;
    }

    .lightbox-frame {
        padding: 10px;
    }

    .frame-corner {
        width: 20px;
        height: 20px;
    }

    .frame-line-top,
    .frame-line-bottom {
        left: 20px;
        right: 20px;
    }

    .frame-line-left,
    .frame-line-right {
        top: 20px;
        bottom: 20px;
    }

    .lightbox-image {
        max-width: 90vw;
        max-height: 60vh;
    }

    .lightbox-banner {
        padding: 15px 30px;
    }

    .banner-link {
        font-size: 1rem;
        letter-spacing: 3px;
    }

    .banner-icon svg {
        width: 20px;
        height: 20px;
    }

    .tech-circle-1,
    .tech-circle-2 {
        display: none;
    }
}
