/* =====================================================
   PPID Website — Global CSS
   ===================================================== */

/* ===================== Base ===================== */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --color-primary: #10b981;
    --color-primary-dark: #059669;
    --color-gold: #f59e0b;
    --radius-card: 1rem;
    --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===================== Custom Scrollbar ===================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #10b981; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #059669; }

/* ===================== Selection ===================== */
::selection { background: #10b98133; color: #064e3b; }

/* ===================== Swiper Hero ===================== */
.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
    width: 48px; height: 48px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    color: white;
    transition: var(--transition);
}
.hero-swiper .swiper-button-prev:hover,
.hero-swiper .swiper-button-next:hover { background: rgba(255,255,255,0.3); }
.hero-swiper .swiper-button-prev::after,
.hero-swiper .swiper-button-next::after { font-size: 14px; font-weight: 700; }
.hero-swiper .swiper-pagination-bullet {
    background: rgba(255,255,255,0.5);
    width: 8px; height: 8px;
    transition: var(--transition);
}
.hero-swiper .swiper-pagination-bullet-active {
    background: white;
    width: 24px;
    border-radius: 99px;
}

/* ===================== Line Clamp ===================== */
.line-clamp-1 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.line-clamp-3 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* ===================== Glassmorphism ===================== */
.glass {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
}

/* ===================== Hero Pattern ===================== */
.hero-pattern {
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ===================== Prose Content ===================== */
.prose-content, .dip-summary { overflow-wrap: anywhere; word-break: break-word; }
.prose-content h2, .prose-content h3, .prose-content h4 {
    font-weight: 700; margin-top: 1.5em; margin-bottom: 0.5em; color: #1f2937;
}
.prose-content p { margin-bottom: 1em; color: #374151; line-height: 1.8; }
.prose-content ul, .dip-summary ul { list-style: none !important; margin: .5rem 0; padding-left: 1.5rem !important; }
.prose-content ol, .dip-summary ol { list-style: none !important; counter-reset: rich-list; margin: .5rem 0; padding-left: 1.75rem !important; }
.prose-content li, .dip-summary li { display: block !important; position: relative; margin-bottom: .25em; color: #374151; }
.prose-content ul > li::before, .dip-summary ul > li::before { content: '•'; position: absolute; left: -1rem; color: #059669; font-weight: 700; }
.prose-content ol > li, .dip-summary ol > li { counter-increment: rich-list; }
.prose-content ol > li::before, .dip-summary ol > li::before { content: counter(rich-list) '.'; position: absolute; left: -1.5rem; color: #059669; font-weight: 700; }
.prose-content ol[type="a"] > li::before, .dip-summary ol[type="a"] > li::before { content: counter(rich-list, lower-alpha) '.'; }
.prose-content a { color: #10b981; text-decoration: underline; }
.prose-content img { max-width: 100%; border-radius: 12px; margin: 1em 0; }
.dark .prose-content h2,.dark .prose-content h3,.dark .prose-content h4 { color: #f9fafb; }
.dark .prose-content p,.dark .prose-content li { color: #d1d5db; }

/* ===================== Form Styles ===================== */
.form-input {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 14px;
    transition: var(--transition);
    background: white;
    color: #1f2937;
    outline: none;
}
.form-input:focus { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.dark .form-input { background: #1f2937; border-color: #374151; color: #f9fafb; }
.dark .form-input:focus { border-color: #10b981; }

.form-label { display: block; font-size: 14px; font-weight: 500; color: #374151; margin-bottom: 6px; }
.dark .form-label { color: #d1d5db; }

/* ===================== Button Styles ===================== */
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: #10b981; hover:background: #059669;
    color: white; font-weight: 600; padding: 10px 24px;
    border-radius: 12px; transition: var(--transition);
    font-size: 14px; border: none; cursor: pointer;
}
.btn-primary:hover { background: #059669; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,0.3); }

/* ===================== Status Badges ===================== */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-size: 11px; font-weight: 600; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-error { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-purple { background: #ede9fe; color: #5b21b6; }

/* ===================== Loading Spinner ===================== */
.spinner { 
    width: 40px; height: 40px; 
    border: 3px solid #e5e7eb; 
    border-top-color: #10b981;
    border-radius: 50%; 
    animation: spin 0.8s linear infinite; 
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== Page Header ===================== */
.page-header {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #059669 100%);
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}
.page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* ===================== Table ===================== */
.table-wrapper { overflow-x: auto; border-radius: 12px; border: 1px solid #e5e7eb; }
.dark .table-wrapper { border-color: #374151; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: #f9fafb; padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.data-table td { padding: 12px 16px; font-size: 14px; color: #374151; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f9fafb; }
.dark .data-table th { background: #1f2937; color: #9ca3af; border-color: #374151; }
.dark .data-table td { color: #d1d5db; border-color: #374151; }
.dark .data-table tr:hover td { background: #1f2937; }

/* ===================== Print Styles ===================== */
@media print {
    nav, footer, .no-print, #backToTop { display: none !important; }
    body { background: white !important; color: black !important; }
    .shadow-lg, .shadow-xl, .shadow-sm { box-shadow: none !important; }
}
