/* ==================================================
   バレずに借りられる カードローン BEST３
================================================== */

.ranking-section {
  padding: 40px 20px;
  background: #f8f9fa;
}

/* リボンサブタイトルのコンテナ */
.ranking-subtitle-ribbon {
  text-align: center;
  margin: 20px 0;
  position: relative;
}
  
/* リボン本体 */
.ranking-subtitle-ribbon span {
  background-color: #d32f2f;
  color: white;
  padding: 12px 40px;
  font-size: 30px;
  font-weight: 700;
  display: inline-block;
  position: relative;
  line-height: 1.2;
}

/* リボンの左側の尖った部分 */
.ranking-subtitle-ribbon span:before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  left: -20px;
  bottom: 0;
  border-right: 20px solid #d32f2f;
  border-top: 30px solid transparent;
  border-bottom: 30px solid transparent;
}

/* リボンの右側の尖った部分 */
.ranking-subtitle-ribbon span:after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  right: -20px;
  bottom: 0;
  border-left: 20px solid #d32f2f;
  border-top: 30px solid transparent;
  border-bottom: 30px solid transparent;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .ranking-subtitle-ribbon span {
      padding: 10px 30px;
      font-size: 24px;
  }
  
  .ranking-subtitle-ribbon span:before {
      left: -16px;
      border-right: 16px solid #d32f2f;
      border-top: 24px solid transparent;
      border-bottom: 24px solid transparent;
  }
  
  .ranking-subtitle-ribbon span:after {
      right: -16px;
      border-left: 16px solid #d32f2f;
      border-top: 24px solid transparent;
      border-bottom: 24px solid transparent;
  }
}
  
/* さらに小さい画面用 */
@media (max-width: 480px) {
  .ranking-subtitle-ribbon span {
    padding: 8px 20px;
    font-size: 18px;
  }
  
  .ranking-subtitle-ribbon span:before {
    left: -11.5px;
    border-right: 12px solid #d32f2f;
    border-top: 19px solid transparent;
    border-bottom: 19px solid transparent;
  }
  
  .ranking-subtitle-ribbon span:after {
    right: -11.5px;
    border-left: 12px solid #d32f2f;
    border-top: 19px solid transparent;
    border-bottom: 19px solid transparent;
  }
}

.ranking-title {
  text-align: center;
  font-size: 2.8rem;
  font-weight: 900;
  color: #1a5fb4;
  margin-bottom: 50px;
  position: relative;
}

.ranking-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(to right, #1a5fb4, #2980b9);
  border-radius: 2px;
}

.ranking-cards {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.ranking-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  width: 100%;
  max-width: 350px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: transform 0.3s ease;
  margin-top: 25px;
}

.ranking-card:hover {
  transform: translateY(-10px);
}

.ranking-crown {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 5px;
  overflow: hidden;
}

.ranking-crown::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
  rgba(255,255,255,0.4) 0%, 
  rgba(255,255,255,0.1) 50%, 
  rgba(255,255,255,0) 100%);
  z-index: 1;
}

.crown-1 {
  background: linear-gradient(135deg, #FFD700, #FFC107, #FFB300, #FFC107);
}

.crown-2 {
  background: linear-gradient(135deg, #C0C0C0, #E8E8E8, #A9A9A9, #C0C0C0);
}

.crown-3 {
  background: linear-gradient(135deg, #CD7F32, #DAA520, #B87333, #CD7F32);
}

.crown-shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
  rgba(255,255,255,0) 0%,
  rgba(255,255,255,0) 40%,
  rgba(255,255,255,0.6) 50%,
  rgba(255,255,255,0) 60%,
  rgba(255,255,255,0) 100%);
  z-index: 2;
  animation: shineHorizontal 3s infinite;
}

@keyframes shineHorizontal {
  0% { 
    transform: translateX(-100%);
  }
  100% { 
    transform: translateX(100%);
  }
}

.ranking-crown i {
  font-size: 1.4rem;
  margin-bottom: 2px;
  position: relative;
  z-index: 3;
}

.ranking-number {
  font-size: 0.8rem;
  font-weight: bold;
  line-height: 1;
  position: relative;
  z-index: 3;
}

.company-logo {
  width: 200px;
  height: 80px;
  margin: 20px auto;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: bold;
  color: #333;
  overflow: hidden;
}

.company-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature-tag {
  background: #e3f2fd;
  color: #1a5fb4;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 15px;
}

.feature-text {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
  margin-bottom: 20px;
}

.detail-button {
  display: block;
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #1a5fb4, #2980b9);
  color: white;
  text-align: center;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
  transition: opacity 0.3s ease;
}

.detail-button:hover {
  opacity: 0.9;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.8rem;
  }

  .feature-badges {
    flex-direction: column;
    gap: 20px;
  }

  .feature-badge {
    padding: 20px 25px;
    min-width: auto;
  }

  .feature-badge-title {
    font-size: 1.4rem;
  }

  .feature-badge i {
    font-size: 2rem;
  }

  .char::before {
    top: -8px;
    width: 4px;
    height: 4px;
  }

  .ranking-title {
    font-size: 1.85rem;
  }

  .ranking-cards {
    flex-direction: column;
    align-items: center;
  }

  .ranking-card {
    max-width: 100%;
  }
}

.crown-1 i, .crown-1 .ranking-number { 
  color: #fff; 
}
.crown-2 i, .crown-2 .ranking-number { 
  color: #fff; 
}
.crown-3 i, .crown-3 .ranking-number { 
  color: #fff; 
}
