/* style/news.css */

/* Base Styles */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
}

.page-news__section {
  padding: 60px 20px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.05); /* Slightly visible section background */
  margin-bottom: 20px;
}

.page-news__section:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.03);
}

.page-news__dark-section {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-news__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

.page-news__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.page-news__dark-section .page-news__section-title {
  color: #ffffff;
}

.page-news__section-description {
  font-size: 1.1em;
  margin-bottom: 40px;
  color: #f0f0f0;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  color: #ffffff;
  text-align: center;
  padding-top: var(--header-offset, 120px);
  box-sizing: border-box;
}

.page-news__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 20px;
}

.page-news__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.page-news__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  color: #f0f0f0;
}

.page-news__hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-news__btn-primary {
  background-color: #EA7C07; /* Login color */
  color: #ffffff;
  border: 2px solid #EA7C07;
}

.page-news__btn-primary:hover {
  background-color: #d46f07;
  border-color: #d46f07;
}

.page-news__btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.page-news__btn-secondary:hover {
  background-color: #ffffff;
  color: #26A9E0;
}

/* Latest News Grid */
.page-news__news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-news__news-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  color: #ffffff;
  display: flex;
  flex-direction: column;
}

.page-news__news-card:hover {
  transform: translateY(-10px);
}

.page-news__news-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.page-news__card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-news__card-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-news__card-title a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__card-title a:hover {
  color: #26A9E0;
}

.page-news__card-text {
  font-size: 1em;
  color: #f0f0f0;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__card-link {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__card-link:hover {
  color: #ffffff;
}

/* Guides & Tips Section */
.page-news__tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-news__tip-item {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 30px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #ffffff;
}

.page-news__tip-title {
  font-size: 1.6em;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-news__tip-text {
  font-size: 1em;
  color: #f0f0f0;
  margin-bottom: 20px;
}

/* Security Section */
.page-news__security-section {
  text-align: left;
}

.page-news__security-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
}

.page-news__security-image {
  flex: 1 1 45%;
  min-width: 300px;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: block;
}

.page-news__security-text {
  flex: 1 1 45%;
  min-width: 300px;
  color: #f0f0f0;
}

.page-news__security-subtitle {
  font-size: 1.8em;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #ffffff;
}

.page-news__security-text p {
  margin-bottom: 20px;
  font-size: 1.1em;
}

.page-news__security-text .page-news__btn-primary,
.page-news__security-text .page-news__btn-secondary {
  margin-right: 15px;
  margin-bottom: 15px; /* For mobile stacking */
}

/* Community & Support Section */
.page-news__community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-news__community-item {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #ffffff;
}

.page-news__community-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.page-news__community-subtitle {
  font-size: 1.6em;
  margin-bottom: 15px;
  color: #ffffff;
}

/* FAQ Section */
.page-news__faq-section {
  text-align: left;
}

.page-news__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #ffffff;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.page-news__faq-question::-webkit-details-marker {
  display: none;
}

.page-news__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.page-news__faq-qtext {
  flex-grow: 1;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  width: 20px;
  text-align: center;
}

.page-news__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: #f0f0f0;
  line-height: 1.7;
}

/* Call to Action Section */
.page-news__cta-section {
  background-color: #26A9E0;
  padding: 80px 20px;
  color: #ffffff;
}

.page-news__cta-content {
  max-width: 800px;
}

.page-news__cta-title {
  font-size: 2.8em;
  margin-bottom: 25px;
  line-height: 1.2;
  color: #ffffff;
}

.page-news__cta-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  color: #f0f0f0;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 2.8em;
  }
  .page-news__hero-description {
    font-size: 1.1em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__news-image, .page-news__community-image {
    height: 200px;
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    height: 500px;
    padding-top: var(--header-offset, 120px) !important;
  }
  .page-news__hero-title {
    font-size: 2.2em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__hero-actions {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100%;
    max-width: 300px !important;
    margin: 0 auto;
    padding: 12px 20px;
  }

  .page-news__section {
    padding: 40px 15px;
  }
  .page-news__section-title {
    font-size: 1.8em;
  }
  .page-news__section-description {
    font-size: 0.95em;
  }
  .page-news__news-grid,
  .page-news__tips-grid,
  .page-news__community-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__news-card, .page-news__tip-item, .page-news__community-item {
    margin-left: 0;
    margin-right: 0;
  }
  .page-news__security-content {
    flex-direction: column;
  }
  .page-news__security-image,
  .page-news__security-text {
    min-width: unset;
    width: 100%;
  }
  .page-news__security-text .page-news__btn-primary,
  .page-news__security-text .page-news__btn-secondary {
    display: block;
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
  }
  .page-news__cta-title {
    font-size: 2em;
  }
  .page-news__cta-description {
    font-size: 1em;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  
  /* Image responsive rules */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-section,
  .page-news__news-card,
  .page-news__tip-item,
  .page-news__community-item,
  .page-news__security-content,
  .page-news__security-text,
  .page-news__community-grid,
  .page-news__faq-list,
  .page-news__cta-section,
  .page-news__cta-content,
  .page-news__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden !important; /* Ensure no horizontal scroll */
  }
  .page-news__faq-question {
    padding: 15px 20px;
    font-size: 1.1em;
  }
  .page-news__faq-answer {
    padding: 15px 20px;
  }
}