/*
Theme Name: Daniel Favero Web Dev
Theme URI: https://danielfavero.dev
Author: Daniel Favero
Description: Tema portfolio moderno, dark, responsive con progetti gestibili e animazioni progressive.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: daniel-favero
License: GPL-2.0-or-later
*/


.service-card {
    position: relative;
    overflow: visible;
    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 180, 255, 0.6);
    box-shadow: 0 15px 40px rgba(0, 180, 255, 0.12);
}

.service-card-featured {
    border: 1px solid #8b5cf6;
    background: linear-gradient(145deg,
            rgba(0, 180, 255, 0.08),
            rgba(139, 92, 246, 0.12));
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.15);
}

.service-card-featured::before {
    content: "★ IN EVIDENZA";
    position: absolute;
    top: -13px;
    right: 18px;
    padding: 6px 12px;
    border-radius: 20px;
    background: linear-gradient(90deg, #009dff, #9333ea);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.service-tag {
    display: inline-block;
    margin-top: 20px;
    color: #9eb8ff;
    font-size: 12px;
}


.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    color: #38bdf8;
    font-size: 30px;
}

.service-icon i {
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon i {
    transform: scale(1.15);
}

.service-icon-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}


/* =====================================
   DANIEL FAVERO - SERVICE CARDS NEON
===================================== */

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    align-items: stretch;
}

.service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 370px;
    padding: 36px 32px;
    border: 1px solid rgba(100, 130, 200, 0.24);
    border-radius: 22px;
    background: linear-gradient(145deg,
            #121a2d 0%,
            #0a1020 100%);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    overflow: visible;
    isolation: isolate;
    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

/* Effetto luce interna */
.service-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 100% 100%,
            rgba(0, 170, 255, 0.12),
            transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* Hover */
.service-card:hover {
    transform: translateY(-9px);
    border-color: rgba(0, 195, 255, 0.65);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.3),
        0 0 25px rgba(0, 170, 255, 0.15);
}

/* Icona */
.service-card .service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 180, 255, 0.5);
    border-radius: 18px;
    background: rgba(0, 140, 255, 0.08);
    color: #18c8ff;
    font-size: 32px;
    box-shadow: inset 0 0 20px rgba(0, 180, 255, 0.08);
}

.service-card .service-icon i {
    transition: transform 0.35s ease;
}

.service-card:hover .service-icon i {
    transform: scale(1.15) rotate(-5deg);
}

/* Numero */
.service-card .service-no {
    position: absolute;
    top: 40px;
    right: 32px;
    color: #667da5;
    font-size: 15px;
    font-weight: 600;
}

/* Titolo */
.service-card h3 {
    margin: 0 0 16px;
    color: #f4f7ff;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.25;
}

/* Descrizione */
.service-card p {
    margin: 0 0 24px;
    color: #b4c3dc;
    font-size: 15px;
    line-height: 1.75;
}

/* Tecnologie */
.service-card .service-tag {
    display: inline-flex;
    align-self: flex-start;
    max-width: 100%;
    padding: 9px 14px;
    margin-top: auto;
    border: 1px solid rgba(0, 170, 255, 0.2);
    border-radius: 30px;
    background: rgba(0, 140, 255, 0.09);
    color: #9ecbff;
    font-size: 12px;
    line-height: 1.4;
}

/* Link approfondimento */
.service-card .text-link {
    display: inline-block;
    align-self: flex-start;
    margin-top: 22px;
    color: #38bdf8;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

/* Card evidenziata */
.service-card.service-card-featured {
    border-color: #a855f7;
    background: linear-gradient(145deg,
            #101c35,
            #1c1034);
    box-shadow:
        0 0 28px rgba(139, 92, 246, 0.18),
        0 12px 35px rgba(0, 0, 0, 0.2);
}

.service-card.service-card-featured::before {
    content: "★ CONSIGLIATO";
    position: absolute;
    top: -15px;
    right: 22px;
    padding: 8px 16px;
    border-radius: 30px;
    background: linear-gradient(90deg, #008dff, #a020f0);
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    z-index: 2;
}

.service-card.service-card-featured:hover {
    border-color: #c084fc;
    box-shadow:
        0 0 45px rgba(139, 92, 246, 0.35),
        0 20px 50px rgba(0, 0, 0, 0.25);
}

/* Responsive */
@media (max-width: 991px) {
    .service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .service-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .service-card {
        min-height: 330px;
        padding: 30px 25px;
    }

    .service-card h3 {
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .service-card,
    .service-card .service-icon i {
        transition: none;
    }

    .service-card:hover {
        transform: none;
    }
}



/* =========================================
   DANIEL FAVERO - PORTFOLIO CARD FIX
========================================= */

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

.project-grid .project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: auto;
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(100, 130, 200, .3);
    border-radius: 20px;
    background: #101625;
    transition:
        transform .35s ease,
        border-color .35s ease,
        box-shadow .35s ease;
}

.project-grid .project-card:hover {
    transform: translateY(-6px);
    border-color: #38bdf8;
    box-shadow: 0 16px 45px rgba(0, 170, 255, .12);
}

/* Immagine */
.project-grid .project-card .project-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 260px;
    min-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: linear-gradient(135deg,
            #17243c,
            #25183e);
}

.project-grid .project-card .project-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.project-grid .project-card:hover .project-image img {
    transform: scale(1.05);
}

/* Testo segnaposto */
.project-grid .project-fallback {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    color: #a5b4fc;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 2px;
}

/* Freccia */
.project-grid .project-arrow {
    position: absolute;
    top: 18px;
    right: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: #101625;
    z-index: 3;
}

/* Badge */
.project-grid .project-featured-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    padding: 8px 14px;
    border-radius: 30px;
    background: linear-gradient(90deg, #009dff, #9333ea);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    z-index: 3;
}

/* Titolo e anno */
.project-grid .project-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 26px 26px 0;
}

.project-grid .project-meta h3 {
    margin: 0;
    color: #f5f7ff;
    font-size: 23px;
    line-height: 1.3;
}

.project-grid .project-meta h3 a {
    color: inherit;
    text-decoration: none;
}

.project-grid .project-meta>span {
    flex-shrink: 0;
    color: #8b9dc1;
    font-size: 13px;
}

/* Categoria */
.project-grid .project-category {
    display: block;
    margin: 10px 26px 0;
    color: #38bdf8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Descrizione */
.project-grid .project-card>p {
    margin: 18px 26px 0;
    padding: 0;
    color: #b4c3dc;
    font-size: 14px;
    line-height: 1.7;
}

/* Tecnologie */
.project-grid .project-tech {
    display: inline-block;
    align-self: flex-start;
    max-width: calc(100% - 52px);
    margin: 22px 26px 26px;
    padding: 8px 13px;
    border: 1px solid rgba(56, 189, 248, .2);
    border-radius: 30px;
    background: rgba(0, 140, 255, .08);
    color: #9ecbff;
    font-size: 12px;
    line-height: 1.5;
}

/* Link */
.project-grid .project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 0 26px 26px;
}

.project-grid .project-links a {
    color: #38bdf8;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

/* Progetto evidenziato */
.project-grid .project-card-featured {
    border-color: #a855f7;
    box-shadow: 0 0 25px rgba(139, 92, 246, .15);
}

/* Tablet */
@media (max-width: 900px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* Smartphone */
@media (max-width: 600px) {
    .project-grid .project-card .project-image {
        height: 210px;
    }

    .project-grid .project-meta {
        padding: 22px 20px 0;
    }

    .project-grid .project-category {
        margin-left: 20px;
        margin-right: 20px;
    }

    .project-grid .project-card>p {
        margin-left: 20px;
        margin-right: 20px;
    }

    .project-grid .project-tech {
        margin-left: 20px;
        margin-right: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .project-grid .project-card,
    .project-grid .project-card .project-image img {
        transition: none;
    }

    .project-grid .project-card:hover {
        transform: none;
    }
}


/* HERO MODERNA - DANIEL FAVERO */

.hero.hero-modern {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    background: #080b14;
}

.hero-modern .hero-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: center;
    gap: 50px;
    min-height: 720px;
    padding-top: 100px;
    padding-bottom: 70px;
}

.hero-modern .hero-content {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.hero-modern h1 {
    max-width: 800px;
    margin: 24px 0;
    color: #f5f7ff;
    font-size: clamp(44px, 5.2vw, 82px);
    line-height: 1.08;
    letter-spacing: -0.055em;
    background: none;
    -webkit-text-fill-color: #f5f7ff;
}

/* Evita il rosa del vecchio titolo */
.hero-modern h1 .gradient-text {
    color: #38bdf8;
    background: none;
    -webkit-text-fill-color: #38bdf8;
}

.hero-modern .hero-desc {
    max-width: 570px;
    color: #b8c7e0;
    font-size: 17px;
    line-height: 1.8;
}

/* CTA */
.hero-modern .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 34px;
}

.hero-modern .hero-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 54px;
    padding: 15px 25px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition:
        transform .3s ease,
        background .3s ease,
        box-shadow .3s ease;
}

.hero-modern .hero-actions .btn-primary {
    color: #fff;
    border: 1px solid #167bff;
    background: linear-gradient(135deg, #007bff, #2563eb);
    box-shadow: 0 8px 28px rgba(0, 123, 255, .20);
}

.hero-modern .hero-actions .btn-secondary {
    color: #e6f3ff;
    border: 1px solid rgba(56, 189, 248, .55);
    background: rgba(56, 189, 248, .05);
}

.hero-modern .hero-actions .btn:hover {
    transform: translateY(-4px);
}

.hero-modern .hero-actions .btn-primary:hover {
    box-shadow: 0 12px 35px rgba(0, 123, 255, .4);
}

.hero-modern .hero-actions .btn-secondary:hover {
    background: rgba(56, 189, 248, .15);
}

/* FOTO */
.hero-modern .hero-visual {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-width: 0;
    min-height: 550px;
    align-self: stretch;
}

.hero-modern .hero-photo-glow {
    position: absolute;
    width: 90%;
    aspect-ratio: 1;
    bottom: 7%;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(0, 145, 255, .27),
        rgba(80, 60, 180, .10) 45%,
        transparent 72%
    );
    filter: blur(28px);
}

.hero-modern .hero-photo {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    max-width: 520px;
    max-height: 650px;
    height: auto;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 10px 35px rgba(0, 100, 255, .15));
}

.hero-modern .hero-photo-placeholder {
    position: relative;
    display: grid;
    place-items: center;
    width: min(75%, 350px);
    aspect-ratio: 1;
    margin: auto;
    border: 1px solid rgba(56, 189, 248, .25);
    border-radius: 50%;
    background: rgba(56, 189, 248, .04);
    color: #38bdf8;
    font-size: 100px;
    font-weight: 800;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero-modern .hero-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-top: 110px;
    }

    .hero-modern .hero-visual {
        min-height: 350px;
        max-height: 480px;
    }

    .hero-modern .hero-photo {
        max-height: 480px;
    }
}

@media (max-width: 600px) {
    .hero-modern .hero-layout {
        padding-bottom: 50px;
    }

    .hero-modern h1 {
        font-size: clamp(40px, 10vw, 58px);
    }

    .hero-modern .hero-visual {
        min-height: 280px;
    }

    .hero-modern .hero-photo {
        max-height: 380px;
    }

    .hero-modern .hero-actions .btn {
        width: 100%;
    }
}


/* Navbar durante lo scroll */
.site-header {
    transition:
        background 0.35s ease,
        box-shadow 0.35s ease,
        backdrop-filter 0.35s ease;
}

.site-header.is-scrolled {
    background: rgba(8, 11, 20, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.3);
}


/* =========================================
   PORTFOLIO - MIGLIORAMENTI VISIVI
========================================= */

#progetti .project-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    transition:
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

#progetti .project-card:hover {
    border-color: rgba(45, 170, 255, 0.65);
    box-shadow: 0 18px 45px rgba(0, 120, 255, 0.12);
}

/* Immagini */

#progetti .project-image {
    display: block;
    position: relative;
    overflow: hidden;
}

#progetti .project-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}

#progetti .project-card:hover .project-image img {
    transform: scale(1.06);
}

/* Freccia */

#progetti .project-arrow {
    transition:
        transform 0.3s ease,
        background 0.3s ease;
}

#progetti .project-card:hover .project-arrow {
    transform: translate(3px, -3px);
    background: #159bff;
    color: #fff;
}

/* Titolo */

#progetti .project-meta h3 a {
    transition: color 0.3s ease;
}

#progetti .project-meta h3 a:hover {
    color: #42baff;
}

/* Gradiente titolo sezione */

#progetti .gradient-text {
    background: linear-gradient(
        90deg,
        #4d8dff,
        #36d8ff
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* ===================================
   PORTFOLIO PAGE
=================================== */

.portfolio-page {
    min-height: 100vh;
    background: #0b0e18;
    color: #f5f7ff;
}

.portfolio-hero {
    padding: 150px 0 80px;
    background:
        radial-gradient(
            ellipse at 75% 20%,
            rgba(33, 110, 255, 0.12),
            transparent 55%
        );
}

.portfolio-hero h1 {
    max-width: 850px;
    margin: 22px 0;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.portfolio-accent {
    color: #47baff;
}

.portfolio-hero p {
    max-width: 620px;
    color: #aab6d0;
    font-size: 17px;
    line-height: 1.8;
}

.portfolio-section {
    padding: 30px 0 120px;
}

.portfolio-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 36px;
}

.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.portfolio-filter {
    padding: 11px 22px;
    border: 1px solid #29354c;
    border-radius: 50px;
    background: #111827;
    color: #aebbd3;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition:
        background 0.25s,
        border-color 0.25s,
        color 0.25s;
}

.portfolio-filter:hover {
    border-color: #42baff;
    color: #fff;
}

.portfolio-filter.is-active {
    background: #168bff;
    border-color: #168bff;
    color: #fff;
}

.portfolio-count {
    color: #92a3c2;
    font-size: 13px;
    white-space: nowrap;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

.portfolio-item {
    min-width: 0;
    height: 100%;
}

.portfolio-item[hidden] {
    display: none !important;
}

.portfolio-grid .project-card {
    height: 100%;
}

.portfolio-empty {
    padding: 60px 0;
    color: #aab6d0;
    text-align: center;
}

.portfolio-empty[hidden] {
    display: none;
}

@media (max-width: 768px) {
    .portfolio-hero {
        padding: 115px 0 55px;
    }

    .portfolio-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .portfolio-filter {
        padding: 9px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-filter {
        transition: none;
    }
}
