:root {
    --teal: #004d4d;
    --teal-dark: #003333;
    --mustard: #d4af37;
    --coral: #d9534f;
    --cream: #f5f5dc;
    --brown: #4b3621;
    --gray-light: #e0e0e0;
    --white: #ffffff;
    --red-accent: #c41e3a;
    --yellow-accent: #ffd700;
}

/* Tema alternativo "Midnight Blue" */
body.alt-theme {
    --teal: #1e2060;
    --teal-dark: #0f1040;
    --mustard: #7AC5C8;
    --coral: #a8c5d8;
    --cream: #eef2f7;
    --brown: #2c3a50;
    --red-accent: #1e2060;
}

body.alt-theme nav {
    background-color: var(--cream);
}

body.alt-theme .nav-links a {
    color: var(--teal);
}

body.alt-theme .hamburger span {
    background-color: var(--teal);
}

body.alt-theme .mobile-menu {
    background-color: var(--cream);
}

body.alt-theme .close-menu {
    color: var(--teal);
}

body.alt-theme .mobile-menu a {
    color: var(--teal);
    border-bottom-color: rgba(30, 32, 96, 0.2);
}

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

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Roboto Slab', serif;
    background-color: var(--cream);
    color: var(--brown);
    line-height: 1.6;
    transition:
        --teal 1.5s ease,
        --teal-dark 1.5s ease,
        --mustard 1.5s ease,
        --coral 1.5s ease,
        --cream 1.5s ease,
        --brown 1.5s ease,
        --red-accent 1.5s ease;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.lang-en [data-lang="it"],
.lang-it [data-lang="en"] {
    display: none !important;
}

/* Navigation */
nav {
    background-color: var(--red-accent);
    padding: 0 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 8px solid var(--mustard);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    height: 70px;
    transition: background-color 1.5s ease;
}

.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    align-items: center;
    height: 100%;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    transition: color 0.3s;
    text-transform: uppercase;
    padding: 0 5px;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--mustard);
}

.lang-switcher {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lang-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 26px;
    cursor: pointer;
    flex-shrink: 0;
    align-self: center;
}

.lang-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.lang-slider {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 26px;
    transition: background-color 0.35s;
}

.lang-slider::before {
    content: '🇬🇧';
    position: absolute;
    font-size: 17px;
    line-height: 1;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.35s;
}

.lang-switch input:checked + .lang-slider::before {
    content: '🇮🇹';
    transform: translateX(24px) translateY(-50%);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    padding: 0;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu Off-Canvas */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--red-accent);
    z-index: 999;
    transition: left 0.3s ease, background-color 1.5s ease;
    overflow-y: auto;
    padding-top: 80px;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
}

.close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
}

.mobile-menu a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.mobile-menu a:hover {
    color: var(--mustard);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle, var(--teal) 0%, var(--teal-dark) 100%);
    color: var(--white);
    padding: 100px 0 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('../../media/miscellaneous/stardust.png');
    opacity: 0.2;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.section-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
}

.section-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    border: 8px solid var(--mustard);
    overflow: hidden;
    background-color: var(--teal-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 2rem;
}

.section-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--yellow-accent);
    text-shadow: 3px 3px 0px var(--teal-dark);
}

.hero-title-box {
    padding: 0.5rem 1rem;
    margin-bottom: 2rem;
    display: inline-block;
}

.hero-title-box p {
    font-family: 'Roboto Slab', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--cream);
    margin: 0;
    display: inline;
    text-transform: uppercase;
}

/* Sections */
section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-full-width-container {
    width: 100%;
    background-color: var(--teal-dark);
    margin: 0;
    padding: 0;
}

.testimonials-bg-container {
    background-image: linear-gradient(rgba(0, 51, 51, 0.5), rgba(0, 51, 51, 0.5)), url('../../media/testimonials/BackGround.avif');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

.section-full-width {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
    color: var(--white);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--teal);
    display: inline-block;
    padding: 0 1rem;
    background-color: var(--cream);
    position: relative;
    z-index: 1;
}

.section-full-width .section-title h2 {
    background-color: var(--teal-dark);
    color: var(--white);
}

.testimonials-bg-container .section-title h2 {
    background-color: transparent;
}

.testimonials-bg-container .section-title::after {
    display: none;
}

.title-divider-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.title-divider-line {
    flex: 1;
    max-width: 220px;
    height: 2px;
    background-color: var(--mustard);
}

.contact-footer .section-title h2 {
    color: var(--yellow-accent);
    background-color: var(--teal-dark);
}

.section-title::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--mustard);
    z-index: 0;
}

.section-subtitle {
    font-family: 'Special Elite', cursive;
    color: var(--coral);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border: 1px solid var(--gray-light);
    border-left: 10px solid var(--teal);
    position: relative;
    transition: transform 0.3s;
    box-shadow: 5px 5px 0px var(--mustard);
}

.service-card:hover {
    transform: translate(-5px, -5px);
    box-shadow: 10px 10px 0px var(--mustard);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--mustard);
    margin-bottom: 1rem;
    display: block;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--teal);
    font-size: 1.2rem;
}

/* Appointments (Cariche) */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255,255,255,0.1);
    border: 2px solid var(--mustard);
    color: var(--white);
    padding: 0.7rem 1.5rem;
    cursor: pointer;
    font-family: 'Roboto Slab', serif;
    font-size: 0.9rem;
    transition: all 0.3s;
    text-transform: uppercase;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--mustard);
    color: var(--teal);
}

.appointments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(450px, 100%), 1fr));
    gap: 1.5rem;
}

.appointment-item {
    background-color: var(--teal);
    color: var(--white);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 2px solid var(--mustard);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.appointment-item.hidden {
    display: none;
}

.appointment-logo {
    width: 80px;
    height: 80px;
    background: var(--white);
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--mustard);
}

.appointment-logo img {
    max-width: 100%;
    max-height: 100%;
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.appointment-item:hover .appointment-logo img {
    filter: grayscale(0%);
}

.appointment-info {
    flex-grow: 1;
}

.appointment-info h4 {
    font-family: 'Roboto Slab', serif;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    color: var(--white);
}

.appointment-info h5 {
    font-family: 'Special Elite', cursive;
    color: var(--coral);
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.appointment-role {
    font-size: 0.9rem;
    font-weight: 700;
    display: none;
}

.lang-it .appointment-item.active .appointment-role[data-lang="it"] {
    display: block !important;
    margin-top: 10px;
    color: var(--mustard); /* Colore senape per risaltare sul teal */
}

.lang-en .appointment-item.active .appointment-role[data-lang="en"] {
    display: block !important;
    margin-top: 10px;
    color: var(--mustard);
}

.appointment-item.active {
    border-color: var(--white);
    background-color: var(--teal-dark);
}

.appointment-status {
    font-family: 'Special Elite', cursive;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.status-active { background-color: var(--mustard); color: var(--teal); }
.status-past { background-color: #666; color: var(--white); }

/* Long Lists */
.long-lists-container {
    background: var(--white);
    padding: 3rem;
    border: 2px dashed var(--teal);
    text-align: center;
}

.long-lists-list {
    margin-top: 2rem;
}

.long-lists-tag {
    background: var(--cream);
    padding: 0.5rem 1rem;
    border: 1px solid var(--mustard);
    font-family: 'Special Elite', cursive;
    font-size: 0.9rem;
    transition: all   0.3s;
    cursor: pointer;
}

.long-lists-tag:hover {
    background: var(--teal);
    color: var(--white);
}

.long-lists-tag a {
    color: inherit;
    text-decoration: none;
}

.section-full-width .long-lists-tag {
    color: var(--teal-dark);
}

.section-full-width .long-lists-tag:hover {
    color: var(--white);
}

/* Testimonials Slider */
.testimonials-slider {
    background-color: var(--coral);
    color: var(--white);
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 10px 10px 0px var(--brown);
}

.testimonial-slide {
    display: none;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.5s;
}

.testimonial-slide.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.testimonial-text {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 2rem;
    position: relative;
}

.testimonial-text::before {
    content: "\f10d";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 3rem;
    position: absolute;
    top: -2rem;
    left: -2rem;
    opacity: 0.2;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.testimonial-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 3px solid var(--mustard);
    overflow: hidden;
}

.testimonial-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-meta h4 {
    font-size: 1.1rem;
    color: var(--mustard);
}

.author-meta p {
    font-size: 0.8rem;
    opacity: 0.8;
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    border: none;
}

.slider-dot.active {
    background: var(--mustard);
}

/* Curriculum Timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--mustard);
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 4rem;
    position: relative;
    width: 50%;
    padding: 0 3rem;
}

.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; }

.timeline-dot {
    position: absolute;
    top: 0;
    width: 30px;
    height: 30px;
    background-color: var(--teal);
    border: 4px solid var(--mustard);
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot { right: -15px; }
.timeline-item:nth-child(even) .timeline-dot { left: -15px; }

.timeline-content {
    background: var(--white);
    padding: 1.5rem;
    border: 1px solid var(--gray-light);
    box-shadow: 5px 5px 0px var(--teal);
}

.timeline-date {
    font-family: 'Special Elite', cursive;
    color: var(--coral);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.timeline-content h3 {
    color: var(--teal);
    margin-bottom: 0.5rem;
}

.details-btn {
    background: none;
    border: 1px solid var(--teal);
    color: var(--teal);
    padding: 0.3rem 0.8rem;
    margin-top: 1rem;
    cursor: pointer;
    font-family: 'Special Elite', cursive;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.details-btn:hover {
    background: var(--teal);
    color: var(--white);
}

.details-content {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--gray-light);
    font-size: 0.9rem;
    text-align: left;
}


/* Music & Travel grouped lists (shared) */
.music-category {
    margin-bottom: 3rem;
}

.tag-group-buttons {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

div[id^="music-"], div[id^="travel-"], div[id^="clients-"], div[id^="quotes-"] {
    display: none !important;
}

div[id^="music-"].active, div[id^="travel-"].active, div[id^="clients-"].active {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 15px !important;
    height: auto !important;
    padding: 20px 0 !important;
}

div[id^="quotes-"].active {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 2rem !important;
    padding: 20px 0 !important;
}

.group-toggle-btn {
    background: var(--teal);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    font-family: 'Roboto Slab', serif;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
    text-transform: uppercase;
}

.group-toggle-btn:hover {
    background: var(--coral);
}

.group-toggle-btn.active {
    background: var(--coral) !important;
    transform: scale(1.05);
}

/* Citazioni: stile identico ai filter-btn della sezione Cariche */
#citazioni .tag-group-buttons {
    background: var(--teal);
    padding: 1.5rem 2rem;
    margin-bottom: 0.5rem;
}
#citazioni .group-toggle-btn {
    background: rgba(255,255,255,0.1);
    border: 2px solid var(--mustard);
    color: var(--white);
    font-weight: normal;
}
#citazioni .group-toggle-btn:hover,
#citazioni .group-toggle-btn.active {
    background: var(--mustard) !important;
    color: var(--teal) !important;
    transform: none !important;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem; /* Aumentato un po' per far respirare l'effetto ombra */
    max-width: 1200px;
    margin: 3rem auto 0;
}

.book-card {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 5px; /* Stesso arrotondamento delle citazioni */
    border: 1px solid var(--mustard);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 150px;
    box-shadow: 5px 5px 0px var(--mustard); 
    position: relative;
}

.book-title {
    font-style: italic;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.book-author {
    font-family: 'Special Elite', cursive;
    font-size: 0.85rem;
    color: var(--mustard);
    text-align: right;
}

/* Quotes Section */
.quotes-container {
    display: block;
    margin-top: 2rem;
}

.quote-card {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 5px;
    position: relative;
    box-shadow: 5px 5px 0px var(--mustard);
}

.quote-text {
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.quote-author {
    font-family: 'Special Elite', cursive;
    font-size: 0.85rem;
    color: var(--mustard);
    text-align: right;
}

/* Contact Section */
.contact-footer-container {
    width: 100%;
    background-color: var(--teal-dark);
    border-top: 8px solid var(--mustard);
}

.contact-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--white);
}

.contact-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.contact-box {
    background: rgba(255,255,255,0.05);
    padding: 2rem;
    border: 1px solid var(--mustard);
    min-width: 250px;
    transition: transform 0.3s;
}

.contact-box:hover {
    transform: translateY(-10px);
    background: rgba(255,255,255,0.1);
}

.contact-box i {
    font-size: 2.5rem;
    color: var(--mustard);
    margin-bottom: 1rem;
}

.contact-box a {
    color: var(--mustard);
    text-decoration: none;
    font-weight: 700;
}

.email-obfuscated {
    cursor: pointer;
    font-weight: 700;
    color: var(--mustard);
}

.contact-intro {
    font-style: italic;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.copyright {
    font-family: 'Special Elite', cursive;
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 2rem;
}

.powered-by a {
    color: var(--mustard);
    text-decoration: none;
    font-weight: 700;
}

.powered-by a:hover {
    text-decoration: underline;
}

.claude-logo {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    vertical-align: middle;
}

.cookie-consent {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--teal-dark);
    color: var(--white);
    border-top: 4px solid var(--mustard);
    padding: 1.2rem 2rem;
    z-index: 1100;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);
}

.cookie-consent p {
    margin: 0;
    font-size: 0.9rem;
    max-width: 600px;
}

.cookie-consent-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-consent-buttons button {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--mustard);
    cursor: pointer;
    transition: all 0.3s;
}

.cookie-consent-buttons button[onclick="acceptCookies()"] {
    background: var(--mustard);
    color: var(--teal-dark);
}

.cookie-consent-buttons button[onclick="rejectCookies()"] {
    background: transparent;
    color: var(--white);
}

.cookie-consent-buttons button:hover {
    opacity: 0.85;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* background-attachment: fixed è inaffidabile/sfocato su molti browser mobili */
    .testimonials-bg-container {
        background-attachment: scroll;
    }

    /* Navigazione e Header */
    .hamburger {
        display: flex;
        position: absolute;
        left: 2rem;
    }

    .nav-links {
        display: none;
    }

    .lang-switcher {
        position: absolute;
        right: 2rem;
    }

    /* Su mobile: prima il tema, poi la lingua */
    .theme-switch {
        order: -1;
    }

    .mobile-menu {
        display: block;
    }

    .hero h1 { 
        font-size: 2.5rem; 
    }

    .hero-title-box p { 
        font-size: 0.75rem; 
    }

    /* Timeline (Curriculum) - Fix Indentazione e Sbordamento */
    .timeline::before { 
        left: 20px !important; 
    }

    .timeline-item { 
        width: 100% !important; 
        left: 0 !important;           /* Reset fondamentale per evitare lo sbordamento */
        right: auto !important;
        padding-left: 60px !important; /* Spazio per la linea e i pallini */
        padding-right: 20px !important;
        text-align: left !important;
        margin-bottom: 2rem;
    }

    .timeline-dot { 
        left: 11px !important;         /* Centra il pallino sulla linea a 20px */
    }
}

/* Theme toggle switch (stile iPhone) */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
    align-self: center;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.theme-slider {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1.5px solid #00bcd4;
    border-radius: 24px;
    transition: background-color 0.35s, border-color 0.35s;
}

.theme-slider::before {
    content: '';
    position: absolute;
    width: 17px;
    height: 17px;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #00bcd4;
    border-radius: 50%;
    transition: transform 0.35s, background-color 0.35s;
}

.theme-switch input:checked + .theme-slider {
    background-color: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
}

.theme-switch input:checked + .theme-slider::before {
    transform: translateX(18px) translateY(-50%);
    background-color: #d4af37;
}

/* Stile base per gli elementi che devono apparire */
.reveal {
    opacity: 0;
    transform: translateY(30px); /* Parte leggermente più in basso */
    transition: all 0.8s ease-out; /* Velocità dell'animazione */
}

/* Classe che verrà aggiunta via JavaScript quando scorri */
.reveal.active {
    opacity: 1;
    transform: translateY(0); /* Torna nella posizione originale */
}

@media (min-width: 769px) {
    .theme-switch {
        position: absolute;
        left: 2rem;
        top: 50%;
        transform: translateY(-50%);
    }
}

/* Footer links (Privacy / Cookies) */
.footer-links {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--mustard);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-link-sep {
    margin: 0 0.8rem;
    opacity: 0.6;
}

/* Privacy pop-up */
.privacy-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1200;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.privacy-modal.open {
    display: flex;
}

.privacy-box {
    position: relative;
    background: var(--cream);
    color: var(--brown);
    max-width: 760px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 2.5rem 2.5rem 2rem;
    border-top: 8px solid var(--mustard);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-size: 0.92rem;
}

.privacy-box h2 {
    color: var(--teal);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    padding-right: 2rem;
}

.privacy-box h3 {
    color: var(--teal);
    font-size: 1rem;
    margin: 1.5rem 0 0.4rem;
}

.privacy-box ul {
    padding-left: 1.3rem;
}

.privacy-box li {
    margin-bottom: 0.4rem;
}

.privacy-box a,
.privacy-email {
    color: var(--teal);
    font-weight: 700;
}

.privacy-email {
    cursor: pointer;
}

.privacy-box code {
    font-size: 0.85rem;
}

.privacy-updated {
    margin-top: 1.5rem;
    font-family: 'Special Elite', cursive;
    font-size: 0.8rem;
    opacity: 0.7;
}

.privacy-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--teal);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .privacy-box {
        padding: 2rem 1.2rem 1.5rem;
    }
}
