/* =============================================================================
   STILE VETRINA AZIENDALE FARMACEUTICA - AUTOREVOLE E AFFIDABILE
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;450;500;600;700&display=swap');

:root {
    /* Palette Aziendale Farmaceutica */
    --brand-blue: #1d4ed8;
    /* Blu istituzionale */
    --brand-blue-light: #3b82f6;
    --brand-grey: #1f2937;
    /* Grigio antracite */
    --grey-light: #f8fafc;
    /* Sfondo elegante */
    --white: #ffffff;
    --text-dark: #111827;
    --text-medium: #374151;
    --text-light: #6b7280;
    --border-light: #e5e7eb;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;

    /* Shadows minimal */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.65;
    color: var(--text-dark);
    background-color: var(--grey-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================================================================
   TYPOGRAPHY ISTITUZIONALE
   ============================================================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--brand-grey);
}

h3 {
    font-size: 1.25rem;
    color: var(--brand-blue);
}

h4,
h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
    font-weight: 500;
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-medium);
}

.lead {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* =============================================================================
   NAVBAR ISTITUZIONALE
   ============================================================================= */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-blue) !important;
    letter-spacing: -0.025em;
}

.navbar-brand span:first-child {
    color: var(--brand-blue);
}

.navbar-brand span:last-child {
    color: var(--success);
}

.navbar-nav .nav-link {
    color: var(--text-medium) !important;
    font-weight: 500;
    padding: 0.75rem 1.25rem !important;
    margin: 0 0.125rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--brand-blue) !important;
    background-color: rgba(30, 64, 175, 0.04);
}

.navbar .btn {
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

/* =============================================================================
   HEADER BANNER DISCLAIMER
   ============================================================================= */
.header-banner {
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.header-banner .container {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

/* =============================================================================
   HERO SECTION ISTITUZIONALE
   ============================================================================= */
.hero-section {
    padding: 5rem 0 4rem;
    background: var(--white);
    text-align: center;
}

.hero-section h1 {
    font-weight: 700;
    color: var(--brand-grey);
    margin-bottom: 1.5rem;
}

.hero-section .lead {
    font-size: 1.25rem;
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* =============================================================================
   CARDS ISTITUZIONALI MINIMAL
   ============================================================================= */
.card {
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-light);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-light);
    padding: 1.5rem 2rem;
    border-radius: 0.75rem 0.75rem 0 0;
}

.card-header h3,
.card-header h4 {
    color: var(--brand-blue);
    margin: 0;
    font-weight: 600;
}

.card-body {
    padding: 2rem;
}

/* =============================================================================
   TABELLE AZIENDALI
   ============================================================================= */
.table-container {
    background: var(--white);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.table {
    margin: 0;
    font-size: 0.95rem;
}

.table thead th {
    background: var(--brand-blue);
    color: white;
    border: none;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-light);
}

.table tbody tr:hover {
    background-color: rgba(30, 64, 175, 0.02);
}

.table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
}

/* =============================================================================
   BUTTONS AZIENDALI
   ============================================================================= */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.75rem 1.75rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--brand-blue-light);
    border-color: var(--brand-blue-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

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

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

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

/* =============================================================================
   ALERTS ISTITUZIONALI
   ============================================================================= */
.alert {
    border: none;
    border-radius: 0.75rem;
    border-left: 4px solid;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

.alert-primary {
    background-color: #eff6ff;
    border-left-color: var(--brand-blue);
    color: var(--brand-blue);
}

.alert-success {
    background-color: #f0fdf4;
    border-left-color: var(--success);
    color: var(--success);
}

.alert-warning {
    background-color: #fef3c7;
    border-left-color: var(--warning);
    color: var(--warning);
}

.alert-danger {
    background-color: #fef2f2;
    border-left-color: var(--danger);
    color: var(--danger);
}

/* =============================================================================
   FOOTER ISTITUZIONALE
   ============================================================================= */
footer {
    background-color: var(--brand-grey);
    color: #9ca3af;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

footer h5 {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

footer .list-unstyled a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

footer .list-unstyled a:hover {
    color: var(--brand-blue-light);
}

/* =============================================================================
   CALCOLATORI MINIMAL
   ============================================================================= */
.calcolatore {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.form-control {
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

#risultatoBMI,
#risultatoPF {
    border-radius: 0.75rem;
    padding: 2rem;
    font-weight: 600;
    text-align: center;
}

/* =============================================================================
   COOKIE BANNER MINIMAL
   ============================================================================= */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem 2rem;
    z-index: 9999;
}

.cookie-settings-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--brand-blue);
    color: white;
    border: none;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    z-index: 1000;
}

/* =============================================================================
   RESPONSIVE OTTIMIZZATO
   ============================================================================= */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--white);
        border-radius: 0.75rem;
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: var(--shadow-md);
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0 2rem;
    }

    .card-body {
        padding: 1.5rem;
    }
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */
.text-brand-blue {
    color: var(--brand-blue) !important;
}

.bg-brand-grey {
    background-color: var(--brand-grey) !important;
}

.border-brand-blue {
    border-color: var(--brand-blue) !important;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}