/* ============================================
   Yayasan Salam Malaysia - Modern Stylesheet
   ============================================ */

:root {
  --primary-color: #2ecc71;
  --secondary-color: #27ae60;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --bg-light: #ecf0f1;
  --bg-white: #ffffff;
  --border-color: #bdc3c7;
  --accent-color: #e74c3c;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
  background-color: var(--bg-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 0;
  font-size: 0.9rem;
}

.header-top-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact-info {
  display: flex;
  gap: 30px;
}

.contact-info a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}

.contact-info a:hover {
  opacity: 0.8;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text .main {
  font-size: 1.5rem;
  font-weight: bold;
}

.logo-text .sub {
  font-size: 0.7rem;
  color: var(--text-light);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 0;
  align-items: center;
}

nav ul li {
  position: relative;
}

nav ul li a {
  display: block;
  padding: 15px 18px;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.3s;
  font-weight: 500;
  font-size: 0.95rem;
}

nav ul li a:hover,
nav ul li a.active {
  background-color: var(--primary-color);
  color: white;
}

/* Dropdown Menu */
nav ul li .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  overflow: hidden;
}

nav ul li:hover .dropdown {
  display: block;
}

nav ul li .dropdown li {
  width: 100%;
}

nav ul li .dropdown li a {
  padding: 12px 18px;
  border-bottom: 1px solid var(--bg-light);
}

nav ul li .dropdown li:last-child a {
  border-bottom: none;
}

.donate-btn {
  background-color: var(--accent-color);
  color: white;
  padding: 10px 25px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s;
  margin-left: 10px;
}

.donate-btn:hover {
  background-color: #c0392b;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 100px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
  opacity: 0.5;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  font-weight: bold;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 30px;
  font-style: italic;
}

.hero .cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s;
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: white;
  color: var(--primary-color);
  border-color: white;
}

.btn-secondary:hover {
  background-color: transparent;
  color: white;
  border-color: white;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 60px 20px;
}

section h2 {
  font-size: 2.2rem;
  margin-bottom: 40px;
  text-align: center;
  color: var(--text-dark);
  position: relative;
  padding-bottom: 20px;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* ============================================
   ACTIVITIES/PROGRAMS SECTION
   ============================================ */

.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.activity-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.activity-card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

.activity-card-content {
  padding: 20px;
}

.activity-card-content h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.activity-card-content p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 15px;
}

.read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.read-more:hover {
  color: var(--secondary-color);
}

/* ============================================
   STATS SECTION
   ============================================ */

.stats-section {
  background-color: var(--primary-color);
  color: white;
  padding: 60px 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-top: 40px;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.stat-item p {
  font-size: 1rem;
  opacity: 0.9;
}

/* ============================================
   GALLERY SECTION
   ============================================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

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

.gallery-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-overlay a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 20px;
  border: 2px solid white;
  border-radius: 4px;
  transition: all 0.3s;
}

.gallery-item-overlay a:hover {
  background-color: white;
  color: var(--primary-color);
}

/* ============================================
   NEWS SECTION
   ============================================ */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.news-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.news-card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
}

.news-card-content {
  padding: 20px;
}

.news-card-content h3 {
  color: var(--text-dark);
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.news-card-content p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 15px;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background-color: var(--text-dark);
  color: white;
  padding: 60px 20px 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  margin-bottom: 20px;
  color: var(--primary-color);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: #bdc3c7;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section ul li a:hover {
  color: var(--primary-color);
}

.footer-section p {
  color: #bdc3c7;
  line-height: 1.8;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: background-color 0.3s;
}

.social-links a:hover {
  background-color: var(--secondary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  color: #bdc3c7;
}

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb {
  background-color: var(--bg-light);
  padding: 15px 20px;
  margin-bottom: 40px;
  border-radius: 4px;
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  margin: 0 5px;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: var(--text-light);
  margin: 0 5px;
}

/* ============================================
   FORMS
   ============================================ */

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

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

.form-submit {
  background-color: var(--primary-color);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.form-submit:hover {
  background-color: var(--secondary-color);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .header-top-content {
    flex-direction: column;
    gap: 10px;
  }

  .contact-info {
    flex-direction: column;
    gap: 10px;
    font-size: 0.8rem;
  }

  .nav-container {
    height: auto;
    padding: 15px 20px;
  }

  .menu-toggle {
    display: block;
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  nav.active {
    display: block;
  }

  nav ul {
    flex-direction: column;
    gap: 0;
  }

  nav ul li a {
    padding: 12px 20px;
    border-bottom: 1px solid var(--bg-light);
  }

  nav ul li .dropdown {
    position: static;
    display: none;
    box-shadow: none;
  }

  nav ul li:hover .dropdown {
    display: none;
  }

  nav ul li.active .dropdown {
    display: block;
  }

  .donate-btn {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
    text-align: center;
  }

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

  .hero p {
    font-size: 1.1rem;
  }

  .hero .cta-buttons {
    flex-direction: column;
  }

  .hero .cta-buttons .btn {
    width: 100%;
  }

  section h2 {
    font-size: 1.8rem;
  }

  .activities-grid {
    grid-template-columns: 1fr;
  }

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

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

  .news-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }

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

  section {
    padding: 40px 15px;
  }

  section h2 {
    font-size: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .stat-item h3 {
    font-size: 2rem;
  }

  .contact-info {
    flex-direction: column;
    gap: 5px;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

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

.text-right {
  text-align: right;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mt-40 {
  margin-top: 40px;
}

.mb-40 {
  margin-bottom: 40px;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}
