/* style/resources.css */

/* Biến CSS cho màu sắc */
:root {
  --primary-color: #003366;
  --secondary-color: #FFD700;
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-light: #f9f9f9;
  --background-dark: #002244;
  --border-color: #e0e0e0;
  --card-bg-dark: #002e5b; /* Slightly lighter than primary for cards on dark sections */
}

/* Thiết lập cơ bản cho trang */
.page-resources {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--background-light);
}

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

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

.page-resources__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-resources__light-bg {
  background-color: var(--background-light);
  color: var(--text-dark);
}

.page-resources__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: inherit; /* Inherit color from parent section */
}

.page-resources__section-intro {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: inherit;
}

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  padding: 100px 0 60px; /* Base padding */
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  text-align: center;
  color: var(--text-light);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-resources__hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 51, 102, 0.8), rgba(0, 51, 102, 0.6)); /* Overlay */
  z-index: 1;
}

.page-resources__hero-section .page-resources__container {
  position: relative;
  z-index: 2;
}

.page-resources__main-title {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 20px;
  color: var(--secondary-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-resources__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
}

.page-resources__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* CTA Button (general style, used in hero and other sections) */
.page-resources__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
}

.page-resources__cta-button:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-resources__cta-button--large {
  padding: 20px 50px;
  font-size: 24px;
  margin-top: 30px;
}

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

/* Card Styles */
.page-resources__card {
  background-color: var(--text-light);
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: var(--text-dark);
}

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

.page-resources__card--dark {
  background-color: var(--card-bg-dark);
  color: var(--text-light);
}

.page-resources__card--dark .page-resources__card-title,
.page-resources__card--dark .page-resources__list li,
.page-resources__card--dark .page-resources__card-button {
  color: var(--text-light);
}

.page-resources__card--dark .page-resources__card-button {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.page-resources__card--dark .page-resources__card-button:hover {
  background-color: #e6c200;
}

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

.page-resources__card-title {
  font-size: 22px;
  font-weight: bold;
  padding: 20px 20px 10px;
  margin: 0;
  color: var(--primary-color);
}

.page-resources__card p {
  padding: 0 20px;
  margin-bottom: 15px;
}

.page-resources__list {
  list-style-type: disc;
  margin: 0 20px 20px 40px;
  padding: 0;
}

.page-resources__list li {
  margin-bottom: 8px;
}

.page-resources__card-button {
  display: inline-block;
  padding: 12px 25px;
  background-color: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  margin: 0 20px 20px;
  transition: background-color 0.3s ease;
  align-self: flex-start; /* Align button to start of card */
}

.page-resources__card-button:hover {
  background-color: #002244;
}

/* CTA Section at bottom */
.page-resources__cta-section {
  padding: 80px 0;
  text-align: center;
  background-color: var(--background-light);
}

.page-resources__cta-title {
  font-size: 38px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.page-resources__cta-description {
  font-size: 20px;
  max-width: 900px;
  margin: 0 auto 40px;
  color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__main-title {
    font-size: 40px;
  }
  .page-resources__hero-description {
    font-size: 18px;
  }
  .page-resources__section-title {
    font-size: 30px;
  }
  .page-resources__section-intro {
    font-size: 16px;
  }
  .page-resources__card-title {
    font-size: 20px;
  }
  .page-resources__cta-title {
    font-size: 32px;
  }
  .page-resources__cta-button--large {
    font-size: 20px;
    padding: 15px 40px;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
  }
  .page-resources__main-title {
    font-size: 32px;
  }
  .page-resources__hero-description {
    font-size: 16px;
  }
  .page-resources__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 25px !important;
    font-size: 18px !important;
  }
  .page-resources__cta-button--large {
    font-size: 20px !important;
    padding: 15px 30px !important;
  }
  .page-resources__section {
    padding: 40px 0;
  }
  .page-resources__section-title {
    font-size: 26px;
  }
  .page-resources__section-intro {
    font-size: 15px;
    margin-bottom: 30px;
  }
  .page-resources__container {
    padding: 0 15px;
  }
  .page-resources__content-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-resources__card-image {
    height: 200px;
  }
  .page-resources__card-title {
    font-size: 18px;
  }
  .page-resources__card p {
    font-size: 14px;
  }
  .page-resources__list {
    font-size: 14px;
    margin-left: 30px;
  }
  .page-resources__card-button {
    width: calc(100% - 40px);
    margin-left: 20px;
    margin-right: 20px;
    box-sizing: border-box;
  }
  .page-resources__cta-title {
    font-size: 28px;
  }
  .page-resources__cta-description {
    font-size: 16px;
  }

  /* Mobile image responsive rules */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-resources__section,
  .page-resources__card,
  .page-resources__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }
  .page-resources__hero-section .page-resources__container {
    padding-left: 0;
    padding-right: 0;
  }
}