/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --news-black: #121212;
  --news-yellow: #F7D844;
  --news-blue: #005596;
  --news-gray: #4a4a4a;
  --news-lightgray: #f5f5f5;
}

/* Performance: Otimização de renderização */
img {
  content-visibility: auto;
  background-color: #f3f4f6;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: white;
  color: var(--news-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.font-serif {
  font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: white;
  border-bottom: 1px solid #d1d5db;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.header-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-btn, .user-btn {
  color: var(--news-black);
  padding: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
}

.logo {
  height: 1.5rem;
  width: 120px;
  user-select: none;
  pointer-events: none;
}

.subscribe-btn {
  background-color: var(--news-yellow);
  color: black;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 0.375rem 0.75rem;
  border-radius: 1px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.05em;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: background-color 0.2s;
}

.subscribe-btn:hover {
  background-color: #ebd040;
}

/* Main Container */
.main-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: white;
}

.main-content {
  flex-grow: 1;
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
  padding: 1rem;
}

@media (min-width: 768px) {
  .main-content {
    padding: 1rem 0;
  }
}

/* Category Label */
.category-label {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.category-text {
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c00;
  font-family: 'Inter', sans-serif;
}

/* Quiz Flow */
.quiz-container {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-title {
  font-family: 'Merriweather', serif;
  font-size: 1.25rem;
  font-weight: bold;
  line-height: 1.4;
  color: var(--news-black);
}

.quiz-title-lg {
  font-size: 1.5rem;
}

.quiz-subtitle {
  font-family: 'Merriweather', serif;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #374151;
}

.quiz-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0.375rem;
  aspect-ratio: 4 / 3;
  min-height: 280px;
  background-color: #f3f4f6;
}

/* Yellow Highlight Box */
.highlight-box {
  background-color: #fefce8;
  border-left: 4px solid var(--news-yellow);
  padding: 0.75rem;
}

.highlight-text {
  font-family: 'Merriweather', serif;
  font-size: 0.75rem;
  font-style: italic;
  color: #374151;
}

/* CTA Button */
.cta-button {
  width: 100%;
  background-color: var(--news-yellow);
  color: black;
  font-weight: bold;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.25rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  animation: pulse-glow 2s ease-in-out infinite;
}

.cta-button:hover {
  background-color: #ebd040;
  transform: scale(1.02);
}

.cta-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cta-button-lg {
  font-size: 1.125rem;
  padding: 1rem 1.5rem;
}

@keyframes pulse-glow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(247, 216, 68, 0.7);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 20px 5px rgba(247, 216, 68, 0.4);
  }
}

@keyframes pulse-glow-strong {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(247, 216, 68, 0.9);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 30px 10px rgba(247, 216, 68, 0.6);
  }
}

.animate-pulse-cta-strong {
  animation: pulse-glow-strong 1.2s ease-in-out infinite;
}

/* Check List */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.check-icon {
  width: 0.75rem;
  height: 0.75rem;
  color: var(--news-yellow);
}

/* Option Buttons */
.options-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.option-button {
  width: 100%;
  text-align: left;
  background-color: white;
  border: 1px solid #e5e7eb;
  padding: 1rem;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.option-button:hover {
  border-color: var(--news-yellow);
  background-color: #fefce8;
}

.option-arrow {
  width: 1rem;
  height: 1rem;
  color: #d1d5db;
  transition: color 0.2s;
}

.option-button:hover .option-arrow {
  color: var(--news-yellow);
}

/* Slider */
.slider-container {
  padding: 0 0.5rem;
}

.slider-value {
  text-align: center;
  padding: 1rem 0;
}

.slider-number {
  font-size: 3.75rem;
  font-weight: bold;
  font-family: 'Merriweather', serif;
  color: var(--news-black);
}

.slider-unit {
  font-size: 1.5rem;
  font-family: 'Merriweather', serif;
  color: #6b7280;
  margin-left: 0.5rem;
}

.slider-track-container {
  position: relative;
  height: 2rem;
  display: flex;
  align-items: center;
}

.slider-track {
  position: absolute;
  width: 100%;
  height: 0.75rem;
  background-color: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}

.slider-fill {
  height: 100%;
  background: linear-gradient(to right, var(--news-yellow), #f97316);
  border-radius: 9999px;
  transition: width 0.1s;
}

.slider-thumb {
  position: absolute;
  width: 1.75rem;
  height: 1.75rem;
  background-color: white;
  border: 4px solid var(--news-yellow);
  border-radius: 9999px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  pointer-events: none;
  transform: translateX(-50%);
}

.slider-input {
  position: absolute;
  width: 100%;
  height: 2rem;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #9ca3af;
  font-weight: 500;
}

.slider-helper {
  background-color: #f9fafb;
  border: 1px solid #f3f4f6;
  padding: 1rem;
  border-radius: 0.5rem;
  text-align: center;
}

.slider-helper-text {
  font-size: 0.875rem;
  color: #4b5563;
  font-family: 'Merriweather', serif;
}

/* Input Field */
.input-field {
  width: 100%;
  padding: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  background-color: white;
  color: #111827;
  font-size: 1.125rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field:focus {
  border-color: var(--news-yellow);
  box-shadow: 0 0 0 1px var(--news-yellow);
}

.input-field::placeholder {
  color: #9ca3af;
}

/* Testimonials */
.testimonial-card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  border: 1px solid #f3f4f6;
  overflow: hidden;
}

.testimonial-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  min-height: 300px;
  background-color: #f3f4f6;
}

.testimonial-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.testimonial-quote {
  font-family: 'Merriweather', serif;
  font-style: italic;
  color: #374151;
  font-size: 0.875rem;
  line-height: 1.6;
  border-left: 4px solid var(--news-yellow);
  padding-left: 0.75rem;
}

.testimonial-author {
  font-weight: bold;
  color: var(--news-black);
  font-size: 0.875rem;
}

.testimonial-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.stars {
  color: #fbbf24;
}

/* Loading */
.loading-container {
  text-align: center;
  padding: 2.5rem 0;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 16rem;
  margin-bottom: 2rem;
  overflow: hidden;
  border-radius: 0.5rem;
}

.carousel-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s;
  background-color: #f3f4f6;
  will-change: opacity;
}

.carousel-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.carousel-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: rgba(255,255,255,0.6);
  transition: all 0.3s;
}

.carousel-dot.active {
  background-color: var(--news-yellow);
  width: 1rem;
}

.progress-bar {
  width: 100%;
  height: 1rem;
  background-color: #e5e7eb;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.progress-fill {
  height: 100%;
  background-color: var(--news-yellow);
  border-radius: 9999px;
  transition: width 0.075s ease-out;
}

.progress-text {
  font-family: 'Merriweather', serif;
  font-size: 1.125rem;
  font-weight: bold;
}

/* IMC Result */
.imc-display {
  text-align: center;
}

.imc-label {
  color: #4b5563;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.imc-value {
  font-size: 2.25rem;
  font-weight: bold;
  color: #f97316;
}

.imc-bar-container {
  position: relative;
  margin-top: 3rem;
  padding-top: 0.5rem;
}

.imc-indicator {
  position: absolute;
  top: -1.25rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.imc-indicator-label {
  color: #f97316;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.125rem;
}

.imc-indicator-arrow {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid #f97316;
}

.imc-bar {
  display: flex;
  height: 2rem;
  border-radius: 0.5rem;
  overflow: hidden;
}

.imc-bar-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
}

.imc-bajo { background-color: #3b82f6; }
.imc-normal { background-color: #22c55e; }
.imc-sobrepeso { background-color: #f97316; }
.imc-obesidad { background-color: #ef4444; }

.imc-bar-section.active {
  box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor;
}

/* Alert Signs */
.alert-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-family: 'Merriweather', serif;
  color: #374151;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.alert-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.alert-icon.red { color: #ef4444; }
.alert-icon.green { color: #16a34a; }

/* Comparison Table */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.comparison-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comparison-title {
  font-weight: bold;
  font-size: 0.875rem;
  text-align: center;
}

.comparison-title.red { color: #ef4444; }
.comparison-title.green { color: #16a34a; }

.comparison-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.comparison-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.comparison-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* Video Page */
.video-container {
  position: relative;
  width: 100%;
  border-radius: 0.5rem;
  overflow: hidden;
}

.video-wrapper {
  margin: 0 auto;
  width: 100%;
  max-width: 400px;
}

/* Comments */
.comments-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.comments-title {
  font-weight: bold;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment {
  display: flex;
  gap: 0.75rem;
}

.comment-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  flex-shrink: 0;
  object-fit: cover;
  background-color: #e5e7eb;
  aspect-ratio: 1 / 1;
}

.comment-content {
  flex: 1;
}

.comment-author {
  font-weight: bold;
  font-size: 0.875rem;
}

.comment-text {
  font-size: 0.75rem;
  color: #4b5563;
  margin-top: 0.25rem;
}

.comment-meta {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

.comments-footer {
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

/* News Feed */
.divider {
  height: 0.25rem;
  width: 100%;
  background-color: #f3f4f6;
  margin: 2rem 0;
  border-radius: 9999px;
}

.newsfeed {
  margin-top: 2rem;
  contain: layout style;
}

.newsfeed-title {
  font-weight: bold;
  font-size: 1.125rem;
  border-bottom: 2px solid black;
  display: inline-block;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

.stories-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.story {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
}

.story-title {
  font-family: 'Merriweather', serif;
  font-weight: bold;
  font-size: 1.25rem;
  line-height: 1.4;
  transition: color 0.2s;
}

.story:hover .story-title {
  color: var(--news-blue);
}

.story-excerpt {
  color: var(--news-gray);
  font-family: 'Merriweather', serif;
  font-size: 0.875rem;
  line-height: 1.6;
}

.story-image-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 180px;
  overflow: hidden;
  border-radius: 0.125rem;
  background-color: #f3f4f6;
  contain: layout style paint;
}

.story-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
  background-color: #f3f4f6;
}

.story:hover .story-image {
  transform: scale(1.05);
}

.story-divider {
  width: 100%;
  height: 1px;
  background-color: #e5e7eb;
  margin-top: 1rem;
}

/* Utilities */
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.text-center { text-align: center; }
.font-bold { font-weight: bold; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

.text-black { color: var(--news-black); }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }

.underline-yellow {
  text-decoration: underline;
  text-decoration-color: var(--news-yellow);
  text-decoration-thickness: 2px;
}

.hidden { display: none; }

/* SVG Icons */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

/* CTA Link */
.cta-link {
  width: 100%;
  background-color: var(--news-yellow);
  color: black;
  font-weight: bold;
  font-size: 1.125rem;
  padding: 1rem 1.5rem;
  border-radius: 0.25rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  animation: pulse-glow-strong 1.2s ease-in-out infinite;
}

.cta-link:hover {
  background-color: #ebd040;
}
