/* ==============================================
   GELATERIA CARLO — style.css
   Authentic Italian aesthetic, Pizzo inspired
   ============================================== */

:root {
    --text-color: #3f473c; /* Olive dark */
    --accent: #d87a60; /* Terracotta */
    --accent-hover: #bc654c;
    --bg-main: #fcfbfa; /* Off-white */
    --bg-sand: #f5f1eb; /* Sand */
    --pistachio: #dce8d1;
    --lemon: #fef1bc;
    --choco: #e2dcd7;
    --stracciatella: #f3f3f3;
    --berry: #fad4d8;
    --hazelnut: #f0e2ca;

    --font-head: 'Italiana', serif;
    --font-body: 'Jost', sans-serif;

    --border-radius: 200px 200px 0 0;
    --card-radius: 1.5rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

/* —————————————— TYPOGRAPHY —————————————— */
h1, h2, h3, .nav-brand, .footer-logo, .hero-text-wrapper .est {
    font-family: var(--font-head);
    font-weight: 400;
}

h1 {
    font-size: clamp(4rem, 8vw, 6.5rem);
    line-height: 1;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: #6d756b;
    margin-bottom: 1.5rem;
}

.text-white {
    color: #fff !important;
}
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

/* —————————————— BUTTONS —————————————— */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(216, 122, 96, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(216, 122, 96, 0.4);
    color: #fff;
}

/* —————————————— NAVIGATION —————————————— */
.floating-nav {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 3rem;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.nav-brand {
    font-size: 1.5rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-brand i, .nav-brand img {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 2rem;
    padding-right: 1.5rem;
    white-space: nowrap;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

/* —————————————— LANG SELECTOR & SPLASH —————————————— */
.lang-selector { position: relative; margin-left: 1rem; display: flex; align-items: center; }
.lang-btn {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 100px;
    background: rgba(255,255,255,0.7);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
    cursor: pointer;
}
.lang-btn:hover, .lang-btn.open { background: #fff; border-color: var(--accent); }
.lang-btn .fa-chevron-down {
    font-size: 0.7rem;
    transition: transform 0.25s;
}
.lang-btn.open .fa-chevron-down { transform: rotate(180deg); }

.lang-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--card-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 0.5rem;
    min-width: 140px;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.lang-dropdown.open {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.lang-option {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem; font-weight: 500;
    color: var(--text-color);
    transition: background 0.15s;
    text-decoration: none;
    font-family: var(--font-body);
}
.lang-option:hover, .lang-option.active { background: var(--bg-sand); color: var(--accent); }

.lang-selector-mobile {
    display: flex; gap: 1rem;
    margin-bottom: 2rem;
}
.lang-mobile-btn {
    background: transparent; border: 1px solid rgba(0,0,0,0.2);
    padding: 0.5rem 1rem; border-radius: 100px;
    font-size: 1rem; font-family: var(--font-body); color: var(--text-color);
    cursor: pointer;
}
.lang-mobile-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

#lang-splash {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg-main);
    display: flex; align-items: center; justify-content: center;
    pointer-events: none; opacity: 0; transition: opacity 0.25s ease;
}
#lang-splash.active { opacity: 1; pointer-events: all; }
.splash-inner { text-align: center; }
.splash-spinner {
    display: flex; gap: 8px; justify-content: center;
}
.splash-spinner span {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
    animation: bounce 0.9s ease infinite;
}
.splash-spinner span:nth-child(2) { animation-delay: 0.15s; }
.splash-spinner span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
    0%, 60%, 100% { transform: scale(1); opacity: 0.5; }
    30% { transform: scale(1.4); opacity: 1; }
}

.menu-toggle {
    display: none;
    font-size: 1.2rem;
    color: var(--text-color);
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--bg-main);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

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

.mobile-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.mobile-links a {
    font-family: var(--font-head);
    font-size: 2.5rem;
    color: var(--text-color);
}

/* —————————————— HERO SECTION —————————————— */
.hero {
    min-height: 100vh;
    display: flex;
    flex-wrap: wrap;
    background-color: var(--bg-sand);
}

.hero-left {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 4rem 4rem;
}

.hero-text-wrapper {
    max-width: 500px;
}

.hero-text-wrapper .est {
    display: block;
    font-size: 1.5rem;
    color: #6d756b;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.hero-text-wrapper p {
    font-size: 1.2rem;
    color: #6d756b;
    margin-bottom: 2.5rem;
}

.hero-right {
    flex: 1 1 50%;
    position: relative;
    padding: 6rem 4rem 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.image-arch {
    width: 100%;
    max-width: 500px;
    height: 80vh;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

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

.deco-circle {
    position: absolute;
    left: 2rem;
    bottom: 20%;
    width: 120px;
    height: 120px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 10px 20px rgba(216, 122, 96, 0.4);
    animation: rotateSlow 20s linear infinite;
    text-align: center;
}

.deco-circle span {
    font-family: var(--font-head);
    font-size: 1.8rem;
    line-height: 1;
}

.deco-circle small {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* —————————————— MARQUEE —————————————— */
.marquee-container {
    background: var(--text-color);
    color: var(--bg-main);
    padding: 1rem 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-track {
    display: inline-block;
    animation: marquee 20s linear infinite;
}

.marquee-track span {
    font-family: var(--font-head);
    font-size: 1.5rem;
    padding-right: 2rem;
}

@keyframes marquee {
    from { transform: translateX(0%); }
    to { transform: translateX(-50%); }
}

/* —————————————— GENERAL SECTIONS —————————————— */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.container-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

/* —————————————— ABOUT SECTION —————————————— */
.about-section {
    background: var(--bg-main);
}

.image-stack {
    position: relative;
    border-radius: var(--border-radius);
}

.image-stack .img-front {
    border-radius: var(--card-radius);
    z-index: 2;
    position: relative;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.image-stack .img-backdrop {
    position: absolute;
    top: -2rem;
    left: -2rem;
    width: 100%;
    height: 100%;
    background: var(--bg-sand);
    border-radius: var(--card-radius);
    z-index: 1;
}

.col-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.features-list {
    list-style: none;
    margin-top: 2rem;
}

.features-list li {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.features-list i {
    color: var(--accent);
    font-size: 1.25rem;
    background: rgba(216, 122, 96, 0.1);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* —————————————— FLAVORS SECTION —————————————— */
.flavors-section {
    background: #fff;
}

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

.flavor-card {
    padding: 3rem 2rem;
    border-radius: var(--card-radius);
    text-align: center;
    transition: transform 0.3s;
}

.flavor-card:hover {
    transform: translateY(-10px);
}

.flavor-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.flavor-card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.flavor-card p {
    font-size: 1rem;
    color: #6d756b;
}

.bg-pistachio { background: var(--pistachio); }
.bg-lemon { background: var(--lemon); }
.bg-choco { background: var(--choco); }
.bg-berry { background: var(--berry); }
.bg-stracciatella { background: var(--stracciatella); }
.bg-hazelnut { background: var(--hazelnut); }

/* —————————————— TARTUFO SECTION —————————————— */
.tartufo-section {
    background: var(--bg-sand);
}

.tartufo-frame {
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    padding: 1.5rem;
    background: #fff;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

.tartufo-frame img {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.align-center-vert {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.align-center-vert p {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
}

.align-center-vert strong {
    color: var(--accent);
}

/* —————————————— VISIT & FOOTER —————————————— */
.visit-section {
    background: var(--text-color);
    padding: 6rem 2rem;
    text-align: center;
    color: #fff;
}

.visit-content {
    max-width: 800px;
    margin: 0 auto;
}

.info-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.info-block i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.info-block h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.info-block p {
    color: rgba(255,255,255,0.7);
}

.footer-simple {
    background: #2e342b;
    color: rgba(255,255,255,0.5);
    padding: 3rem 0;
}

.footer-logo {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 1rem;
}

/* —————————————— RESPONSIVE —————————————— */
@media (max-width: 900px) {
    .container-cols {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .nav-links {
        display: none;
    }
    
    .floating-nav {
        justify-content: space-between;
        width: calc(100% - 2rem);
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero-left {
        padding: 8rem 2rem 2rem;
        flex: 1 1 100%;
    }
    
    .hero-right {
        padding: 0 2rem 4rem;
        flex: 1 1 100%;
    }
    
    .image-arch {
        height: 60vh;
    }

    .reverse-mobile .col-image {
        grid-row: 1;
    }
}
