/* style/resources.css */

:root {
  --primary-color: #FFD700;
  --secondary-color: #DC143C;
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #121212;
  --card-bg-dark: rgba(255, 255, 255, 0.08);
  --border-color-dark: rgba(255, 255, 255, 0.15);
}

.page-resources {
  padding-top: 120px; /* Desktop: Adjust based on fixed header height */
  color: var(--text-light); /* Light text for dark body background */
  background-color: var(--bg-dark);
  line-height: 1.6;
  font-family: 'Arial', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-resources h1,
.page-resources h2,
.page-resources h3,
.page-resources h4,
.page-resources h5,
.page-resources h6 {
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-resources h1 {
  font-size: 44px;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-resources h2 {
  font-size: 36px;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 30px;
  color: var(--secondary-color);
}

.page-resources h3 {
  font-size: 24px;
  color: var(--primary-color);
}

.page-resources p {
  margin-bottom: 1em;
}

.page-resources a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

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

.page-resources__container--narrow {
  max-width: 800px;
}

/* Hero Section */
.page-resources__hero-section {
  background: linear-gradient(135deg, rgba(28, 28, 28, 0.9) 0%, rgba(50, 50, 50, 0.9) 100%), url('[GALLERY:bg:clb88 nổ hũ,hero,main]') no-repeat center center/cover;
  padding: 80px 0;
  text-align: center;
  border-bottom: 5px solid var(--primary-color);
}

.page-resources__main-title {
  margin-bottom: 20px;
  font-weight: bold;
}

.page-resources__hero-description {
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

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

.page-resources__cta-group--center {
  margin-top: 40px;
}

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__cta-button--primary {
  background: var(--primary-color);
  color: var(--text-dark);
}

.page-resources__cta-button--primary:hover {
  background: #e0c200;
  color: var(--text-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-resources__cta-button--secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-resources__cta-button--secondary:hover {
  background: var(--primary-color);
  color: var(--text-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* General Section Styles */
.page-resources__section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-color-dark);
}

.page-resources__section:last-of-type {
  border-bottom: none;
}

.page-resources__section-title {
  margin-bottom: 15px;
}

.page-resources__section-description {
  font-size: 17px;
  margin-bottom: 40px;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #c0c0c0;
}

/* Grid Layouts */
.page-resources__grid {
  display: grid;
  gap: 30px;
  margin-top: 30px;
}

.page-resources__grid--3-cols {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.page-resources__grid--2-cols {
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.page-resources__grid--reverse {
  grid-template-columns: 1fr 1fr;
}

.page-resources__grid--reverse > *:first-child {
  order: 2;
}

.page-resources__grid--reverse > *:last-child {
  order: 1;
}

/* Card Styles */
.page-resources__card, .page-resources__tip-card {
  background: var(--card-bg-dark);
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.page-resources__card:hover, .page-resources__tip-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-resources__card-image, .page-resources__tip-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color-dark);
}

.page-resources__card-title, .page-resources__tip-title {
  font-size: 22px;
  margin-top: 0;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-resources__card-title a, .page-resources__tip-title a {
  color: var(--primary-color);
  text-decoration: none;
}

.page-resources__card-title a:hover, .page-resources__tip-title a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.page-resources__card-excerpt, .page-resources__tip-excerpt {
  font-size: 15px;
  color: #c0c0c0;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-resources__card-link, .page-resources__tip-link {
  display: inline-block;
  padding: 10px 20px;
  background: var(--secondary-color);
  color: var(--text-light);
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-resources__card-link:hover, .page-resources__tip-link:hover {
  background: #a81030;
  transform: translateY(-2px);
  text-decoration: none;
}

/* Text Block for Strategies */
.page-resources__text-block {
  padding: 20px;
  background: var(--card-bg-dark);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-resources__text-block-title {
  font-size: 28px;
  margin-top: 0;
  color: var(--primary-color);
}

.page-resources__image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-color-dark);
}

.page-resources__image--full-width {
  height: 350px;
}

/* News Item Styles */
.page-resources__news-item {
  display: flex;
  background: var(--card-bg-dark);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.page-resources__news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-resources__news-image {
  width: 250px;
  height: 180px;
  object-fit: cover;
  flex-shrink: 0;
}

.page-resources__news-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.page-resources__news-title {
  font-size: 20px;
  margin-top: 0;
  margin-bottom: 10px;
}

.page-resources__news-title a {
  color: var(--primary-color);
  text-decoration: none;
}

.page-resources__news-title a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.page-resources__news-date {
  font-size: 13px;
  color: #999;
  margin-bottom: 15px;
}

.page-resources__news-excerpt {
  font-size: 15px;
  color: #c0c0c0;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-resources__news-link {
  display: inline-block;
  color: var(--secondary-color);
  font-weight: bold;
  text-decoration: none;
  margin-top: auto;
}

.page-resources__news-link:hover {
  text-decoration: underline;
}

/* Contact Section */
.page-resources__section--contact {
  text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources h1 {
    font-size: 38px;
  }

  .page-resources h2 {
    font-size: 32px;
  }

  .page-resources h3 {
    font-size: 22px;
  }

  .page-resources__hero-description {
    font-size: 17px;
  }

  .page-resources__cta-button {
    padding: 12px 25px;
    font-size: 16px;
  }

  .page-resources__grid--2-cols {
    grid-template-columns: 1fr;
  }

  .page-resources__grid--reverse > *:first-child {
    order: 1;
  }
  
  .page-resources__grid--reverse > *:last-child {
    order: 2;
  }

  .page-resources__image--full-width {
    height: auto;
    margin-bottom: 20px;
  }

  .page-resources__news-item {
    flex-direction: column;
  }

  .page-resources__news-image {
    width: 100%;
    height: 200px;
  }
}

@media (max-width: 768px) {
  .page-resources {
    padding-top: 100px !important; /* Mobile: Adjust based on fixed header height */
    font-size: 16px;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .page-resources h1 {
    font-size: 32px;
  }

  .page-resources h2 {
    font-size: 28px;
  }

  .page-resources h3 {
    font-size: 20px;
  }

  .page-resources__hero-section {
    padding: 60px 0;
  }

  .page-resources__hero-description {
    font-size: 16px;
  }

  .page-resources__cta-group {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-resources__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px !important;
    font-size: 15px !important;
    box-sizing: border-box !important;
  }

  .page-resources__container {
    padding: 0 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-resources__section {
    padding: 40px 0;
  }

  .page-resources__section-description {
    font-size: 15px;
    padding: 0 10px;
  }

  .page-resources__grid--3-cols {
    grid-template-columns: 1fr;
  }

  .page-resources__card-image, .page-resources__tip-image {
    height: 180px;
  }

  .page-resources__text-block-title {
    font-size: 24px;
  }

  .page-resources__news-item {
    flex-direction: column;
  }

  .page-resources__news-image {
    width: 100%;
    height: 180px;
  }
  
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 480px) {
  .page-resources h1 {
    font-size: 28px;
  }

  .page-resources h2 {
    font-size: 24px;
  }

  .page-resources h3 {
    font-size: 18px;
  }

  .page-resources__hero-section {
    padding: 40px 0;
  }
}