/* ============================================================
   Yearly Raasi Palan - CSS
   Mobile-first, Premium Feel
   ============================================================ */

/* Wrapper */
.yearly-wrapper {
  min-height: 100vh;
  overflow-x: hidden;
}

.yearly-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
  /* Ensure content doesn't touch screen edges on mobile */
  box-sizing: border-box;
  width: 100%;
}

/* Header */
.yearly-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.yearly-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--purple-dark, #5a189a);
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.yearly-icon {
  font-size: 1.6rem;
}

.yearly-subtitle {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

/* Intro Card */
.yearly-intro-card {
  background: linear-gradient(135deg, #f8f4ff 0%, #fff 100%);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.intro-text {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.6;
  margin: 0;
}

/* Raasi Grid (Hub Page) */
.yearly-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  /* Prevent grid from touching edges */
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 600px) {
  .yearly-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .yearly-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Yearly Card (Grid Item) */
.yearly-card {
  background: #fff;
  border-radius: 12px;
  padding: 0.85rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(106, 27, 154, 0.1);
  /* Prevent overflow from wide Tamil text */
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
}

.yearly-card:hover,
.yearly-card:focus {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(106, 27, 154, 0.15);
}

.yearly-card-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 0.5rem;
}

.rasi-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Apply purple color filter to SVG icons */
  filter: invert(22%) sepia(80%) saturate(2000%) hue-rotate(260deg) brightness(85%) contrast(100%);
}

.yearly-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--purple-dark, #5a189a);
  margin: 0 0 0.3rem 0;
}

.yearly-card-summary {
  font-size: 0.75rem;
  color: #666;
  line-height: 1.4;
  margin: 0 0 0.5rem 0;
  flex-grow: 1;
  /* Handle long Tamil text */
  word-break: break-word;
  overflow-wrap: break-word;
  width: 100%;
  max-width: 100%;
}

.yearly-card-cta {
  font-size: 0.8rem;
  color: var(--purple-primary, #7b2cbf);
  font-weight: 500;
}

/* Bottom CTA */
.yearly-bottom-cta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
  margin: 1.5rem 0 1rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.6rem 1.2rem;
  width: 100%;
  max-width: 280px;
  background: linear-gradient(135deg, #7b2cbf 0%, #9d4edd 100%);
  color: #fff;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-back:hover,
.btn-back:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(123, 44, 191, 0.3);
}

/* ============================================================
   DETAIL PAGE STYLES
   ============================================================ */

/* Carousel (Pill Strip) */
.yearly-carousel {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.yearly-carousel::-webkit-scrollbar {
  height: 4px;
}

.yearly-carousel::-webkit-scrollbar-thumb {
  background: rgba(123, 44, 191, 0.3);
  border-radius: 2px;
}

.rasi-carousel-item {
  flex-shrink: 0;
  padding: 0.4rem 0.8rem;
  background: #f8f4ff;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #666;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.rasi-carousel-item:hover,
.rasi-carousel-item:focus {
  background: #e9d5ff;
  color: #5a189a;
}

.rasi-carousel-item.active {
  background: linear-gradient(135deg, #7b2cbf 0%, #9d4edd 100%);
  color: #fff;
  border-color: #7b2cbf;
}

/* Detail Header */
.yearly-detail-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f4ff 0%, #fff 100%);
  border-radius: 12px;
}

.detail-icon-wrap {
  flex-shrink: 0;
}

.detail-rasi-icon {
  width: 44px;
  height: 44px;
  /* Apply purple color filter to SVG icons */
  filter: invert(22%) sepia(80%) saturate(2000%) hue-rotate(260deg) brightness(85%) contrast(100%);
}

.detail-title-wrap {
  flex-grow: 1;
}

.detail-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--purple-dark, #5a189a);
  margin: 0 0 0.25rem 0;
}

.detail-subtitle {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
}

/* Overview Card */
.yearly-overview-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--purple-dark, #5a189a);
  margin: 0 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-icon {
  font-size: 1.1rem;
}

.overview-text {
  font-size: 0.9rem;
  color: #333;
  line-height: 1.7;
  margin: 0;
}

/* Ratings Card */
.yearly-ratings-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.ratings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 500px) {
  .ratings-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.rating-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.rating-label {
  font-size: 0.75rem;
  color: #666;
  text-align: center;
}

.rating-stars {
  font-size: 1rem;
  letter-spacing: 1px;
}

.purple-stars {
  color: var(--purple-primary, #7b2cbf);
}

/* Accordion */
.yearly-accordion {
  margin-bottom: 1rem;
}

.accordion-item {
  background: #fff;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #faf8ff 0%, #fff 100%);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--purple-dark, #5a189a);
  text-align: left;
  transition: background 0.2s;
}

.accordion-toggle:hover,
.accordion-toggle:focus {
  background: #f0e6ff;
}

.accordion-icon {
  font-size: 1rem;
}

.arrow-right {
  margin-left: auto;
  font-size: 0.7rem;
  transition: transform 0.3s;
}

.accordion-toggle[aria-expanded="true"] .arrow-right {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 1rem 1rem;
  display: none;
}

.accordion-content[aria-hidden="false"] {
  display: block;
}

.accordion-text {
  font-size: 0.88rem;
  color: #444;
  line-height: 1.7;
  margin: 0;
  white-space: pre-line;
}

/* Life Lesson Card */
.life-lesson-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: linear-gradient(135deg, #fff9e6 0%, #fff 100%);
  border-radius: 10px;
  padding: 1rem;
  margin-top: 1rem;
}

.lesson-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.lesson-text {
  font-size: 0.9rem;
  color: #5a5a00;
  line-height: 1.6;
  margin: 0;
}

/* No Data */
.yearly-no-data {
  text-align: center;
  padding: 2rem 1rem;
  background: #fff;
  border-radius: 12px;
}

.no-data-text {
  font-size: 0.95rem;
  color: #666;
  margin: 0;
}

/* Prev/Next Navigation */
.yearly-nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0;
}

.nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  background: #f8f4ff;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--purple-dark, #5a189a);
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid rgba(106, 27, 154, 0.1);
}

.nav-btn:hover,
.nav-btn:focus {
  background: #e9d5ff;
  border-color: #7b2cbf;
}

.prev-btn {
  text-align: left;
}

.next-btn {
  text-align: right;
}

/* AI Disclaimer */
.ai-disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: #888;
  padding: 1rem 0;
}

/* ============================================================
   HOME PAGE CARD INTEGRATION
   ============================================================ */
.yearly-home-card {
  background: linear-gradient(135deg, #7b2cbf 0%, #9d4edd 100%);
  color: #fff;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.yearly-home-card .banner-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.yearly-home-card .banner-top-title {
  font-size: 1rem;
  font-weight: 600;
}

.yearly-home-card .banner-text {
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  opacity: 0.95;
}

.yearly-home-card .banner-actions {
  display: flex;
  justify-content: flex-end;
}

.yearly-home-card .icon-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.yearly-home-card .icon-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* ============================================================
   UTILITY
   ============================================================ */
.border-purple {
  border: 1px solid rgba(106, 27, 154, 0.15);
}

.site-shadow {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Breadcrumb (micro version for this page) */
.breadcrumb-nav.micro {
  font-size: 0.75rem;
  margin-bottom: 1rem;
  color: #888;
}

.breadcrumb-nav.micro a {
  color: var(--purple-primary, #7b2cbf);
  text-decoration: none;
}

.breadcrumb-nav.micro a:hover {
  text-decoration: underline;
}

.breadcrumb-nav.micro .sep {
  margin: 0 0.3rem;
  color: #aaa;
}
