/* ============================================
   Portal Home Page Styles
   登山篇テーマのダークデザインを継承
   ============================================ */

.th-portal {
  min-height: calc(100vh - 64px);
  padding: 40px 0 80px;
}

/* Hero Section - Full Width with Text Overlay */
.th-hero--fullwidth {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 0 60px;
  padding: 0;
  height: 500px;
  overflow: hidden;
}

.th-hero--fullwidth .th-hero__graphic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.th-hero--fullwidth .th-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.th-hero--fullwidth .th-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(11, 12, 15, 0.85) 0%,
    rgba(11, 12, 15, 0.6) 40%,
    rgba(11, 12, 15, 0.3) 70%,
    transparent 100%
  );
  z-index: 1;
}

.th-hero--fullwidth .th-hero__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1120px, calc(100% - 64px));
  z-index: 2;
  text-align: left;
}

/* Legacy Hero Section (for reference) */
.th-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
  padding: 60px 0;
}

.th-hero__content {
  z-index: 1;
}

.th-hero__title {
  font-size: 56px;
  font-weight: 700;
  margin: 0 0 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.th-hero__lead {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.th-hero__graphic {
  position: relative;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r2);
  overflow: hidden;
}

.th-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.th-hero__orb {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--accent2));
  opacity: 0.3;
  filter: blur(40px);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* Portal Grid */
.th-portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 80px;
}

.th-portal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  min-height: 200px;
}

.th-portal-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
  z-index: 0;
}

.th-portal-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(11, 12, 15, 0.85),
    rgba(17, 19, 26, 0.90)
  );
  z-index: 1;
}

.th-portal-card:hover .th-portal-card__bg {
  transform: scale(1.05);
}

.th-portal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(92,255,122,0.05), 
    rgba(122,167,255,0.05)
  );
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
}

.th-portal-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(92,255,122,0.15);
}

.th-portal-card:hover::before {
  opacity: 1;
}

.th-portal-card--featured {
  grid-column: span 2;
  background: linear-gradient(135deg, 
    rgba(92,255,122,0.08), 
    rgba(122,167,255,0.08)
  );
  border-color: rgba(92,255,122,0.3);
  min-height: 280px;
}

.th-portal-card--featured .th-portal-card__overlay {
  background: linear-gradient(
    135deg,
    rgba(11, 12, 15, 0.75),
    rgba(17, 19, 26, 0.85)
  );
}

.th-portal-card__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(92,255,122,0.2);
  border-radius: 14px;
  color: var(--accent);
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  backdrop-filter: blur(10px);
}

.th-portal-card--featured .th-portal-card__icon {
  width: 64px;
  height: 64px;
}

.th-portal-card--featured .th-portal-card__icon svg {
  width: 36px;
  height: 36px;
}

.th-portal-card__content {
  flex: 1;
  position: relative;
  z-index: 3;
}

.th-portal-card__title {
  font-size: 20px;
  font-weight: 650;
  margin: 0 0 8px;
  color: var(--text);
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.th-portal-card--featured .th-portal-card__title {
  font-size: 24px;
}

.th-portal-card__desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

.th-portal-card__arrow {
  align-self: flex-end;
  font-size: 24px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s;
  position: relative;
  z-index: 3;
}

.th-portal-card:hover .th-portal-card__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Recent Posts Section */
.th-portal-recent {
  margin-top: 80px;
}

.th-portal-recent__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.th-portal-section-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.th-portal-more {
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all 0.3s;
}

.th-portal-more:hover {
  background: rgba(92,255,122,0.1);
  border-color: var(--accent);
}

.th-portal-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.th-portal-post {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  overflow: hidden;
  transition: all 0.3s;
}

.th-portal-post:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.th-portal-post__thumb {
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--card);
}

.th-portal-post__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.th-portal-post:hover .th-portal-post__thumb img {
  transform: scale(1.05);
}

.th-portal-post__body {
  padding: 20px;
}

.th-portal-post__date {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.th-portal-post__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.4;
}

.th-portal-post__title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
}

.th-portal-post__title a:hover {
  color: var(--accent);
}

.th-portal-post__excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Logo Image Support */
.th-logo__image {
  height: 32px;
  width: auto;
  display: block;
}

/* Responsive */
@media (max-width: 1024px) {
  .th-hero--fullwidth {
    height: 400px;
  }

  .th-hero--fullwidth .th-hero__content {
    width: calc(100% - 48px);
  }
}

@media (max-width: 768px) {
  .th-portal {
    padding: 0 0 40px;
  }

  .th-hero--fullwidth {
    height: 350px;
  }

  .th-hero--fullwidth .th-hero__content {
    width: calc(100% - 40px);
  }

  .th-hero--fullwidth .th-hero__overlay {
    background: linear-gradient(
      to top,
      rgba(11, 12, 15, 0.9) 0%,
      rgba(11, 12, 15, 0.6) 50%,
      rgba(11, 12, 15, 0.3) 100%
    );
  }

  .th-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
    padding: 30px 0;
  }

  .th-hero__title {
    font-size: 36px;
  }

  .th-hero__lead {
    font-size: 16px;
  }

  .th-hero__graphic {
    height: 180px;
  }

  .th-hero__orb {
    width: 140px;
    height: 140px;
  }

  .th-portal-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .th-portal-card--featured {
    grid-column: span 1;
  }

  .th-portal-recent {
    margin-top: 40px;
  }

  .th-portal-section-title {
    font-size: 24px;
  }

  .th-portal-posts {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .th-hero--fullwidth {
    height: 300px;
  }

  .th-hero__title {
    font-size: 32px;
  }

  .th-hero__lead {
    font-size: 14px;
  }

  .th-portal-card {
    padding: 20px;
  }

  .th-portal-card__icon {
    width: 44px;
    height: 44px;
  }

  .th-portal-card--featured .th-portal-card__icon {
    width: 52px;
    height: 52px;
  }

  .th-portal-card--featured .th-portal-card__icon svg {
    width: 28px;
    height: 28px;
  }

  .th-portal-card__title {
    font-size: 18px;
  }

  .th-portal-card--featured .th-portal-card__title {
    font-size: 20px;
  }
}
