/**
 * Public Frontend Styles - BMT Bina Ummah
 * Menggunakan TailwindCSS CDN dengan custom styling
 */

/* Utilities tambahan yang tidak ada di TailwindCSS CDN */
.text-balance {
    text-wrap: balance;
}

/* Custom button effects */
.btn-hover-shadow:hover {
    box-shadow: 0 10px 25px -5px rgba(75, 163, 93, 0.4);
}

/* Custom animation delays */
.animation-delay-100 {
    animation-delay: 0.1s;
}

.animation-delay-200 {
    animation-delay: 0.2s;
}

.animation-delay-300 {
    animation-delay: 0.3s;
}

/* Instagram-style components */
.instagram-post {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.instagram-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.instagram-post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.instagram-post:hover .instagram-post-overlay {
    opacity: 1;
}

.instagram-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.instagram-stats svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Swiper customization for Instagram posts */
.post-swiper .swiper-pagination {
    bottom: 12px !important;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.post-swiper .swiper-pagination-bullet {
    width: 8px !important;
    height: 8px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    border-radius: 50% !important;
    opacity: 1 !important;
    margin: 0 2px !important;
    transition: all 0.2s ease !important;
}

.post-swiper .swiper-pagination-bullet-active {
    background: white !important;
    opacity: 1 !important;
    transform: scale(1.2);
}

.post-swiper .swiper-button-next,
.post-swiper .swiper-button-prev {
    color: white !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    margin-top: -20px !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.post-swiper:hover .swiper-button-next,
.post-swiper:hover .swiper-button-prev {
    opacity: 1 !important;
}

.post-swiper .swiper-button-next:after,
.post-swiper .swiper-button-prev:after {
    font-size: 14px !important;
    font-weight: bold !important;
}

/* Modal customization */
#post-modal {
    z-index: 9999;
}

#post-modal .bg-white {
    max-height: 90vh;
    overflow: hidden;
}

#post-modal video,
#post-modal img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

/* Responsive utilities untuk chart */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

@media (max-width: 768px) {
    .chart-container {
        height: 300px;
    }

    .instagram-post {
        border-radius: 8px;
    }

    #post-modal .max-w-4xl {
        max-width: 95vw;
        margin: 1rem;
    }

    #post-modal .bg-white {
        border-radius: 12px;
    }
}

/* Responsive utilities untuk chart */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

@media (max-width: 768px) {
    .chart-container {
        height: 300px;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .print-break {
        page-break-before: always;
    }
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4BA35D;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form enhancements */
.form-input:focus {
    border-color: #4BA35D;
    box-shadow: 0 0 0 3px rgba(75, 163, 93, 0.1);
}

.form-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

.notification.success {
    background-color: #dcfce7;
    border-left: 4px solid #4BA35D;
    color: #15803d;
}

.notification.error {
    background-color: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #dc2626;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile-first responsive images */
.responsive-img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #4BA35D;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .glass-card {
        background: white;
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Donation Component Styles */
.donation-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.donation-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.progress-bar {
    background: linear-gradient(90deg, #10b981, #22c55e);
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: rgba(255, 255, 255, 0.35);
    transform: skewX(-20deg);
    animation: shimmer 1.6s infinite;
}

/* Width utilities (percent) to avoid inline style on progress bars */
.w-p-0{width:0%}
.w-p-1{width:1%}
.w-p-2{width:2%}
.w-p-3{width:3%}
.w-p-4{width:4%}
.w-p-5{width:5%}
.w-p-6{width:6%}
.w-p-7{width:7%}
.w-p-8{width:8%}
.w-p-9{width:9%}
.w-p-10{width:10%}
.w-p-11{width:11%}
.w-p-12{width:12%}
.w-p-13{width:13%}
.w-p-14{width:14%}
.w-p-15{width:15%}
.w-p-16{width:16%}
.w-p-17{width:17%}
.w-p-18{width:18%}
.w-p-19{width:19%}
.w-p-20{width:20%}
.w-p-21{width:21%}
.w-p-22{width:22%}
.w-p-23{width:23%}
.w-p-24{width:24%}
.w-p-25{width:25%}
.w-p-26{width:26%}
.w-p-27{width:27%}
.w-p-28{width:28%}
.w-p-29{width:29%}
.w-p-30{width:30%}
.w-p-31{width:31%}
.w-p-32{width:32%}
.w-p-33{width:33%}
.w-p-34{width:34%}
.w-p-35{width:35%}
.w-p-36{width:36%}
.w-p-37{width:37%}
.w-p-38{width:38%}
.w-p-39{width:39%}
.w-p-40{width:40%}
.w-p-41{width:41%}
.w-p-42{width:42%}
.w-p-43{width:43%}
.w-p-44{width:44%}
.w-p-45{width:45%}
.w-p-46{width:46%}
.w-p-47{width:47%}
.w-p-48{width:48%}
.w-p-49{width:49%}
.w-p-50{width:50%}
.w-p-51{width:51%}
.w-p-52{width:52%}
.w-p-53{width:53%}
.w-p-54{width:54%}
.w-p-55{width:55%}
.w-p-56{width:56%}
.w-p-57{width:57%}
.w-p-58{width:58%}
.w-p-59{width:59%}
.w-p-60{width:60%}
.w-p-61{width:61%}
.w-p-62{width:62%}
.w-p-63{width:63%}
.w-p-64{width:64%}
.w-p-65{width:65%}
.w-p-66{width:66%}
.w-p-67{width:67%}
.w-p-68{width:68%}
.w-p-69{width:69%}
.w-p-70{width:70%}
.w-p-71{width:71%}
.w-p-72{width:72%}
.w-p-73{width:73%}
.w-p-74{width:74%}
.w-p-75{width:75%}
.w-p-76{width:76%}
.w-p-77{width:77%}
.w-p-78{width:78%}
.w-p-79{width:79%}
.w-p-80{width:80%}
.w-p-81{width:81%}
.w-p-82{width:82%}
.w-p-83{width:83%}
.w-p-84{width:84%}
.w-p-85{width:85%}
.w-p-86{width:86%}
.w-p-87{width:87%}
.w-p-88{width:88%}
.w-p-89{width:89%}
.w-p-90{width:90%}
.w-p-91{width:91%}
.w-p-92{width:92%}
.w-p-93{width:93%}
.w-p-94{width:94%}
.w-p-95{width:95%}
.w-p-96{width:96%}
.w-p-97{width:97%}
.w-p-98{width:98%}
.w-p-99{width:99%}
.w-p-100{width:100%}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Payment Method Selection */
.payment-method {
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
    position: relative;
}

.payment-method:hover {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.payment-method.selected {
    border-color: #10b981;
    background-color: #dcfce7;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.payment-method.selected::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Quick Amount Buttons */
.quick-amount {
    transition: all 0.2s ease;
}

.quick-amount:hover {
    border-color: #10b981;
    background-color: #f0fdf4;
    transform: translateY(-1px);
}

.quick-amount:active {
    transform: translateY(0);
}

/* Modal Animations */
.modal-content {
    animation: donationModalSlideIn 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes donationModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Line Clamp for donation descriptions */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    max-height: 4.5em;
}

/* Disabled Button States */
button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Success/Error States */
.success-state {
    color: #10b981;
    background-color: #f0fdf4;
    border-color: #10b981;
}

.error-state {
    color: #ef4444;
    background-color: #fef2f2;
    border-color: #ef4444;
}

/* Responsive Adjustments for Donation */
@media (max-width: 768px) {
    .donation-card {
        margin-bottom: 1rem;
    }

    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }

    .payment-method {
        margin-bottom: 0.5rem;
    }
}

/* Donation Messages Component Styles */
.message-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid #16a34a;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
}

.message-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
    border-left-color: #15803d;
}

.message-content {
    font-style: italic;
    line-height: 1.6;
    color: #374151;
    position: relative;
}

.message-content::before {
    content: '"';
    font-size: 1.5em;
    color: #16a34a;
    opacity: 0.3;
    position: absolute;
    left: -8px;
    top: -8px;
    font-family: Georgia, serif;
}

.message-meta {
    font-size: 0.75rem;
    color: #6b7280;
    border-top: 1px solid #f3f4f6;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.program-badge {
    display: inline-block;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.2);
}

.amount-display {
    color: #16a34a;
    font-weight: 700;
    font-size: 0.875rem;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    display: inline-block;
    margin-top: 0.25rem;
}

/* Verified badge */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #16a34a;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Avatar styling */
.message-avatar {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
    position: relative;
}

.message-avatar::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    z-index: -1;
    opacity: 0.3;
}

/* Animation for new messages */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message-card.new {
    animation: messageSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-left-color: #fbbf24;
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.2);
}

/* Loading skeleton for messages */
.message-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Load more button styling */
#load-more-messages {
    position: relative;
    overflow: hidden;
}

#load-more-messages::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

#load-more-messages:hover::before {
    left: 100%;
}

/* Responsive adjustments for messages */
@media (max-width: 768px) {
    .message-card {
        margin-bottom: 0.75rem;
        padding: 0.75rem;
    }

    .message-avatar {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }

    .program-badge {
        font-size: 0.625rem;
        padding: 0.125rem 0.5rem;
    }

    .amount-display {
        font-size: 0.8125rem;
    }
}

/* Empty state styling */
.messages-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.messages-empty-state svg {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    opacity: 0.5;
}

/* SSE Real-time Update Visual Feedback - Disabled aggressive animations */
/* .updated and .updated-text classes disabled to prevent continuous movement */

@keyframes pulseGreen {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
}

@keyframes textHighlight {
0% {
background-color: transparent;
color: inherit;
}
50% {
background-color: rgba(34, 197, 94, 0.2);
color: rgb(21, 128, 61);
}
100% {
background-color: transparent;
color: inherit;
}
}

/* ================= Migrated from header.php <style> (inline) ================= */
/* Essential CSS with modern theme */
body {
font-family: 'Inter', system-ui, sans-serif;
}

/* Custom animations */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
from { opacity: 0; transform: translateY(40px); }
to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceSoft {
0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
40%, 43% { transform: translate3d(0, -15px, 0); }
70% { transform: translate3d(0, -7px, 0); }
90% { transform: translate3d(0, -2px, 0); }
}

/* Gradient backgrounds untuk hero section */
.bg-gradient-elegant {
background: linear-gradient(135deg, #4BA35D 0%, #16a34a 50%, #15803d 100%);
}

.bg-gradient-soft {
background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

/* Custom hover effects */
.hover-lift {
transition: all 0.3s ease-in-out;
}

.hover-lift:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Card glassmorphism effect */
.glass-card {
backdrop-filter: blur(10px);
background: rgba(255, 255, 255, 0.95);
border: 1px solid rgba(255, 255, 255, 0.2);
}

/* CMS Media optimization */
.cms-media-container {
position: relative;
width: 100%;
min-height: 200px;
overflow: hidden;
border-radius: 0.75rem;
}

.cms-media-container img,
.cms-media-container video {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease-in-out;
}

.cms-media-container:hover img,
.cms-media-container:hover video {
transform: scale(1.05);
}

/* Button modern styling */
.btn-primary {
background-color: #4BA35D;
color: white;
font-weight: 600;
padding: 0.75rem 1.5rem;
border-radius: 0.5rem;
transition: all 0.3s ease-in-out;
box-shadow: 0 4px 14px 0 rgba(75, 163, 93, 0.3);
border: none;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
}

.btn-primary:hover {
background-color: #22c55e;
box-shadow: 0 6px 20px rgba(75, 163, 93, 0.4);
transform: translateY(-2px);
}

.btn-secondary {
background-color: white;
color: #4BA35D;
border: 2px solid #4BA35D;
font-weight: 600;
padding: 0.75rem 1.5rem;
border-radius: 0.5rem;
transition: all 0.3s ease-in-out;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
}

.btn-secondary:hover {
background-color: #f0fdf4;
}

/* Navigation modern styling */
.nav-link {
color: #374151;
font-weight: 500;
transition: color 0.2s ease-in-out;
position: relative;
text-decoration: none;
}

.nav-link:hover {
color: #4BA35D;
}

.nav-link::after {
content: '';
position: absolute;
width: 0;
height: 2px;
bottom: -4px;
left: 50%;
background-color: #4BA35D;
transition: all 0.3s ease-in-out;
transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
width: 100%;
}

/* Responsive optimizations */
@media (min-width: 640px) {
.cms-media-container {
min-height: 224px;
}
}

@media (min-width: 1024px) {
.cms-media-container {
min-height: 256px;
}
}

/* Loading skeleton */
.skeleton {
animation: skeleton-loading 1s linear infinite alternate;
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
background-size: 200% 100%;
}

@keyframes skeleton-loading {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Focus states untuk accessibility */
.focus-ring:focus {
outline: none;
box-shadow: 0 0 0 2px rgba(75, 163, 93, 0.5);
}

/* Header gradient modern putih (subtle) */
.bg-header-gradient {
background: linear-gradient(90deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
position: relative;
}

/* Mobile menu styling untuk konsistensi dengan header (light) */
#mobile-menu.bg-header-gradient {
background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
}

/* Enhanced hover effects untuk mobile menu (light) */
#mobile-menu a:hover { background: #eef2f7; }

/* Swiper custom styling */
.swiper-pagination-bullet-active { background: #4BA35D !important; }
.swiper-button-next, .swiper-button-prev { color: #16a34a !important; }

/* Compact controls for media modal and docs carousel */
.media-swiper .swiper-button-next,
.media-swiper .swiper-button-prev,
.docs-carousel .swiper-button-next,
.docs-carousel .swiper-button-prev {
width: 36px;
height: 36px;
border-radius: 9999px;
background: rgba(255,255,255,0.9);
box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.media-swiper .swiper-button-next::after,
.media-swiper .swiper-button-prev::after,
.docs-carousel .swiper-button-next::after,
.docs-carousel .swiper-button-prev::after {
font-size: 14px;
font-weight: 700;
}
.media-swiper .swiper-pagination-bullet,
.docs-carousel .swiper-pagination-bullet {
width: 6px;
height: 6px;
background: #cbd5e1;
opacity: 1;
}
.media-swiper .swiper-pagination-bullet-active,
.docs-carousel .swiper-pagination-bullet-active { background: #16a34a !important; }

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

/* Progress width utilities (0%..100%) to replace inline style widths */
.progress-w-0 { width: 0%; }
.progress-w-1 { width: 1%; }
.progress-w-2 { width: 2%; }
.progress-w-3 { width: 3%; }
.progress-w-4 { width: 4%; }
.progress-w-5 { width: 5%; }
.progress-w-6 { width: 6%; }
.progress-w-7 { width: 7%; }
.progress-w-8 { width: 8%; }
.progress-w-9 { width: 9%; }
.progress-w-10 { width: 10%; }
.progress-w-11 { width: 11%; }
.progress-w-12 { width: 12%; }
.progress-w-13 { width: 13%; }
.progress-w-14 { width: 14%; }
.progress-w-15 { width: 15%; }
.progress-w-16 { width: 16%; }
.progress-w-17 { width: 17%; }
.progress-w-18 { width: 18%; }
.progress-w-19 { width: 19%; }
.progress-w-20 { width: 20%; }
.progress-w-21 { width: 21%; }
.progress-w-22 { width: 22%; }
.progress-w-23 { width: 23%; }
.progress-w-24 { width: 24%; }
.progress-w-25 { width: 25%; }
.progress-w-26 { width: 26%; }
.progress-w-27 { width: 27%; }
.progress-w-28 { width: 28%; }
.progress-w-29 { width: 29%; }
.progress-w-30 { width: 30%; }
.progress-w-31 { width: 31%; }
.progress-w-32 { width: 32%; }
.progress-w-33 { width: 33%; }
.progress-w-34 { width: 34%; }
.progress-w-35 { width: 35%; }
.progress-w-36 { width: 36%; }
.progress-w-37 { width: 37%; }
.progress-w-38 { width: 38%; }
.progress-w-39 { width: 39%; }
.progress-w-40 { width: 40%; }
.progress-w-41 { width: 41%; }
.progress-w-42 { width: 42%; }
.progress-w-43 { width: 43%; }
.progress-w-44 { width: 44%; }
.progress-w-45 { width: 45%; }
.progress-w-46 { width: 46%; }
.progress-w-47 { width: 47%; }
.progress-w-48 { width: 48%; }
.progress-w-49 { width: 49%; }
.progress-w-50 { width: 50%; }
.progress-w-51 { width: 51%; }
.progress-w-52 { width: 52%; }
.progress-w-53 { width: 53%; }
.progress-w-54 { width: 54%; }
.progress-w-55 { width: 55%; }
.progress-w-56 { width: 56%; }
.progress-w-57 { width: 57%; }
.progress-w-58 { width: 58%; }
.progress-w-59 { width: 59%; }
.progress-w-60 { width: 60%; }
.progress-w-61 { width: 61%; }
.progress-w-62 { width: 62%; }
.progress-w-63 { width: 63%; }
.progress-w-64 { width: 64%; }
.progress-w-65 { width: 65%; }
.progress-w-66 { width: 66%; }
.progress-w-67 { width: 67%; }
.progress-w-68 { width: 68%; }
.progress-w-69 { width: 69%; }
.progress-w-70 { width: 70%; }
.progress-w-71 { width: 71%; }
.progress-w-72 { width: 72%; }
.progress-w-73 { width: 73%; }
.progress-w-74 { width: 74%; }
.progress-w-75 { width: 75%; }
.progress-w-76 { width: 76%; }
.progress-w-77 { width: 77%; }
.progress-w-78 { width: 78%; }
.progress-w-79 { width: 79%; }
.progress-w-80 { width: 80%; }
.progress-w-81 { width: 81%; }
.progress-w-82 { width: 82%; }
.progress-w-83 { width: 83%; }
.progress-w-84 { width: 84%; }
.progress-w-85 { width: 85%; }
.progress-w-86 { width: 86%; }
.progress-w-87 { width: 87%; }
.progress-w-88 { width: 88%; }
.progress-w-89 { width: 89%; }
.progress-w-90 { width: 90%; }
.progress-w-91 { width: 91%; }
.progress-w-92 { width: 92%; }
.progress-w-93 { width: 93%; }
.progress-w-94 { width: 94%; }
.progress-w-95 { width: 95%; }
.progress-w-96 { width: 96%; }
.progress-w-97 { width: 97%; }
.progress-w-98 { width: 98%; }
.progress-w-99 { width: 99%; }
.progress-w-100 { width: 100%; }

/* Hide header when modal is open (fully remove space) */
body.modal-open nav.sticky,
html.modal-open nav.sticky { display: none !important; }

/* Utility: hide scrollbar (for mobile horizontal nav list) */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ===== Utilities to replace inline styles (for strict CSP) ===== */
/* Enter transition (replaces inline opacity/transform/transition) */
.enter-from { opacity: 0; transform: translateY(-20px); transition: opacity 0.3s ease, transform 0.3s ease; }
.enter-to   { opacity: 1; transform: translateY(0); }

/* Marquee duration utilities (desktop and mobile) */
.marquee-duration-20 { --marquee-duration: 20s; }
.marquee-duration-30 { --marquee-duration: 30s; }
.marquee-duration-45 { --marquee-duration: 45s; }

/* Mobile-specific duration override; used by media query in marquee CSS */
.marquee-mobile-30 { --marquee-duration-mobile: 30s; }
.marquee-mobile-60 { --marquee-duration-mobile: 60s; }

/* Animation delay utilities (seconds) */
.delay-0s { animation-delay: 0s !important; }
.delay-1s { animation-delay: 1s !important; }
.delay-2s { animation-delay: 2s !important; }
.delay-3s { animation-delay: 3s !important; }
.delay-4s { animation-delay: 4s !important; }
.delay-5s { animation-delay: 5s !important; }

/* Aspect-ratio utilities to avoid inline style attributes */
.ratio-4-5 { aspect-ratio: 4 / 5; }
.ratio-1-1 { aspect-ratio: 1 / 1; }
.ratio-16-9 { aspect-ratio: 16 / 9; }

/* Modal body scroll lock via class instead of inline style */
body.modal-open { overflow: hidden; }

/* Utility: will-change for smoother transforms */
.will-change-transform { will-change: transform; }

/* Utility: safe-area bottom padding for mobile */
.pb-safe { padding-bottom: calc(env(safe-area-inset-bottom) + 1rem); }

/* Swiper bullets styling via CSS (no inline style needed) */
.swiper-pagination-bullet { background: #ffffff; opacity: 0.5; }
.swiper-pagination-bullet-active { opacity: 1; }

/* Hero carousel: prevent flicker and initial flash */
.hero-swiper { background-color: transparent; }
.hero-swiper .swiper-wrapper { background-color: transparent; }
.hero-swiper .swiper-slide { background-color: transparent; }

/* Ensure proper Swiper layout for hero */
.hero-swiper .swiper-wrapper {
  display: flex; /* required by Swiper to align slides horizontally */
}
.hero-swiper .swiper-slide {
  flex-shrink: 0;
  width: 100%;
}

/* Hero swiper navigation: white semi-transparent arrows on desktop */
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
  color: rgba(255, 255, 255, 0.9) !important; /* arrow icon color */
  background: transparent !important; /* no bubble background */
  width: 44px !important;
  height: 44px !important;
  text-shadow: 0 2px 6px rgba(0,0,0,0.35);
  z-index: 30; /* ensure above slide anchors/images */
  pointer-events: auto;
}
.hero-swiper .swiper-button-next::after,
.hero-swiper .swiper-button-prev::after { display: none !important; }
.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover {
  color: #ffffff !important;
}

/* Arrow SVG styling for better contrast */
.hero-swiper .swiper-button-next svg,
.hero-swiper .swiper-button-prev svg {
  width: 36px;
  height: 36px;
  opacity: 0.9;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
  transition: opacity .2s ease, transform .2s ease;
}
.hero-swiper .swiper-button-next:hover svg,
.hero-swiper .swiper-button-prev:hover svg {
  opacity: 1;
}

/* Ensure hero pagination is above slides too */
.hero-swiper .swiper-pagination {
  z-index: 30;
}

/* In loop mode, avoid disabling navigation clickability */
.hero-swiper .swiper-button-disabled {
  opacity: 0.9 !important;
  pointer-events: auto !important;
}

/* Hide slides until initialized to avoid showing stacked images */
.hero-swiper:not(.is-ready) { visibility: hidden; }
.hero-swiper.is-ready { visibility: visible; }

.hero-swiper img {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: opacity, transform;
}

/* Hide navigation arrows on mobile/tablet for hero swiper */
@media (max-width: 1024px) {
  .hero-swiper .swiper-button-next,
  .hero-swiper .swiper-button-prev { display: none !important; }
}

/* Keep pagination visible during transitions */
.hero-swiper .swiper-pagination { opacity: 1 !important; visibility: visible !important; }

/* Statistic cards: vertical centering and responsive value size */
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 9.5rem; /* ensure enough height for perfect centering */
}

.stat-value {
  font-weight: 800;
  line-height: 1.1;
  /* scale with viewport but cap for readability; grows on desktop, shrinks for long values */
  font-size: clamp(2rem, 3vw + 0.5rem, 3.75rem);
  word-break: break-word;
}