/* ========================================
   pfSense Guide - CSS Completo
   Academy-PC.it - 2025
   ======================================== */

/* === RESET E BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    color: #2c3e50;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 10px 60px rgba(0,0,0,0.4);
}

/* === HERO HEADER === */
.hero {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    color: white;
    padding: 120px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: drift 20s linear infinite;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4em;
    margin-bottom: 25px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
    font-weight: 700;
    letter-spacing: 2px;
}

.hero .subtitle {
    font-size: 1.6em;
    opacity: 0.95;
    margin-bottom: 30px;
    font-weight: 300;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 12px 30px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
    font-weight: 600;
    letter-spacing: 1px;
}

/* === NAVIGATION === */
.nav {
    background: #34495e;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.nav li {
    margin: 0;
}

.nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 20px 28px;
    font-weight: 600;
    font-size: 1.05em;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
}

.nav a:hover {
    background: #2c3e50;
    border-bottom-color: #3498db;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #3498db;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav a:hover::after {
    width: 80%;
}

/* === CONTENT === */
.content {
    padding: 80px 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    margin-bottom: 100px;
    scroll-margin-top: 100px;
}

.section h2 {
    color: #0f2027;
    font-size: 2.8em;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 5px solid #3498db;
    font-weight: 700;
    position: relative;
}

.section h2::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, #2ecc71, #3498db);
}

.section h3 {
    color: #2c3e50;
    font-size: 2em;
    margin: 50px 0 30px 0;
    font-weight: 600;
    border-left: 5px solid #3498db;
    padding-left: 20px;
}

.section h4 {
    color: #34495e;
    font-size: 1.5em;
    margin: 35px 0 20px 0;
    font-weight: 600;
}

.section p {
    font-size: 1.15em;
    line-height: 2;
    color: #555;
    margin-bottom: 20px;
    text-align: justify;
}

.section ul, .section ol {
    margin: 25px 0 25px 40px;
}

.section li {
    font-size: 1.1em;
    line-height: 2;
    color: #555;
    margin-bottom: 15px;
}

.section strong {
    color: #0f2027;
    font-weight: 600;
}

/* === INFO BOXES === */
.info-box {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 6px solid #10b981;
    padding: 30px;
    border-radius: 12px;
    margin: 35px 0;
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.2);
}

.info-box h4 {
    color: #059669;
    margin: 0 0 18px 0;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-box p, .info-box ul, .info-box li {
    color: #065f46;
    font-size: 1.1em;
}

.warning-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 6px solid #f59e0b;
    padding: 30px;
    border-radius: 12px;
    margin: 35px 0;
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.2);
}

.warning-box h4 {
    color: #d97706;
    margin: 0 0 18px 0;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.warning-box p, .warning-box ul, .warning-box li {
    color: #92400e;
    font-size: 1.1em;
}

.danger-box {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 6px solid #ef4444;
    padding: 30px;
    border-radius: 12px;
    margin: 35px 0;
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.2);
}

.danger-box h4 {
    color: #dc2626;
    margin: 0 0 18px 0;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.danger-box p, .danger-box ul, .danger-box li {
    color: #991b1b;
    font-size: 1.1em;
}

.video-box {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border: 4px solid #9c27b0;
    border-radius: 15px;
    padding: 35px;
    margin: 40px 0;
    box-shadow: 0 8px 25px rgba(156, 39, 176, 0.2);
}

.video-box h4 {
    color: #7b1fa2;
    margin: 0 0 20px 0;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.video-box p {
    color: #6a1b9a;
    font-size: 1.1em;
    margin-bottom: 20px;
}

.video-link, .resource-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #2196f3;
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    transition: all 0.3s ease;
    margin: 12px 12px 12px 0;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.video-link {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
}

.video-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(156, 39, 176, 0.4);
}

.resource-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
    background: #1976d2;
}

/* === CARDS GRID === */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.card {
    background: white;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
    border-top: 5px solid #3498db;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #2ecc71, #f39c12);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 3.5em;
    margin-bottom: 20px;
    display: block;
}

.card h4 {
    color: #0f2027;
    margin: 0 0 18px 0;
    font-size: 1.4em;
}

.card p {
    color: #666;
    font-size: 1.05em;
    margin: 0;
    line-height: 1.8;
}

/* === STEPS NUMBERED === */
.steps {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
    margin: 40px 0;
}

.steps li {
    counter-increment: step-counter;
    padding: 30px 30px 30px 90px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    position: relative;
    border-left: 5px solid #3498db;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.steps li:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: translateX(10px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.4em;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.steps li strong {
    display: block;
    color: #0f2027;
    font-size: 1.3em;
    margin-bottom: 12px;
}

/* === CODE BLOCKS === */
.code-block {
    background: #f1f5f9;
    color: #1e293b;
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
    overflow-x: auto;
    font-family: 'Courier New', 'Consolas', monospace;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    position: relative;
    border: 2px solid #cbd5e1;
}

.code-block::before {
    content: attr(data-lang);
    position: absolute;
    top: 10px;
    right: 18px;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: white;
    padding: 6px 15px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.code-block pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 1em;
    line-height: 1.8;
}

.code-block strong {
    color: #0369a1;
    font-weight: 700;
}

.command {
    color: #61dafb;
    font-weight: 600;
}

.comment {
    color: #8b949e;
    font-style: italic;
}

/* === IMAGES === */
.image-container {
    margin: 40px 0;
    text-align: center;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.4s ease;
    border: 4px solid #e9ecef;
}

.image-container img:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    border-color: #3498db;
}

.image-caption {
    margin-top: 18px;
    font-style: italic;
    color: #666;
    font-size: 1.05em;
    font-weight: 500;
}

/* === IMAGE MODAL === */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    position: relative;
    margin: auto;
    padding: 30px;
    max-width: 95%;
    max-height: 95%;
    top: 50%;
    transform: translateY(-50%);
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-close {
    position: absolute;
    top: 40px;
    right: 50px;
    font-size: 60px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    z-index: 10000;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.modal-close:hover {
    color: #3498db;
    transform: scale(1.1);
}

.modal-caption {
    text-align: center;
    color: white;
    padding: 25px;
    font-size: 1.3em;
    font-weight: 500;
}

/* === TABLES === */
.table-wrapper {
    overflow-x: auto;
    margin: 35px 0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

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

th {
    background: linear-gradient(135deg, #0f2027 0%, #2c5364 100%);
    color: white;
    padding: 20px;
    text-align: left;
    font-weight: 600;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 1.05em;
}

tr:hover {
    background: #f8f9fa;
}

tr:last-child td {
    border-bottom: none;
}

/* === FOOTER === */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 60px 50px;
    text-align: center;
}

.footer h3 {
    margin-bottom: 30px;
    font-size: 2em;
}

.footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: #2ecc71;
    text-decoration: underline;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
    text-align: left;
}

.footer-grid h4 {
    color: #3498db;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
}

.footer-grid li {
    margin-bottom: 12px;
    font-size: 1.05em;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .content {
        padding: 60px 35px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5em;
    }
    
    .hero .subtitle {
        font-size: 1.2em;
    }
    
    .hero {
        padding: 80px 25px;
    }
    
    .content {
        padding: 40px 25px;
    }
    
    .nav ul {
        flex-direction: column;
    }
    
    .nav a {
        padding: 15px 25px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .section h2 {
        font-size: 2em;
    }
    
    .section h3 {
        font-size: 1.6em;
    }
    
    .steps li {
        padding-left: 75px;
    }
    
    .steps li::before {
        width: 42px;
        height: 42px;
        font-size: 1.2em;
        left: 18px;
    }
    
    .grid-cards {
        grid-template-columns: 1fr;
    }
    
    .modal-close {
        top: 20px;
        right: 25px;
        font-size: 45px;
    }
}

/* === SCROLL BEHAVIOR === */
html {
    scroll-behavior: smooth;
}

/* === SELECTION === */
::selection {
    background: #3498db;
    color: white;
}

::-moz-selection {
    background: #3498db;
    color: white;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db, #2ecc71);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2980b9, #27ae60);
}