/* ========================================
   IL DIARIO DEI PICCOLI ESPLORATORI
   Main Stylesheet
   ======================================== */

/* === VARIABILI CSS === */
:root {
    /* Colori Brand */
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-800: #92400e;
    --amber-900: #78350f;

    --teal-50: #f0fdfa;
    --teal-200: #99f6e4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;

    --orange-50: #fff7ed;
    --orange-400: #fb923c;

    /* Neutrali */
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;

    /* Spacing */
    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
    --spacing-2xl: 3rem;     /* 48px */
    --spacing-3xl: 4rem;     /* 64px */
    --spacing-4xl: 5rem;     /* 80px */

    /* Font Sizes */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-6xl: 3.75rem;     /* 60px */
    --text-7xl: 4.5rem;      /* 72px */

    /* Shadows */
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Border Radius */
    --radius-sm: 0.5rem;     /* 8px */
    --radius-md: 0.75rem;    /* 12px */
    --radius-lg: 1rem;       /* 16px */
    --radius-xl: 1.5rem;     /* 24px */
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET & BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.5;
    color: var(--gray-900);
    background-color: var(--white);
}

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

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    font-family: inherit;
    cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

/* === CONTAINER & LAYOUT === */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-4xl) 0;
}

/* === GRID SYSTEM === */
.grid {
    display: grid;
    gap: var(--spacing-xl);
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Mobile: 2 colonne */
@media (min-width: 640px) {
    .sm-grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Tablet: 2 colonne */
@media (min-width: 768px) {
    .md-grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md-grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md-grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Desktop: 3 colonne */
@media (min-width: 1024px) {
    .lg-grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lg-grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg-grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* === FLEX UTILITIES === */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-4 {
    gap: var(--spacing-md);
}

.gap-8 {
    gap: var(--spacing-xl);
}

/* === TYPOGRAPHY === */
.text-xs {
    font-size: var(--text-xs);
}

.text-sm {
    font-size: var(--text-sm);
}

.text-lg {
    font-size: var(--text-lg);
}

.text-xl {
    font-size: var(--text-xl);
}

.text-2xl {
    font-size: var(--text-2xl);
}

.text-3xl {
    font-size: var(--text-3xl);
}

.text-4xl {
    font-size: var(--text-4xl);
}

.text-6xl {
    font-size: var(--text-6xl);
}

.text-center {
    text-align: center;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-light {
    font-weight: 300;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wide {
    letter-spacing: 0.3em;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.leading-relaxed {
    line-height: 1.625;
}

/* === COLOR UTILITIES === */
.text-amber-200 {
    color: var(--amber-200);
}

.text-amber-400 {
    color: var(--amber-400);
}

.text-amber-500 {
    color: var(--amber-500);
}

.text-amber-600 {
    color: var(--amber-600);
}

.text-teal-600 {
    color: var(--teal-600);
}

.text-gray-500 {
    color: var(--gray-500);
}

.text-gray-600 {
    color: var(--gray-600);
}

.text-gray-700 {
    color: var(--gray-700);
}

.text-white {
    color: var(--white);
}

.bg-white {
    background-color: var(--white);
}

.bg-amber-50 {
    background-color: var(--amber-50);
}

.bg-amber-500 {
    background-color: var(--amber-500);
}

.bg-teal-50 {
    background-color: var(--teal-50);
}

.bg-gray-900 {
    background-color: var(--gray-900);
}

/* === SPACING UTILITIES === */
.p-4 {
    padding: var(--spacing-md);
}

.p-6 {
    padding: var(--spacing-lg);
}

.p-8 {
    padding: var(--spacing-xl);
}

.px-4 {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

.py-4 {
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
}

.py-6 {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
}

.py-8 {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

.py-12 {
    padding-top: var(--spacing-2xl);
    padding-bottom: var(--spacing-2xl);
}

.py-20 {
    padding-top: var(--spacing-4xl);
    padding-bottom: var(--spacing-4xl);
}

.mb-2 {
    margin-bottom: var(--spacing-sm);
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: var(--spacing-md);
}

.mb-6 {
    margin-bottom: var(--spacing-lg);
}

.mb-8 {
    margin-bottom: var(--spacing-xl);
}

.mb-16 {
    margin-bottom: var(--spacing-3xl);
}

.mt-4 {
    margin-top: var(--spacing-md);
}

.mt-8 {
    margin-top: var(--spacing-xl);
}

.mt-16 {
    margin-top: var(--spacing-3xl);
}

/* === SHADOW UTILITIES === */
.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.shadow-xl {
    box-shadow: var(--shadow-xl);
}

.shadow-2xl {
    box-shadow: var(--shadow-2xl);
}

/* === BORDER RADIUS UTILITIES === */
.rounded-xl {
    border-radius: var(--radius-xl);
}

.rounded-2xl {
    border-radius: var(--radius-lg);
}

.rounded-full {
    border-radius: var(--radius-full);
}

/* === TRANSITIONS === */
.transition {
    transition-property: all;
    transition-duration: var(--transition-base);
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-colors {
    transition-property: color, background-color, border-color;
    transition-duration: var(--transition-base);
}

.transition-transform {
    transition-property: transform;
    transition-duration: var(--transition-slow);
}

/* === RESPONSIVE UTILITIES === */
@media (min-width: 768px) {
    .md-text-3xl {
        font-size: var(--text-3xl);
    }

    .md-text-4xl {
        font-size: var(--text-4xl);
    }

    .md-text-6xl {
        font-size: var(--text-6xl);
    }

    .md-flex-row {
        flex-direction: row;
    }
}

@media (min-width: 1024px) {
    .lg-text-7xl {
        font-size: var(--text-7xl);
    }
}

/* === UTILITY CLASSES === */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.overflow-hidden {
    overflow: hidden;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

/* === ANIMATIONS === */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}
