/* Professional Modern Design for SMP IT Al - Hijrah */
:root {
    --primary: #0f4c81;
    --secondary: #1976d2;
    --accent: #26a69a;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray: #e9ecef;
    --text-color: #333333;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--light);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header & Navigation */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand img {
    height: 45px;
    width: auto;
}

.brand-text h1 {
    font-size: 1.15rem;
    color: var(--primary);
    font-weight: 700;
    line-height: 1.2;
}

.brand-text span {
    font-size: 0.8rem;
    color: #666;
}

/* Nav Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.nav-menu li a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    padding: 8px 12px;
    border-radius: 4px;
    transition: var(--transition);
}

.nav-menu li a:hover, .nav-menu li a.active {
    color: var(--white);
    background-color: var(--primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

/* Banner / H1 Banner Card */
.banner-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
}

.banner-card h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.banner-card p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
}

/* Cards & Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background: var(--white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.card h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.25rem;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 15px;
    transition: var(--transition);
}

.btn:hover {
    background: var(--secondary);
}

/* Tables & Responsive Cards for Tables */
table.responsive-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

table.responsive-table th, table.responsive-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray);
}

table.responsive-table th {
    background-color: var(--primary);
    color: var(--white);
}

/* Random Links Section */
.random-links-section {
    background: var(--white);
    padding: 30px 20px;
    border-top: 1px solid var(--gray);
    margin-top: 40px;
}

.random-links-container {
    max-width: 1200px;
    margin: 0 auto;
}

.random-links-container h4 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.random-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.random-links-grid a {
    background: var(--light);
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--dark);
    border: 1px solid var(--gray);
    transition: var(--transition);
}

.random-links-grid a:hover {
    background: var(--primary);
    color: var(--white);
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

/* Mobile Media Query */
@media (max-width: 900px) {
    .menu-toggle {
        display: block;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--white);
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        padding: 20px 0;
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-menu li {
        width: 100%;
        text-align: center;
    }
    .nav-menu li a {
        display: block;
        padding: 12px;
    }
    
    /* Transform Tables to Cards on Mobile */
    .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td, .responsive-table th {
        display: block;
    }
    .responsive-table thead {
        display: none;
    }
    .responsive-table tr {
        background: var(--white);
        margin-bottom: 15px;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    .responsive-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid var(--gray);
        text-align: right;
    }
    .responsive-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--primary);
        text-align: left;
    }
    .responsive-table td:last-child {
        border-bottom: none;
    }
}
