/* สไตล์พื้นฐาน */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

nav {
    background-color: #333;
    color: white;
    padding: 10px;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-right: 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
}

.content {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* สไตล์สำหรับหน้า Network Devices */
.device-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.device-item {
    flex: 1 1 calc(50% - 20px);
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.device-item i {
    font-size: 2.5em;
    color: #3498db;
    margin-bottom: 10px;
}

.device-item h2 {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.device-item p {
    font-size: 1em;
    color: #333;
    line-height: 1.6;
}
/* Connection Types Page */
.connection-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.connection-item {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.connection-item:hover {
    transform: translateY(-5px);
}

.connection-item i {
    font-size: 2.8em;
    color: #3498db;
    margin-bottom: 15px;
}

.connection-item h2 {
    color: #2c3e50;
    font-size: 1.4em;
    margin-bottom: 12px;
}

.connection-item ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.connection-item li {
    padding: 8px 0;
    color: #34495e;
    font-size: 0.95em;
    border-bottom: 1px solid #eee;
}

.connection-item li:last-child {
    border-bottom: none;
}
/* OSI Model Page */
.osi-layers {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 30px;
    position: relative;
}

.osi-layer {
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.osi-layer:hover {
    transform: translateX(10px);
}

.layer-icon {
    width: 60px;
    height: 60px;
    background: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.layer-icon i {
    font-size: 1.8em;
    color: white;
}

.layer-content h2 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 1.3em;
}

.layer-content p {
    color: #34495e;
    margin: 0;
    line-height: 1.6;
}

/* เส้นเชื่อมระหว่างชั้น */
.osi-layers::before {
    content: "";
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #3498db;
    z-index: 0;
}

@media (max-width: 768px) {
    .osi-layer {
        flex-direction: column;
        text-align: center;
    }
    
    .layer-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .osi-layers::before {
        display: none;
    }
}
/* เพิ่มในไฟล์ static/styles.css */

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    height: 100px;
    background: white;
    transform: skewY(-3deg);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s 0.2s ease backwards;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s 0.4s ease backwards;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    border-radius: 50px;
    transition: 0.3s;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.stat-item i {
    font-size: 1.5rem;
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: #6366f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
    transition: 0.3s;
}

.feature-card:hover .feature-icon {
    background: #a855f7;
    transform: rotate(360deg);
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6366f1;
    text-decoration: none;
    margin-top: 1.5rem;
    font-weight: 600;
}

.feature-link:hover {
    color: #a855f7;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ปุ่ม Home ลอย */
.home-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #6366f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    text-decoration: none;
}

.home-button:hover {
    background: #a855f7;
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.home-button i {
    font-size: 1.5em;
}