/* ---------- GOOGLE FONTS ---------- */
/* Add this <link> in your HTML <head>:
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@400;500&display=swap" rel="stylesheet">
*/

/* ---------- GLOBAL STYLES ---------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  margin: 0;
  background: #f8f9fa;
  color: #222;
  line-height: 1.8;
  font-size: 16px;
}

a {
  color: #0077cc;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #005fa3;
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.5px;
}

/* ---------- HEADER ---------- */
header {
  background: #002f6c;
  padding: 15px 20px; /* reduced for compact layout */
  position: sticky;
  top: 0;
  z-index: 9999;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
  width: 100%;
  flex-wrap: nowrap; /* prevent wrapping */
}

.logo {
  flex: 0 0 auto;
  font-size: 1.6em;
  font-weight: 700;
}

.logo a {
  color: white;
  text-decoration: none;
}

.tagline {
  color: #FFD700;
  font-size: 1rem !important;
  font-weight: 700;
}

.main-nav {
  display: flex;
  flex: 1;
  justify-content: flex-start; /* align menu left */
  gap: 25px;
  flex-wrap: nowrap; /* prevent wrapping */
  overflow-x: auto; /* horizontal scroll for small screens */
}

.main-nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap; /* keep links on one line */
  font-size: 0.9rem;
  transition: color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
  color: #00aaff;
}

.donate-container {
  flex: 0 0 auto;
}

.donate-container .btn {
  background: #0077cc;
  color: white !important;
  padding: 8px 16px;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s;
}

.donate-container .btn:hover {
  background: #005fa3;
}

/* ---------- HAMBURGER MENU ---------- */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.menu-toggle span {
  width: 26px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ---------- MOBILE MENU ---------- */
@media (max-width: 768px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: #003b73;
    display: none;
    gap: 15px;
    padding: 15px 0;
    text-align: center;
    border-radius: 6px;
  }

  .main-nav.active {
    display: flex;
  }

  .donate-container {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
  }
  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
  }
}

/* ---------- BUTTONS ---------- */
.btn {
  background: #0077cc;
  color: white;
  padding: 10px 25px;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s;
  display: inline-block;
  font-weight: 500;
}

.btn:hover {
  background: #005fa3;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* ---------- CONTAINERS & LAYOUT ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.flex {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
}

.flex .text {
  flex: 1 1 55%;
}

.flex .image {
  flex: 1 1 40%;
  text-align: center;
}

.flex .image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* ---------- HOME SLIDESHOW ---------- */
#home {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

#home::before, 
#home::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  animation: slideShow 24s infinite;
  opacity: 0;
}

#home::before { animation-delay: 0s; background-image: url('../assets/images/hero1.jpg'); }
#home::after  { animation-delay: 12s; background-image: url('../assets/images/hero2.jpg'); }

/* Overlay gradient */
#home .overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.4), rgba(0,47,108,0.8));
  z-index: 2;
}

#home .container { position: relative; z-index: 3; }

#home h1 {
  font-size: 2.8em;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.4);
}

#home p {
  font-size: 1.2em;
  max-width: 650px;
  margin: 0 auto 25px;
  line-height: 1.7;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

/* ---------- HOME SECTIONS ---------- */
.home .why-cotech {
  background: #fff;
  border-radius: 20px;
  padding: 70px 10%;
  margin-top: 60px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
  animation: fadeInUp 0.8s ease-out both;
}

.home .why-cotech h2 {
  text-align: center;
  color: #004aad;
  margin-bottom: 25px;
  font-size: 2.2em;
}

.home .why-cotech p {
  margin-bottom: 18px;
  text-align: justify;
  font-size: 1rem;
  color: #444;
}

.home .why-cotech strong {
  color: #004aad;
  font-weight: 600;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- OVERVIEW ---------- */
.home .overview {
  text-align: center;
  background: #f1f3f4;
  padding: 80px 20px;
  border-radius: 8px;
}

.home .overview h2 {
  color: #002f6c;
  font-size: 2em;
  margin-bottom: 40px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 40px 20px;
  width: 270px;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card h3 {
  color: #0077cc;
  font-size: 2.4em;
  margin-bottom: 10px;
  font-weight: bold;
}

.card p {
  color: #333;
  font-size: 0.95em;
  line-height: 1.4;
  max-width: 220px;
}

/* ---------- OTHER SECTIONS ---------- */
.posts,
.programs,
.testimonials,
.partners,
.cta,
footer {
  font-family: 'Inter', sans-serif;
}

/* ---------- RESPONSIVENESS ---------- */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .flex {
    flex-direction: column;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }
}
