/* styles/packetDetail.css - Restored Visuals & Simplified Layout */

/* --- Global Variables (Assuming they are in a separate file or :root) --- */
:root {
  --dark-green: #006400;
  --text-color: var(--text-color);
  --light-gray: #d3d3d3;
  --background-color: var(--background-color);
  --secondary-bg-color: #f8f9fa;
  --steel-blue: #4682b4;
  --pale-turquoise: #afeeee;
  --light-green: #77dd77;
  --btn-primary-bg: #4682b4;
  --btn-primary-hover: #5a9bc9;
  --btn-secondary-bg: var(--light-green);
}

/* --- Main Content --- */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* --- Page Header --- */
.packet-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: var(--background-color);
  border-radius: 8px;
  border: 1px solid var(--light-gray);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.packet-header h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  color: var(--dark-green);
  margin: 0 0 0.5rem 0;
}

.packet-header .subtitle {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  color: var(--text-color);
  margin: 0;
  padding: 0 1rem;
}

/* --- Content Grid: MOBILE FIRST --- */
.content-grid {
  display: block;
  width: 100%;
}

.samples-column {
  width: 100%;
  margin-bottom: 1.5rem;
}

.cta-column {
  width: 100%;
  position: static;
}

/* Desktop ONLY: Two-column layout with sticky sidebar */
@media (min-width: 1024px) {
  .content-grid {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
  }
  .samples-column {
    flex: 2;
    min-width: 0; /* Prevents flex overflow issues */
    width: auto;
    margin-bottom: 0;
  }
  .cta-column {
    flex: 1;
    width: auto;
    position: sticky;
    top: 2rem;
  }
}

/* --- Card Styling --- */
.sample-feature-card {
  border: 1px solid var(--light-gray);
  border-radius: 0.5rem;
  padding: 1.5rem;
  background: var(--background-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem; /* KEY: Adds space between stacked cards */
}

.sample-section .sample-feature-card:last-child {
  margin-bottom: 0; /* Removes margin from the last card */
}

/* --- Sample Sections --- */
.sample-section {
  margin-bottom: 3rem;
}

.sample-section h2 {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  color: var(--steel-blue);
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--pale-turquoise);
  text-align: center;
}

.sample-section p.section-intro {
  font-size: clamp(0.9rem, 2vw, 1rem);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--text-color);
}

/* --- Flashcards & Questions --- */
.flashcard-front {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--light-gray);
}

.flashcard-front strong,
.flashcard-back strong,
.answers-body strong {
  color: var(--steel-blue);
  display: block;
  margin-bottom: 0.5rem;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  font-weight: 600;
}

.question-body,
.flashcard-front,
.flashcard-back {
  font-size: clamp(0.9rem, 2vw, 1rem);
  line-height: 1.6;
  color: var(--text-color);
}

.question-body {
  margin-bottom: 1.5rem;
}

.answer-option {
  padding: 0.75rem;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--light-gray);
  background-color: #fdfdfd;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.correct-answer {
  border-color: var(--btn-secondary-bg);
  background-color: #e9f5ec;
}

.correct-indicator {
  margin-left: 0.5rem;
  font-weight: bold;
  color: var(--btn-secondary-bg);
}

/* --- CTA Box --- */
.cta-box {
  background: var(--background-color);
  padding: 1.5rem;
  border-radius: 0.5rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--light-gray);
}

.cta-box h3 {
  font-size: clamp(1.3rem, 4vw, 1.6rem);
  color: var(--dark-green);
  margin: 0 0 1rem 0;
  font-weight: 700;
}

.cta-box p {
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  color: var(--text-color);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* --- Global Button Styles (General appearance for all action buttons) --- */
.btn-block {
  display: block;
  width: 100%;
  padding: 0.875rem 1rem; /* Slightly more horizontal padding */
  font-size: clamp(0.9rem, 2.5vw, 1.1rem); /* Responsive font size */
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  border-radius: 0.375rem; /* Consistent border-radius */
  border: none;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease,
    box-shadow 0.2s ease; /* Add box-shadow transition */
  min-height: 48px; /* Ensures consistent clickable area */
  box-sizing: border-box;
  var(--background-color)-space: normal;
  word-wrap: break-word;
  line-height: 1.3;
  margin-bottom: 0.75rem; /* Spacing between buttons if stacked */
}

/* Remove margin from the last button in a group */
.cta-box .btn-block:last-of-type {
  margin-bottom: 0;
}

.btn-block:hover {
  transform: translateY(-2px); /* Slight lift on hover */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Subtle shadow on hover */
}

.btn-block:active {
  transform: translateY(0); /* Press down effect */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-block:focus {
  outline: 2px solid var(--steel-blue); /* Accessibility outline */
  outline-offset: 2px;
}

/* --- Specific Button Styles --- */

/* "Adicionar ao Carrinho" (Add to Cart) - Primary Action */
.btn-primary {
  background-color: var(--btn-primary-bg); /* Use your primary blue */
  color: var(--background-color);
}

.btn-primary:hover {
  background-color: var(--btn-primary-hover);
}

/* "Adicionar aos Meus Estudos" (Add to My Studies) - Secondary Success Action */
.btn-add {
  background-color: var(--btn-secondary-bg); /* Use your secondary green */
  color: var(--background-color);
}

.btn-add:hover {
  background-color: var(--btn-secondary-hover);
}

/* "Remover dos Meus Estudos" (Remove from My Studies) - Danger/Warning Action */
.btn-remove {
  background-color: var(--tomato); /* Use your tomato red for danger */
  color: var(--background-color);
}

.btn-remove:hover {
  background-color: #e04e37; /* Slightly darker red on hover */
}

/* "Ver Planos de Assinatura" (View Subscription Plans) */
.btn-secondary {
    background-color: var(--steel-blue); /* A different shade for distinction */
    color: var(--background-color);
}
.btn-secondary:hover {
    background-color: var(--cadet-blue);
}

/* --- Disabled Button Style --- */
.btn-block:disabled {
  background-color: var(--light-gray);
  color: var(--dark-gray);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.7;
}

/* --- Link Styled as Button --- */
.link-to-library {
  display: block;
  margin-top: 1rem; /* Space from the button above */
  color: var(--steel-blue); /* Steel blue for links */
  font-weight: bold;
  text-decoration: underline; /* Standard link underline */
  font-size: clamp(0.9rem, 2.5vw, 1rem); /* Consistent with other text */
  text-align: center;
}

.link-to-library:hover {
  color: var(--cadet-blue);
  text-decoration: none; /* Remove underline on hover for a cleaner look */
}
