/* ============================================
   Tar Sao — Custom Styles (Bootstrap 5 override)
   ============================================ */

:root {
  --ts-orange: #D35400;
  --ts-orange-light: #E67E22;
  --ts-gold: #F39C12;
  --ts-brown: #5D4037;
  --ts-brown-light: #795548;
  --ts-charcoal: #2C3E50;
  --ts-charcoal-light: #34495E;
  --ts-off-white: #FDF6EC;
  --ts-text-light: #666666;
  --ts-shadow: 0 2px 12px rgba(0,0,0,0.1);
  --ts-shadow-hover: 0 6px 24px rgba(0,0,0,0.15);
  --ts-transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  color: #333;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--ts-charcoal);
}

a { transition: color var(--ts-transition); }

/* --- Bootstrap Overrides --- */
.btn-ts-primary {
  background: var(--ts-orange);
  color: #fff;
  border: none;
  padding: 12px 30px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  border-radius: 6px;
  transition: all var(--ts-transition);
}
.btn-ts-primary:hover {
  background: var(--ts-orange-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--ts-shadow-hover);
}

.btn-ts-outline {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  padding: 12px 30px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  border-radius: 6px;
  transition: all var(--ts-transition);
}
.btn-ts-outline:hover {
  background: #fff;
  color: var(--ts-charcoal);
  transform: translateY(-2px);
}

.btn-ts-gold {
  background: var(--ts-gold);
  color: var(--ts-charcoal);
  border: none;
  padding: 14px 36px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 6px;
  transition: all var(--ts-transition);
}
.btn-ts-gold:hover {
  background: #E8930B;
  color: var(--ts-charcoal);
  transform: translateY(-2px);
  box-shadow: var(--ts-shadow-hover);
}

.btn-ts-outline-orange {
  background: transparent;
  color: var(--ts-orange);
  border: 2px solid var(--ts-orange);
  padding: 12px 30px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  border-radius: 6px;
  transition: all var(--ts-transition);
}
.btn-ts-outline-orange:hover {
  background: var(--ts-orange);
  color: #fff;
  transform: translateY(-2px);
}

/* --- Navbar --- */
.navbar-ts {
  transition: all var(--ts-transition);
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.navbar-ts.scrolled {
  background: #fff !important;
  box-shadow: var(--ts-shadow);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.navbar-logo {
  height: 56px;
  width: auto;
  transition: height var(--ts-transition);
}
.navbar-ts.scrolled .navbar-logo {
  height: 44px;
}
.navbar-ts .navbar-brand {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  transition: color var(--ts-transition);
}
.navbar-ts .navbar-brand .text-gold { color: var(--ts-gold); }
.navbar-ts.scrolled .navbar-brand { color: var(--ts-charcoal); }

.navbar-ts .nav-link {
  color: rgba(255,255,255,0.9) !important;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--ts-transition);
  position: relative;
  padding-bottom: 6px;
}
.navbar-ts .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--ts-gold);
  transition: all var(--ts-transition);
  transform: translateX(-50%);
}
.navbar-ts .nav-link:hover::after,
.navbar-ts .nav-link.active::after { width: 80%; }
.navbar-ts.scrolled .nav-link { color: var(--ts-charcoal) !important; }
.navbar-ts.scrolled .nav-link:hover { color: var(--ts-orange) !important; }

.navbar-ts .navbar-toggler {
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}
.navbar-ts .navbar-toggler-icon {
  filter: invert(1);
}
.navbar-ts.scrolled .navbar-toggler {
  border-color: var(--ts-charcoal);
}
.navbar-ts.scrolled .navbar-toggler-icon {
  filter: none;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(44,62,80,0.88), rgba(93,64,55,0.82)),
              url('../images/hero-bg.jpg') center/cover no-repeat;
  color: #fff;
  position: relative;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(transparent, #fff);
}
.hero-badge {
  display: inline-block;
  background: rgba(243, 156, 18, 0.2);
  border: 1px solid var(--ts-gold);
  color: var(--ts-gold);
  padding: 6px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.hero h1 { color: #fff; font-size: 3.5rem; letter-spacing: -1px; }
.hero h1 .text-gold { color: var(--ts-gold); }
.hero p { opacity: 0.9; }

/* --- Section Header --- */
.section-header h2 {
  position: relative;
  display: inline-block;
  font-size: 2.2rem;
}
.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--ts-gold);
  border-radius: 2px;
}
.section-header p {
  color: var(--ts-text-light);
  font-size: 1.1rem;
}

.bg-off-white { background: var(--ts-off-white); }

/* --- About --- */
.about-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
}
.about-stat {
  position: absolute;
  bottom: -20px;
  right: -10px;
  background: var(--ts-gold);
  color: var(--ts-charcoal);
  padding: 20px 28px;
  border-radius: 8px;
  text-align: center;
  box-shadow: var(--ts-shadow);
  z-index: 2;
}
.about-stat .stat-number {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  display: block;
}
.about-stat .stat-label { font-size: 0.85rem; font-weight: 600; }

.value-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: var(--ts-off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.value-item p { font-size: 0.85rem; color: var(--ts-text-light); }

/* --- Process Steps --- */
.step-number {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--ts-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ts-orange);
  transition: all var(--ts-transition);
}
.step-card:hover .step-number {
  background: var(--ts-orange);
  color: #fff;
}
.step-card p { font-size: 0.9rem; color: var(--ts-text-light); }

.process-line {
  position: absolute;
  top: 40px;
  left: 12.5%;
  width: 75%;
  height: 3px;
  background: #BDC3C7;
  z-index: 0;
}

/* --- Cards --- */
.card-ts {
  border: none;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--ts-shadow);
  transition: all var(--ts-transition);
}
.card-ts:hover {
  transform: translateY(-6px);
  box-shadow: var(--ts-shadow-hover);
}
.card-img-wrapper {
  position: relative;
  overflow: hidden;
}
.card-img-wrapper .card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.card-ts .card-img-top-placeholder {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.5rem;
  position: relative;
}
.card-img-water { background: linear-gradient(135deg, #2980B9, #3498DB); }
.card-img-education { background: linear-gradient(135deg, #27AE60, #2ECC71); }
.card-img-health { background: linear-gradient(135deg, #E74C3C, #C0392B); }
.card-img-collab { background: linear-gradient(135deg, #D35400, #F39C12); }
.card-img-scholarship { background: linear-gradient(135deg, #8E44AD, #9B59B6); }
.card-img-agriculture { background: linear-gradient(135deg, #5D4037, #795548); }
.card-img-gender { background: linear-gradient(135deg, #E91E63, #F06292); }
.card-img-autonomy { background: linear-gradient(135deg, #FF9800, #FFB74D); }

.card-badge-ts {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #fff;
}
.badge-completed { background: #27AE60; }
.badge-in-progress { background: var(--ts-orange); }
.badge-planned { background: var(--ts-charcoal-light); }

.card-ts .card-body p { font-size: 0.9rem; color: var(--ts-text-light); }
.card-meta { font-size: 0.8rem; color: var(--ts-text-light); }

/* --- Donation --- */
.donation {
  background: linear-gradient(135deg, var(--ts-charcoal), var(--ts-brown));
  color: #fff;
}
.donation .section-header h2 { color: #fff; }
.donation .section-header h2::after { background: var(--ts-gold); }
.donation .section-header p { color: rgba(255,255,255,0.8); }

.donation-way {
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  transition: all var(--ts-transition);
  padding: 2rem 1.5rem;
}
.donation-way:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-4px);
}
.donation-way h5 { color: var(--ts-gold); }
.donation-way p { font-size: 0.85rem; opacity: 0.8; }

/* --- Contact --- */
.contact-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: var(--ts-off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.contact-form-box {
  background: #f5f5f5;
  padding: 2.5rem;
  border-radius: 8px;
}
.contact-form-box .form-control:focus {
  border-color: var(--ts-orange);
  box-shadow: 0 0 0 0.2rem rgba(211, 84, 0, 0.15);
}

/* --- Footer Logo --- */
.footer-logo {
  height: 50px;
  width: auto;
}

/* --- Footer --- */
.footer-ts {
  background: var(--ts-charcoal);
  color: rgba(255,255,255,0.7);
}
.footer-ts h5 { color: #fff; }
.footer-ts .text-gold { color: var(--ts-gold); }
.footer-ts a { color: rgba(255,255,255,0.7); transition: color var(--ts-transition); }
.footer-ts a:hover { color: var(--ts-gold); }
.footer-ts h6 {
  color: #fff;
  position: relative;
  padding-bottom: 8px;
  margin-bottom: 1rem;
}
.footer-ts h6::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--ts-gold);
}
.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all var(--ts-transition);
}
.footer-social a:hover {
  background: var(--ts-gold);
  color: var(--ts-charcoal);
}

/* --- Page Header (sub-pages) --- */
.page-header-ts {
  background: linear-gradient(135deg, var(--ts-charcoal), var(--ts-brown));
  color: #fff;
  padding: 140px 0 60px;
}
.page-header-ts h1 { color: #fff; }
.page-header-ts p { color: rgba(255,255,255,0.8); }

/* --- Project Details --- */
.project-detail {
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--ts-shadow);
}
.project-detail ul { list-style: disc; padding-left: 1.5rem; }
.project-detail ul li { color: var(--ts-text-light); margin-bottom: 0.5rem; }

/* --- Project Gallery --- */
.project-photo {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 40px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #BDC3C7;
}
.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ts-orange);
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px var(--ts-orange);
}
.timeline-item.completed::before {
  background: #27AE60;
  box-shadow: 0 0 0 3px #27AE60;
}
.timeline-item .date {
  font-size: 0.85rem;
  color: var(--ts-orange);
  font-weight: 600;
}
.timeline-item p { color: var(--ts-text-light); font-size: 0.9rem; }

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive tweaks on top of Bootstrap --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .section-header h2 { font-size: 1.8rem; }
  .process-line { display: none; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
}
