/* ============================================
   DATAGESTIO - Sito di Presentazione
   ============================================ */

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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --light: #f1f5f9;
    --lighter: #f8fafc;
    --white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15);

    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

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

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

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

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

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

.btn-outline {
    background: transparent;
    color: var(--dark);
    border-color: var(--light);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

.btn-white:hover {
    background: var(--lighter);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.3);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

/* ============================================
   Header
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    padding-bottom: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dark);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    transition: var(--transition);
}

.nav a:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 160px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero h1 {
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Section Styles
   ============================================ */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header h2 {
    margin-bottom: 16px;
    color: var(--dark);
}

.section-header p {
    color: var(--secondary);
    font-size: 1.15rem;
}

/* ============================================
   Platform Section
   ============================================ */
.platform {
    padding: 100px 0;
    background: var(--lighter);
}

.portals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.portal-card {
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary);
}

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

.portal-internal { border-top-color: #2563eb; }
.portal-public { border-top-color: #10b981; }
.portal-providers { border-top-color: #f59e0b; }
.portal-me { border-top-color: #8b5cf6; }

.portal-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.portal-card h3 {
    margin-bottom: 12px;
    color: var(--dark);
}

.portal-card > p {
    color: var(--secondary);
    margin-bottom: 20px;
}

.portal-card ul {
    list-style: none;
}

.portal-card li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: var(--secondary);
    font-size: 0.95rem;
}

.portal-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* ============================================
   Features Section
   ============================================ */
.features {
    padding: 100px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--light);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    margin-bottom: 12px;
    color: var(--dark);
}

.feature-card p {
    color: var(--secondary);
    font-size: 0.95rem;
}

/* ============================================
   Solutions Section
   ============================================ */
.solutions {
    padding: 100px 0;
    background: var(--dark);
    color: var(--white);
}

.solutions .section-header h2 {
    color: var(--white);
}

.solutions .section-header p {
    color: rgba(255,255,255,0.7);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.solution-card {
    padding: 40px;
    border-radius: var(--radius-xl);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}

.solution-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}

.solution-card h3 {
    color: var(--white);
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.solution-card p {
    color: rgba(255,255,255,0.7);
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
}

.cta h2 {
    margin-bottom: 16px;
}

.cta > .container > p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.cta-actions {
    margin-bottom: 24px;
}

.cta-info {
    opacity: 0.8;
}

.cta-info a {
    color: var(--white);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 12px;
}

.footer-brand .logo-icon {
    background: rgba(255,255,255,0.1);
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-column h4 {
    color: var(--white);
    margin-bottom: 16px;
}

.footer-column a {
    display: block;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    padding: 6px 0;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--white);
}

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .portals-grid {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        box-shadow: var(--shadow-lg);
    }

    .nav.active {
        display: flex;
    }

    .header-actions .btn-outline,
    .header-actions .btn-primary {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        padding: 140px 0 80px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

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

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
}
