/* =====================================================
   JOINAS DT SACCO - Unified and Optimized Stylesheet
   Combines Untitled-2.css + styles2.css + styles3.css
   ===================================================== */

/* Root variables */
:root {
  --primary: #0b6b4f;
  --accent: #f4f8f6;
  --muted: #6b7280;
  --container: 95%;
  --radius: 12px;
}

/* Container limits */
.nav-wrap,
.topbar .inner,
.card-grid,
.team,
.footer-inner,
.hero-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
body, html {
  font-family: Inter, system-ui, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #111;
  background: #fff;
  line-height: 1.45;
}
body { padding-top: 100px; }

/* ============================
   Top Bar
   ============================ */
.topbar {
  background: #5791d0;
  color: #fff;
  font-size: 16px;
  padding: 8px 16px;
}
.topbar .inner {
  display: flex;
  gap: 8px;
  align-items: center;
}
.topbar .spacer { flex: 1; }

/* ============================
   Header / Navigation
   ============================ */
header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,.1);
  border-bottom: 1px solid #eee;
}
.nav-wrap {
  max-width: var(--container); 
  margin:0 auto; 
  display:flex; 
  justify-content:space-between; 
  align-items:center;
}
.logo { display: flex; gap: 12px; align-items: center; }
.logo img { height: 80px; border-radius: 10px; }
.site-title { font-weight: 900; font-size: 1.2rem; color: #5791d0; }

/* Navigation */
nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  margin:0;
  padding:0;
}
nav a {
  color: #111;
  text-decoration: none;
  font-weight: 600;
  padding:8px 12px;
  display:block;
}

.cta { background:#5791d0; color:#fff; border-radius:8px; font-weight:700; }

/* Dropdown */
.dropdown { position:relative; }
.dropdown-menu { display:none; position:absolute; top:80%; left:0; background:#fff; border:1px solid #ccc; min-width:150px; z-index:1000; }
.dropdown:hover .dropdown-menu { display:block; }
.dropdown-menu li a { padding:8px 12px; }
.dropdown-menu li a:hover { background:#f4f8f6; }

/* Mobile nav */
.mobile-toggle { display:none; background:none; border:none; font-size:22px; }
.nav-mobile { display:none; background:#fff; padding:12px; border-top:1px solid #eee; }
.nav-mobile a { display:block; padding:8px 0; color:#111; text-decoration:none; }
.nav-mobile a:hover { color:#5791d0; }

/* ============================
   Hero / Carousel
   ============================ */
.hero-wrap { max-width: var(--container); }

.hero2, .carousel {
  position: relative;
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
  border-radius: var(--radius);
}
.carousel .item img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Hero content */
.hero-content2 {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  max-width: 800px;
  padding: 1rem;
  background: rgba(0,0,0,0.6);
  border-radius: 10px;
  text-align: center;
  opacity: 0;
  transition: opacity 1s ease, transform 1s ease;
}
.hero2 .btn {
  background: #ff6600;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  color: #fff;
  text-decoration: none;
}
.carousel .item.active .hero-content2 {
  opacity: 1;
  transform: translate(-50%, -50%);
}
.hero-content2 h2, .hero-content2 p, .hero-content2 .btn {
  color: #fff;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}
.carousel .item.active .hero-content2 h2 { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
.carousel .item.active .hero-content2 p { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }
.carousel .item.active .hero-content2 .btn { opacity: 1; transform: translateY(0); transition-delay: 0.6s; }

/* ============================
   Cards
   ============================ */
.card-grid {
  margin: 30px auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: #c5db3a;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 6px 18px rgba(12,30,22,.08);
  transition: transform 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
}
.card img {
  width: 30%;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
}
.card h3 { margin-top: 0; }

/* ============================
   Loan Products (Animated)
   ============================ */
.team {
  background: var(--accent);
  padding: 30px 20px;
  border-radius: 20px;
  margin: auto;
}
.team h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 30px;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.loanmember {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  padding: 20px;
}
.loanmember:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}
.loanmember img {
  width: 120px;
  height: 100px;
  object-fit: contain;
  animation: float 3s ease-in-out infinite;
}
.loanmember h4 {
  margin: 10px 0 6px;
  color: var(--primary);
  font-size: 18px;
}
.loanmember p {
  font-size: 14px;
  color: #555;
}

/* Hover dropdown */
.loan-dropdown {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(87, 145, 208, 0.97);
  color: #fff;
  text-align: left;
  padding: 18px;
  border-radius: 0 0 15px 15px;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.4s ease;
  font-size: 14px;
}
.loanmember:hover .loan-dropdown {
  opacity: 1;
  transform: translateY(0);
}
.loan-dropdown h5 {
  margin-top: 0;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 4px;
}
.loan-dropdown ul { list-style: none; margin: 0; padding: 0; }
.loan-dropdown li { margin-bottom: 6px; line-height: 1.4; }
.loan-dropdown a {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 20px;
  padding: 6px 16px;
  transition: background 0.3s;
}
.loan-dropdown a:hover { background: #063d2c; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ============================
   Footer
   ============================ */
footer {
  background: #c5db3a;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.4;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 10px;
  max-width: 1000px;
  margin: auto;
}
.footer-section strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13.5px;
}
.footer-section nav a {
  display: block;
  color: #ffffff;
  text-decoration: none;
  margin-bottom: 4px;
  opacity: 0.9;
  transition: 0.2s;
}
.footer-section nav a:hover {
  opacity: 1;
  text-decoration: underline;
}
.footer .logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer .logo img {
  width: 70px;
  border-radius: 6px;
}
.footer .brand-text {
  display: flex;
  flex-direction: column;
}
.footer .site-title {
  font-weight: 700;
  font-size: 14.5px;
}
.footer .tagline {
  font-size: 12.5px;
  opacity: 0.9;
}
.footer-section p {
  margin: 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.social-links a {
  margin-right: 10px;
  color: #ffffff;
  font-size: 19px;
  transition: 0.3s;
}
.social-links a:hover { color: #333333; }
.footer-bottom {
  text-align: center;
  background: #b4c735;
  padding: 8px 0;
  font-size: 12.5px;
  color: #ffffff;
}

/* ============================
   Responsive Design
   ============================ */
@media (max-width: 1000px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .hero2 { max-height: 60vh; }
  .hero-content2 { font-size: 14px; }
  nav ul { display: none; }
  .mobile-toggle { display: block; }
  .team-grid { grid-template-columns: 1fr; }
}
