/* ========================================
   Boss Lady Journal — Main Stylesheet
   Based on women.com design language
   ======================================== */

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --pink-primary: #e91e8c;
  --pink-light: #f5a3d0;
  --pink-bg: #fdf2f8;
  --pink-hover: #d4187e;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --max-width: 1200px;
  --header-height: 80px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  color: var(--gray-800);
  background-color: var(--white);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ========================================
   Header
   ======================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__inner {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__logo-img {
  height: 64px;
  width: auto;
}

/* ========================================
   Featured Section (Top 3 articles)
   ======================================== */
.featured {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 0;
}

.featured__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}

.featured__card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured__card:first-child {
  grid-row: 1 / 3;
}

.featured__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.featured__card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured__card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  color: var(--white);
}

.featured__card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  padding: 4px 10px;
  background: var(--pink-primary);
  z-index: 2;
}

.featured__card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   More Stories Divider
   ======================================== */
.divider {
  display: flex;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
}

.divider__text {
  flex-shrink: 0;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gray-500);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-300);
}

/* ========================================
   Articles Grid
   ======================================== */
.articles {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
}

.articles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(200px, auto);
  grid-auto-flow: dense;
  gap: 24px;
}

/* Mosaic layout — varied card sizes */
.article-card:nth-child(1) {
  grid-column: span 2;
}

.article-card:nth-child(3) {
  grid-row: span 2;
}

.article-card:nth-child(6) {
  grid-column: span 2;
}

.article-card:nth-child(8) {
  grid-row: span 2;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border: 1px solid var(--gray-100);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.article-card__image-wrapper {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.article-card__image {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .article-card__image {
  transform: scale(1.05);
}

.article-card__content {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: none;
}

.article-card__category {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  padding: 4px 10px;
  background: var(--pink-primary);
  z-index: 2;
}

.article-card__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--gray-900);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__description {
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray-500);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.article-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-400);
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}

.article-card__author {
  font-weight: 600;
  color: var(--gray-600);
}

.article-card__time {
  color: var(--gray-400);
}

.article-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pink-primary);
  margin-top: 12px;
  transition: gap 0.2s ease;
}

.article-card__read-more:hover {
  color: var(--pink-hover);
  gap: 8px;
}

.article-card__read-more svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.article-card:hover .article-card__read-more svg {
  transform: translateX(2px);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  margin-top: 40px;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--pink-primary);
  text-transform: uppercase;
  letter-spacing: -0.3px;
}

.footer__copyright {
  font-size: 13px;
  color: var(--gray-500);
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__link {
  font-size: 13px;
  color: var(--gray-400);
  transition: color 0.2s ease;
}

.footer__link:hover {
  color: var(--pink-primary);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .articles__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 20px;
  }

  .article-card:nth-child(1) {
    grid-column: span 2;
  }

  .article-card:nth-child(3) {
    grid-row: span 2;
  }

  .article-card:nth-child(6) {
    grid-column: span 1;
  }

  .article-card:nth-child(6) .article-card__image {
    aspect-ratio: 16 / 10;
  }

  .article-card:nth-child(8) {
    grid-row: span 1;
  }

  .article-card:nth-child(8) .article-card__image {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .header__logo-img {
    height: 52px;
  }

  .featured {
    padding: 20px 16px 0;
  }

  .featured__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 16px;
  }

  .featured__card:first-child {
    grid-row: auto;
  }

  .featured__card-image {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .featured__card-title {
    font-size: 16px;
  }

  .divider {
    padding: 28px 16px;
  }

  .articles {
    padding: 24px 16px;
  }

  .articles__grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 20px;
  }

  .article-card:nth-child(1),
  .article-card:nth-child(6) {
    grid-column: span 1;
  }

  .article-card:nth-child(3),
  .article-card:nth-child(8) {
    grid-row: span 1;
  }

  .article-card {
    flex-direction: row;
  }

  .article-card__image-wrapper {
    flex: none;
    width: 140px;
    min-width: 140px;
  }

  .article-card__image {
    aspect-ratio: 1 / 1;
    height: 100%;
    min-height: auto;
  }

  .article-card__content {
    padding: 12px 14px;
  }

  .article-card__title {
    font-size: 15px;
    -webkit-line-clamp: 2;
  }

  .article-card__description {
    display: none;
  }

  .article-card__read-more {
    display: none;
  }

  .footer__inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer__links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .article-card__image-wrapper {
    width: 110px;
    min-width: 110px;
  }

  .article-card__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

/* ========================================
   Legal Pages
   ======================================== */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.legal-page h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.legal-page__date {
  font-size: 14px;
  color: var(--gray-400);
  margin-bottom: 32px;
  display: block;
}

.legal-page h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-800);
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--pink-bg);
}

.legal-page h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-700);
  margin-top: 24px;
  margin-bottom: 10px;
}

.legal-page p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 14px;
}

.legal-page ul, .legal-page ol {
  margin: 12px 0 16px 24px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--gray-600);
}

.legal-page li {
  margin-bottom: 6px;
}

.legal-page strong {
  color: var(--gray-800);
}

.legal-page .caps-section {
  text-transform: uppercase;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray-700);
  background: var(--gray-50);
  padding: 20px 24px;
  border-radius: 8px;
  border-left: 4px solid var(--pink-primary);
  margin: 20px 0;
}

.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}

.legal-page table th {
  background: var(--pink-bg);
  color: var(--gray-800);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
}

.legal-page table td {
  padding: 10px 16px;
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
}

.legal-page table tr:nth-child(even) td {
  background: var(--gray-50);
}

.legal-page a {
  color: var(--pink-primary);
  text-decoration: underline;
}

.legal-page a:hover {
  color: var(--pink-hover);
}

/* Back to home link */
.legal-page__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pink-primary);
  text-decoration: none;
  margin-bottom: 32px;
}

.legal-page__back:hover {
  color: var(--pink-hover);
}

/* ========================================
   Article Page
   ======================================== */
.article-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.article-page__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pink-primary);
  text-decoration: none;
  margin-bottom: 24px;
  transition: gap 0.2s ease;
}

.article-page__back:hover {
  color: var(--pink-hover);
  gap: 10px;
}

.article-page__category {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--pink-primary);
  margin-bottom: 12px;
}

.article-page__title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.article-page__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--gray-400);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-200);
}

.article-page__author {
  font-weight: 600;
  color: var(--gray-600);
}

.article-page__date {
  color: var(--gray-400);
}

.article-page__hero {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 32px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-page__body h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-800);
  margin-top: 36px;
  margin-bottom: 16px;
}

.article-page__body p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--gray-600);
  margin-bottom: 18px;
}

.article-page__body img {
  width: 100%;
  border-radius: 10px;
  margin: 24px 0;
}

.article-page__body blockquote {
  border-left: 4px solid var(--pink-primary);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--pink-bg);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--gray-700);
  font-size: 16px;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .article-page__title {
    font-size: 26px;
  }

  .article-page__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .article-page__hero {
    border-radius: 8px;
  }

  .article-page__body h2 {
    font-size: 19px;
  }

  .article-page__body p {
    font-size: 15px;
  }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-card {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.article-card:nth-child(1) { animation-delay: 0.05s; }
.article-card:nth-child(2) { animation-delay: 0.1s; }
.article-card:nth-child(3) { animation-delay: 0.15s; }
.article-card:nth-child(4) { animation-delay: 0.2s; }
.article-card:nth-child(5) { animation-delay: 0.25s; }
.article-card:nth-child(6) { animation-delay: 0.3s; }
.article-card:nth-child(7) { animation-delay: 0.05s; }
.article-card:nth-child(8) { animation-delay: 0.1s; }
.article-card:nth-child(9) { animation-delay: 0.15s; }
.article-card:nth-child(n+10) { animation-delay: 0.1s; }

.featured__card {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.featured__card:nth-child(1) { animation-delay: 0.1s; }
.featured__card:nth-child(2) { animation-delay: 0.2s; }
.featured__card:nth-child(3) { animation-delay: 0.3s; }
