/* ============================================
   Mount Pleasant Saints Soup Kitchen
   Stylesheet - Mobile First
   ============================================ */

/* ---- 1. CSS Custom Properties ---- */
:root {
  --color-primary: #F2A922;
  --color-secondary: #E8854A;
  --color-earth: #C4703F;
  --color-teal: #5BBFAD;
  --color-dark: #2D2D2D;
  --color-bg-warm: #FFF9F0;
  --color-bg-sand: #FEF3E2;
  --color-white: #FFFFFF;
  --color-text: #2D2D2D;
  --color-text-muted: #6B5E54;
  --color-success: #4CAF50;
  --color-error: #E53935;
  --color-whatsapp: #25D366;
  --font-body: 'Nunito', sans-serif;
  --font-heading: 'Playfair Display', serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.12);
  --container-max: 1100px;
  --spacing-section: 60px;
}

/* ---- 2. Reset & Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg-warm);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--color-teal);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-secondary);
}

/* ---- 3. Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.3;
  color: var(--color-text);
}

h1 {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
}

h2 {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  margin-bottom: 12px;
}

h3 {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
}

p {
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

/* Section title with decorative underline */
.section-title {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 2px;
  margin: 12px auto 0;
}

/* ---- 4. Layout Utilities ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: var(--spacing-section) 0;
  position: relative;
}

/* ---- 5. African Pattern Overlay ---- */
.pattern-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0 L40 20 L20 40 L0 20Z' fill='none' stroke='%23C4703F' stroke-width='1'/%3E%3Cpath d='M20 8 L32 20 L20 32 L8 20Z' fill='none' stroke='%23C4703F' stroke-width='0.5'/%3E%3C/svg%3E");
  background-size: 40px 40px;
}

/* ---- 6. Hero Section ---- */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #F2A922 0%, #E8854A 50%, #C4703F 100%);
  position: relative;
  overflow: hidden;
  padding: 40px 20px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.06;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30Z' fill='none' stroke='%23ffffff' stroke-width='1'/%3E%3Cpath d='M30 10 L50 30 L30 50 L10 30Z' fill='none' stroke='%23ffffff' stroke-width='0.5'/%3E%3C/svg%3E");
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-logo {
  width: 160px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  margin: 0 auto 24px;
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: 8px;
}

.hero h1 .subtitle {
  display: block;
  font-size: 0.65em;
  font-weight: 400;
  opacity: 0.9;
  margin-top: 4px;
}

.slogan {
  font-family: var(--font-heading);
  font-style: italic;
  color: rgba(255, 255, 255, 0.92);
  max-width: 600px;
  margin: 0 auto 32px;
  font-size: clamp(0.95rem, 2.8vw, 1.15rem);
  line-height: 1.6;
}

.cta-button {
  display: inline-block;
  background: var(--color-white);
  color: var(--color-secondary);
  padding: 14px 36px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  color: var(--color-secondary);
}

.cta-button--primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.cta-button--primary:hover {
  color: var(--color-white);
  background: var(--color-secondary);
}

/* ---- 7. About Section ---- */
.about {
  background: var(--color-bg-warm);
}

.about-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 36px;
}

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

.service-card {
  background: var(--color-white);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--color-primary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.service-card .icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--color-teal);
}

.service-card .icon svg {
  width: 100%;
  height: 100%;
}

.service-card h3 {
  margin-bottom: 8px;
  color: var(--color-text);
}

.service-card p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

/* ---- 8. Founder Section ---- */
.founder {
  background: var(--color-bg-sand);
}

.founder-layout {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
}

.founder-image-wrapper {
  position: relative;
  max-width: 350px;
  width: 100%;
}

.founder-image-wrapper::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  width: 100%;
  height: 100%;
  border: 3px solid var(--color-teal);
  border-radius: var(--radius-md);
  z-index: 0;
}

.founder-image-wrapper img {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-md);
  width: 100%;
  box-shadow: var(--shadow-card);
}

.founder-text {
  text-align: center;
}

.founder-text h3 {
  color: var(--color-teal);
  margin-bottom: 16px;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
}

.bio-preview {
  line-height: 1.8;
}

.bio-expanded {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease;
}

.bio-expanded.active {
  max-height: 600px;
}

.expand-btn {
  background: none;
  border: none;
  color: var(--color-teal);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  margin-top: 4px;
  transition: color 0.3s ease;
}

.expand-btn:hover {
  color: var(--color-secondary);
}

.expand-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.expand-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* ---- 9. Events Section ---- */
.events {
  background: var(--color-bg-warm);
}

.events-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 36px;
}

.events-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.event-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.event-card-header {
  padding: 16px 20px;
  color: var(--color-white);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
}

.event-card-header span {
  font-size: 1.5rem;
}

.event-card:nth-child(1) .event-card-header { background: var(--color-primary); }
.event-card:nth-child(2) .event-card-header { background: var(--color-secondary); }
.event-card:nth-child(3) .event-card-header { background: #E87E8B; }
.event-card:nth-child(4) .event-card-header { background: var(--color-teal); }
.event-card:nth-child(5) .event-card-header { background: var(--color-earth); }
.event-card:nth-child(6) .event-card-header { background: #8B7355; }
.event-card:nth-child(7) .event-card-header { background: #6B8E6B; }
.event-card:nth-child(8) .event-card-header { background: #E87E8B; }

.event-card-body {
  padding: 20px;
}

.event-card-body h3 {
  margin-bottom: 8px;
  font-family: var(--font-heading);
}

.event-card-body p {
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 0;
}

.event-card-body ul {
  list-style: none;
  padding: 0;
  margin-top: 8px;
}

.event-card-body ul li {
  padding: 4px 0 4px 20px;
  position: relative;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.event-card-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
}

/* ---- 10. Gallery / Carousel Section ---- */
.gallery {
  background: var(--color-dark);
  color: var(--color-white);
}

.gallery .section-title {
  color: var(--color-white);
}

.gallery .section-title::after {
  background: var(--color-teal);
}

.carousel-wrapper {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.carousel-viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  aspect-ratio: 16 / 10;
  background: #1a1a1a;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
}

.carousel-track img {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.carousel-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  text-align: center;
}

.carousel-placeholder .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--color-teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  color: var(--color-white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  font-size: 1.2rem;
}

.carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

/* Countdown Timer Ring */
.carousel-timer {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 48px;
  height: 48px;
  z-index: 2;
}

.carousel-timer svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 3;
}

.timer-progress {
  fill: none;
  stroke: var(--color-teal);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 131.95;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-white);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Fullscreen Modal */
.carousel-fullscreen {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.carousel-fullscreen.active {
  display: flex;
}

.carousel-fullscreen img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.fullscreen-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--color-white);
  font-size: 1.8rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  z-index: 1001;
}

.fullscreen-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.fullscreen-title {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  text-align: center;
  max-width: 80%;
}

/* ---- 11. Donation Section ---- */
.donate {
  background: linear-gradient(135deg, var(--color-bg-sand) 0%, var(--color-bg-warm) 100%);
}

.donate-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 8px;
}

.donate-card {
  background: var(--color-white);
  padding: 28px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.donate-primary {
  border-top: 4px solid var(--color-primary);
}

.donate-primary h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.donate-note {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.bank-details {
  margin-bottom: 16px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
  gap: 4px;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row .label {
  font-weight: 700;
  color: var(--color-text);
  font-size: 0.9rem;
}

.detail-row .value {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--color-teal);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.3s ease, background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn:hover {
  background: rgba(91, 191, 173, 0.1);
}

.copy-btn svg {
  width: 18px;
  height: 18px;
}

.copy-btn.copied svg {
  color: var(--color-success);
}

.security-note {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--color-text-muted);
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(91, 191, 173, 0.06);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-teal);
}

.reference-note {
  font-size: 0.85rem;
  color: var(--color-text);
  margin-top: 12px;
  font-weight: 600;
}

.donate-secondary {
  text-align: center;
  border-top: 4px solid var(--color-teal);
}

.donate-secondary h3 {
  margin-bottom: 12px;
}

.coming-soon-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 16px 0;
  opacity: 0.5;
}

.coming-soon-icons span {
  font-size: 2rem;
}

/* Quick Contact Buttons */
.quick-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.quick-contact-title {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 4px;
}

.btn-whatsapp,
.btn-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: var(--color-white);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.3);
  color: var(--color-white);
}

.btn-email {
  background: var(--color-teal);
  color: var(--color-white);
}

.btn-email:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(91, 191, 173, 0.3);
  color: var(--color-white);
}

.btn-whatsapp svg,
.btn-email svg {
  width: 22px;
  height: 22px;
}

/* ---- 12. Contact Form Section ---- */
.contact {
  background: var(--color-bg-sand);
}

.contact-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 32px;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

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

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e0d6cc;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-teal);
  outline: none;
  box-shadow: 0 0 0 3px rgba(91, 191, 173, 0.15);
}

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

.form-group.error input,
.form-group.error textarea {
  border-color: var(--color-error);
}

.form-group .error-message {
  color: var(--color-error);
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}

.form-group.error .error-message {
  display: block;
}

.form-submit {
  text-align: center;
  margin-top: 24px;
}

.form-submit .cta-button {
  min-width: 200px;
}

.form-status {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  font-size: 0.95rem;
  display: none;
  text-align: center;
}

.form-status.show {
  display: block;
}

.form-status.success {
  background: #e8f5e9;
  color: var(--color-success);
  border: 1px solid #c8e6c9;
}

.form-status.error {
  background: #ffebee;
  color: var(--color-error);
  border: 1px solid #ffcdd2;
}

/* ---- 13. Map (Inline within Contact) ---- */
.contact-map {
  margin-top: 48px;
  text-align: center;
}

.contact-map-title {
  font-family: var(--font-heading);
  margin-bottom: 4px;
}

.map-address-text {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.map-wrapper-inline {
  position: relative;
  padding-bottom: 56.25%;
  max-width: 600px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.map-wrapper-inline iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- 14. Animations ---- */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Stagger animation for grid items */
.animate-in.delay-1 { transition-delay: 0.1s; }
.animate-in.delay-2 { transition-delay: 0.2s; }
.animate-in.delay-3 { transition-delay: 0.3s; }
.animate-in.delay-4 { transition-delay: 0.4s; }
.animate-in.delay-5 { transition-delay: 0.5s; }

/* ---- 15. Media Queries ---- */

/* Larger phones (480px+) */
@media (min-width: 480px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-contact {
    flex-direction: row;
    justify-content: center;
  }
}

/* Tablets (768px+) */
@media (min-width: 768px) {
  :root {
    --spacing-section: 70px;
  }

  .hero {
    min-height: 75vh;
  }

  .hero-logo {
    width: 220px;
  }

  .founder-layout {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
  }

  .founder-text {
    text-align: left;
  }

  .events-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .donate-grid {
    flex-direction: row;
  }

  .donate-primary {
    flex: 2;
  }

  .donate-secondary {
    flex: 1;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  :root {
    --spacing-section: 80px;
  }

  .container {
    padding: 0 40px;
  }

  .hero {
    min-height: 70vh;
  }

  .hero-logo {
    width: 240px;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .carousel-wrapper {
    max-width: 900px;
  }
}

/* Large desktop (1200px+) */
@media (min-width: 1200px) {
  .container {
    padding: 0;
  }
}
