/* ==============================================
   LAYOUT.CSS - Struttura e Layout (senza header/footer)
   Botanica Veneta - Tuttifiori
   ============================================== */

/* ==============================================
   1. HERO SECTION
   ============================================== */

.hero {
    margin-top: 108px; /* Account for fixed header */
    padding: var(--space-3xl) 0;
    background: var(--crema);
    position: relative;
    overflow: hidden;
}

/* Pattern botanico sottile */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 150%;
    background: radial-gradient(
        ellipse at center,
        var(--oro-caldo) 0%,
        transparent 70%
    );
    opacity: 0.03;
    transform: rotate(-15deg);
    pointer-events: none;
}

.hero-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    position: relative;
}

.hero-content h1 {
    color: var(--verde-botanico);
}

.hero-content .subtitle {
    font-size: var(--text-lg);
    font-weight: 400;
    color: var(--verde-salvia);
    margin-bottom: var(--space-xl);
    font-family: var(--font-heading);
    font-style: italic;
}

.hero-content p {
    font-size: var(--text-base);
    margin-bottom: var(--space-xl);
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 500px;
    background: linear-gradient(135deg, var(--sabbia-chiara) 0%, var(--perla) 100%);
    border-radius: var(--radius-large);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-quiet);
    font-size: var(--text-lg);
    overflow: hidden;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-visual-placeholder {
    text-align: center;
    color: var(--text-quiet);
}

/* Pattern decorativo per placeholder */
.hero-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%23D4A574" stroke-width="0.1" opacity="0.3"/></svg>');
    background-size: 200px;
    opacity: 0.5;
    pointer-events: none;
}

/* ==============================================
   2. SECTIONS LAYOUT
   ============================================== */

.section {
    padding: var(--space-3xl) 0;
    position: relative;
}

.section:nth-child(even) {
    background: var(--sabbia-chiara);
}

.section.bg-cream {
    background: var(--crema);
}

.section.bg-sand {
    background: var(--sabbia-chiara);
}

.section.bg-white {
    background: white;
}

.section-compact {
    padding: var(--space-2xl) 0;
}

.section-large {
    padding: calc(var(--space-3xl) * 1.5) 0;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    font-size: var(--text-base);
}

/* ==============================================
   3. GRID LAYOUTS
   ============================================== */

/* Grid Auto */
.grid {
    display: grid;
    gap: var(--space-xl);
}

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

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

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

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Grid specifici per contenuti */
.plants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--space-xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.business-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: var(--space-xl);
}

/* About Grid con allineamento */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.about-visual {
    height: 480px;
    background: linear-gradient(135deg, var(--perla) 0%, var(--sabbia-chiara) 100%);
    border-radius: var(--radius-large);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-quiet);
    position: relative;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

/* ==============================================
   4. LAYOUT UTILITIES
   ============================================== */

/* Content Wrapper */
.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

/* Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.split-layout.reverse {
    direction: rtl;
}

.split-layout.reverse > * {
    direction: ltr;
}

/* Sidebar Layout */
.sidebar-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--space-2xl);
}

.sidebar {
    position: sticky;
    top: calc(108px + var(--space-lg));
    height: fit-content;
}

/* Full Width Section */
.full-width {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* Overlap Layout */
.overlap-section {
    margin-top: calc(var(--space-3xl) * -1);
    position: relative;
    z-index: 10;
}

/* ==============================================
   5. PAGE WRAPPER
   ============================================== */

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
    margin-top: 108px; /* Header height */
}

/* Page Hero generico per pagine interne */
.page-hero {
    padding: var(--space-2xl) 0;
    background: linear-gradient(135deg, var(--sabbia-chiara) 0%, var(--crema) 100%);
    border-bottom: 1px solid var(--perla);
}

.page-hero h1 {
    text-align: center;
    color: var(--verde-botanico);
}

.page-hero .breadcrumbs {
    text-align: center;
    margin-top: var(--space-md);
}

/* ==============================================
   6. SCROLL ANIMATIONS TRIGGERS
   ============================================== */

.scroll-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-slide-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-slide-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ==============================================
   7. RESPONSIVE LAYOUT (non header/footer)
   ============================================== */

@media (max-width: 768px) {
    /* Hero mobile */
    .hero {
        margin-top: 80px;
        padding: var(--space-2xl) 0;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .hero-visual {
        height: 300px;
        order: -1;
    }
    
    /* Sections mobile */
    .section {
        padding: var(--space-2xl) 0;
    }
    
    .page-content {
        margin-top: 80px;
    }
    
    /* Grids mobile */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .plants-grid,
    .features-grid,
    .business-cards {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .about-grid,
    .split-layout {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .about-visual {
        height: 300px;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .sidebar-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: relative;
        top: auto;
        margin-bottom: var(--space-xl);
    }
}