/* ===== VARIABILI E RESET ===== */
:root {
    --primary-color: #2563eb;
    --secondary-color: #f97316;
    --dark-blue: #1e40af;
    --light-gray: #f3f4f6;
    --gray: #6b7280;
    --dark-gray: #374151;
    --white: #ffffff;
    --black: #111827;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== HEADER E NAVIGAZIONE ===== */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
    font-weight: 700;
}

.logo-text {
    font-size: 1.8rem;
    color: var(--primary-color);
    letter-spacing: -1px;
}

.logo-subtext {
    font-size: 0.7rem;
    color: var(--gray);
    letter-spacing: 2px;
    margin-top: -5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    font-weight: 500;
    transition: var(--transition);
    color: var(--dark-gray);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark-gray);
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-blue) 100%);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.highlight {
    color: var(--secondary-color);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin: 3rem 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===== BOTTONI ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #ea580c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--light-gray);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: 80px 0;
    background: var(--light-gray);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--black);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--black);
}

.service-card p {
    color: var(--gray);
}

/* ===== CTA SECTION ===== */
.cta {
    background: var(--dark-blue);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ===== PAGE HEADER ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-blue) 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.breadcrumb {
    opacity: 0.8;
}

/* ===== ABOUT SECTION ===== */
.about-content {
    padding: 80px 0;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--black);
}

.about-text h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.value-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: var(--border-radius);
}

.value-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.contact-info {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: var(--border-radius);
}

.contact-info h2 {
    margin-bottom: 1rem;
    color: var(--black);
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-item strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* ===== FORMS ===== */
.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--gray);
    font-size: 0.85rem;
}

.captcha-group {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.captcha-question {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-blue);
}

/* ===== ALERTS ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid var(--danger);
}

/* ===== SHOP SECTION ===== */
.shop-section {
    padding: 80px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-placeholder {
    width: 100%;
    height: 250px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-placeholder svg {
    width: 80px;
    height: 80px;
    color: var(--gray);
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    color: var(--black);
}

.product-description {
    color: var(--gray);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ===== ADMIN PANEL ===== */
.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-blue) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--black);
}

.login-box p {
    text-align: center;
    color: var(--gray);
    margin-bottom: 2rem;
}

.admin-panel {
    display: flex;
}

.admin-nav {
    width: 250px;
    background: var(--dark-blue);
    min-height: 100vh;
    color: var(--white);
    position: fixed;
}

.admin-nav-content {
    padding: 2rem 1rem;
}

.admin-nav h2 {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.admin-nav ul {
    list-style: none;
}

.admin-nav ul li {
    margin-bottom: 0.5rem;
}

.admin-nav ul li a {
    display: block;
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    color: var(--white);
}

.admin-nav ul li a:hover,
.admin-nav ul li a.active {
    background: rgba(255,255,255,0.1);
}

.admin-main {
    margin-left: 250px;
    flex: 1;
    background: var(--light-gray);
    min-height: 100vh;
}

.admin-container {
    padding: 2rem;
}

.admin-container h1 {
    margin-bottom: 2rem;
    color: var(--black);
}

/* ===== DASHBOARD ===== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 1rem;
}

.stat-card a {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== TABLES ===== */
.admin-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-table thead {
    background: var(--primary-color);
    color: var(--white);
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
}

.admin-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

.admin-table tbody tr:hover {
    background: var(--light-gray);
}

/* ===== BADGES ===== */
.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* ===== MESSAGES ===== */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid var(--gray);
}

.message-card.unread {
    border-left-color: var(--secondary-color);
    background: #fffbeb;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.message-header h3 {
    color: var(--black);
}

.message-date {
    color: var(--gray);
    font-size: 0.9rem;
}

.message-info p {
    margin-bottom: 0.5rem;
    color: var(--gray);
}

.message-content {
    margin: 1.5rem 0;
    line-height: 1.8;
}

.message-attachment {
    background: var(--light-gray);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.message-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray);
    cursor: pointer;
}

.close:hover {
    color: var(--black);
}

/* ===== FOOTER ===== */
.main-footer {
    background: var(--black);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .admin-nav {
        display: none;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}
