/* 
  Professional Styling for SMAN 1 Seram Bagian Barat
  Palette: Deep Emerald & Slate / Modern & Clean
*/
:root {
    --primary: #0f766e; /* Deep Teal / Emerald */
    --primary-dark: #115e59;
    --accent: #f59e0b; /* Warm Gold */
    --bg-color: #f8fafc;
    --text-color: #334155;
    --heading-color: #0f172a;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Navigation */
header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

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

.brand-text span {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
}

/* Navigation Menu */
nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
    padding: 6px 0;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    transition: width 0.2s;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

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

/* Main Content Wrapper */
.main-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    flex: 1;
    width: 100%;
}

/* H1 Banner Card */
.page-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.page-banner h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.page-banner p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* General Sections & Cards */
.section-title {
    font-size: 1.4rem;
    color: var(--heading-color);
    margin-bottom: 20px;
    font-weight: 700;
    border-left: 4px solid var(--primary);
    padding-left: 12px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.card h3 {
    font-size: 1.1rem;
    color: var(--heading-color);
    margin-bottom: 12px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 8px;
}

/* Responsive Tables & Cards for Mobile */
.table-container {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.data-table th {
    background-color: #f1f5f9;
    color: var(--heading-color);
    font-weight: 600;
}

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

/* Random Links (Partner Kami) */
.random-links-container {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 24px;
    margin-top: 40px;
    box-shadow: var(--shadow);
}

.random-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.random-link-item {
    background: var(--bg-color);
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.random-link-item a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.random-link-item a:hover {
    text-decoration: underline;
}

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

footer p {
    opacity: 0.85;
}

/* Mobile Responsive Adjustments */
@media (max-width: 900px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
        align-items: flex-start;
        gap: 15px;
    }

    .nav-links.active {
        display: flex;
    }

    .brand-text h1 {
        font-size: 0.95rem;
    }
    
    .brand-text span {
        font-size: 0.75rem;
    }

    /* Table to Card conversion for mobile */
    .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td {
        display: block;
    }

    .data-table thead {
        display: none;
    }

    .data-table tr {
        background: var(--white);
        border: 1px solid var(--border-color);
        margin-bottom: 15px;
        border-radius: 8px;
        padding: 12px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    .data-table td {
        border: none;
        padding: 8px 12px;
        position: relative;
        padding-left: 45%;
        text-align: right;
        font-size: 0.9rem;
    }

    .data-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 12px;
        width: 40%;
        text-align: left;
        font-weight: 600;
        color: var(--heading-color);
    }
}
