/* Global Reset and Variables */
:root {
  --primary-color: #0f172a;
  /* Deep Slate Blue */
  --secondary-color: #1e293b;
  /* Slate */
  --accent-color: #a83281;
  /* Pink from Logo */
  --text-color: #334155;
  /* Blue Gray */
  --bg-color: #f8fafc;
  /* Very Light Blue Gray */
  --white: #ffffff;
  --transition: all 0.3s ease;
  --font-main: 'Inter', sans-serif;
  --container-width: 1200px;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--primary-color);
  line-height: 1.2;
}

h1 {
  font-size: 3rem;
  font-weight: 800;
}

h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  background: var(--accent-color);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  background-color: #8c2a6b;
  /* Darker shade of #a83281 */
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary-color);
}

.nav-btn {
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  height: 60px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-weight: 500;
  color: var(--secondary-color);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-color);
}

.hamburger {
  display: none;
  cursor: pointer;
}

/* Hero Section */
.hero {
  height: 80vh;
  background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), url('assets/unnamed.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 0 20px;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 20px;
  font-size: 4rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

/* About Section */
.about-section {
  padding: 80px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-img img {
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.stat-item {
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.stat-item h3 {
  color: var(--accent-color);
  font-size: 2rem;
}

.stat-item p {
  font-size: 0.9rem;
  color: var(--text-color);
}

/* Features/Facilities */
.features {
  padding: 80px 0;
  background: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--bg-color);
  padding: 30px;
  border-radius: 12px;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  background: var(--white);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 20px;
}

/* Gallery Page */
.page-header {
  background: var(--primary-color);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 60px 0;
}

.gallery-item {
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Contact Page */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  padding: 80px 0 40px;
}

.contact-info {
  background: var(--white);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.info-item {
  margin-bottom: 25px;
}

.info-item h4 {
  color: var(--primary-color);
  margin-bottom: 5px;
}

.map-container {
  border-radius: 12px;
  overflow: hidden;
  height: 400px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Support Form Card */
.contact-form-card {
  background: var(--white);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  position: relative;
}

.support-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--secondary-color);
}

.required {
  color: #ef4444;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--primary-color);
  background: var(--bg-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23334155' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(168, 50, 129, 0.1);
  background: var(--white);
}

.field-error {
  display: none;
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 4px;
}

.support-submit-btn {
  width: 100%;
  padding: 13px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Form feedback states */
.form-feedback {
  text-align: center;
  padding: 40px 20px;
}

.form-feedback i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.form-feedback h3 {
  margin-bottom: 8px;
}

.form-feedback p {
  color: var(--text-color);
}

.form-success i { color: #10b981; }
.form-error-state i { color: #ef4444; }

/* Footer */
footer {
  background: var(--primary-color);
  color: var(--white);
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: var(--white);
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  opacity: 0.8;
}

.footer-col ul li a:hover {
  opacity: 1;
  color: var(--accent-color);
}

.copy {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.6;
  font-size: 0.9rem;
}

/* Donation Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--white);
  margin: 5% auto;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.close-modal {
  color: #aaa;
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--primary-color);
  text-decoration: none;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 20px;
}

.form-group {
  margin-bottom: 5px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--secondary-color);
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .nav-links {
    position: fixed;
    top: 80px;
    right: -100%;
    background: var(--white);
    flex-direction: column;
    width: 100%;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
  }

  .nav-links.active {
    right: 0;
  }

  .hamburger {
    display: block;
    font-size: 1.5rem;
  }

  .about-grid,
  .contact-container {
    grid-template-columns: 1fr;
  }

  .support-form-grid {
    grid-template-columns: 1fr;
  }

  .donate-container {
    padding: 20px;
  }
}

/* Full Page Donate Section */
.donate-section {
  padding: 60px 0;
  background-color: var(--white);
}

.donate-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--bg-color);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.donate-btn {
  width: 100%;
  margin-top: 30px;
  padding: 15px;
  font-size: 1.1rem;
}

.amount-input {
  font-size: 1.25rem !important;
  font-weight: 600;
  color: var(--primary-color);
}

/* Auto-pay container (query-param initiated payment) */
.auto-pay-container {
  text-align: center;
}

.auto-pay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  min-height: 200px;
}

.auto-pay-inner p {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-color);
  margin: 0;
}

.auto-pay-error {
  color: #ef4444;
  font-size: 1rem !important;
  font-weight: 400 !important;
  margin-top: 12px !important;
}

/* Receipt Modal Styles */
.receipt-modal-content {
  text-align: center;
  max-width: 500px;
}

.receipt-modal-content h2 {
  margin-bottom: 20px;
  color: var(--primary-color);
}

.receipt-status-container {
  margin: 30px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Spinner Animation */
.spinner {
  border: 4px solid rgba(0, 0, 0, 0.05);
  border-left-color: var(--accent-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

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

.receipt-message {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--text-color);
}

.receipt-attempt {
  font-size: 0.9rem;
  color: #64748b; /* slate-500 */
}

/* Success styling */
.receipt-success-icon {
  font-size: 3rem;
  color: #10b981; /* emerald-500 */
  margin-bottom: 20px;
}
.receipt-error-icon {
  font-size: 3rem;
  color: #ef4444; /* red-500 */
  margin-bottom: 20px;
}

.receipt-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.receipt-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}