/* ==========================================================================
   MOAH - Mohlakeng Old Age Home
   Custom Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Theme)
   -------------------------------------------------------------------------- */
:root {
  --color-primary: #4a7c59;
  --color-primary-dark: #3a6347;
  --color-primary-light: #5e9a6f;
  --color-accent: #c9963b;
  --color-accent-dark: #b0822f;
  --color-accent-light: #d4a95a;
  --color-cream: #faf6f0;
  --color-cream-dark: #f0e8d8;
  --color-text: #3a3a3a;
  --color-text-light: #6b6b6b;
  --color-white: #ffffff;
  --color-dark: #2c2c2c;
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.7;
  background-color: var(--color-white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-dark);
}

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

a:hover {
  color: var(--color-primary-dark);
}

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

/* --------------------------------------------------------------------------
   Skip to Content (Accessibility)
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  z-index: 10000;
  font-weight: 600;
  border-radius: 0 0 var(--radius) 0;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 0;
  color: var(--color-white);
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.navbar {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: 0.6rem 0;
  transition: all var(--transition);
}

.navbar.scrolled {
  padding: 0.4rem 0;
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-primary) !important;
}

.navbar-brand img {
  height: 48px;
  width: auto;
}

.navbar .nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text) !important;
  padding: 0.5rem 1rem !important;
  position: relative;
  transition: color var(--transition);
}

.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--color-primary) !important;
}

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

.nav-donate-btn .nav-link {
  background: var(--color-accent) !important;
  color: var(--color-white) !important;
  border-radius: 50px;
  padding: 0.45rem 1.4rem !important;
  font-weight: 600;
}

.nav-donate-btn .nav-link::after {
  display: none;
}

.nav-donate-btn .nav-link:hover {
  background: var(--color-accent-dark) !important;
  color: var(--color-white) !important;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%234a7c59' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  margin-top: 72px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../img/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(74, 124, 89, 0.82) 0%,
    rgba(44, 44, 44, 0.7) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 1rem;
  max-width: 800px;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero .lead {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 2rem;
  font-weight: 300;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 3.5rem;
  }
  .hero .lead {
    font-size: 1.35rem;
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-primary-custom {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 50px;
  padding: 0.75rem 2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  display: inline-block;
}

.btn-primary-custom:hover {
  background-color: var(--color-primary-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent-custom {
  background-color: var(--color-accent);
  color: var(--color-white);
  border: none;
  border-radius: 50px;
  padding: 0.75rem 2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  display: inline-block;
}

.btn-accent-custom:hover {
  background-color: var(--color-accent-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-light-custom {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50px;
  padding: 0.7rem 2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  display: inline-block;
}

.btn-outline-light-custom:hover {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Section Styles
   -------------------------------------------------------------------------- */
.section-padding {
  padding: 5rem 0;
}

.section-cream {
  background-color: var(--color-cream);
}

.section-green {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.section-green h2,
.section-green h3,
.section-green h4 {
  color: var(--color-white);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}

.section-title p {
  color: var(--color-text-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 1rem auto 0;
}

/* --------------------------------------------------------------------------
   About / Intro Section
   -------------------------------------------------------------------------- */
.about-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.about-img:hover img {
  transform: scale(1.03);
}

.about-text h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.about-text p {
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   Services / What We Offer
   -------------------------------------------------------------------------- */
.service-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

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

.service-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.75rem;
  color: var(--color-primary);
  transition: all var(--transition);
}

.service-card:hover .service-icon {
  background: var(--color-primary);
  color: var(--color-white);
}

.service-card h4 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Stories Section
   -------------------------------------------------------------------------- */
.story-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  height: 100%;
}

.story-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.story-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.story-card .card-body {
  padding: 1.5rem;
}

.story-card h4 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.story-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.story-badge {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   Gallery
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  aspect-ratio: 4/3;
}

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

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(74, 124, 89, 0);
  transition: background var(--transition);
}

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

.gallery-item:hover::after {
  background: rgba(74, 124, 89, 0.3);
}

.gallery-item .gallery-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 2;
  color: var(--color-white);
  font-size: 2rem;
  transition: transform var(--transition);
}

.gallery-item:hover .gallery-icon {
  transform: translate(-50%, -50%) scale(1);
}

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 2rem;
  cursor: pointer;
  z-index: 10000;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 10000;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.15);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  padding: 4rem 0;
  text-align: center;
  color: var(--color-white);
}

.cta-section h2 {
  color: var(--color-white);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* --------------------------------------------------------------------------
   Contact Section
   -------------------------------------------------------------------------- */
.contact-info-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  height: 100%;
  transition: all var(--transition);
}

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

.contact-info-card .icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.4rem;
  color: var(--color-primary);
}

.contact-info-card h5 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.contact-info-card p {
  color: var(--color-text-light);
  margin-bottom: 0;
  font-size: 0.95rem;
}

.contact-form {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.contact-form .form-control {
  border: 1px solid #e0e0e0;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-form .form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.15);
}

.contact-form label {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

/* --------------------------------------------------------------------------
   Donate Page
   -------------------------------------------------------------------------- */
.donate-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  padding: 6rem 0 4rem;
  text-align: center;
  color: var(--color-white);
  margin-top: 72px;
}

.donate-hero h1 {
  color: var(--color-white);
}

.banking-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  border-left: 5px solid var(--color-accent);
}

.banking-card h4 {
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.banking-detail {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-cream-dark);
}

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

.banking-detail .label {
  font-weight: 600;
  color: var(--color-text);
}

.banking-detail .value {
  color: var(--color-text-light);
  font-family: 'Courier New', monospace;
}

.donate-ways-card {
  background: var(--color-cream);
  border-radius: var(--radius-lg);
  padding: 2rem;
  height: 100%;
  text-align: center;
  transition: all var(--transition);
}

.donate-ways-card:hover {
  background: var(--color-white);
  box-shadow: var(--shadow-md);
}

.donate-ways-card .icon {
  font-size: 2.5rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   Page Header (inner pages)
   -------------------------------------------------------------------------- */
.page-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  padding: 6rem 0 3rem;
  text-align: center;
  color: var(--color-white);
  margin-top: 72px;
}

.page-header h1 {
  color: var(--color-white);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  opacity: 0.85;
  font-size: 1.1rem;
}

.breadcrumb-custom {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.breadcrumb-custom li {
  font-size: 0.9rem;
}

.breadcrumb-custom li a {
  color: rgba(255, 255, 255, 0.75);
}

.breadcrumb-custom li a:hover {
  color: var(--color-white);
}

.breadcrumb-custom .separator {
  color: rgba(255, 255, 255, 0.5);
}

.breadcrumb-custom .current {
  color: var(--color-white);
}

/* --------------------------------------------------------------------------
   Vision & Mission (About page)
   -------------------------------------------------------------------------- */
.vision-mission-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  height: 100%;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--color-primary);
  transition: all var(--transition);
}

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

.vision-mission-card .icon {
  font-size: 2.5rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.vision-mission-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

/* YouTube embed container */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 4rem 0 0;
}

.footer h5 {
  color: var(--color-white);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--color-accent);
}

.footer p {
  font-size: 0.95rem;
  line-height: 1.8;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-links a:hover {
  color: var(--color-accent);
  padding-left: 4px;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition);
  font-size: 1.1rem;
}

.footer-social a:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   Back to Top
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  box-shadow: var(--shadow-md);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary-dark);
  transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.text-primary-custom {
  color: var(--color-primary) !important;
}

.text-accent {
  color: var(--color-accent) !important;
}

.bg-cream {
  background-color: var(--color-cream);
}

.fw-heading {
  font-family: var(--font-heading);
}

/* --------------------------------------------------------------------------
   Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .hero {
    min-height: 70vh;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .section-padding {
    padding: 3.5rem 0;
  }

  .section-title h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 767.98px) {
  .hero {
    min-height: 60vh;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero .lead {
    font-size: 1rem;
  }

  .section-padding {
    padding: 3rem 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
  }

  .page-header {
    padding: 5rem 0 2.5rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .banking-detail {
    flex-direction: column;
    gap: 0.25rem;
  }

  .lightbox-nav {
    font-size: 1.8rem;
    width: 44px;
    height: 44px;
  }
}

/* --------------------------------------------------------------------------
   Animations (supplement AOS)
   -------------------------------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
  .navbar,
  .back-to-top,
  .footer-social {
    display: none !important;
  }

  .hero {
    min-height: auto;
    margin-top: 0;
  }

  body {
    color: #000;
  }
}
