/**
 * Main Stylesheet
 * Italia Delight Theme
 */

/* ===== Reset & Base Styles ===== */
*,
*::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: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text-dark);
    background-color: var(--color-bg-white);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin: 0 0 var(--spacing-md) 0;
}

a {
    color: var(--color-brand-red);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-brand-red-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Layout Utilities ===== */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

.content-width {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* ===== Flexbox Utilities ===== */
.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

.justify-end {
    justify-content: flex-end;
}

/* ===== Grid Utilities ===== */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ===== Spacing Utilities ===== */
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

.space-x-4 > * + * { margin-left: 1rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-x-8 > * + * { margin-left: 2rem; }

.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.pt-4 { padding-top: 1rem; }
.pt-8 { padding-top: 2rem; }
.pb-6 { padding-bottom: 1.5rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-12 { margin-top: 3rem; }
.mt-20 { margin-top: 5rem; }

/* ===== Typography Utilities ===== */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-4xl { font-size: var(--font-size-4xl); }
.text-5xl { font-size: var(--font-size-5xl); }

.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }
.font-extrabold { font-weight: var(--font-weight-extrabold); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ===== Display Utilities ===== */
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }

/* ===== Border Utilities ===== */
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

.border { border: 1px solid var(--color-border-light); }
.border-t { border-top: 1px solid var(--color-border-light); }
.border-b { border-bottom: 1px solid var(--color-border-light); }

/* ===== Shadow Utilities ===== */
.shadow-sm { box-shadow: var(--shadow-sm); }
.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); }

/* ===== Position Utilities ===== */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.top-0 { top: 0; }
.z-50 { z-index: 50; }

/* ===== Size Utilities ===== */
.w-full { width: 100%; }
.w-10 { width: 2.5rem; }
.w-8 { width: 2rem; }
.w-6 { width: 1.5rem; }
.w-5 { width: 1.25rem; }
.w-4 { width: 1rem; }

.h-full { height: 100%; }
.h-96 { height: 24rem; }
.h-56 { height: 14rem; }
.h-48 { height: 12rem; }
.h-8 { height: 2rem; }
.h-6 { height: 1.5rem; }
.h-5 { height: 1.25rem; }
.h-4 { height: 1rem; }
.h-1 { height: 0.25rem; }

/* ===== Overflow Utilities ===== */
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }

/* ===== Transform Utilities ===== */
.transition-all { transition: var(--transition-all); }
.transition-colors { transition: color var(--transition-normal), background-color var(--transition-normal); }
.transition-transform { transition: transform var(--transition-normal); }

.hover\:scale-110:hover {
    transform: scale(1.1);
}

.hover\:-translate-y-1:hover {
    transform: translateY(-0.25rem);
}

.hover\:shadow-2xl:hover {
    box-shadow: var(--shadow-2xl);
}

/* ===== Text Utilities ===== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Background Utilities ===== */
.bg-white { background-color: #ffffff; }

/* ===== Object Fit ===== */
.object-cover { object-fit: cover; }

/* ===== Group Hover Effects ===== */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.group:hover .group-hover\:text-brand-red {
    color: var(--color-brand-red);
}

/* ===== Prose (Content Styling) ===== */
.prose {
    max-width: 65ch;
}

.prose p {
    margin-bottom: 1.25em;
}

.prose h2,
.prose h3,
.prose h4 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

.prose ul,
.prose ol {
    margin-left: 1.5em;
    margin-bottom: 1.25em;
}

.prose li {
    margin-bottom: 0.5em;
}

.prose img {
    margin: 1.5em 0;
    border-radius: var(--radius-lg);
}

.prose a {
    color: var(--color-brand-red);
    text-decoration: underline;
}

.prose-lg {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
}
