/* ============================================
   DESIGN SYSTEM — Ponpes Rahmatul Ummah
   Premium Islamic theme with green/gold palette
   ============================================ */

:root {
    --primary: #1B5E20;
    --primary-light: #2E7D32;
    --primary-dark: #0D3B13;
    --primary-50: #E8F5E9;
    --secondary: #C9A94E;
    --secondary-light: #D4B96A;
    --accent: #FFC107;
    --bg: #F8FAF8;
    --bg-card: #ffffff;
    --text: #1A1A2E;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --border: #E5E7EB;
    --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 12px rgba(0, 0, 0, .04);
    --shadow-lg: 0 4px 24px rgba(0, 0, 0, .1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --transition: all .3s cubic-bezier(.4, 0, .2, 1);
    --font: 'Poppins', -apple-system, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .875rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: var(--font);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
}

.btn-secondary:hover {
    background: var(--secondary-light);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-sm {
    padding: 6px 16px;
    font-size: .8rem;
}

.btn-danger {
    background: #DC2626;
    color: #fff;
}

.btn-danger:hover {
    background: #B91C1C;
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(20px);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 8px 0;
    box-shadow: var(--shadow);
    background: rgba(255, 255, 255, .98);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    font-size: 2rem;
}

.brand-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-dark);
    display: block;
    line-height: 1.2;
}

.brand-sub {
    display: block;
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: .1px;
    line-height: 1.35;
    text-transform: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-menu a {
    padding: 8px 16px;
    font-weight: 500;
    color: var(--text);
    border-radius: var(--radius-sm);
    font-size: .9rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
    background: var(--primary-50);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text);
}

/* HERO BANNER */
.hero-banner {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 500px;
    max-height: 1080px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(13, 59, 19, .85) 0%, rgba(27, 94, 32, .75) 50%, rgba(13, 59, 19, .88) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 140px 20px 80px;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 300;
    margin-bottom: 8px;
    font-style: italic;
    color: var(--secondary);
    text-shadow: 0 2px 20px rgba(0, 0, 0, .3);
    animation: fadeInUp .8s ease;
}

.hero-subtitle {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.3;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .4);
    animation: fadeInUp 1s ease;
}

.hero-desc {
    font-size: 1.1rem;
    opacity: .9;
    max-width: 650px;
    margin: 0 auto 36px;
    line-height: 1.7;
    animation: fadeInUp 1.2s ease;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 1.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SECTIONS */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.section-header .divider {
    width: 60px;
    height: 4px;
    background: var(--secondary);
    border-radius: 2px;
    margin: 16px auto 0;
}

/* CARDS GRID */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.card p {
    font-size: .9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* FEATURES */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-50);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--primary-50);
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: .85rem;
    color: var(--text-secondary);
}

/* CTA */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.cta-section p {
    opacity: .9;
    max-width: 500px;
    margin: 0 auto 32px;
}

/* FOOTER */
.footer {
    background: #0F2A12;
    color: rgba(255, 255, 255, .8);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-col h3,
.footer-col h4 {
    color: #fff;
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.footer-col p {
    font-size: .9rem;
    line-height: 1.7;
    opacity: .8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
    font-size: .85rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, .8);
}

.footer-col ul li a:hover {
    color: var(--secondary);
}

.footer-col ul li i {
    margin-top: 3px;
    flex-shrink: 0;
    color: var(--secondary);
}

.footer-locations li {
    align-items: flex-start;
    line-height: 1.5;
}

.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    transition: var(--transition);
}

.footer-socials a:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .8rem;
    opacity: .6;
}

/* GALERI PUBLIC */
.galeri-public-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.galeri-public-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.galeri-public-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.galeri-public-item:hover img {
    transform: scale(1.08);
}

.galeri-public-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(0, 0, 0, .7));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: #fff;
    opacity: 0;
    transition: opacity .3s ease;
}

.galeri-public-item:hover .galeri-public-overlay {
    opacity: 1;
}

.galeri-public-overlay h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.galeri-public-overlay small {
    opacity: .8;
}

/* PAGE HEADER (sub-pages) */
.page-header {
    padding: 140px 0 60px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    color: #fff;
    text-align: center;
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-header p {
    opacity: .85;
}

/* TENTANG KAMI */
.about-profile-full {
    width: 100%;
    text-align: center;
    padding: 0 20px;
    margin: 0 auto;
}

.about-profile-title {
    color: var(--primary-dark);
    margin-bottom: 16px;
    font-size: 2rem;
}

.about-profile-text {
    line-height: 1.9;
    color: var(--text-secondary);
    font-size: 1.02rem;
    max-width: 980px;
    margin: 0 auto;
}

.about-profile-media {
    margin-top: 28px;
}

.about-profile-media img {
    width: 100%;
    max-width: 820px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.quoted-vision {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.quoted-vision p {
    font-size: 1.1rem;
    line-height: 1.8;
    font-style: italic;
}

/* TABLES (public) */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

th {
    background: var(--primary-50);
    color: var(--primary-dark);
    font-weight: 600;
    text-align: left;
}

th,
td {
    padding: 12px 16px;
    font-size: .875rem;
    border-bottom: 1px solid var(--border);
}

tr:hover {
    background: #F9FAFB;
}

/* FORMS (public) */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: .875rem;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: .9rem;
    font-family: var(--font);
    transition: var(--transition);
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 94, 32, .1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* BADGE */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

/* ALERT */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .9rem;
    animation: slideDown .3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert-danger {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-xs);
    font-size: .875rem;
    font-weight: 500;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.pagination a:hover {
    background: var(--primary-50);
    color: var(--primary);
}

.pagination .active span {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.show {
        display: flex;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .hero-desc {
        font-size: .95rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .galeri-public-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-profile-title {
        font-size: 1.6rem;
    }

    .about-profile-text {
        font-size: .95rem;
    }
}

@media (max-width: 480px) {
    .galeri-public-grid {
        grid-template-columns: 1fr;
    }
}

/* PUBLIC REGISTRATION */
.daftar-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 20px;
}

.daftar-info {
    position: sticky;
    top: 90px;
    align-self: start;
}

.steps-indicator {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.step {
    flex: 1 1 120px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: #F3F4F6;
    text-align: center;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.step.active {
    background: var(--primary);
    color: #fff;
}

.step.completed {
    background: #D1FAE5;
    color: #065F46;
}

.dash-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.dash-card-body.padded {
    padding: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

@media (max-width: 992px) {
    .daftar-layout {
        grid-template-columns: 1fr;
    }

    .daftar-info {
        position: static;
    }
}
