/* ==============================================
   COMPONENTS CSS (Buttons, Cards, Forms, Modals)
=============================================== */

/* Preloader */
#ssd-preloader { position: fixed; inset: 0; z-index: 99999; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; transition: opacity 0.55s ease, visibility 0.55s ease; }
#ssd-preloader.hide { opacity: 0; visibility: hidden; }
.preloader-logo { animation: preloader-pulse 1.6s ease-in-out infinite; }
@keyframes preloader-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: 0.85; } }
.preloader-ring { width: 56px; height: 56px; position: relative; }
.preloader-ring svg { width: 100%; height: 100%; animation: preloader-rotate 1.4s linear infinite; }
.preloader-ring circle { fill: none; stroke: #215a37; stroke-width: 3.5; stroke-dasharray: 100; stroke-dashoffset: 60; stroke-linecap: round; }
@keyframes preloader-rotate { to { transform: rotate(360deg); } }
.preloader-dots { display: flex; gap: 7px; }
.preloader-dots span { width: 8px; height: 8px; border-radius: 50%; background: #215a37; animation: preloader-dot 1.2s ease-in-out infinite; }
.preloader-dots span:nth-child(2) { animation-delay: 0.2s; background: #72c173; }
.preloader-dots span:nth-child(3) { animation-delay: 0.4s; background: #2e7d52; }
@keyframes preloader-dot { 0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

/* Reveal Animations */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Section Titles */
.section-title { text-align: center; margin-bottom: 80px; position: relative; padding: 0 16px; }
.section-title h2 { font-size: clamp(2.2rem, 3.2vw, 3.2rem); color: var(--primary); position: relative; display: inline-block; padding-bottom: 22px; letter-spacing: -0.015em; }
.section-title h2::after { content: ''; position: absolute; width: 140px; height: 6px; background: var(--gradient-accent); bottom: 0; left: 50%; transform: translateX(-50%); border-radius: 10px; }
.section-title p { max-width: 860px; margin: 22px auto 0; color: var(--gray); font-size: 1.18rem; }
.section-title--left { text-align: left; margin-bottom: 30px; font-size: clamp(2rem, 3vw, 2.8rem); color: var(--primary); line-height: 1.2; }

/* Buttons */
.nav-cta { background: var(--primary); color: white !important; padding: 12px 36px !important; font-weight: 800; transition: var(--transition); position: relative; overflow: hidden; z-index: 1; display: inline-flex; align-items: center; gap: 10px; border-radius: 50px; }
.nav-cta::before { background: var(--gradient-accent); content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; transition: var(--transition); z-index: -1; }
.nav-cta:hover::before { left: 0; }
.nav-cta:hover { transform: translateY(-4px); }

.btn-primary { background: var(--gradient-primary); color: white; padding: 18px 34px; font-weight: 800; font-size: 1.05rem; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 12px; transition: var(--transition); position: relative; overflow: hidden; z-index: 1; text-decoration: none; border-radius: 50px; }
.btn-primary::before { background: var(--gradient-accent); content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; transition: var(--transition); z-index: -1; }
.btn-primary:hover::before { left: 0; }
.btn-primary:hover { transform: translateY(-6px); color: white; }

.btn-secondary { background: transparent; color: var(--primary); padding: 12px 36px; font-weight: 800; font-size: 1.05rem; border: 2px solid rgba(33, 90, 55, 0.75); cursor: pointer; display: inline-flex; align-items: center; gap: 12px; transition: var(--transition); text-decoration: none; border-radius: 50px; }
.btn-secondary:hover { background: var(--primary); color: white; transform: translateY(-6px); box-shadow: 0 15px 30px rgba(33, 90, 55, 0.18); border-color: var(--primary); }

/* Unified Cards (News, Events, Archive) */
.unified-card { background: white; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(33, 90, 55, 0.05); border: 1px solid rgba(33, 90, 55, 0.05); transition: var(--transition); display: flex; flex-direction: column; height: 100%; }
.unified-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(33, 90, 55, 0.12); border-color: rgba(114, 193, 115, 0.2); }
.card-img-wrap { position: relative; height: 220px; overflow: hidden; }
.unified-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.unified-card:hover img { transform: scale(1.08); }
.card-badge { position: absolute; top: 15px; left: 15px; background: var(--accent); color: var(--dark); padding: 5px 16px; border-radius: 50px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; z-index: 2; box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.event-badge { background: var(--primary); color: white; }
.unified-card-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.unified-card-content h4 a { color: var(--dark); font-size: 1.3rem; text-decoration: none; line-height: 1.4; display: block; margin-bottom: 12px; transition: var(--transition); font-weight: 800; }
.unified-card-content h4 a:hover { color: var(--primary); }
.card-date { color: var(--gray); font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 6px; margin-bottom: 15px; }
.card-date i { color: var(--accent); }
.unified-card-content p { color: var(--gray); font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; }
.event-details { background: var(--bg-cream); padding: 12px 15px; border-radius: 10px; margin-bottom: 20px; border: 1px dashed rgba(33, 90, 55, 0.15); flex-grow: 1; }
.event-details span { display: flex; align-items: flex-start; gap: 8px; color: var(--gray); font-size: 0.9rem; margin-bottom: 8px; font-weight: 500; }
.event-details i { color: var(--accent); width: 14px; text-align: center; margin-top: 3px; }
.read-more { color: var(--primary); text-decoration: none; font-weight: 700; transition: var(--transition); display: inline-flex; align-items: center; gap: 8px; margin-top: auto; }
.read-more:hover { color: var(--accent); gap: 12px; }

/* Filters & Badges */
.header-filters, .archive-filters { display: flex; gap: 10px; background: rgba(33, 90, 55, 0.05); padding: 6px; border-radius: 50px; border: 1px solid rgba(33, 90, 55, 0.1); flex-wrap: wrap; justify-content: center; margin-bottom: 50px; }
.filter-btn { background: transparent; border: none; color: var(--gray); padding: 10px 26px; border-radius: 50px; cursor: pointer; transition: var(--transition); font-weight: 700; font-size: 0.95rem; }
.filter-btn.active, .filter-btn:hover { background: white; color: var(--primary); box-shadow: 0 5px 15px rgba(33, 90, 55, 0.08); border-color: var(--primary); }
.filterable-item { transition: opacity 0.4s ease, transform 0.4s ease; opacity: 1; transform: translateY(0); }
.hide-item { display: none !important; opacity: 0; transform: translateY(10px); }

/* Breadcrumbs */
.breadcrumb { color: var(--gray); display: inline-flex; align-items: center; gap: 12px; font-size: 0.95rem; font-weight: 500; }
.breadcrumb a { color: var(--primary); border-bottom: 1px solid rgba(114, 193, 115, 0.5); text-decoration: none; transition: all 0.3s ease; }
.breadcrumb a:hover { color: var(--accent); border-color: var(--accent); }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 80px; }
.page-numbers { display: flex; align-items: center; justify-content: center; width: 45px; height: 45px; border-radius: 50%; background: white; color: var(--primary); font-weight: 700; text-decoration: none; border: 1px solid rgba(114, 193, 115, 0.2); transition: all 0.3s ease; }
.page-numbers:hover, .page-numbers.current { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 5px 15px rgba(33, 90, 55, 0.2); }
.page-numbers.next, .page-numbers.prev { width: auto; padding: 0 25px; border-radius: 50px; gap: 8px; }

/* Global Forms (.ssd-form, .prt-form, .volunteer-form) */
.ssd-form .form-row, .prt-form-grid, .volunteer-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.ssd-form .form-group, .prt-form .form-group, .volunteer-form .form-group { margin-bottom: 20px; }
.ssd-form label, .prt-form label, .volunteer-form label { display: block; font-weight: 600; color: var(--dark); margin-bottom: 8px; font-size: 0.95rem; }
.ssd-form input, .ssd-form textarea, 
.prt-form input[type="text"], .prt-form input[type="email"], .prt-form input[type="tel"], .prt-form select, .prt-form textarea,
.volunteer-form input[type="text"], .volunteer-form input[type="email"], .volunteer-form input[type="tel"], .volunteer-form select, .volunteer-form textarea {
  width: 100%; padding: 16px 20px; border: 2px solid rgba(114, 193, 115, 0.2); border-radius: 12px; background: #fdfdfd; color: var(--dark); font-family: 'Montserrat', sans-serif; font-size: 1rem; transition: all 0.3s ease;
}
.ssd-form input:focus, .ssd-form textarea:focus, .prt-form input:focus, .prt-form select:focus, .prt-form textarea:focus, .volunteer-form input:focus, .volunteer-form select:focus, .volunteer-form textarea:focus {
  outline: none; border-color: var(--accent); background: white; box-shadow: 0 0 0 4px rgba(114, 193, 115, 0.1);
}
.ssd-form textarea, .prt-form textarea, .volunteer-form textarea { height: 150px; resize: vertical; }
.ssd-form button, .form-submit .btn-primary { width: 100%; justify-content: center; margin-top: 10px; }

/* Form Radio Options (Donation) */
.radio-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 30px; }
.radio-grid.amount-grid { grid-template-columns: repeat(5, 1fr); }
.radio-option { position: relative; }
.radio-option input[type="radio"] { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.radio-option label { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px 15px; background: var(--bg-cream); border: 2px solid rgba(114, 193, 115, 0.2); border-radius: 12px; cursor: pointer; transition: all 0.3s ease; font-weight: 600; color: var(--gray); text-align: center; height: 100%; }
.radio-option label i { font-size: 1.5rem; margin-bottom: 8px; color: var(--primary); transition: all 0.3s ease; }
.radio-option input[type="radio"]:checked + label { background: var(--primary); border-color: var(--primary); color: white; box-shadow: 0 10px 20px rgba(33, 90, 55, 0.2); }
.radio-option input[type="radio"]:checked + label i { color: white; }
.radio-option label:hover { border-color: var(--primary); background: white; }
.amount-label { font-size: 1.3rem; font-weight: 800; }
.custom-amount-wrap { position: relative; margin-bottom: 30px; }
.custom-amount-wrap i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--gray); font-size: 1.2rem; }
.custom-amount-wrap input { width: 100%; padding: 16px 20px 16px 45px; border: 2px solid rgba(114, 193, 115, 0.2); border-radius: 12px; font-size: 1.1rem; font-weight: 600; color: var(--dark); transition: all 0.3s ease; }

/* Lightbox */
.lightbox-modal { position: fixed; inset: 0; background: rgba(10, 15, 12, 0.95); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; padding: 40px; }
.lightbox-modal.active { opacity: 1; visibility: visible; }
.lightbox-content { position: relative; max-width: 1000px; width: 100%; max-height: 90vh; }
.lightbox-content img { width: 100%; height: 100%; max-height: 85vh; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); transition: opacity 0.15s ease; }
.lightbox-caption { text-align: center; color: white; margin-top: 15px; font-size: 1.1rem; }
.lightbox-close { position: absolute; top: -40px; right: -40px; color: white; font-size: 2rem; cursor: pointer; background: none; border: none; transition: color 0.3s ease; }
.lightbox-close:hover { color: var(--accent); }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); color: white; border: none; font-size: 1.5rem; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; z-index: 10; }
.lightbox-prev:hover, .lightbox-next:hover { background: var(--primary); color: white; }
.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }

/* Responsive Components */
@media (max-width: 992px) {
  .lightbox-close { top: -40px; right: 0; }
  .lightbox-prev { left: 10px; background: rgba(0,0,0,0.5); }
  .lightbox-next { right: 10px; background: rgba(0,0,0,0.5); }
  .ssd-form .form-row, .prt-form-grid, .volunteer-form .form-row { grid-template-columns: 1fr; gap: 0; }
  .radio-grid { grid-template-columns: repeat(2, 1fr); }
  .radio-grid.amount-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .section-title h2 { font-size: 2.35rem; }
  .section-title p { font-size: 1.05rem; }
  .btn-primary, .btn-secondary { padding: 16px 26px; font-size: 1rem; width: 100%; max-width: 320px; justify-content: center; }
}
@media (max-width: 576px) {
  .radio-grid { grid-template-columns: 1fr; }
  .radio-grid.amount-grid { grid-template-columns: repeat(2, 1fr); }
}