/* General Styles */
:root {
    --nu-green: #006400; /* Dark Green */
    --nu-light-green: #008000; /* Medium Green */
    --nu-white: #ffffff;
    --nu-gray: #f8f8f8;
    --nu-dark-gray: #333;
    --nu-text-color: #444;
}

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

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

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

a {
    color: var(--nu-green);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--nu-dark-gray);
    margin-bottom: 15px;
}

p {
    margin-bottom: 10px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header */
.header {
    background-color: var(--nu-green);
    color: var(--nu-white);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header .title-wrap h1 {
    color: #E6BE33;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.header .title-wrap p {
    color: #ffffff;
}

.logo {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--nu-white);
    text-transform: uppercase;
}

.logo a {
    color: var(--nu-white);
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.main-nav ul li {
    margin-left: 25px;
}

.main-nav ul li a {
    color: var(--nu-white);
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--nu-gray);
    text-decoration: none;
}

/* Hero Section */
.hero {
    background: url('../images/hero-bg.png') no-repeat center center/cover;
    color: var(--nu-white);
    text-align: center;
    padding: 100px 20px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 100, 0, 0.6);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    margin-top: -130px;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--nu-white);
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Bottom Section */
.hero-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.3);
    padding: 30px 0;
    backdrop-filter: blur(5px);
}

.hero-bottom .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-bottom p {
    color: var(--nu-white);
    font-size: 1.1em;
    margin: 0;
    flex: 1;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-bottom .btn {
    background-color: var(--nu-white);
    color: var(--nu-green);
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.hero-bottom .btn:hover {
    background-color: var(--nu-light-green);
    color: var(--nu-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn {
    display: inline-block;
    background-color: var(--nu-white);
    color: var(--nu-green);
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn:hover {
    background-color: var(--nu-light-green);
    color: var(--nu-white);
    text-decoration: none;
}

/* Section Styling */
.section {
    padding: 60px 0;
    background-color: var(--nu-white);
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.section.bg-gray {
    background-color: var(--nu-gray);
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
    color: var(--nu-green);
}

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

.card {
    background-color: var(--nu-white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--nu-green);
}

.card-content p {
    font-size: 0.95em;
    color: #666;
}

.card-content .read-more {
    display: inline-block;
    margin-top: 15px;
    font-weight: bold;
    color: var(--nu-light-green);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input[type="submit"] {
    background-color: var(--nu-green);
    color: var(--nu-white);
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}

.form-group input[type="submit"]:hover {
    background-color: var(--nu-light-green);
}

/* Footer */
.footer {
    background-color: var(--nu-dark-gray);
    color: var(--nu-white);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9em;
}

.footer p {
    margin-bottom: 10px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.footer-links ul li {
    margin: 0 15px;
}

.footer-links ul li a {
    color: var(--nu-white);
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--nu-light-green);
}

/* Admin Specific Styles */
.admin-body {
    display: flex;
    min-height: 100vh;
    background-color: var(--nu-gray);
}

.admin-sidebar {
    width: 250px;
    background-color: var(--nu-green);
    color: var(--nu-white);
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.admin-sidebar h2 {
    color: var(--nu-white);
    text-align: center;
    margin-bottom: 30px;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar ul li {
    margin-bottom: 10px;
}

.admin-sidebar ul li a {
    display: block;
    color: var(--nu-white);
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.admin-sidebar ul li a:hover,
.admin-sidebar ul li a.active {
    background-color: var(--nu-light-green);
    text-decoration: none;
}

.admin-main-content {
    flex-grow: 1;
    padding: 30px;
}

.admin-header {
    background-color: var(--nu-white);
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.admin-header h1 {
    margin: 0;
    color: var(--nu-green);
}

.admin-header .user-info {
    font-weight: bold;
    color: var(--nu-dark-gray);
}

.admin-header .user-info a {
    margin-left: 15px;
    color: var(--nu-green);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: var(--nu-white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.admin-table th, .admin-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
}

.admin-table th {
    background-color: var(--nu-green);
    color: var(--nu-white);
    font-weight: bold;
}

.admin-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.admin-table .action-buttons a {
    margin-right: 10px;
    padding: 5px 10px;
    border-radius: 3px;
    color: var(--nu-white);
    text-decoration: none;
}

.admin-table .action-buttons .edit-btn {
    background-color: #28a745;
}

.admin-table .action-buttons .delete-btn {
    background-color: #dc3545;
}

.admin-table .action-buttons a:hover {
    opacity: 0.9;
}

.add-button {
    display: inline-block;
    background-color: var(--nu-green);
    color: var(--nu-white);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

.add-button:hover {
    background-color: var(--nu-light-green);
}

.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: bold;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }

    .main-nav ul {
        margin-top: 15px;
        justify-content: center;
    }

    .main-nav ul li {
        margin: 0 10px;
    }

    .hero h1 {
        font-size: 2.5em;
    }

    .hero p {
        font-size: 1em;
    }

    .hero-bottom .container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .hero-bottom p {
        font-size: 1em;
        text-align: center;
    }
    
    .hero-bottom .btn {
        width: 100%;
        max-width: 250px;
    }

    .section-title {
        font-size: 2em;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .admin-body {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        padding: 15px;
    }

    .admin-main-content {
        padding: 20px;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-header .user-info {
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .main-nav ul li {
        margin: 0 5px;
    }

    .hero h1 {
        font-size: 2em;
    }
}

/* Fix dropdown tertutup hero section */
.dropdown-content {
    z-index: 9999 !important;
}

.nav {
    position: relative;
    z-index: 1000;
}
.ads-horizontal {
    width: 100%;
    max-width: 100%;
    height: 160px;             /* tinggi banner */
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    margin: 25px 0;
}

.ads-horizontal img {
    position: absolute;
    top: 50%;
    left: 50%;
    height: auto;
    width: 100%;

    transform: translate(-50%, -50%);

    /* Buat gambar ter-crop persis jadi horizontal */
    min-height: 160px;
    object-fit: cover;
}
