/* ============================================
   VALLEPIANA - Modern Premium Design CSS
   ============================================ */

/* VARIABLES */
:root {
    --primary-dark: #2d5016;
    --primary-light: #4a7c25;
    --accent-warm: #d97706;
    --accent-warm-dark: #b45309;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #fafaf9;
    --bg-white: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);

    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* BUTTONS */
.btn-primary,
.btn-secondary {
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(45, 80, 22, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(45, 80, 22, 0.4);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--primary-dark);
    border: 2px solid var(--primary-dark);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-3px);
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1rem;
}

.link-btn {
    color: var(--accent-warm);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    margin-top: 0.5rem;
}

.link-btn:hover {
    color: var(--accent-warm-dark);
    transform: translateX(5px);
}

/* NAVBAR */
.navbar {
    background: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.nav-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: -5px;
}

.tagline {
    font-size: 0.75rem;
    color: var(--accent-warm);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-warm);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-dark);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* HERO SECTION */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6 0%, #fafaf9 100%);
    padding-top: 120px;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.3;
    z-index: 1;
}

.hero-pattern {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(45, 80, 22, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(217, 119, 6, 0.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    background: rgba(255, 255, 255, 0.42);
    padding: 40px 30px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.8rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--accent-warm);
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.hero-description {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* INTRO TEXT SECTION */
.intro-text {
    padding: 60px 0;
    background: var(--bg-white);
}

.intro-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.intro-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.8rem;
    line-height: 1.1;
}

.intro-subtitle {
    font-size: 1.1rem;
    color: var(--accent-warm);
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.intro-description {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.6;
}

/* SECTIONS */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 500px;
    margin: 0 auto;
}

/* CHI SIAMO SECTION */
.chi-siamo {
    background: var(--bg-light);
}

.storia-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.storia-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.anno-fondazione {
    color: var(--accent-warm);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.storia-content h3 {
    font-size: 2.2rem;
    margin-bottom: 0.25rem;
}

.highlight {
    background: linear-gradient(120deg, rgba(217, 119, 6, 0.15), rgba(45, 80, 22, 0.05));
    padding: 1.5rem;
    border-left: 4px solid var(--accent-warm);
    border-radius: 4px;
    font-style: italic;
    color: var(--text-dark);
}

.storia-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border-top: 4px solid var(--primary-dark);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2.5rem;
    font-family: var(--font-display);
    color: var(--primary-dark);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-weight: 600;
}

/* VALORI SECTION */
.valori {
    background: var(--bg-white);
}

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

.valore-card {
    background: var(--bg-light);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    border-bottom: 4px solid var(--accent-warm);
}

.valore-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-white);
}

.valore-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
}

.valore-card h3 {
    margin-bottom: 1rem;
}

.valore-card p {
    margin-bottom: 0;
}

/* PRODOTTI SECTION */
.prodotti {
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 100%);
}

.prodotti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.prodotto-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.prodotto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--accent-warm) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.prodotto-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.prodotto-card:hover::before {
    transform: scaleX(1);
}

.prodotto-img {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.prodotto-card h3 {
    margin-bottom: 0.75rem;
}

.prodotto-tag {
    display: inline-block;
    background: var(--accent-warm);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 1rem;
}

.prodotti-cta {
    text-align: center;
    padding: 2rem;
    background: var(--primary-dark);
    color: white;
    border-radius: 12px;
}

.prodotti-cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

/* CONTATTI SECTION */
.contatti {
    background: var(--bg-light);
}

.contatti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.contatto-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.contatto-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.contatto-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contatto-card p {
    margin-bottom: 1.5rem;
}

.contatti-form {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

.contatti-form h3 {
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.contatti-form button {
    width: 100%;
    margin-top: 1rem;
}

/* FOOTER */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-warm);
    font-size: 1.1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.75rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-warm);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    h2 {
        font-size: 2.2rem;
    }

    .navbar .container {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        gap: 0;
        display: none;
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .storia-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    section {
        padding: 50px 0;
    }

    .contatti-form {
        padding: 2rem;
    }

    .footer-content {
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    .valori-grid {
        grid-template-columns: 1fr;
    }

    .prodotti-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 40px 0;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* ANIMATIONS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.storia-content {
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.storia-stats {
    animation: slideInRight 0.8s ease-out 0.2s both;
}

/* MODAL POPUP */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.4s ease-out;
}

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

.modal-close {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent-warm);
    transform: scale(1.2);
}

.modal-content h2 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.modal-content > p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.modal-message {
    background: linear-gradient(135deg, rgba(45, 80, 22, 0.05) 0%, rgba(217, 119, 6, 0.05) 100%);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-warm);
}

.modal-message h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.modal-message p {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.modal-message strong {
    color: var(--accent-warm);
}

.modal-btn {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(45, 80, 22, 0.3);
}

.modal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(45, 80, 22, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}