/* ================================
   HOME PAGE STYLES
   ================================ */

/* ================================
   HERO - Full immersive Italian
   ================================ */
.hero {
    min-height: 100vh; display: flex;
    align-items: center; justify-content: center;
    text-align: center; color: white;
    position: relative; overflow: hidden;
    padding-top: 80px;
}
/* Animated gradient background */
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background: linear-gradient(-45deg, var(--verde-notte), var(--verde-bosco), #0B3D20, #122B1B);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* Radial color accents */
.hero-glow {
    position: absolute; inset: 0; z-index: 1;
    background:
        radial-gradient(ellipse at 15% 50%, rgba(0,109,59,0.4) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 40%, rgba(206,43,55,0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 90%, var(--oro-glow) 0%, transparent 40%);
    animation: glowPulse 6s ease-in-out infinite alternate;
}
@keyframes glowPulse {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}
/* Geometric pattern overlay */
.hero-pattern {
    position: absolute; inset: 0; z-index: 2;
    opacity: 0.03; pointer-events: none;
    background-image:
        repeating-linear-gradient(45deg, #fff 0px, #fff 1px, transparent 1px, transparent 18px),
        repeating-linear-gradient(-45deg, #fff 0px, #fff 1px, transparent 1px, transparent 18px);
}
/* Floating particles */
.particles { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.p {
    position: absolute; border-radius: 50%;
    animation: floatUp linear infinite;
}
@keyframes floatUp {
    0% { transform: translateY(100vh) rotate(0deg) scale(0); opacity: 0; }
    15% { opacity: 1; transform: translateY(85vh) rotate(45deg) scale(1); }
    85% { opacity: 0.8; }
    100% { transform: translateY(-10vh) rotate(360deg) scale(0.5); opacity: 0; }
}
.p:nth-child(1){width:5px;height:5px;background:var(--oro-chiaro);left:8%;animation-duration:14s;animation-delay:0s}
.p:nth-child(2){width:3px;height:3px;background:rgba(0,163,86,0.6);left:18%;animation-duration:18s;animation-delay:2s}
.p:nth-child(3){width:6px;height:6px;background:rgba(212,168,67,0.5);left:30%;animation-duration:16s;animation-delay:4s}
.p:nth-child(4){width:4px;height:4px;background:rgba(255,255,255,0.4);left:42%;animation-duration:20s;animation-delay:1s}
.p:nth-child(5){width:7px;height:7px;background:rgba(206,43,55,0.4);left:55%;animation-duration:15s;animation-delay:6s}
.p:nth-child(6){width:3px;height:3px;background:var(--oro-chiaro);left:67%;animation-duration:19s;animation-delay:3s}
.p:nth-child(7){width:5px;height:5px;background:rgba(0,163,86,0.4);left:78%;animation-duration:17s;animation-delay:8s}
.p:nth-child(8){width:4px;height:4px;background:rgba(255,255,255,0.3);left:88%;animation-duration:21s;animation-delay:5s}
.p:nth-child(9){width:6px;height:6px;background:rgba(212,168,67,0.3);left:95%;animation-duration:13s;animation-delay:7s}

/* Decorative floating circles */
.hero-decor {
    position: absolute; border-radius: 50%;
    border: 1px solid rgba(212,168,67,0.15);
    z-index: 2; pointer-events: none;
    animation: floatCircle 8s ease-in-out infinite;
}
.hero-decor:nth-child(1) { width:300px;height:300px;top:-50px;right:-80px;animation-delay:0s; }
.hero-decor:nth-child(2) { width:200px;height:200px;bottom:10%;left:-60px;animation-delay:2s; }
.hero-decor:nth-child(3) { width:150px;height:150px;top:30%;right:10%;animation-delay:4s;border-color:rgba(206,43,55,0.1); }
@keyframes floatCircle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-25px) rotate(5deg); }
}

.hero-content { position: relative; z-index: 5; max-width: 950px; padding: 2rem; }
.hero-flag {
    margin-bottom: 2.5rem; opacity: 0;
    transform: translateY(50px) scale(0.8);
    animation: heroReveal 1.2s cubic-bezier(0.16,1,0.3,1) 0.2s forwards;
    display: flex; justify-content: center; align-items: center;
}
.flag-container {
    position: relative; display: inline-flex; align-items: flex-start;
    filter: drop-shadow(0 10px 40px rgba(0,0,0,0.5)) drop-shadow(0 0 60px rgba(212,168,67,0.2));
}
/* Pole */
.flag-pole {
    width: 8px; height: 200px; flex-shrink: 0;
    background: linear-gradient(90deg, #8a6d30, #d4a843, #c9a040, #8a6d30);
    border-radius: 4px; position: relative; z-index: 3;
    box-shadow: 3px 0 15px rgba(0,0,0,0.4);
}
.flag-pole::before {
    content: ''; position: absolute; top: -12px;
    left: 50%; transform: translateX(-50%);
    width: 16px; height: 16px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--oro-chiaro), var(--oro));
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
/* SVG flag wave */
.flag-svg {
    width: 240px; height: 160px; margin-top: 10px;
    animation: flagWave 3s ease-in-out infinite;
    transform-origin: left center;
}
@keyframes flagWave {
    0% { transform: perspective(600px) rotateY(0deg) skewY(0deg); }
    25% { transform: perspective(600px) rotateY(8deg) skewY(-2deg); }
    50% { transform: perspective(600px) rotateY(0deg) skewY(0deg); }
    75% { transform: perspective(600px) rotateY(-5deg) skewY(1.5deg); }
    100% { transform: perspective(600px) rotateY(0deg) skewY(0deg); }
}
.flag-svg .wave-green,
.flag-svg .wave-white,
.flag-svg .wave-red {
    animation: waveShadow 3s ease-in-out infinite;
}
.flag-svg .wave-white { animation-delay: 0.1s; }
.flag-svg .wave-red { animation-delay: 0.2s; }
@keyframes waveShadow {
    0%, 100% { filter: brightness(1); }
    25% { filter: brightness(1.05); }
    75% { filter: brightness(0.95); }
}
.flag-sheen {
    animation: flagSheen 4s ease-in-out infinite;
}
@keyframes flagSheen {
    0%, 100% { opacity: 0; transform: translateX(-100%); }
    40% { opacity: 0.4; }
    50% { opacity: 0.4; transform: translateX(250px); }
    51% { opacity: 0; }
}
@keyframes heroReveal {
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.hero-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem; font-weight: 600;
    color: var(--oro); letter-spacing: 6px;
    text-transform: uppercase; margin-bottom: 1rem;
    opacity: 0; animation: heroReveal 1s ease 0.4s forwards;
}
.hero h1 {
    color: white; margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--oro-chiaro) 50%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: heroReveal 1s ease 0.5s forwards, textShimmer 4s linear infinite;
    opacity: 0; text-shadow: none;
}
@keyframes textShimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}
.hero .ornament {
    opacity: 0; animation: heroReveal 0.8s ease 0.7s forwards;
}
/* Flag line in hero */
.flag-line {
    display: flex; justify-content: center;
    gap: 0; margin: 0.8rem 0 1.5rem;
    opacity: 0; animation: heroReveal 0.8s ease 0.8s forwards;
}
.fl { height: 4px; width: 45px; transition: width 0.6s; }
.fl.g { background: var(--verde); }
.fl.w { background: #fff; }
.fl.r { background: var(--rosso); }
.hero:hover .fl { width: 60px; }

.hero-sub {
    font-size: 1.2rem; color: rgba(255,255,255,0.85);
    font-weight: 300; line-height: 1.9; margin-bottom: 3rem;
    opacity: 0; animation: heroReveal 1s ease 0.9s forwards;
    font-family: 'Cormorant Garamond', serif; font-style: italic;
}
.hero-sub strong { color: var(--oro-chiaro); font-weight: 600; font-style: normal; }
.cta {
    display: inline-block; padding: 18px 55px;
    background: transparent; color: var(--oro);
    text-decoration: none; border: 2px solid var(--oro);
    border-radius: 50px; font-weight: 700;
    font-size: 0.9rem; letter-spacing: 3px;
    text-transform: uppercase;
    transition: all 0.5s cubic-bezier(0.4,0,0.2,1);
    opacity: 0; animation: heroReveal 1s ease 1.1s forwards;
    position: relative; overflow: hidden;
}
.cta::before {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 0; height: 0; border-radius: 50%;
    background: var(--oro); transition: all 0.6s;
    transform: translate(-50%,-50%); z-index: -1;
}
.cta:hover::before { width: 400px; height: 400px; }
.cta:hover {
    color: var(--verde-bosco); border-color: var(--oro);
    transform: translateY(-5px);
    box-shadow: 0 20px 50px var(--oro-glow);
}

/* ================================
   PRODUCTS - Cards with 3D hover
   ================================ */
.products { padding: 120px 0; background: var(--crema); position: relative; }
.products::before {
    content: ''; position: absolute; top: 0;
    left: 0; right: 0; height: 200px;
    background: linear-gradient(180deg, var(--avorio) 0%, transparent 100%);
    pointer-events: none;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}
.product-card {
    background: white; border-radius: 8px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(212,168,67,0.12);
    position: relative;
    transition: all 0.6s cubic-bezier(0.4,0,0.2,1);
    transform-style: preserve-3d; perspective: 1000px;
}
.product-card::before {
    content: ''; position: absolute; top: 0;
    left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--verde), var(--oro), var(--rosso));
    background-size: 200% 100%;
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
    animation: none;
}
.product-card:hover::before { transform: scaleX(1); animation: gradSlide 2s linear infinite; }
@keyframes gradSlide { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }
.product-card:hover {
    transform: translateY(-15px) rotateX(2deg);
    box-shadow: 0 30px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(212,168,67,0.3);
}
.eco-badge {
    position: absolute; top: 15px; right: 15px; z-index: 5;
    background: var(--verde); color: white;
    padding: 6px 14px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0,109,59,0.3);
}
.product-img {
    width: 100%; height: 260px;
    background: linear-gradient(145deg, var(--avorio), var(--crema-scura));
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.product-img img {
    max-width: 85%; max-height: 85%; object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.product-card:hover .product-img img { transform: scale(1.08) rotate(-2deg); }
.product-img::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(255,255,255,0.5) 100%);
}
.p-accent { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; }
.product-strong .p-accent { background: linear-gradient(90deg, #E91E63, #FF4081); }
.product-heat .p-accent { background: linear-gradient(90deg, #FF6B35, #FF9800); }
.product-freeze .p-accent { background: linear-gradient(90deg, #1E88E5, #42A5F5); }
.product-cbd .p-accent { background: linear-gradient(90deg, #2E7D32, #66BB6A); }
.p-content { padding: 2rem; }
.p-content h3 { font-size: 1.4rem; color: var(--verde-bosco); margin-bottom: 0.8rem; font-style: italic; }
.p-desc { color: var(--grigio); line-height: 1.8; font-size: 0.92rem; margin-bottom: 1.2rem; }
.p-desc strong { color: var(--verde); font-weight: 600; }
.p-features { list-style: none; border-top: 1px solid var(--crema-scura); padding-top: 1.2rem; }
.p-features li {
    color: var(--testo); font-size: 0.88rem;
    margin-bottom: 0.6rem; padding-left: 1.5rem;
    position: relative; transition: transform 0.3s;
}
.p-features li:hover { transform: translateX(5px); }
.p-features li::before {
    content: '◆'; position: absolute; left: 0;
    color: var(--oro); font-size: 0.55rem; top: 5px;
}

/* ================================
   CBD SECTION
   ================================ */
.cbd-section {
    padding: 120px 0; position: relative;
    overflow: hidden; background: var(--verde-bosco);
}
.cbd-orb {
    position: absolute; border-radius: 50%;
    filter: blur(60px); z-index: 0;
    animation: orbFloat 10s ease-in-out infinite;
}
.cbd-orb:nth-child(1){width:400px;height:400px;background:rgba(0,109,59,0.2);top:-10%;right:-10%;animation-delay:0s}
.cbd-orb:nth-child(2){width:300px;height:300px;background:rgba(212,168,67,0.1);bottom:-5%;left:-5%;animation-delay:3s}
.cbd-orb:nth-child(3){width:200px;height:200px;background:rgba(206,43,55,0.08);top:40%;left:20%;animation-delay:6s}
@keyframes orbFloat {
    0%, 100% { transform: translate(0,0) scale(1); }
    33% { transform: translate(30px,-20px) scale(1.1); }
    66% { transform: translate(-20px,15px) scale(0.9); }
}
.cbd-inner { max-width: 900px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.cbd-text {
    font-size: 1.2rem; line-height: 1.9;
    color: rgba(255,255,255,0.85);
    margin-bottom: 4rem;
    font-family: 'Cormorant Garamond', serif;
}
.cbd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.cbd-card {
    background: rgba(255,255,255,0.04); padding: 2rem 1.5rem;
    border: 1px solid rgba(212,168,67,0.15); border-radius: 8px;
    transition: all 0.5s cubic-bezier(0.4,0,0.2,1);
    position: relative; overflow: hidden;
}
.cbd-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(212,168,67,0.1), transparent);
    opacity: 0; transition: opacity 0.5s;
}
.cbd-card:hover::before { opacity: 1; }
.cbd-card:hover {
    transform: translateY(-10px);
    border-color: rgba(212,168,67,0.5);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}
.cbd-card .icon {
    font-size: 2.5rem; display: block;
    margin-bottom: 1rem;
    animation: iconBounce 3s ease-in-out infinite;
}
.cbd-card:nth-child(2) .icon { animation-delay: 0.5s; }
.cbd-card:nth-child(3) .icon { animation-delay: 1s; }
.cbd-card:nth-child(4) .icon { animation-delay: 1.5s; }
@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.cbd-card h4 { font-family: 'Playfair Display', serif; color: var(--oro); font-size: 1.05rem; margin-bottom: 0.5rem; }
.cbd-card p { color: rgba(255,255,255,0.65); font-size: 0.88rem; }

/* ================================
   ECO SECTION
   ================================ */
.eco-section { padding: 120px 0; background: var(--crema-scura); position: relative; }
.eco-main-badge {
    display: inline-flex; align-items: center; gap: 1rem;
    background: var(--verde); color: white;
    padding: 1rem 2.5rem; border-radius: 50px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0,109,59,0.3);
    animation: badgeFloat 4s ease-in-out infinite;
}
@keyframes badgeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.eco-main-badge .ei { font-size: 2.2rem; }
.eco-main-badge h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; margin: 0; }
.eco-desc {
    font-size: 1.1rem; line-height: 1.9; color: var(--testo);
    margin-bottom: 4rem; max-width: 750px;
    margin-left: auto; margin-right: auto;
}
.eco-desc strong { color: var(--verde); }
.eco-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 4rem; }
.eco-card {
    background: white; padding: 2.5rem 2rem; border-radius: 8px;
    border: 1px solid rgba(0,109,59,0.1); text-align: center;
    transition: all 0.5s cubic-bezier(0.4,0,0.2,1); position: relative;
}
.eco-card::after {
    content: ''; position: absolute; bottom: 0;
    left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--verde), var(--oro));
    transform: scaleX(0); transition: transform 0.4s;
}
.eco-card:hover::after { transform: scaleX(1); }
.eco-card:hover { transform: translateY(-10px); box-shadow: 0 20px 50px rgba(0,0,0,0.1); }
.eco-card .ei { font-size: 2.5rem; display: block; margin-bottom: 1rem; }
.eco-card h4 { color: var(--verde-bosco); font-size: 1.05rem; margin-bottom: 0.6rem; font-family: 'Playfair Display', serif; }
.eco-card p { color: var(--grigio); font-size: 0.88rem; }
.eco-pledge {
    background: var(--verde); color: white;
    padding: 2rem 3rem; border-radius: 8px;
    max-width: 750px; margin: 0 auto;
    border-left: 5px solid var(--oro);
    box-shadow: 0 10px 30px rgba(0,109,59,0.2);
}
.eco-pledge strong { color: var(--oro-chiaro); }

/* HOME RESPONSIVE */
@media (max-width: 768px) {
    .product-grid, .eco-grid { grid-template-columns: 1fr; }
    .cbd-grid { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 2.5rem; }
    .hero-decor { display: none; }
}
@media (max-width: 480px) {
    .cbd-grid { grid-template-columns: 1fr; }
}
