:root {
    --primary-color: #0056b3; /* Deep Blue */
    --secondary-color: #004494;
    --accent-color: #f1c40f; /* Gold/Yellow for highlights */
    --text-color: #333;
    --light-bg: #f4f7f6;
    --white: #ffffff;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.hero {
    background: linear-gradient(135deg, rgba(0, 86, 179, 1) 0%, rgba(0, 68, 148, 1) 100%);
    color: var(--white);
    padding: 80px 0;
    border-radius: 0 0 20px 20px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 25%),
                radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 25%);
    pointer-events: none;
}

.hero-container {
    display: flex;
    flex-direction: row; /* Default: Row untuk Desktop */
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    text-align: left;
}

.hero-title-wrapper {
    display: block;
    margin-bottom: 20px;
}

/* .hero-logo deleted as it is no longer used in hero */

.hero-content h2 {
    margin: 0; /* Reset margin to align with flex container */
    font-size: 2.5rem; /* Ensure size is prominent */
    line-height: 1.2;
}

.hero-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1000px; /* Efek 3D */
}

/* Tampilan Kartu Spesifik di Hero */
.member-card-preview {
    width: 380px;
    height: 240px;
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: none; /* Tegak lurus, tidak miring */
    transition: transform 0.5s ease;
}

.member-card-preview:hover {
    transform: scale(1.02); /* Hanya zoom sedikit saat hover */
}

/* Overlay agar teks terbaca jelas di atas background - Lebih Terang & Elegan */
.card-overlay {
    background: transparent; /* Transparan total agar background jelas */
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center; /* Vertikal tengah */
    justify-content: center; /* Horizontal tengah (jika diperlukan layout center) */
    padding: 25px;
    box-sizing: border-box;
    gap: 25px;
    /* backdrop-filter dihapus agar tidak blur */
}

.card-photo {
    width: 75px;
    height: 95px;
    object-fit: cover;
    border: 2px solid var(--white); /* List Putih */
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.card-details {
    color: #000; /* Warna Hitam */
    text-align: center; /* Rata Tengah */
    flex: 1;
}

.card-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600; /* Sedikit lebih tebal agar jelas */
    text-transform: uppercase;
    text-shadow: none; /* Hilangkan shadow agar bersih */
    line-height: 1.1; /* Line height diperkecil */
    letter-spacing: 0.5px;
    color: #000; /* Warna Hitam */
    margin-bottom: 0;
}

.card-nik {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #000; /* Warna Hitam */
    text-shadow: none;
    font-family: 'Segoe UI', sans-serif;
    letter-spacing: 1px;
    margin-top: 0; /* Jarak dirapatkan (sebelumnya -5px mungkin terlalu ekstrim, coba 0 dengan line-height kecil) */
}

.section-news-grid {
    padding: 10px 0 5px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.news-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
}

.news-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-card-link:hover .news-card {
    box-shadow: 0 6px 14px rgba(0,0,0,0.16);
}

.news-card-image {
    width: 100%;
    aspect-ratio: 2/1;
    background: #e0e6f5;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fb, #dde5ff);
    color: #555;
    font-weight: 600;
    font-size: 0.85rem;
}

.news-card-body {
    padding: 8px 10px 10px;
}

.news-card-title {
    margin: 0 0 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #111;
}

.news-card-snippet {
    margin: 0 0 4px;
    font-size: 0.8rem;
    color: #555;
}

.news-card-meta {
    font-size: 0.78rem;
    color: #777;
}

/* Responsif untuk Mobile */
@media (max-width: 768px) {
    .hero-container {
        flex-direction: column; /* Stack vertikal di HP */
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .member-card-preview {
        width: 320px;
        height: 200px;
        transform: none; /* Hilangkan efek miring di HP biar rapi */
    }
    
    .card-photo {
        width: 70px;
        height: 90px;
    }
    
    .card-name {
        font-size: 1.2rem;
    }
}

.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.section {
    padding: 30px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 20px;
}

.section-title h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 2px;
    background-color: var(--accent-color);
    bottom: 0;
    left: 25%;
}

/* Card Styles for News/Socialization */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-list-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 900px; /* Limit width for readability */
    margin: 0 auto;   /* Center the column */
}

.card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-body {
    padding: 25px;
}

.card-title {
    margin-top: 0;
    color: var(--primary-color);
}

.card-date {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 15px;
    display: block;
}

/* Form Styles */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
    box-sizing: border-box; /* Ensure padding doesn't add width */
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.footer {
    background-color: #333;
    color: var(--white);
    padding: 18px 0 14px;
    text-align: center;
    margin-top: 25px;
}

.footer p {
    opacity: 0.7;
}

/* Admin Table */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee; /* Vertical lines for columns */
}

th:last-child, td:last-child {
    border-right: none; /* Remove border from the last column */
}

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

tr:hover {
    background-color: #f9f9f9;
}

/* Member Card Styles */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.member-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    position: relative;
    aspect-ratio: 1.586; /* Credit card ratio */
    color: #fff;
    background-size: cover;
    background-position: center;
    padding: 0; /* Padding dihandle oleh overlay */
    display: flex;
    transition: transform 0.3s, box-shadow 0.3s;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.member-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Gradient sangat tipis hanya untuk menjaga keterbacaan teks jika background putih */
    background: rgba(0, 0, 0, 0.05); 
    z-index: 1;
}

/* Inner content wrapper to mimic .card-overlay layout */
.member-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    gap: 15px;
}

.member-card > * {
    /* Legacy fallback if not wrapped */
    position: relative;
    z-index: 2;
}

.member-photo {
    width: 60px;
    height: 75px; /* Rectangular proportional */
    border-radius: 5px;
    object-fit: cover;
    border: 2px solid var(--white); /* List Putih */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    background: #ccc;
    flex-shrink: 0;
}

.member-info {
    flex: 1;
    text-align: center; /* Rata Tengah */
}

.member-info h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #000; /* Warna Hitam */
    text-transform: uppercase;
    text-shadow: none;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.member-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #000; /* Warna Hitam */
    font-weight: 500;
    text-shadow: none;
    margin-top: 0;
}

/* Admin Dashboard Styles - Compact Version */
.admin-dashboard {
    padding: 10px 0;
}

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

.admin-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.admin-card-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 15px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card-body {
    padding: 15px;
    flex: 1;
    font-size: 0.9rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table-responsive td {
    vertical-align: middle;
    padding: 8px 12px;
}

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

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.3s;
}

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

/* Form Compact Overrides for Admin */
.admin-card-body .form-group {
    margin-bottom: 12px;
}

.admin-card-body label {
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.admin-card-body input,
.admin-card-body select,
.admin-card-body textarea {
    padding: 8px 10px;
    font-size: 0.9rem;
}

.console-output {
    background: #000;
    color: #0f0;
    font-family: 'Consolas', 'Monaco', monospace;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    font-size: 0.85rem;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* News Ticker Styles */
.news-ticker-container {
    background: #222;
    color: #fff;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 45px;
    border-bottom: 1px solid #444;
    position: relative;
    z-index: 10;
}

.ticker-title {
    background: #d32f2f; /* Red for breaking news */
    color: white;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 0.95rem;
    z-index: 20;
    box-shadow: 4px 0 10px rgba(0,0,0,0.3);
    white-space: nowrap;
    position: relative;
}

.ticker-title::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 0;
    border-top: 45px solid #d32f2f;
    border-right: 20px solid transparent;
    width: 0;
    z-index: 20;
}

.ticker-wrapper {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    animation: ticker 30s linear infinite;
    /* Move the start to the right edge */
    padding-left: 100%; 
}

/* Hover to pause */
.ticker-wrapper:hover .ticker-content {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-block;
    padding: 0 30px;
    font-size: 0.95rem;
    color: #f1f1f1;
}

.ticker-item i {
    margin-right: 8px;
    color: var(--accent-color);
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

@media (max-width: 768px) {
    .ticker-title {
        font-size: 0.8rem;
        padding: 0 10px;
    }
    
    .ticker-item {
        font-size: 0.85rem;
        padding: 0 15px;
    }
}

.news-content {
    color: #555;
    line-height: 1.6;
}

.news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 10px 0;
}

/* Image Sizing Classes */
.news-content .img-small {
    width: 30%;
}

.news-content .img-medium {
    width: 50%;
}

.news-content .img-full {
    width: 100%;
}

/* Responsive adjustment for small images on mobile */
@media (max-width: 600px) {
    .news-content .img-small,
    .news-content .img-medium {
        width: 100%;
        float: none;
        margin-right: 0;
        margin-left: 0;
    }
}

.news-content .alignleft {
    float: left;
    margin-right: 20px;
    margin-bottom: 15px;
}

.news-content .alignright {
    float: right;
    margin-left: 20px;
    margin-bottom: 15px;
}

.news-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 15px;
}

.news-content p {
    margin-bottom: 15px;
}

/* ========================= */
/* HAMBURGER MENU SAFE FIX */
/* ========================= */

.nav-toggle {
    display: none;
    font-size: 26px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--white);
}

/* Mobile only */
@media (max-width: 768px) {

    .nav-toggle {
        display: block;
    }

    .navbar {
        position: relative;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 10px;
        width: 220px;
        background: var(--white);
        box-shadow: 0 8px 20px rgba(0,0,0,0.2);
        border-radius: 10px;
        overflow: hidden;
        z-index: 9999;
    }

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

    .nav-links li {
        padding: 12px 18px;
        border-bottom: 1px solid #eee;
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        color: var(--text-color);
        display: block;
    }
}