/* page-contact.css */

:root {
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --background-dark: #0A0A0A;
  --card-background: #111111;
  --text-light: #FFF6D6;
  --border-color: #3A2A12;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --glow-color: #FFD36B;
}

.page-contact {
  font-family: 'Arial', sans-serif;
  color: var(--text-light); /* Main text color for dark background */
  background-color: var(--background-dark);
  line-height: 1.6;
  padding-bottom: 50px; /* Ensure space above footer */
}

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

/* Hero Section */
.page-contact__hero-section {
  position: relative;
  width: 100%;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  margin-bottom: 40px;
}

.page-contact__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Desktop: cover */
  z-index: 1;
  opacity: 0.3;
}

.page-contact__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 40px 20px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.page-contact__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--secondary-color);
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(255, 211, 107, 0.5);
}

.page-contact__hero-description {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 30px;
  line-height: 1.7;
}

.page-contact__highlight {
  color: var(--secondary-color);
  font-weight: bold;
}

.page-contact__btn-primary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  background: var(--button-gradient);
  color: #ffffff;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(242, 193, 78, 0.4);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-contact__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(242, 193, 78, 0.6);
}

.page-contact__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  background: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-contact__btn-secondary:hover {
  background: var(--secondary-color);
  color: var(--background-dark);
}

/* Section Titles and Descriptions */
.page-contact__section-title {
  font-size: 2.2rem;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 15px;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(242, 193, 78, 0.3);
}

.page-contact__section-description {
  font-size: 1.05rem;
  color: var(--text-light);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* Channels Section */
.page-contact__channels-section {
  padding: 60px 0;
}

.page-contact__channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-contact__channel-card {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-contact__channel-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.page-contact__channel-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 5px rgba(255, 211, 107, 0.5));
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

.page-contact__card-title {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-weight: 600;
}

.page-contact__card-text {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-contact__email-address, .page-contact__phone-number {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 15px;
  font-weight: 500;
}

/* Form Section */
.page-contact__form-section {
  padding: 60px 0;
  background: var(--background-dark);
}

.page-contact__contact-form {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 40px;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.page-contact__form-group {
  margin-bottom: 20px;
}

.page-contact__form-label {
  display: block;
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 8px;
  font-weight: 600;
}

.page-contact__form-input,
.page-contact__form-textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: #1a1a1a;
  color: var(--text-light);
  font-size: 1rem;
  box-sizing: border-box;
}

.page-contact__form-input::placeholder,
.page-contact__form-textarea::placeholder {
  color: #888;
}

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
  border-color: var(--secondary-color);
  outline: none;
  box-shadow: 0 0 5px rgba(255, 211, 107, 0.5);
}

.page-contact__form-submit-btn {
  width: 100%;
  padding: 15px;
  font-size: 1.2rem;
  margin-top: 20px;
}

/* Why Contact Section */
.page-contact__why-contact-section {
  padding: 60px 0;
}

.page-contact__why-contact-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 40px;
  max-width: 800px;
}

.page-contact__list-item {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  font-size: 1rem;
  color: var(--text-light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-contact__list-item strong {
  color: var(--secondary-color);
}

.page-contact__responsible-gaming-text {
  font-size: 1rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 20px;
}

.page-contact__responsible-gaming-cta {
  display: block;
  width: fit-content;
  margin: 0 auto;
}

/* FAQ Section */
.page-contact__faq-section {
  padding: 60px 0;
  background: var(--background-dark);
}

.page-contact__faq-list {
  max-width: 800px;
  margin: 0 auto;
}

details.page-contact__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-background);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

details.page-contact__faq-item summary.page-contact__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: var(--secondary-color);
  font-weight: 600;
}

details.page-contact__faq-item summary.page-contact__faq-question::-webkit-details-marker {
  display: none;
}

details.page-contact__faq-item summary.page-contact__faq-question:hover {
  background: #1a1a1a; /* Slightly lighter dark background on hover */
}

.page-contact__faq-qtext {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}

.page-contact__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-contact__faq-item .page-contact__faq-answer {
  padding: 0 20px 20px;
  background: #0a0a0a; /* Darker background for answer */
  border-radius: 0 0 5px 5px;
  color: var(--text-light);
}

.page-contact__faq-answer p {
  margin: 0;
  font-size: 1rem;
}

/* Social Media Section */
.page-contact__social-media-section {
  padding: 60px 0;
  text-align: center;
}

.page-contact__social-icons {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 40px;
}

.page-contact__social-link {
  display: inline-block;
  transition: transform 0.3s ease;
}

.page-contact__social-link:hover {
  transform: translateY(-5px) scale(1.1);
}

.page-contact__social-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  min-width: 200px; /* Enforce min size, this will be overridden by width:60px */
  min-height: 200px; /* Enforce min size, this will be overridden by height:60px */
}

/* General Image styles for content area */
.page-contact img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === Responsive Styles === */

/* Desktop/Tablet transition point */
@media (max-width: 1024px) {
  .page-contact__container {
    padding: 15px;
  }

  .page-contact__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }

  .page-contact__hero-description {
    font-size: 1rem;
  }

  .page-contact__section-title {
    font-size: 2rem;
  }

  .page-contact__section-description {
    font-size: 1rem;
  }

  .page-contact__channels-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .page-contact__channel-card {
    padding: 25px;
  }

  .page-contact__form-input, .page-contact__form-textarea {
    padding: 10px 12px;
  }

  .page-contact__hero-image {
    object-fit: cover; /* Still cover for larger tablets */
  }

  .page-contact__social-icon {
    width: 50px;
    height: 50px;
  }
}

/* Mobile Styles (max-width: 768px) */
@media (max-width: 768px) {
  .page-contact {
    font-size: 15px;
    line-height: 1.5;
  }

  .page-contact__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* HERO 主图区域 */
  .page-contact__hero-section {
    min-height: 400px;
    padding-top: 10px; /* Keep small top padding */
    margin-bottom: 30px;
  }

  .page-contact__hero-image {
    object-fit: contain !important; /* Mobile: contain */
    aspect-ratio: unset !important; /* Allow aspect ratio to adjust */
    position: relative; /* Change to relative to stack with content */
    height: 200px; /* Give it a fixed height for contain */
    opacity: 1; /* Make it more visible */
    margin-bottom: 20px;
  }

  .page-contact__hero-content {
    padding: 20px;
    background: rgba(0, 0, 0, 0.8); /* Darker overlay for readability */
    border-radius: 8px;
    box-shadow: none;
    position: relative; /* Ensure text is above image if image is relative */
    margin-top: -100px; /* Pull content up slightly over image if image is relative */
  }

  .page-contact__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem); /* Adjust clamp for smaller screens */
    margin-bottom: 15px;
  }

  .page-contact__hero-description {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }

  /* 按钮与按钮容器 */
  .page-contact__btn-primary,
  .page-contact__btn-secondary,
  .page-contact a[class*="button"],
  .page-contact a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 10px; /* Add space between stacked buttons */
  }

  .page-contact__hero-cta {
    margin-top: 10px;
  }

  .page-contact__cta-buttons,
  .page-contact__button-group,
  .page-contact__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px;
  }

  /* Section Titles and Descriptions */
  .page-contact__section-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    line-height: 1.3;
  }

  .page-contact__section-description {
    font-size: 0.95rem;
    margin-bottom: 30px;
  }

  /* 通用图片与容器 */
  .page-contact img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-contact__section,
  .page-contact__card,
  .page-contact__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Channels Section */
  .page-contact__channels-section {
    padding: 40px 0;
  }

  .page-contact__channels-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

  .page-contact__channel-card {
    padding: 20px;
  }

  .page-contact__channel-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    min-width: 80px; /* Adjust min size for mobile */
    min-height: 80px; /* Adjust min size for mobile */
  }

  .page-contact__card-title {
    font-size: 1.3rem;
  }

  .page-contact__card-text {
    font-size: 0.9rem;
  }

  /* Form Section */
  .page-contact__form-section {
    padding: 40px 0;
  }

  .page-contact__contact-form {
    padding: 25px;
  }

  .page-contact__form-label {
    font-size: 1rem;
  }

  .page-contact__form-input,
  .page-contact__form-textarea {
    padding: 10px;
    font-size: 0.95rem;
  }

  .page-contact__form-submit-btn {
    font-size: 1.1rem;
    padding: 12px;
  }

  /* Why Contact Section */
  .page-contact__why-contact-section {
    padding: 40px 0;
  }

  .page-contact__list-item {
    padding: 15px;
    font-size: 0.95rem;
  }

  /* FAQ Section */
  .page-contact__faq-section {
    padding: 40px 0;
  }

  details.page-contact__faq-item summary.page-contact__faq-question {
    padding: 15px;
  }

  .page-contact__faq-qtext {
    font-size: 1rem;
  }

  .page-contact__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }

  details.page-contact__faq-item .page-contact__faq-answer {
    padding: 0 15px 15px;
  }

  /* Social Media Section */
  .page-contact__social-media-section {
    padding: 40px 0;
  }

  .page-contact__social-icons {
    gap: 15px;
    margin-top: 30px;
  }

  .page-contact__social-icon {
    width: 45px;
    height: 45px;
  }
}

/* Ensure min-width/height for channel icons are respected */
.page-contact__channel-icon,
.page-contact__social-icon {
  min-width: 200px; /* Default large size, overridden by specific width/height */
  min-height: 200px; /* Default large size, overridden by specific width/height */
}

@media (max-width: 768px) {
  .page-contact__channel-icon {
    min-width: 100px !important;
    min-height: 100px !important;
    width: 100px !important;
    height: 100px !important;
  }
  .page-contact__social-icon {
    min-width: 60px !important;
    min-height: 60px !important;
    width: 60px !important;
    height: 60px !important;
  }
}

/* Override specific image sizes to ensure they are not too small, but also not causing overflow */
.page-contact__channel-icon[width="400"][height="267"],
.page-contact__channel-icon[width="400"][height="300"] {
  width: 250px;
  height: auto;
}

@media (max-width: 768px) {
  .page-contact__channel-icon[width="400"][height="267"],
  .page-contact__channel-icon[width="400"][height="300"] {
    width: 150px !important;
    height: auto !important;
  }
}