/* assets/css/style.css */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f7f7f7;
    margin: 0;
    padding: 0;
}

.header {
    width: 100%;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo a {
    font-size: 1.5em;
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
}

.logo a:hover {
    color: #3498db;
}

.main-nav {
    display: flex;
    gap: 20px;
    list-style: none;
}

.main-nav a {
    color: #555;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #3498db;
    background: #f0f7ff;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 340px;
    flex-shrink: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 90px;
}

.card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.card h3 {
    margin: 0 0 10px 0;
    font-size: 1.4em;
}

.card h3 a {
    color: #2980b9;
    text-decoration: none;
}

.card h3 a:hover {
    text-decoration: underline;
}

.card .url {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.card .desc {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.7;
}

.card .meta {
    font-size: 0.9em;
    color: #7f8c8d;
}

.card .rating {
    color: #f39c12;
    font-weight: bold;
    margin-top: 5px;
}

.btn {
    display: inline-block;
    padding: 10px 16px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95em;
    transition: background 0.2s;
}

.btn:hover {
    background: #2980b9;
}

.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-between;
    align-items: center;
}

.footer-logo a {
    font-size: 1.4em;
    font-weight: 600;
    color: white;
    text-decoration: none;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9em;
}

.footer-links a:hover {
    color: white;
}

.footer-copyright {
    color: #bdc3c7;
    font-size: 0.9em;
    margin-top: 20px;
    width: 100%;
    text-align: center;
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        position: static;
        margin-top: 20px;
    }
    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 10px 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease;
        z-index: 900;
    }
    .main-nav.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    .main-nav a {
        display: block;
        padding: 12px 20px;
        border-bottom: 1px solid #eee;
    }
    .menu-toggle {
        display: flex;
    }
}