/* ==========================================================================
   ITALY INTERNET GUIDE - DESIGN SYSTEM & MAIN STYLES
   Warm Italian Flag Palette | Animated BG | 3D Perspective | Bug-Free
   ========================================================================== */

:root {
    /* Color Palette - Light & Warm Theme */
    --bg-light: #f7faf6;
    --bg-light-warm: #edf5ee;
    --bg-card: #ffffff;

    /* Italian Flag Primary Colors */
    --italian-green: #009246;
    --italian-green-dark: #006830;
    --italian-green-light: #e6f5ed;
    --italian-green-glow: rgba(0, 146, 70, 0.22);

    --italian-red: #CE2B37;
    --italian-red-dark: #9a0007;
    --italian-red-light: #fde8e8;
    --italian-red-glow: rgba(206, 43, 55, 0.2);

    --italian-gold: #f59e0b;
    --italian-gold-light: #fffbeb;

    --accent-cyan: #0284c7;
    --accent-cyan-light: #e0f2fe;

    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-light: #ffffff;

    /* Fonts */
    --font-fa: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-en: 'Inter', system-ui, sans-serif;

    /* Shadows */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 30px rgba(0, 80, 40, 0.08);
    --shadow-lg: 0 20px 45px rgba(0, 80, 40, 0.13), 0 8px 16px rgba(0,0,0,0.05);
    --shadow-3d: 0 15px 35px rgba(0, 146, 70, 0.16), 0 5px 15px rgba(0,0,0,0.07);
    --shadow-glow: 0 0 35px rgba(0, 146, 70, 0.28);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-3d: transform 0.35s ease, box-shadow 0.35s ease;
}

/* ---- Global Reset ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    direction: rtl;
    text-align: right;
    scroll-behavior: smooth;
    font-size: 16px;
    color: var(--text-primary);
    font-family: var(--font-fa);
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    background: linear-gradient(135deg, #f0f9f4 0%, #fafcfa 40%, #fff5f5 70%, #f0f9f4 100%);
    background-size: 400% 400%;
    animation: bgShift 18s ease infinite;
}

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

/* ---- Animated Background Particles ---- */
.animated-bg-particles {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
    animation: floatParticle linear infinite;
}

.p1 { width: 350px; height: 350px; background: var(--italian-green); top: -100px; right: -80px; animation-duration: 25s; animation-delay: 0s; }
.p2 { width: 250px; height: 250px; background: var(--italian-red); bottom: 10%; left: -60px; animation-duration: 30s; animation-delay: -8s; }
.p3 { width: 180px; height: 180px; background: var(--italian-green); top: 40%; right: 5%; animation-duration: 22s; animation-delay: -4s; }
.p4 { width: 120px; height: 120px; background: var(--italian-gold); top: 20%; left: 20%; animation-duration: 18s; animation-delay: -12s; }
.p5 { width: 200px; height: 200px; background: var(--italian-red); top: 60%; right: 30%; animation-duration: 28s; animation-delay: -6s; }
.p6 { width: 90px;  height: 90px;  background: var(--italian-green); bottom: 25%; left: 40%; animation-duration: 20s; animation-delay: -15s; }
.p7 { width: 300px; height: 300px; background: var(--italian-green); top: 75%; right: -50px; animation-duration: 35s; animation-delay: -3s; }
.p8 { width: 140px; height: 140px; background: var(--italian-gold); top: 10%; left: 60%; animation-duration: 24s; animation-delay: -10s; }

@keyframes floatParticle {
    0%   { transform: translateY(0px) rotate(0deg) scale(1); }
    33%  { transform: translateY(-40px) rotate(120deg) scale(1.05); }
    66%  { transform: translateY(20px) rotate(240deg) scale(0.95); }
    100% { transform: translateY(0px) rotate(360deg) scale(1); }
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--italian-green); }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 { font-weight: 800; line-height: 1.3; color: var(--text-primary); }

.latin-text { direction: ltr; display: inline-block; font-family: var(--font-en); }
.price-tag  { font-family: var(--font-en); direction: ltr; font-weight: 800; }

/* ---- Layout ---- */
.container { width: 100%; max-width: 1340px; margin: 0 auto; padding: 0 1.5rem; }

/* Ensure all content is above particles */
nav, header, main, footer, section {
    position: relative;
    z-index: 1;
}

.section { padding: 5.5rem 0; position: relative; }

.section-header { text-align: center; max-width: 820px; margin: 0 auto 3.5rem auto; }

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.3rem;
    background: var(--italian-green-light);
    border: 1px solid rgba(0,146,70,0.25);
    border-radius: var(--radius-full);
    color: var(--italian-green);
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(0,146,70,0.09);
}

/* Animated pulsing tag for special sections */
.animated-tag {
    animation: tagPulse 3s ease-in-out infinite;
}

@keyframes tagPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(0,146,70,0.09); }
    50%       { box-shadow: 0 4px 22px rgba(0,146,70,0.32); transform: scale(1.03); }
}

.section-title {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.8; }

/* ---- Italian Tricolor Top Bar (animated shimmer) ---- */
.italian-tricolor-bar {
    height: 5px;
    width: 100%;
    background: linear-gradient(90deg,
        #009246 0%, #009246 33.3%,
        #ffffff 33.3%, #ffffff 66.6%,
        #CE2B37 66.6%, #CE2B37 100%
    );
    background-size: 200% 100%;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1100;
    animation: tricolorShimmer 4s linear infinite;
}

@keyframes tricolorShimmer {
    0%   { background-position: 0% 0%; }
    100% { background-position: -200% 0%; }
}
