/* Base Styles */
:root {
  --primary: #000000;
  --secondary: #ffffff;
  --accent: #e6e6e6;
  --text: #333333;
  --font-primary: "Monomakh", "Noto Serif TC", serif;
  --font-size-base: 16px;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.5rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-primary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
}

.logo {
  font-family: var(--font-primary);
  font-size: var(--font-size-xl);
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--primary);
}

.logo-link {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

.logo-link:hover {
  opacity: 0.8;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--secondary);
  color: var(--text);
  line-height: 1.6;
  background-image: url("img/bg-gray-texture.jpg");
  background-repeat: repeat;
  background-attachment: fixed;
  background-size: 50px 50px;
  font-size: var(--font-size-base);
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.6);
  padding: 20px 40px;
  z-index: 1000;
  transition: all 0.3s ease;
}

header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: var(--font-size-base);
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary);
}

/* Sections */
section {
  padding: 100px 40px;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
  font-weight: 600;
  letter-spacing: 2px;
  font-size: var(--font-size-2xl);
}

.highlight-title {
  color: var(--primary);
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin: 2rem 0;
  text-align: center;
  position: relative;
  padding-bottom: 0.5rem;
}

.highlight-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background-color: var(--primary);
}

/* About Section */
.about {
  background-color: rgba(255, 255, 255, 0.6);
  padding: 150px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.about-text {
  flex: 1;
  position: relative;
}

.about-text .btn {
  margin-top: 20px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.about-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image img {
  max-width: 70%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--primary);
  color: var(--secondary);
  text-decoration: none;
  border: 1px solid var(--primary);
  transition: all 0.3s ease;
  font-size: var(--font-size-base);
  font-weight: 500;
  letter-spacing: 1px;
  border-radius: 50px;
}

.btn:hover {
  background-color: transparent;
  color: var(--primary);
}

/* Footer */
.white-footer {
  background-color: rgba(255, 255, 255, 0.6);
  color: var(--text);
  padding: 60px 40px;
  text-align: center;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.copyright {
  font-size: var(--font-size-sm);
  font-weight: 400;
  opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
  }

  .about-image {
    height: auto;
    margin-bottom: 30px;
  }

  .about-image img {
    width: 80%;
    height: auto;
    max-width: 400px;
    border-radius: 20px;
  }

  section {
    padding: 80px 20px;
  }

  .about {
    padding: 120px 20px 80px;
  }

  .section-title {
    font-size: var(--font-size-xl);
    margin-bottom: 40px;
  }

  header {
    padding: 15px 20px;
  }

  .logo {
    font-size: var(--font-size-lg);
  }

  .highlight-title {
    font-size: var(--font-size-lg);
  }

  .about-text p {
    font-size: var(--font-size-base);
  }

  blockquote {
    font-size: var(--font-size-base);
  }
}

@media (max-width: 480px) {
  .about-image img {
    width: 70%;
    border-radius: 15px;
  }

  .section-title {
    font-size: var(--font-size-lg);
    margin-bottom: 30px;
  }

  .about-text p {
    font-size: var(--font-size-sm);
  }

  .btn {
    font-size: var(--font-size-sm);
  }

  .about {
    padding: 100px 15px 60px;
  }

  section {
    padding: 60px 15px;
  }

  blockquote {
    font-size: var(--font-size-sm);
  }
}

@media (min-width: 768px) {
  .about-content {
    flex-direction: row;
    align-items: center;
    padding: 0 40px;
  }

  .about-image {
    flex: 1;
  }

  .about-text {
    flex: 1;
  }
}

/* 確保圖片在所有設備上都能正確顯示 */
img {
  max-width: 100%;
  height: auto;
}

/* 改善在小螢幕上的觸控體驗 */
@media (hover: none) {
  .btn {
    padding: 14px 30px; /* 增加按鈕大小以便於觸控 */
  }
}

.about-text p {
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* Key terms styling */
.key-term {
  white-space: nowrap;
  display: inline-block;
}

/* Blockquote styling */
blockquote {
  position: relative;
  padding-left: 20px;
  margin: 20px 0;
  font-size: var(--font-size-lg);
  line-height: 1.8;
  font-weight: 400;
}

blockquote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--primary);
}

blockquote p {
  font-style: italic;
  margin-bottom: 0;
}

/* Partners Page Styles */
.partners {
  background-color: rgba(255, 255, 255, 0.6);
  padding: 150px 40px;
  min-height: calc(100vh - 80px);
  flex: 1;
}

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

.partners-intro {
  text-align: center;
  margin-bottom: 60px;
}

.partners-intro p {
  font-size: var(--font-size-lg);
  font-weight: 500;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
}

.partners-grid {
  display: grid;
  gap: 3rem;
  margin-bottom: 60px;
}

.partner-category {
  background-color: rgba(255, 255, 255, 0.8);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.category-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  padding-bottom: 0.5rem;
}

.category-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background-color: var(--primary);
}

.partner-list {
  display: grid;
  gap: 1.5rem;
}

.partner-item {
  padding: 1.5rem;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  border-left: 4px solid var(--primary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

.partner-info h5 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.partner-info p {
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

.partner-info a {
  color: inherit;
  text-decoration: none;
}

.partner-info a:hover {
  text-decoration: underline;
}

.partnership-cta {
  text-align: center;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 3rem 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.partnership-cta p {
  font-size: var(--font-size-lg);
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Design for Partners Page */
@media (max-width: 768px) {
  .nav-menu {
    gap: 1rem;
  }

  .nav-link {
    font-size: var(--font-size-sm);
  }

  .partners {
    padding: 120px 20px 80px;
  }

  .partners-content {
    padding: 0 10px;
  }

  .partners-intro {
    margin-bottom: 40px;
  }

  .partners-intro p {
    font-size: var(--font-size-base);
  }

  .partners-grid {
    gap: 2rem;
    margin-bottom: 40px;
  }

  .partner-category {
    padding: 1.5rem;
  }

  .category-title {
    font-size: var(--font-size-lg);
  }

  .partner-item {
    padding: 1rem;
  }

  .partner-info h5 {
    font-size: var(--font-size-base);
  }

  .partner-info p {
    font-size: var(--font-size-sm);
  }

  .partnership-cta {
    padding: 2rem 1rem;
  }

  .partnership-cta p {
    font-size: var(--font-size-base);
  }
}

@media (max-width: 480px) {
  .nav-menu {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
  }

  .partners {
    padding: 100px 15px 60px;
  }

  .partner-category {
    padding: 1rem;
  }

  .partner-item {
    padding: 0.8rem;
  }

  .partnership-cta {
    padding: 1.5rem 0.8rem;
  }
}
