/* COTTON ALMSHOUSES - Traditional British Charity Website Styles */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Georgia", "Times New Roman", serif;
  line-height: 1.6;
  color: #2c3e50;
  background-color: #f8f6f1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(139, 69, 19, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #d4af37;
}

.logo-text {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: #d4af37;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #d4af37;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("background.png") center/cover;
  opacity: 0.35;
  z-index: -2;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(139, 69, 19, 0.5),
    rgba(44, 62, 80, 0.5)
  );
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #d4af37;
  font-weight: 600;
}

.hero-description {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: #d4af37;
  color: #2c3e50;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid #d4af37;
}

.cta-button:hover {
  background: transparent;
  color: #d4af37;
  transform: translateY(-2px);
}

/* Section Styles */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: #8b4513;
  position: relative;
  padding-bottom: 20px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #d4af37;
}

/* About Section */
.about-section {
  padding: 100px 0;
  background: #fff;
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 25px;
  text-align: center;
  color: #555;
}

.mission-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.value-item {
  text-align: center;
  padding: 30px 20px;
  background: #f8f6f1;
  border-radius: 10px;
  border: 2px solid #e8d5b5;
  transition: transform 0.3s ease;
}

.value-item:hover {
  transform: translateY(-5px);
}

.value-item i {
  font-size: 3rem;
  color: #8b4513;
  margin-bottom: 20px;
}

.value-item h3 {
  color: #8b4513;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.value-item p {
  color: #666;
  font-size: 1rem;
}

/* History Section */
.history-section {
  padding: 100px 0;
  background: #f8f6f1;
}

.history-content {
  max-width: 900px;
  margin: 0 auto;
}

.history-text p {
  font-size: 1.1rem;
  margin-bottom: 25px;
  text-align: center;
  color: #555;
}

.history-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.highlight-item {
  text-align: center;
  padding: 25px 20px;
  background: #fff;
  border-radius: 10px;
  border: 2px solid #d4af37;
}

.highlight-year {
  font-size: 1.5rem;
  font-weight: 700;
  color: #8b4513;
  margin-bottom: 10px;
}

.highlight-description {
  color: #666;
  font-size: 0.9rem;
}

/* Community Support Section */
.community-section {
  padding: 100px 0;
  background: #fff;
}

.support-programs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.program-card {
  text-align: center;
  padding: 40px 30px;
  background: #f8f6f1;
  border-radius: 15px;
  border: 2px solid #e8d5b5;
  transition: all 0.3s ease;
}

.program-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.program-card i {
  font-size: 3.5rem;
  color: #8b4513;
  margin-bottom: 25px;
}

.program-card h3 {
  color: #8b4513;
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.program-card p {
  color: #666;
  line-height: 1.6;
}

/* Subscribe Section */
.subscribe-section {
  padding: 100px 0;
  background: linear-gradient(135deg, #8b4513, #a0522d);
  color: #fff;
  text-align: center;
}

.subscribe-section .section-title {
  color: #fff;
}

.subscribe-description {
  font-size: 1.2rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: #fff;
}

.subscribe-form {
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 250px;
  padding: 15px 20px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
}

.subscribe-button {
  padding: 15px 30px;
  background: #d4af37;
  color: #2c3e50;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.subscribe-button:hover {
  background: #c19b2e;
  transform: translateY(-2px);
}

/* Contact Section */
.contact-section {
  padding: 100px 0;
  background: #f8f6f1;
}

.contact-content {
  max-width: 900px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;          /* 允许换行，避免挤在一行重叠 */
  gap: 16px;                /* 盒子之间的间距 */
  align-items: flex-start;
  
}

.contact-item {
  box-sizing: border-box;   /* 宽度计算包含 padding/border，避免“撑破” */
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 20px;
  background: #fff;
  border-radius: 30px;
  border: 2px solid #e8d5b5;

  /* 控制大小范围 + 自适应 */
  flex: 1 1 320px;          /* 基础宽度 320px，空间不足会缩，足够会长 */
  min-width: 260px;         /* 不要小于这个宽度，避免内容过窄 */
  max-width: 100%;
  min-height: 200px;

  overflow: auto;
  /* 确保不是绝对定位 */
  position: relative;
}

.contact-item i {
  font-size: 2rem;
  color: #8b4513;
  margin-top: 5px;
}

.contact-item h3 {
  color: #8b4513;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.contact-item p {
  color: #666;
  line-height: 1.6;
}

/* Footer */
.footer {
  background: #2c3e50;
  color: #fff;
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  color: #d4af37;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.footer-section p {
  color: #bdc3c7;
  line-height: 1.6;
  margin-bottom: 10px;
}

.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 ease;
}

.footer-section ul li a:hover {
  color: #d4af37;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #34495e;
  color: #95a5a6;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .form-group {
    flex-direction: column;
    align-items: center;
  }

  .subscribe-form input[type="email"] {
    min-width: 100%;
  }

  .contact-info {
    grid-template-columns: 1fr;
  }

  .mission-values,
  .history-highlights,
  .support-programs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .value-item,
  .program-card,
  .contact-item {
    padding: 20px 15px;
  }
}
