/* style/beginner-guide.css */

/* --- Base Styles & Variables --- */
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --bg-dark: #08160F;
  --bg-card: #11271B;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --header-offset: 0px; /* This will be set by shared.css body padding-top */
}

/* Ensure body padding-top is handled by shared.css */
/* .page-beginner-guide should not have padding-top: var(--header-offset); */
.page-beginner-guide {
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  font-family: Arial, sans-serif; /* Fallback font */
}

/* --- Sections --- */
.page-beginner-guide__section {
  padding: 60px 0;
  position: relative;
  overflow: hidden; /* Prevent content overflow */
}

.page-beginner-guide__dark-bg {
  background-color: var(--bg-dark);
}

.page-beginner-guide__light-bg {
  background-color: var(--primary-color); /* Example for light bg, adjust as needed */
  color: #000000; /* Dark text on light bg */
}

.page-beginner-guide__medium-bg {
  /* Medium brightness background needs smart analysis */
  color: #000000; /* Default to dark text */
  background: var(--secondary-color);
}

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

/* --- Hero Section --- */
.page-beginner-guide__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-main);
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  background-color: var(--bg-dark); /* Fallback if image not loaded */
}

.page-beginner-guide__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  max-height: 700px; /* Limit hero image height */
}

.page-beginner-guide__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 40px 20px;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
  border-radius: 10px;
  margin-top: 20px; /* Separate from image */
}

.page-beginner-guide__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--gold-color);
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.5);
}

.page-beginner-guide__hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: 30px;
  color: var(--text-secondary);
}

.page-beginner-guide__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* --- Titles --- */
.page-beginner-guide__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--primary-color);
  text-shadow: 0 0 8px rgba(17, 168, 78, 0.3);
}

.page-beginner-guide__step-title,
.page-beginner-guide__card-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--gold-color);
  text-align: center;
}

.page-beginner-guide__card-title a {
  color: var(--gold-color);
  text-decoration: none;
}

.page-beginner-guide__card-title a:hover {
  color: var(--glow-color);
  text-decoration: underline;
}

/* --- Text Blocks --- */
.page-beginner-guide__text-block {
  font-size: 1rem;
  margin-bottom: 20px;
  color: var(--text-main);
  text-align: justify;
}

.page-beginner-guide__text-block ul,
.page-beginner-guide__text-block ol {
  margin-left: 20px;
  list-style-type: disc;
  color: var(--text-main);
}

.page-beginner-guide__text-block ul li,
.page-beginner-guide__text-block ol li {
  margin-bottom: 10px;
}

.page-beginner-guide__text-block strong {
  color: var(--glow-color);
}

.page-beginner-guide__text-link {
  color: var(--glow-color);
  text-decoration: none;
}

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

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

.page-beginner-guide__btn-primary {
  background: var(--button-gradient);
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

.page-beginner-guide__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(34, 199, 104, 0.6);
  opacity: 0.9;
}

.page-beginner-guide__btn-secondary {
  background: transparent;
  color: var(--glow-color);
  border: 2px solid var(--glow-color);
  box-shadow: 0 4px 10px rgba(87, 227, 141, 0.2);
}

.page-beginner-guide__btn-secondary:hover {
  transform: translateY(-3px);
  background: var(--glow-color);
  color: var(--bg-dark);
  box-shadow: 0 6px 15px rgba(87, 227, 141, 0.4);
}

/* --- Layouts --- */
.page-beginner-guide__steps-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 30px;
  margin-bottom: 30px;
}

.page-beginner-guide__step-item {
  background-color: var(--bg-card);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  text-align: center;
}

.page-beginner-guide__step-item p,
.page-beginner-guide__step-item ul {
  text-align: left;
  color: var(--text-secondary);
}

.page-beginner-guide__grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
  margin-bottom: 30px;
}

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

.page-beginner-guide__card:hover {
  transform: translateY(-5px);
}

.page-beginner-guide__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  display: block;
}

.page-beginner-guide__card p {
  color: var(--text-secondary);
}

/* Image floating for introduction/deposit/withdrawal */
.page-beginner-guide__introduction-section .page-beginner-guide__container,
.page-beginner-guide__deposit-section .page-beginner-guide__container,
.page-beginner-guide__withdrawal-section .page-beginner-guide__container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.page-beginner-guide__image-right,
.page-beginner-guide__image-left {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  margin-top: 30px;
  display: block; /* Ensure it behaves as a block element */
}

.page-beginner-guide__image-right {
  align-self: flex-end;
}

.page-beginner-guide__image-left {
  align-self: flex-start;
}


/* --- Bullet List (Tips Section) --- */
.page-beginner-guide__bullet-list {
  list-style: none; /* Remove default bullet */
  padding: 0;
  margin-top: 30px;
  margin-bottom: 30px;
}

.page-beginner-guide__bullet-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
  color: var(--text-main);
}

.page-beginner-guide__bullet-list li::before {
  content: '✓'; /* Custom bullet point */
  position: absolute;
  left: 0;
  color: var(--glow-color);
  font-weight: bold;
  font-size: 1.2em;
}

/* --- FAQ Section --- */
.page-beginner-guide__faq-list {
  margin-top: 30px;
}

.page-beginner-guide__faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.page-beginner-guide__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  font-weight: bold;
  color: var(--gold-color);
  background-color: var(--deep-green);
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

.page-beginner-guide__faq-question:hover {
  background-color: var(--primary-color);
}

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

.page-beginner-guide__faq-qtext {
  flex-grow: 1;
  color: var(--gold-color);
}

.page-beginner-guide__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  width: 25px;
  text-align: center;
  color: var(--glow-color);
}

.page-beginner-guide__faq-answer {
  padding: 0 25px 20px;
  color: var(--text-secondary);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  background-color: var(--bg-card);
}

/* For details tag, the answer is shown by default when open */
.page-beginner-guide__faq-item[open] .page-beginner-guide__faq-answer {
  max-height: 1000px; /* Sufficiently large for content */
  padding-top: 15px;
}

/* Alternative for div-based FAQ if JS is used */
.page-beginner-guide__faq-item.active .page-beginner-guide__faq-answer {
  max-height: 1000px !important;
  padding-top: 15px;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
  .page-beginner-guide__hero-image {
    max-height: 500px;
  }
  .page-beginner-guide__main-title {
    font-size: clamp(2rem, 4vw, 3rem);
  }
  .page-beginner-guide__hero-description {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  }
  .page-beginner-guide__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  }
  .page-beginner-guide__step-title,
  .page-beginner-guide__card-title {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  }

  .page-beginner-guide__introduction-section .page-beginner-guide__container,
  .page-beginner-guide__deposit-section .page-beginner-guide__container,
  .page-beginner-guide__withdrawal-section .page-beginner-guide__container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .page-beginner-guide__image-right,
  .page-beginner-guide__image-left {
    align-self: center;
    margin-top: 30px;
    max-width: 80%;
  }
}

@media (max-width: 768px) {
  .page-beginner-guide__section {
    padding: 40px 0;
  }
  .page-beginner-guide__hero-section {
    padding-bottom: 40px;
  }
  .page-beginner-guide__hero-image {
    max-height: 400px;
  }
  .page-beginner-guide__hero-content {
    padding: 30px 15px;
  }
  .page-beginner-guide__main-title {
    font-size: 2rem;
    margin-bottom: 15px;
  }
  .page-beginner-guide__hero-description {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }
  .page-beginner-guide__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    padding: 0 15px;
  }
  .page-beginner-guide__btn-primary,
  .page-beginner-guide__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 1rem;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }

  .page-beginner-guide__section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }
  .page-beginner-guide__step-title,
  .page-beginner-guide__card-title {
    font-size: 1.2rem;
  }
  .page-beginner-guide__text-block {
    font-size: 0.95rem;
  }

  .page-beginner-guide__grid-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-beginner-guide__card {
    padding: 15px;
  }
  .page-beginner-guide__card-image {
    height: 180px;
  }
  .page-beginner-guide__hero-image {
    max-height: 300px;
  }

  /* Mobile image responsiveness */
  .page-beginner-guide img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-beginner-guide__section,
  .page-beginner-guide__card,
  .page-beginner-guide__container,
  .page-beginner-guide__cta-buttons,
  .page-beginner-guide__video-section,
  .page-beginner-guide__video-container,
  .page-beginner-guide__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  
  .page-beginner-guide__video-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }

  /* Video responsiveness */
  .page-beginner-guide video,
  .page-beginner-guide__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-beginner-guide__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-beginner-guide__faq-question {
    padding: 15px 20px;
    font-size: 0.95rem;
  }
  .page-beginner-guide__faq-answer {
    padding: 0 20px 15px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .page-beginner-guide__main-title {
    font-size: 1.8rem;
  }
  .page-beginner-guide__hero-description {
    font-size: 0.85rem;
  }
  .page-beginner-guide__section-title {
    font-size: 1.5rem;
  }
  .page-beginner-guide__step-title,
  .page-beginner-guide__card-title {
    font-size: 1.1rem;
  }
  .page-beginner-guide__card-image {
    height: 150px;
  }
  .page-beginner-guide__hero-image {
    max-height: 300px;
  }
}