
/*Developed by Cristian Ceni 2025, all the rights are reserved*/

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

:root {
    --color-primary: #ff85c2;
    --color-secondary: #ff39a2;
    --color-background: #0a0a0a;
    --color-surface: #1a1a1a;
    --color-text: #ffffff;
    --color-card: rgba(37, 37, 37, 0.8);
    --color-nav-bg: rgba(18, 18, 18, 0.8);
    --color-border: rgba(255, 105, 180, 0.1);
    --font-family-base: 'DM Sans', sans-serif;
}

[data-theme="light"] {
    --color-primary: #d81b60;
    --color-secondary: #ad1457;
    --color-background: #f7f2f5;
    --color-surface: #ffffff;
    --color-text: #1f1b1d;
    --color-card: rgba(255, 255, 255, 0.95);
    --color-nav-bg: rgba(255, 255, 255, 0.9);
    --color-border: rgba(216, 27, 96, 0.2);
}

/* Reset e stili di base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-family-base);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header e navigazione */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--color-nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    padding: 5px;
    margin: auto;
}

.nav-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.loghetto {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    height: 60px;
}

.loghetto::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
    filter: blur(10px);
}

.brand {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.brand::before {
    content: '';
    position: absolute;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #000000;
    opacity: 0.6;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.loghetto img {
    height: 70px;
    width: auto;
    object-fit: contain;
    margin-top: 5px;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.4));
}

.loghetto p {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.3);
    line-height: 50px;
}

/* Sezione Home */
.home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: var(--color-background);
    position: relative;
    color: var(--color-text);
    overflow: hidden;
}

.home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 105, 180, 0.15) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0.6;
}

.home::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 105, 180, 0.15) 0%, rgba(255, 20, 147, 0) 70%);
    pointer-events: none;
}

.home-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.home-content {
    max-width: 600px;
}

.home-logo {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.home-logo-img {
    height: 120px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.home-logo-img--light {
    display: none;
}

[data-theme="light"] .home-logo-img--dark {
    display: none;
}

[data-theme="light"] .home-logo-img--light {
    display: block;
}

.home-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.home-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(255, 105, 180, 0.3);
    box-shadow: 0 0 20px rgba(255, 105, 180, 0.2);
}

.btn:hover {
    transform: translateY(-3px);
    background-color: var(--color-secondary);
    box-shadow: 0 0 30px rgba(255, 105, 180, 0.4);
}

/* Sezione Lavori */
.lavori-section {
    padding: 5rem 0;
    background-color: var(--color-background);
    position: relative;
    overflow: hidden;
}

.lavori-section::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    top: 0;
    left: 0;
    background: linear-gradient(to right, transparent, var(--color-primary), transparent);
    opacity: 0.2;
}

.lavori-wrap {
    position: relative;
    z-index: 1;
}

.lavori-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.lavori-wrap h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--color-primary);
}

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

.lavori-gallery img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(255, 105, 180, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 105, 180, 0.1);
    filter: brightness(0.95);
}

.lavori-gallery img:hover {
    filter: brightness(1.05);
    box-shadow: 0 12px 40px rgba(255, 105, 180, 0.25);
}

.lavori-gallery img:hover {
    transform: scale(1.05);
}

/* Sezione Recensioni */
.recensioni-section {
    padding: 5rem 0;
    background-color: var(--color-background);
    position: relative;
    overflow: hidden;
}

.recensioni-section::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    top: 0;
    left: 0;
    background: linear-gradient(to right, transparent, var(--color-primary), transparent);
    opacity: 0.2;
}

.recensioni-wrap {
    position: relative;
    z-index: 1;
}

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

.recensioni-wrap h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--color-primary);
    text-shadow: 0 0 15px rgba(255, 105, 180, 0.3);
}

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

.recensione-card {
    background: var(--color-card);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(255, 105, 180, 0.1);
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recensione-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(255, 105, 180, 0.2);
}

.recensione-stars {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.3);
}

.recensione-testo {
    color: var(--color-text);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.recensione-autore {
    color: var(--color-primary);
    font-weight: 600;
    text-align: right;
    margin-bottom: 1.5rem;
}

.recensione-lavori {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.lavori-caption {
    color: var(--color-primary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.recensione-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
}

.recensione-gallery img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease, filter 0.3s ease;
    border: 1px solid var(--color-border);
}

.recensione-gallery img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Media Queries per la galleria delle recensioni */
@media (max-width: 480px) {
    .recensione-gallery {
        grid-template-columns: 1fr;
    }
    
    .recensione-gallery img {
        height: 160px;
    }
}

/* Footer */
.footer {
    background-color: var(--color-background);
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 105, 180, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.copyright, .developer {
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.9rem;
}

.developer {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.developer-link {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--color-secondary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.developer-link:hover {
    color: var(--color-secondary);
}

.theme-toggle {
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--color-border);
    padding: 0.45rem 0.6rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 105, 180, 0.2);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
}

.theme-icon--moon {
    display: none;
}

[data-theme="light"] .theme-icon--sun {
    display: none;
}

[data-theme="light"] .theme-icon--moon {
    display: inline-flex;
}

[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.02);
    box-shadow: none;
}

.developer-logo {
    height: 18px;
    width: auto;
    transition: filter 0.3s ease, transform 0.3s ease;
    margin: auto;
    margin-right: -5px;
    vertical-align: -3px;
}

.developer-logo:hover {
    filter: brightness(0) invert(1) opacity(1) drop-shadow(0 0 4px rgba(255, 105, 180, 0.5));
    transform: scale(1.1);
}

/* Media Queries */
@media (max-width: 768px) {
    .nav {
        padding: 0.5rem 0;
    }

    .nav-wrap {
        padding: 0 1rem;
    }

    .loghetto img {
        height: 40px;
    }

    .loghetto p {
        font-size: 1.2rem;
    }

    .home {
        min-height: calc(100vh - 60px);
        padding-top: 60px;
        display: flex;
        align-items: center;
    }

    .home-wrap {
        padding: 1rem;
        width: 100%;
    }

    .home-content {
        text-align: left;
        padding: 0 0.5rem;
    }

    .home-logo {
        margin-bottom: 0.90rem;
    }

    .home-logo-img {
        height: 75px;
    }

    .home-content h1 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
        line-height: 1.2;
    }

    .home-content p {
        font-size: 1rem;
        margin-bottom: 1.25rem;
        line-height: 1.4;
        opacity: 0.9;
    }

    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        margin-top: 0.5rem;
        width: auto;
        min-width: 200px;
    }

    .lavori-section,
    .recensioni-section {
        padding: 2rem 0;
    }

    .lavori-wrap,
    .recensioni-wrap {
        padding: 0 0.75rem;
    }

    .lavori-wrap h2,
    .recensioni-wrap h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
        text-align: left;
        padding-left: 0.5rem;
    }

    .lavori-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0 0.25rem;
    }

    .lavori-gallery img {
        height: auto;
        aspect-ratio: 1/1;
        border-radius: 6px;
    }

    .recensioni-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .recensione-card {
        padding: 1.25rem;
        margin: 0 0.25rem;
    }

    .recensione-stars {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }

    .recensione-testo {
        font-size: 0.95rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }

    .recensione-autore {
        margin-bottom: 1rem;
    }

    .recensione-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }

    .recensione-gallery img {
        height: 90px;
        border-radius: 4px;
    }

    .lavori-caption {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .footer {
        padding: 1.5rem 0;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }

    .copyright,
    .developer {
        font-size: 0.8rem;
    }
}

/* Fix per dispositivi più piccoli */
@media (max-width: 360px) {
    .home-content h1 {
        font-size: 1.8rem;
    }

    .recensione-gallery {
        grid-template-columns: 1fr;
    }

    .recensione-gallery img {
        height: 150px;
    }
}

/* Fix per l'orientamento landscape su mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .home {
        min-height: auto;
        padding: 4rem 0;
    }

    .home-content {
        max-width: 100%;
    }
}

/* Fix per il supporto a hover su dispositivi touch */
@media (hover: hover) {
    .btn:hover {
        transform: translateY(-3px);
    }

    .lavori-gallery img:hover,
    .recensione-gallery img:hover {
        transform: scale(1.05);
    }
}

/* Fix per dispositivi con notch */
@supports (padding-top: env(safe-area-inset-top)) {
    .nav {
        padding-top: calc(env(safe-area-inset-top) + 0.5rem);
    }

    .home {
        padding-top: calc(env(safe-area-inset-top) + 60px);
    }
}
