/* Reset Dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f0f9f0 0%, #ffffff 50%, #fff8e7 100%);
    color: #2c3e50;
    line-height: 1.6;
    min-height: 100vh;
}

/* Header Modern */
.kemenag-header {
    background: linear-gradient(135deg, #006400 0%, #004d00 100%);
    padding: 1.5rem 0;
    box-shadow: 0 4px 30px rgba(0, 100, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.kemenag-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.logo {
    height: 75px;
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.3));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05) rotate(3deg);
}

.logo-text h2 {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

.logo-text p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    font-weight: 500;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* Main Content */
main {
    padding: 3rem 2rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.hero-section .hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.4);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-section .hero-icon i {
    font-size: 3rem;
    color: #006400;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #006400;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 100, 0, 0.1);
}

.hero-section .subtitle {
    font-size: 1.25rem;
    color: #5a6c57;
    font-weight: 500;
}

/* Search Board */
.search-board {
    background: #ffffff;
    padding: 3rem;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 100, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.search-board::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.search-board h2 {
    text-align: center;
    color: #006400;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.search-board > p {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.25rem;
}

#searchInput {
    width: 100%;
    padding: 1.25rem 1.25rem 1.25rem 3.5rem;
    font-size: 1.1rem;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    background: #f9fafb;
}

#searchInput:focus {
    border-color: #006400;
    box-shadow: 0 0 0 4px rgba(0, 100, 0, 0.1);
    background: #ffffff;
}

#searchButton {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    background: linear-gradient(135deg, #006400 0%, #004d00 100%);
    color: white;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 100, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

#searchButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 100, 0, 0.4);
}

#searchButton:active {
    transform: translateY(0);
}

/* Stats Badge */
.stats-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #006400;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    margin: 1.5rem auto;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Loading Spinner */
.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #006400;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 3rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Container */
#resultsContainer {
    margin-top: 2rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #9ca3af;
}

.empty-state i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-state.error {
    color: #dc2626;
}

.empty-state.error i {
    color: #fca5a5;
}

/* Result Cards - Super Elegant */
.result-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #FFD700 0%, #FFA500 100%);
}

.result-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.result-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 100, 0, 0.15);
    border-color: rgba(0, 100, 0, 0.2);
}

.result-card h3 {
    color: #006400;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
    word-wrap: break-word;
}

.result-card h3 i {
    color: #FFD700;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.data-item {
    background: linear-gradient(135deg, #f8fdf8 0%, #ffffff 100%);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid #e8f5e8;
    transition: all 0.3s ease;
}

.data-item:hover {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f9f0 100%);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 100, 0, 0.1);
}

.data-item strong {
    display: block;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-item span {
    color: #1f2937;
    font-weight: 500;
    font-size: 1.05rem;
    display: block;
    word-wrap: break-word;
}

/* Akta Info - Premium Highlight */
.akta-info {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #006400 0%, #004d00 100%);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    margin-top: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 100, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.akta-info::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.akta-info strong {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.akta-info span {
    color: #FFD700;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    display: block;
    position: relative;
    z-index: 1;
    word-wrap: break-word;
}

/* Footer Mewah */
.kemenag-footer {
    background: linear-gradient(135deg, #006400 0%, #004d00 100%);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.kemenag-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="footergrid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23footergrid)"/></svg>');
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.footer-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #FFD700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: #FFD700;
    color: #006400;
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.social-link i {
    font-size: 1.25rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.footer-bottom small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

/* Responsive - Mobile First Approach */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    /* Header tetap elegan di mobile */
    .kemenag-header {
        padding: 1rem 0;
    }

    .logo {
        height: 60px;
    }

    .logo-text h2 {
        font-size: 1.1rem;
    }

    .logo-text p {
        font-size: 0.8rem;
    }

    /* Hero section proporsi baik */
    .hero-section {
        padding: 1.5rem 0;
        margin-bottom: 2rem;
    }

    .hero-section .hero-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }

    .hero-section .hero-icon i {
        font-size: 2.25rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .subtitle {
        font-size: 1.1rem;
    }

    /* Search board tetap mewah */
    main {
        padding: 2rem 1rem;
    }

    .search-board {
        padding: 2rem 1.5rem;
        border-radius: 24px;
    }

    .search-board h2 {
        font-size: 1.5rem;
    }

    .search-board > p {
        font-size: 0.95rem;
    }

    /* Search box vertikal tapi tetap bagus */
    .search-box {
        flex-direction: column;
        gap: 0.75rem;
    }

    #searchInput {
        padding: 1.1rem 1.1rem 1.1rem 3.25rem;
        font-size: 1rem;
        border-radius: 18px;
    }

    .search-input-wrapper i {
        left: 1.1rem;
        font-size: 1.1rem;
    }

    #searchButton {
        padding: 1.1rem 2rem;
        font-size: 1rem;
        border-radius: 18px;
        width: 100%;
    }

    /* Stats badge responsif */
    .stats-badge {
        padding: 0.9rem 1.75rem;
        font-size: 1rem;
    }

    /* Result cards tetap premium */
    .result-card {
        padding: 2rem 1.75rem;
        border-radius: 20px;
        margin-bottom: 1.75rem;
    }

    .result-card h3 {
        font-size: 1.25rem;
        margin-bottom: 1.75rem;
        flex-wrap: wrap;
    }

    .result-card h3 i {
        font-size: 1.5rem;
    }

    /* Data grid 1 kolom tapi tetap elegan */
    .data-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .data-item {
        padding: 1.1rem;
        border-radius: 14px;
    }

    .data-item strong {
        font-size: 0.8rem;
    }

    .data-item span {
        font-size: 1rem;
    }

    /* Akta info tetap menonjol */
    .akta-info {
        padding: 1.75rem;
        border-radius: 18px;
    }

    .akta-info span {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    /* Empty state proporsional */
    .empty-state {
        padding: 3rem 1.5rem;
    }

    .empty-state i {
        font-size: 3rem;
    }

    /* Footer tetap rapi */
    .kemenag-footer {
        padding: 2.5rem 0 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-section h3 {
        font-size: 1.15rem;
    }

    .footer-section p {
        font-size: 0.95rem;
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom p {
        font-size: 0.9rem;
    }

    .footer-bottom small {
        font-size: 0.8rem;
    }
}

/* Untuk layar sangat kecil (< 380px) */
@media (max-width: 380px) {
    .logo {
        height: 50px;
    }

    .logo-text h2 {
        font-size: 1rem;
    }

    .logo-text p {
        font-size: 0.75rem;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .search-board {
        padding: 1.5rem 1.25rem;
    }

    .result-card {
        padding: 1.5rem 1.25rem;
    }

    .akta-info span {
        font-size: 1.25rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    animation: fadeInUp 0.6s ease forwards;
}

.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.2s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }
.result-card:nth-child(4) { animation-delay: 0.4s; }
