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

html, body {
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(180deg, rgb(248, 218, 203) 0%, rgb(158, 69, 57) 100%) no-repeat fixed;
    background-size: 100% 100%;
    color: #2c1810;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: rgb(158, 69, 57);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background 0.3s ease;
}

header.scrolled {
    background: rgb(158, 69, 57);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: white;  /* CAMBIATO */
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.7;
}

.logo-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    object-fit: cover;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.nav-links a:hover {
    opacity: 0.6;
}

.nav-links a.active {
    opacity: 1;
    font-weight: 600;
}

.lang-switcher {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);  /* CAMBIATO: più trasparente */
    padding: 0.3rem;
    border-radius: 8px;
}

.lang-btn {
    padding: 0.4rem 0.9rem;
    border: none;
    background: transparent;
    color: white;  /* CAMBIATO */
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: white;
    color: rgb(158, 69, 57);  /* AGGIUNGI: testo rosso quando attivo */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.lang-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.7);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    background: white;  /* CAMBIATO */
    border-radius: 2px;
    transition: 0.3s;
}

.menu-close {
    display: none;
}

@media (max-width: 768px) {
    .menu-close {
        display: block;
        position: absolute;
        top: 1.5rem;
        right: 2rem;
        background: none;
        border: none;
        color: white;
        font-size: 2.5rem;
        line-height: 1;
        cursor: pointer;
        padding: 0.5rem;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.3s ease;
    }
    
    .menu-close:active {
        opacity: 0.6;
    }
}


main {
    padding-top: 100px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    flex: 1;
}

.page {
    display: none;
    animation: fadeInUp 0.6s ease;
}

.page.active {
    display: block;
}

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

.hero {
    text-align: center;
    padding: 4rem 0 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.timer-section {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.pomodoro-wrapper {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 60px;
    height: 60px;
}

.ring-progress {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.ring-bg {
    fill: none;
    stroke: rgba(158, 69, 57, 0.15);
    stroke-width: 2.5;
}

.ring-fill {
    fill: none;
    stroke: rgb(158, 69, 57);
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.4s ease;
    transform: rotate(-90deg);
    transform-origin: center;
}

.pomodoro-counter {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.pomodoro-icon {
    font-size: 1.3rem;
}

.pomodoro-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgb(158, 69, 57);
}

.timer-display {
    font-size: 6rem;
    font-weight: 700;
    color: rgb(158, 69, 57);
    margin-bottom: 2rem;
    font-variant-numeric: tabular-nums;
    transition: font-size 0.3s ease;
}

.focus-time {
    text-align: center;
    margin-bottom: 2rem;
}

.focus-time-label {
    font-size: 0.75rem;
    color: rgba(92, 64, 51, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.focus-time-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgb(158, 69, 57);
}

.timer-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.timer-btn {
    background: rgb(158, 69, 57);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timer-btn:hover {
    background: rgb(132, 32, 26);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(158, 69, 57, 0.3);
}

.timer-btn:active {
    transform: translateY(0);
}

.timer-btn.secondary {
    background: rgba(158, 69, 57, 0.2);
    color: rgb(158, 69, 57);
}

.timer-btn.secondary:hover {
    background: rgba(158, 69, 57, 0.3);
}

.app-banner {
    background: rgba(54, 94, 41, 0.1);
    border: 1px solid rgba(54, 94, 41, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: #5c4033;
    line-height: 1.6;
    display: none;
}

.app-banner.show {
    display: block;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-banner a {
    color: rgb(54, 94, 41);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.app-banner a:hover {
    opacity: 0.7;
}

.hero h3 {
    font-size: 1.1rem;
    line-height: 1.4;
    color: #5c4033;
    margin-top: -2rem;
    margin-bottom: 1rem;
    font-weight: 400;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(90deg, rgb(54, 94, 41) 0%, rgb(158, 69, 57) 50%, rgb(54, 94, 41) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
    line-height: 1.1;
    animation: greenFlow 6s ease-in-out infinite;
    text-align: left;
}

@keyframes greenFlow {
    0% {
        background-position: 100% 0%;
    }
    50% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 0%;
    }
}

.hero .philosophy {
    font-size: 1.4rem;
    line-height: 1.7;
    color: #5c4033;
    margin-bottom: 1rem;
    font-weight: 400;
    text-align: left;
}

.hero .tagline-highlight {
    font-size: 1.3rem;
    color: #5c4033;
    margin-bottom: 1rem;
    font-weight: 500;
    font-style: italic;
    line-height: 1.6;
    text-align: left;
}

.hero .tagline {
    font-size: 1.3rem;
    color: #5c4033;
    margin-bottom: 2rem;
    font-weight: 700;
    line-height: 1.6;
    text-align: left;
}

.promo-banner {
    background: linear-gradient(135deg, rgb(54, 94, 41) 0%, rgb(158, 69, 57) 100%);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
    width: fit-content;
    margin: 0 0 1.5rem 0;
    box-shadow: 0 4px 15px rgba(158, 69, 57, 0.3);
    animation: pulsePromo 2s ease-in-out infinite;
}

@keyframes pulsePromo {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(158, 69, 57, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(158, 69, 57, 0.4);
    }
}

.app-store-badge {
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
    margin: 1.5rem 0 2rem;
}

.app-store-badge:hover {
    transform: scale(1.03);
    opacity: 0.9;
}

.app-store-badge img {
    height: 56px;
}

.features-interactive {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 0 6rem;
    overflow: hidden;
}

.features-header {
    text-align: center;
    margin-bottom: 1rem;
}

.features-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: rgb(158, 69, 57);
    letter-spacing: -1px;
}

.carousel-container {
    position: relative;
    width: 100%;
}

.carousel-wrapper {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 3rem 0 3rem 3rem;
    margin: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-padding-left: 3rem;
}

.carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.feature-card {
    flex: 0 0 calc(33.333% - 1.5rem);
    min-width: 280px;
    max-width: 380px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 3rem 2.5rem;
    border-radius: 24px;
    transition: all 0.4s ease;
    text-align: center;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (hover: hover) and (pointer: fine) {
    .feature-card:hover {
        background: rgba(255, 255, 255, 0.8);
        transform: translateY(-8px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    }
}

.feature-card.in-view {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.feature-card-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
}

.feature-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgb(158, 69, 57);
    margin-bottom: 1.2rem;
    line-height: 1.3;
}

.feature-card-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #5c4033;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 2rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(158, 69, 57, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: rgb(158, 69, 57);
    transform: scale(1.3);
}

.carousel-dot:hover {
    background: rgba(158, 69, 57, 0.6);
}

.bottom-sections {
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 3rem 6rem;
}

.bottom-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.bottom-card h2 {
    font-size: 2rem;
    color: rgb(158, 69, 57);
    margin-bottom: 1.5rem;
}

.bottom-card p {
    font-size: 1.1rem;
    color: #5c4033;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.contact-email {
    font-size: 1.1rem;
    color: rgb(158, 69, 57);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.contact-email:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

footer {
    background: transparent;
    padding: 3rem 0 2rem;
    text-align: center;
    width: 100%;
}

footer p {
    color: white;
    font-size: 0.95rem;
    margin: 0;
    font-weight: 500;
}

.blog-section {
    padding: 4rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.blog-header {
    text-align: center;
    margin-bottom: 4rem;
}

.blog-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: rgb(158, 69, 57);
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.post {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.post:hover {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.post-date {
    font-size: 0.85rem;
    color: rgb(158, 69, 57);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
}

.post-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c1810;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #5c4033;
}

.post-content p {
    margin-bottom: 1.2rem;
}

.post-content .feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-content .feature-list li {
    padding-left: 2rem;
    text-indent: -2rem;
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

.post-content .feature-list li::before {
    content: "🟡 ";
    margin-right: 0.3rem;
}

.privacy-section {
    padding: 4rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.privacy-content {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 4rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.privacy-content h1 {
    font-size: 3rem;
    font-weight: 700;
    color: rgb(158, 69, 57);
    margin-bottom: 1rem;
}

.privacy-date {
    font-size: 0.9rem;
    color: rgba(92, 64, 51, 0.7);
    margin-bottom: 2rem;
}

.privacy-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #5c4033;
    margin-bottom: 2.5rem;
}

.privacy-content .contact-email {
    margin-top: 1.5rem;
}

@keyframes sessionComplete {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(158, 69, 57, 0.3);
    }
    50% {
        transform: scale(1.015);
        box-shadow: 0 0 0 10px rgba(158, 69, 57, 0);
    }
}

@keyframes pulseTimer {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.03);
        opacity: 0.85;
    }
}

.timer-section.completed {
    animation: sessionComplete 3s ease infinite;
    background: rgba(54, 94, 41, 0.15);
    border-color: rgba(54, 94, 41, 0.3);
    transition: background 0.8s ease, border-color 0.8s ease;
}

.timer-display.completed {
    animation: pulseTimer 2.5s ease infinite;
}

[data-lang] {
    display: none;
}

[data-lang].active {
    display: block;
}

span[data-lang].active {
    display: inline;
}

@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    nav {
        padding: 1.5rem 2rem;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .timer-display {
        font-size: 4rem;
    }
    
    .timer-controls {
        flex-direction: column;
    }
    
    .timer-btn {
        width: 100%;
    }
    
    .feature-card {
        flex: 0 0 calc(50% - 1rem);
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
    
    main {
        padding-top: 80px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-content {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        background: rgb(158, 69, 57);  /* Rosso del sito */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 2rem;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 999;
    }
    
    .nav-content.active {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 2rem;
        width: 100%;
        max-width: 300px;
    }
    
    .nav-links a {
        font-size: 1.8rem;
        color: white;
        font-weight: 600;
        padding: 0.8rem 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        transition: opacity 0.3s ease;
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    .nav-links a:active {
        opacity: 0.6;
    }
    
    .lang-switcher {
        margin: 2rem 0 0;
        background: rgba(255, 255, 255, 0.2);
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .philosophy {
        font-size: 1.2rem;
    }
    
    
    .blog-header h1 {
        font-size: 2.5rem;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .privacy-content h1 {
        font-size: 2.5rem;
    }
    
    .timer-display {
        font-size: 3rem;
    }
    
    .timer-section {
        padding: 2rem 1.5rem;
    }
    
    .bottom-card,
    .privacy-content {
        padding: 2.5rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    .features-header {
        margin-bottom: 1rem;
    }
    
    .features-header h2 {
        font-size: 2rem;
    }
    
    .carousel-wrapper {
        padding: 3rem 0 3rem 1.5rem;  /* CAMBIATO: da 1rem a 3rem */
        margin: 0;
    }
    
    .feature-card {
        flex: 0 0 85%;
        min-width: 260px;
        max-width: 340px;
        padding: 2.5rem 2rem;
    }
    
    .feature-card-icon {
        font-size: 3.5rem;
        margin-bottom: 1.2rem;
    }
    
    .feature-card-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .feature-card-text {
        font-size: 1rem;
    }
    
    .carousel-dots {
        margin-top: 1rem;
    }
    
    .bottom-sections {
        padding: 3rem 1.5rem 2rem;
    }
    
    .bottom-card {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }
    
    .bottom-card h2 {
        font-size: 1.8rem;
    }
    
    .bottom-card p {
        font-size: 1rem;
    }
    
    .contact-email {
        font-size: 0.9rem;
        padding: 0.7rem 1rem;
        display: block;
        word-break: break-word;
        max-width: 100%;
    }
    
    footer {
            padding: 2rem 0 1.5rem;
        }
        
        footer p {
            font-size: 0.85rem;
        }
}
