/* =====================================================
   ESGlog - Stylesheet Principale
   Palette: Verde (#2d9f7c) / Blu (#2c5aa0) / Grigio (#f8f9fa)
   Mobile-First Responsive Design
   ===================================================== */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #2d9f7c;
    --primary-blue: #2c5aa0;
    --secondary-green: #26a69a;
    --accent-blue: #4a90e2;
    --dark-gray: #333333;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --text-dark: #2d3748;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --success: #48bb78;
    --warning: #ed8936;
    --danger: #f56565;
    --gradient-green-blue: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-light);
}

/* =====================================================
   HEADER & NAVIGATION
   ===================================================== */

.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    text-decoration: none;
    color: var(--primary-green);
}

.logo h1 {
    margin: 0;
    font-size: 1.8rem;
}

.logo-highlight {
    color: var(--primary-blue);
}

/* Menu Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

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

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

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover {
    background-color: var(--light-gray);
    color: var(--primary-green);
}

.btn-login {
    color: var(--primary-blue);
}

.btn-register {
    background: var(--gradient-green-blue);
    color: var(--white) !important;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Mobile Menu */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        box-shadow: var(--shadow-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-menu.active {
        max-height: 500px;
    }

    .nav-link {
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }
}

/* =====================================================
   HERO SECTION
   ===================================================== */

.hero {
    background: var(--gradient-green-blue);
    color: var(--white);
    padding: 100px 0 80px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

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

@media (max-width: 768px) {
    .hero {
        padding: 60px 0 40px;
    }

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

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

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-green-blue);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-blue);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.btn-outline:hover {
    background-color: var(--primary-green);
    color: var(--white);
}

/* =====================================================
   MISSION SECTION
   ===================================================== */

.mission-section {
    padding: 80px 0;
    background-color: var(--white);
}

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

.mission-text h2 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}

.mission-list {
    list-style: none;
    margin: 2rem 0;
}

.mission-list li {
    padding: 0.8rem 0;
    border-left: 3px solid var(--primary-green);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.mission-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .mission-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .mission-image {
        order: -1;
    }
}

/* =====================================================
   ESG SECTION
   ===================================================== */

.esg-section {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
}

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

.esg-card {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.esg-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.esg-icon.environmental {
    background: linear-gradient(135deg, #2d9f7c, #26a69a);
}

.esg-icon.social {
    background: linear-gradient(135deg, #2c5aa0, #4a90e2);
}

.esg-icon.governance {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.stats-list {
    list-style: none;
    margin-top: 1.5rem;
}

.stats-list li {
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

/* Chart */
.digital-chart {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.digital-chart h3 {
    color: var(--primary-blue);
    margin-bottom: 2rem;
}

.chart-container {
    position: relative;
    height: 400px;
    margin: 2rem 0;
}

.chart-note {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .chart-container {
        height: 300px;
    }

    .digital-chart {
        padding: 1.5rem;
    }
}

/* =====================================================
   CTA LOGISTICA
   ===================================================== */

.cta-logistica {
    padding: 80px 0;
    background: var(--gradient-green-blue);
    color: var(--white);
    text-align: center;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* =====================================================
   REGISTRAZIONE
   ===================================================== */

.register-section {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.register-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.register-info h2 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}

.benefits-list {
    list-style: none;
    margin-top: 2rem;
}

.benefits-list li {
    padding: 0.8rem 0;
    font-size: 1.1rem;
}

.register-form-container {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.register-form h3 {
    color: var(--primary-blue);
    margin-bottom: 2rem;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(45, 159, 124, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

.checkbox-group label {
    display: flex;
    align-items: start;
    gap: 0.5rem;
    font-weight: 400;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.3rem;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-light);
}

.form-footer a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .register-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .register-form-container {
        padding: 2rem;
    }
}

/* =====================================================
   FOOTER
   ===================================================== */

.footer {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

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

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

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

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

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

.footer-col a:hover {
    color: var(--primary-green);
}

.social-links {
    display: flex;
    gap: 1rem;
}

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

/* =====================================================
   MODAL
   ===================================================== */

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

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

.modal-content {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: slideIn 0.3s ease;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.close:hover {
    color: var(--danger);
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   DASHBOARD STYLES
   ===================================================== */

.dashboard-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: calc(100vh - 70px);
}

.sidebar {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 2rem 0;
}

.sidebar-header {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-nav li {
    margin: 0.5rem 0;
}

.sidebar-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary-green);
    color: var(--white);
}

.main-content {
    padding: 3rem;
    background-color: var(--light-gray);
}

.dashboard-header {
    margin-bottom: 3rem;
}

.dashboard-header h1 {
    color: var(--primary-blue);
}

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

.dashboard-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

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

.card-title {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

/* Plans */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.plan-card {
    background-color: var(--white);
    border: 3px solid var(--border-color);
    border-radius: 15px;
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition);
}

.plan-card.featured {
    border-color: var(--primary-green);
    transform: scale(1.05);
}

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

.plan-name {
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.plan-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.plan-period {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.plan-features {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
}

.plan-features li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.plan-features li:last-child {
    border-bottom: none;
}

/* Table */
.table-container {
    overflow-x: auto;
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--light-gray);
    font-weight: 600;
    color: var(--primary-blue);
}

tr:hover {
    background-color: var(--light-gray);
}

/* Alert */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #c6f6d5;
    color: #22543d;
    border-left: 4px solid var(--success);
}

.alert-info {
    background-color: #bee3f8;
    color: #2c5282;
    border-left: 4px solid var(--primary-blue);
}

.alert-warning {
    background-color: #feebc8;
    color: #7c2d12;
    border-left: 4px solid var(--warning);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

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

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

.badge-info {
    background-color: var(--primary-blue);
    color: var(--white);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 992px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        padding: 2rem 1rem;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    h3 { font-size: 1.3rem; }

    .section-header,
    .dashboard-header {
        margin-bottom: 2rem;
    }

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

    .plan-card.featured {
        transform: scale(1);
    }
}

/* =====================================================
   ACCESSIBILITY
   ===================================================== */

:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* =====================================================
   UTILITIES
   ===================================================== */

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none;
}
