/* ==========================================================================
   Card Component - カードコンポーネント
   ========================================================================== */

/* Base Card Component - Text + Media Layout */
:where(.c-card) {
  display: flex;
  align-items: stretch;
  gap: var(--wp--preset--spacing--40);
  position: relative;
  z-index: 1;
  min-height: 600px;
}

/* Card Content Area */
:where(.c-card__content) {
  flex: 1.2;
  display: flex;
  align-items: center;
}

/* Card Text Container */
:where(.c-card__text) {
  margin-top: var(--wp--preset--spacing--xs);
  padding: var(--wp--preset--spacing--xs);
  border-radius: var(--wp--preset--spacing--base);
  margin-bottom: var(--wp--preset--spacing--sm0);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: var(--wp--custom--backdrop-filter--blur-md);
  position: relative;
  max-width: 70rem;
}

/* Card Title */
:where(.c-card__title) {
  font-size: var(--wp--preset--font-size--heading-lg);
  font-weight: 900;
  background: linear-gradient(
    135deg,
    var(--wp--preset--color--primary-700) 0%,
    var(--wp--preset--color--primary-500) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--wp--preset--spacing--lg);
  position: relative;
  display: inline-block;
  padding-bottom: var(--wp--preset--spacing--20);
  line-height: 1.3;
}

/* Title Underline */
:where(.c-card__title::after) {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: var(--wp--preset--spacing--sm0);
  height: var(--wp--preset--spacing--4);
  background: linear-gradient(
    90deg,
    var(--wp--preset--color--primary-700),
    var(--wp--preset--color--primary-500),
    var(--wp--preset--color--brand-300)
  );
  border-radius: var(--wp--preset--spacing--4);
  box-shadow: 0 2px 8px rgba(46, 91, 138, 0.3);
}

/* Card Subtitle */
:where(.c-card__subtitle) {
  font-size: var(--wp--preset--font-size--heading-md);
  font-weight: 700;
  color: var(--wp--preset--color--primary-600);
  margin-bottom: var(--wp--preset--spacing--lg);
  line-height: 1.4;
}

/* Card Body Text */
:where(.c-card__body) {
  font-size: var(--wp--preset--font-size--lg);
  color: var(--wp--preset--color--basic-text);
  line-height: 2;
}

:where(.c-card__body p) {
  margin-bottom: var(--wp--preset--spacing--xs);
}

:where(.c-card__body p:last-child) {
  margin-bottom: 0;
}

/* Card Actions */
:where(.c-card__actions) {
  margin-top: var(--wp--preset--spacing--xs);
}

/* Card Media Container */
:where(.c-card__media) {
  flex: 1;
  position: relative;
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
}

:where(.c-card__media img) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--wp--custom--border-radius--large);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Card Variations */

/* Reverse Layout */
:where(.c-card--reverse) {
  flex-direction: row-reverse;
}

/* Vertical Layout */
:where(.c-card--vertical) {
  flex-direction: column;
  min-height: auto;
}

:where(.c-card--vertical .c-card__media) {
  min-height: 300px;
}

/* Compact Size */
:where(.c-card--compact) {
  min-height: 400px;
}

:where(.c-card--compact .c-card__text) {
  padding: var(--wp--preset--spacing--lg);
  margin-bottom: 0;
}

:where(.c-card--compact .c-card__media) {
  min-height: 300px;
}

/* Bordered Card */
:where(.c-card--bordered) {
  border: 1px solid var(--wp--preset--color--gray-200);
  border-radius: var(--wp--custom--border-radius--xl);
  padding: var(--wp--preset--spacing--lg);
  background: white;
}

/* Shadow Card */
:where(.c-card--shadow) {
  background: white;
  border-radius: var(--wp--custom--border-radius--xl);
  box-shadow: var(--wp--custom--box-shadow--large);
  padding: var(--wp--preset--spacing--lg);
}

/* Blur Background Variations */
:where(.c-card__text--blur-sm) {
  backdrop-filter: var(--wp--custom--backdrop-filter--blur-sm);
}

:where(.c-card__text--blur-lg) {
  backdrop-filter: var(--wp--custom--backdrop-filter--blur-lg);
}

:where(.c-card__text--blur-xl) {
  backdrop-filter: var(--wp--custom--backdrop-filter--blur-xl);
}

/* Background Opacity Variations */
:where(.c-card__text--opacity-60) {
  background: rgba(255, 255, 255, 0.6);
}

:where(.c-card__text--opacity-80) {
  background: rgba(255, 255, 255, 0.8);
}

:where(.c-card__text--opacity-90) {
  background: rgba(255, 255, 255, 0.9);
}
