/* Reset e Font Import */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #030712 0%, #0f172a 100%);
    color: #f8fafc;
    overflow-y: auto;
    min-height: 100vh;
}

/* Presentazione Container */
.presentation-container {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* Slides */
.slide {
    display: block;
    position: relative;
    width: 297mm;      /* A3 width */
    height: 420mm;     /* A3 height */
    max-width: 100%;
    margin: 10mm auto; /* space between slides, avoids extra blank pages */
    padding: 20mm;     /* inner margin; align with print padding */
    background: linear-gradient(135deg, #030712 0%, #0f172a 50%, #1e293b 100%);
    border: 3px solid #3b82f6;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
    box-sizing: border-box;
}

.slide.active {
    display: block;
}

.slide-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

/* Title Slide */
.title-slide .slide-content {
    text-align: center;
    justify-content: center;
    align-items: center;
}

.title-content {
    max-width: 800px;
}

.network-icon {
    font-size: 4rem;
    color: #3b82f6;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.title-slide h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.subtitle {
    margin-bottom: 3rem;
}

.subtitle p {
    font-size: 1.5rem;
    color: #94a3b8;
    font-weight: 300;
}

.author-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.author-info p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
}

/* Headings */
h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #3b82f6;
    display: flex;
    align-items: center;
    gap: 1rem;
}

h2 i {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #e2e8f0;
}

/* Index Grid */
.index-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
}

.index-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.index-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

.index-number {
    font-size: 2rem;
    font-weight: 700;
    color: #3b82f6;
    min-width: 60px;
    text-align: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    padding: 0.5rem;
}

.index-text h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.index-text p {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.column {
    height: 100%;
}

/* Full Width Section */
.full-width {
    width: 100%;
    margin-top: 2rem;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #e2e8f0;
}

.feature-list i {
    color: #10b981;
    font-size: 1.2rem;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

/* Tech Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.05);
}

.tech-item i {
    font-size: 2rem;
    color: #3b82f6;
}

.tech-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Architecture Diagram */
.architecture-diagram {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    margin-top: 2rem;
}

.network-layer {
    width: 100%;
    text-align: center;
}

.network-layer h3 {
    margin-bottom: 1rem;
    color: #3b82f6;
    font-size: 1.2rem;
}

.device {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.1));
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 15px;
    margin: 0 1rem;
    transition: all 0.3s ease;
    min-width: 120px;
}

.device:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
}

.device i {
    font-size: 2.5rem;
    color: #3b82f6;
}

.device span {
    font-weight: 500;
    font-size: 0.9rem;
}

.devices-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Configuration Section */
.config-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 1rem;
}

.config-section.config-large {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    margin-bottom: 1.5rem;
}

.config-section.config-large > p {
    margin-bottom: 1.5rem;
}

.config-section.config-large .code-block {
    flex: 1;
    margin-top: 1rem;
}

.config-section.config-large .code-block pre {
    font-size: 1rem;
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.config-type {
    background: #3b82f6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.code-block {
    background: #030712;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.code-block pre {
    color: #e2e8f0;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-block code {
    color: #06b6d4;
}

.config-notes h4 {
    color: #3b82f6;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.config-notes ul {
    list-style: none;
    padding-left: 0;
}

.config-notes li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    color: #94a3b8;
}

.config-notes li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: bold;
}

/* Topology Image Styles */
.topology-image {
    width: 100%;
    max-width: 100%;
    margin: 1.5rem 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;

    overflow: hidden;
}

.topology-image img {
    max-width: 100%;
    max-height: 600px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

table thead {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(99, 102, 241, 0.3));
}

table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #3b82f6;
    border-bottom: 2px solid rgba(59, 130, 246, 0.4);
    font-size: 1rem;
}

table td {
    padding: 0.875rem 1rem;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    font-size: 0.95rem;
}

table tbody tr {
    transition: all 0.3s ease;
}

table tbody tr:nth-child(odd) {
    background: rgba(59, 130, 246, 0.05);
}

table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

table tbody tr:hover {
    background: rgba(59, 130, 246, 0.15);
    transform: scale(1.01);
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* Compact Table Styles - Only for Introduction page */
table.table-compact th {
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
}

table.table-compact td {
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
}

/* Slide Footer */
.slide-footer {
    position: absolute;
    bottom: 20mm;
    right: 20mm;
    text-align: right;
}

.slide-number {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Navigation */
.navigation {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    z-index: 1000;
}

.nav-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.1);
}

.nav-btn:disabled {
    color: #475569;
    cursor: not-allowed;
}

.slide-counter {
    color: #e2e8f0;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

/* Print Instructions */
.print-instructions {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 1rem;
    font-size: 0.8rem;
    color: #94a3b8;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

/* Print Styles - Mantiene i colori */
@media print {
    @page {
        size: A3 portrait;
        margin: 0;
    }
    body {
        overflow: visible !important;
        height: auto !important;
    }
    
    .slide {
        display: block !important;
        position: relative !important;
        width: 297mm !important;
        height: 420mm !important;
        margin: 0 !important;
        padding: 25mm !important;
        page-break-after: always;
        border: 2px solid #3b82f6 !important;
        box-shadow: none !important;
        background: linear-gradient(135deg, #030712 0%, #0f172a 50%, #1e293b 100%) !important;
        color: #f8fafc !important;
    }
    
    .slide:last-child {
        page-break-after: auto;
    }
    
    .navigation,
    .print-instructions,
    .no-print {
        display: none !important;
    }
    
    /* Mantiene tutti i colori originali */
    h1, h2, h3 {
        color: #3b82f6 !important;
    }
    
    .network-icon {
        color: #3b82f6 !important;
        text-shadow: 0 0 10px rgba(59, 130, 246, 0.5) !important;
    }
    
    .title-slide h1 {
        background: linear-gradient(135deg, #3b82f6, #06b6d4) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
    }
    
    .device, .index-item, .highlight-box, .config-section {
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(59, 130, 246, 0.3) !important;
    }
    
    .code-block {
        background: #030712 !important;
        border: 1px solid #1e293b !important;
        color: #e2e8f0 !important;
    }
    
    .code-block pre {
        color: #e2e8f0 !important;
    }
    
    .code-block code {
        color: #06b6d4 !important;
    }
    
    .slide-number {
        background: linear-gradient(135deg, #3b82f6, #06b6d4) !important;
        color: white !important;
    }
    
    .index-number {
        background: rgba(59, 130, 246, 0.1) !important;
        color: #3b82f6 !important;
    }
    
    .feature-list i {
        color: #10b981 !important;
    }
    
    .tech-item i, .device i {
        color: #3b82f6 !important;
    }
    
    .author-info {
        background: rgba(59, 130, 246, 0.1) !important;
        border: 1px solid rgba(59, 130, 246, 0.3) !important;
    }
    
    .config-type {
        background: #3b82f6 !important;
        color: white !important;
    }
    
    .config-notes h4 {
        color: #3b82f6 !important;
    }
    
    .config-notes li {
        color: #94a3b8 !important;
    }
    
    .config-notes li::before {
        color: #3b82f6 !important;
    }
    
    /* Forza la stampa a colori */
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* A3 Optimizations */
@media screen {
    .slide {
        width: 297mm; /* A3 width */
        max-width: 100%;
        margin: 2rem auto; /* horizontally centered */
        left: auto;
        transform: none;
    }
    
    .slide-content {
        max-width: 1300px;
    }
    
    .title-slide h1 {
        font-size: 4rem;
    }
    
    h2 {
        font-size: 3rem;
    }
    
    .two-column {
        gap: 3rem;
    }
    
    .architecture-diagram {
        gap: 3rem;
    }
    
    .devices-row {
        gap: 2rem;
    }
    
    .device {
        min-width: 150px;
        padding: 2rem;
    }
    
    .device i {
        font-size: 3rem;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .slide {
        padding: 2rem;
    }
    
    .title-slide h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .two-column {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .slide {
        padding: 1.5rem;
    }
    
    .devices-row {
        flex-direction: column;
        align-items: center;
    }
    
    .navigation {
        bottom: 1rem;
        padding: 0.5rem 1rem;
    }
} 