/* 
 * Koperasi Desa Merah Putih - Main Stylesheet
 * Theme: Red (Indonesia) & White
 */
:root {
    --primary-red: #D32F2F;
    /* Merah Bendera */
    --hover-red: #B71C1C;
    /* Merah Gelap untuk Hover */
    --primary-white: #FFFFFF;
    --bg-light: #F9FAFB;
    /* Abu-abu sangat muda */
    --text-dark: #1F2937;
    /* Abu-abu gelap untuk teks */
    --text-light: #6B7280;
    /* Abu-abu sedang */
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --container-width: 1200px;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    line-height: 1.5;
    background-color: var(--bg-light);
}
a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}
ul {
    list-style: none;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}
.section {
    padding: 4rem 0;
}
.text-center {
    text-align: center;
}
.text-red {
    color: var(--primary-red);
}
.bg-red {
    background-color: var(--primary-red);
}
.bg-white {
    background-color: var(--primary-white);
}
.font-bold {
    font-weight: 700;
}
.mb-4 {
    margin-bottom: 1rem;
}
/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.btn-primary {
    background-color: var(--primary-red);
    color: var(--primary-white);
}
.btn-primary:hover {
    background-color: var(--hover-red);
}
.btn-outline {
    border: 1px solid var(--primary-red);
    color: var(--primary-red);
    background-color: transparent;
}
.btn-outline:hover {
    background-color: var(--primary-red);
    color: var(--primary-white);
}
/* Header */
header {
    background-color: var(--primary-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-red);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-links {
    display: flex;
    gap: 2rem;
}
.nav-links a {
    font-weight: 500;
    color: var(--text-dark);
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-red);
}
/* Mobile Menu Button */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
}
/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../assets/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-color: var(--text-dark);
    /* Fallback */
    height: 600px;
    display: flex;
    align-items: center;
    color: var(--primary-white);
    text-align: center;
}
.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
/* Section Headings */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 1rem;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-red);
    margin: 0.5rem auto 0;
}
/* About & History (Side by Side) */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
/* Vision Mission */
.vision-mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.card {
    background: var(--primary-white);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--primary-red);
}
.card h3 {
    margin-bottom: 1rem;
    color: var(--primary-red);
}
.mission-list li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}
.mission-list li::before {
    content: '•';
    color: var(--primary-red);
    font-weight: bold;
    position: absolute;
    left: 0;
}
/* Legalitas */
.legal-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}
.legal-item {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.legal-item i {
    color: var(--primary-red);
}
/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.team-card {
    background: var(--primary-white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.2s;
}
.team-card:hover {
    transform: translateY(-5px);
}
.team-photo {
    height: 300px;
    width: 100%;
    object-fit: cover;
    background-color: #eee;
}
.team-info {
    padding: 1.5rem;
}
.team-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}
.team-role {
    color: var(--text-light);
    font-size: 0.9rem;
    color: var(--primary-red);
}
/* Business Units */
.unit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.unit-card {
    background: var(--primary-white);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}
.unit-icon {
    font-size: 3rem;
    color: var(--primary-red);
    margin-bottom: 1.5rem;
}
.unit-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
/* Membership */
.membership-steps {
    max-width: 800px;
    margin: 0 auto;
    counter-reset: steps;
}
.step-item {
    background: var(--primary-white);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    padding-left: 4rem;
    display: flex;
    align-items: center;
}
.step-item::before {
    counter-increment: steps;
    content: counter(steps);
    position: absolute;
    left: 1rem;
    background: var(--primary-red);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}
/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}
.post-card {
    background: var(--primary-white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s;
    cursor: pointer;
    border-bottom: 3px solid var(--primary-red);
}
.post-card:hover {
    transform: translateY(-5px);
}
.post-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background-color: #eee;
}
.post-content {
    padding: 1.25rem;
}
.post-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    display: block;
}
.post-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: var(--text-dark);
}
.post-excerpt {
    color: var(--text-light);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 3;
}
.post-full-content {
    white-space: pre-wrap;
    line-height: 1.6;
    color: var(--text-dark);
}
.d-block {
    display: block;
}
/* Footer */
footer {
    background-color: #1a1a1a;
    color: #e5e7eb;
    padding: 4rem 0 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-col h4 {
    color: var(--primary-white);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    border-left: 3px solid var(--primary-red);
    padding-left: 1rem;
}
.footer-links li {
    margin-bottom: 0.75rem;
}
.footer-links a:hover {
    color: var(--primary-red);
}
.social-links {
    display: flex;
    gap: 1rem;
}
.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: background 0.2s;
}
.social-links a:hover {
    background: var(--primary-red);
}
.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    font-size: 0.9rem;
}
/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Mobile menu hidden by default */
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-md);
        gap: 1rem;
    }
    .nav-links.active {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .about-grid,
    .vision-mission-grid {
        display: grid;
        grid-template-columns: 1fr;
    }
}
/* Gallery (Album) Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.album-card {
    background: var(--primary-white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border-top: 4px solid var(--primary-red);
}
.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.album-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #eee;
}
.album-info {
    padding: 1.5rem;
    text-align: center;
}
.album-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
}
.album-count {
    font-size: 0.85rem;
    color: var(--primary-red);
    margin-top: 0.5rem;
}
/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow-y: auto;
    padding: 2rem 1rem;
}
.modal-content {
    background-color: var(--primary-white);
    margin: auto;
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 1000px;
    position: relative;
}
.close-modal {
    position: fixed;
    top: 1rem;
    right: 2rem;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1010;
}
.modal-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.modal-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: opacity 0.2s;
}
.modal-img:hover {
    opacity: 0.8;
}
@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        padding: 1.5rem 1rem;
    }
    .modal-images-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    .close-modal {
        top: 0.5rem;
        right: 1rem;
    }
}