/*
* DiwaPay - Pure HTML/CSS/JS Standalone Stylesheet
* Clean, responsive, modern UI
*/

:root {
    --brand-main: #4f46e5;
    --brand-light: #e0e7ff;
    --brand-dark: #3730a3;
    --text-dark: #0f172a;
    --text-muted: #475569;
    --text-light: #94a3b8;
    --surface-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #f1f5f9;
    --corner-radius: 14px;
    --corner-radius-lg: 20px;
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--surface-bg);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* Responsive Wrapper */
.diwa-app-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* NAVIGATION */
.diwa-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 5%;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.diwa-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.diwa-brand-link img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
}

.diwa-brand-text {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-dark);
}

/* Desktop Menu */
.diwa-desktop-menu {
    display: none;
    gap: 25px;
    align-items: center;
}

.diwa-desktop-menu a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.diwa-desktop-menu a:hover,
.diwa-desktop-menu a.active {
    color: var(--brand-main);
}

/* Mobile Hamburger */
.diwa-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.diwa-menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--text-dark);
    border-radius: 4px;
    transition: 0.3s;
}

.diwa-dropdown-menu {
    display: none;
    position: absolute;
    top: 75px;
    right: 5%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--corner-radius);
    width: 220px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 99;
}

.diwa-dropdown-menu.is-active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.diwa-dropdown-menu a {
    display: block;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s, color 0.2s;
}

.diwa-dropdown-menu a:last-child {
    border-bottom: none;
}

.diwa-dropdown-menu a:hover,
.diwa-dropdown-menu a.active {
    background: var(--brand-light);
    color: var(--brand-dark);
}

/* SCROLL CONTAINER */
.diwa-scroll-view {
    flex: 1;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px 60px;
    display: flex;
    flex-direction: column;
}

/* HERO SECTION */
.diwa-hero-block {
    padding: 50px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--card-bg);
    border-radius: var(--corner-radius-lg);
    margin: 25px 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.diwa-hero-img {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.2);
    object-fit: cover;
}

.diwa-hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.diwa-hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 600px;
}

.diwa-action-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 500px;
    margin-bottom: 15px;
}

.diwa-btn {
    flex: 1;
    min-width: 200px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: var(--corner-radius);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s;
    cursor: pointer;
    border: none;
    gap: 8px;
}

.diwa-btn-filled {
    background: var(--brand-main);
    color: var(--card-bg);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.diwa-btn-filled:hover {
    background: var(--brand-dark);
    transform: translateY(-2px);
    color: var(--card-bg);
}

.diwa-btn-outlined {
    background: var(--card-bg);
    color: var(--brand-main);
    border: 2px solid var(--brand-main);
}

.diwa-btn-outlined:hover {
    background: var(--brand-light);
    color: var(--brand-dark);
}

.diwa-btn-social {
    background: #0088CC;
    color: var(--card-bg);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.diwa-btn-social:hover {
    background: #0077b5;
    transform: translateY(-2px);
    color: var(--card-bg);
}

/* CONTENT CARDS */
.diwa-content-card {
    margin: 25px 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--corner-radius-lg);
    padding: 35px 40px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.02);
}

.diwa-heading-primary {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--brand-light);
}

.diwa-heading-secondary {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 24px 0 10px;
}

.diwa-heading-tertiary {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-main);
    margin: 16px 0 8px;
}

.diwa-paragraph {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 16px;
}

/* Typographic rules for rich content / inner pages */
.diwa-paragraph h2,
.diwa-content-card h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 28px 0 12px;
}

.diwa-paragraph h3,
.diwa-content-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-main);
    margin: 20px 0 10px;
}

.diwa-paragraph p,
.diwa-content-card p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 16px;
}

.diwa-paragraph ul,
.diwa-content-card ul {
    margin: 15px 0 20px;
    padding-left: 24px;
}

.diwa-paragraph ol,
.diwa-content-card ol {
    margin: 15px 0 20px;
    padding-left: 24px;
}

.diwa-paragraph li,
.diwa-content-card li {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 8px;
}

.diwa-paragraph a,
.diwa-content-card a {
    color: var(--brand-main);
    text-decoration: underline;
    font-weight: 600;
}

.diwa-paragraph a:hover,
.diwa-content-card a:hover {
    color: var(--brand-dark);
}

.diwa-paragraph strong,
.diwa-content-card strong {
    color: var(--text-dark);
    font-weight: 700;
}

/* LIST GROUPS */
.diwa-list-group,
.diwa-list-ordered {
    padding-left: 20px;
    margin-top: 10px;
    margin-bottom: 18px;
}

.diwa-list-ordered {
    counter-reset: custom-counter;
    list-style: none;
    padding-left: 24px;
}

.diwa-list-item {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 10px;
}

.diwa-list-ordered .diwa-list-item {
    position: relative;
    counter-increment: custom-counter;
}

.diwa-list-ordered .diwa-list-item::before {
    content: counter(custom-counter) ".";
    position: absolute;
    left: -24px;
    font-weight: 800;
    color: var(--brand-main);
}

.diwa-hyperlink {
    color: var(--brand-dark);
    text-decoration: none;
    font-weight: 700;
}

.diwa-hyperlink:hover {
    text-decoration: underline;
}

.diwa-image-box {
    width: 100%;
    max-width: 500px;
    border-radius: var(--corner-radius);
    margin: 20px auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: block;
}

/* TOC LIST */
.diwa-toc-wrap {
    list-style: none;
    counter-reset: diwa-toc;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.diwa-toc-item {
    counter-increment: diwa-toc;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--corner-radius);
    font-size: 0.95rem;
    background: var(--surface-bg);
    transition: 0.2s;
}

.diwa-toc-item:hover {
    border-color: var(--brand-light);
    background: var(--brand-light);
}

.diwa-toc-item::before {
    content: counter(diwa-toc);
    width: 26px;
    height: 26px;
    background: var(--brand-main);
    color: var(--card-bg);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    font-weight: 800;
    flex-shrink: 0;
}

.diwa-toc-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    width: 100%;
}

/* TABLES */
.diwa-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
    border-radius: var(--corner-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.diwa-table th {
    background: var(--brand-main);
    color: var(--card-bg);
    padding: 14px 18px;
    text-align: left;
    font-weight: 700;
}

.diwa-table td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
}

.diwa-table tr:nth-child(even) td {
    background: var(--surface-bg);
}

/* ALERTS */
.diwa-alert {
    background: var(--brand-light);
    border-left: 5px solid var(--brand-main);
    padding: 16px 20px;
    border-radius: 0 var(--corner-radius) var(--corner-radius) 0;
    font-size: 0.95rem;
    color: var(--text-dark);
    margin: 20px 0;
    line-height: 1.6;
    font-weight: 500;
}

.diwa-alert-danger {
    background: #fee2e2;
    border-left: 5px solid #ef4444;
    padding: 16px 20px;
    border-radius: 0 var(--corner-radius) var(--corner-radius) 0;
    font-size: 0.95rem;
    color: #991b1b;
    margin: 20px 0;
    line-height: 1.6;
    font-weight: 500;
}

/* CHIPS */
.diwa-chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.diwa-chip {
    background: var(--surface-bg);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* FAQ SECTION */
.diwa-faq-container {
    border: 1px solid var(--border-color);
    border-radius: var(--corner-radius);
    overflow: hidden;
    margin-bottom: 10px;
}

.diwa-faq-btn {
    width: 100%;
    text-align: left;
    padding: 18px 20px;
    background: var(--surface-bg);
    border: none;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    transition: background-color 0.2s;
}

.diwa-faq-btn:last-child {
    border-bottom: none;
}

.diwa-faq-btn:hover {
    background: #f1f5f9;
}

.diwa-faq-btn i {
    color: var(--brand-main);
    transition: transform 0.3s ease;
}

.diwa-faq-btn.active i {
    transform: rotate(180deg);
}

.diwa-faq-content {
    display: none;
    padding: 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

/* FOOTER */
.diwa-footer-wrap {
    background: #0f172a;
    border-top: 1px solid #1e293b;
    text-align: center;
    padding: 40px 20px;
    margin-top: auto;
}

.diwa-disclaimer-footer {
    font-size: 0.85rem;
    color: #991b1b;
    background: #fee2e2;
    padding: 18px;
    border-radius: var(--corner-radius);
    margin: 0 auto 30px;
    max-width: 900px;
    text-align: left;
    line-height: 1.6;
    border: 1px solid #fca5a5;
}

.diwa-footer-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.diwa-footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.diwa-footer-links a:hover,
.diwa-footer-links a.active {
    color: #ffffff;
}

.diwa-copyright {
    font-size: 0.85rem;
    color: #64748b;
}

/* Responsive Breakpoints */
@media (min-width: 768px) {
    .diwa-desktop-menu {
        display: flex;
    }
    .diwa-menu-toggle {
        display: none;
    }
    .diwa-dropdown-menu {
        display: none !important;
    }
    .diwa-image-box {
        max-width: 600px;
    }
}

@media (max-width: 767px) {
    .diwa-content-card {
        padding: 25px 20px;
        margin: 15px 0;
    }
    .diwa-hero-block {
        padding: 35px 20px;
    }
    .diwa-hero-title {
        font-size: 1.8rem;
    }
    .diwa-toc-wrap {
        grid-template-columns: 1fr;
    }
}
