/* Epic Hero Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

.animate-fadeIn {
  animation: fadeIn 1.2s ease-in-out;
}

.animate-fadeInUp {
  animation: fadeInUp 1s ease-out;
  animation-fill-mode: both;
}

.animate-fadeInDown {
  animation: fadeInDown 0.8s ease-out;
  animation-fill-mode: both;
}

/* Animation Delays */
.animation-delay-200 {
  animation-delay: 0.2s;
}

.animation-delay-400 {
  animation-delay: 0.4s;
}

.animation-delay-600 {
  animation-delay: 0.6s;
}

/* Hero Glow Effects */
.hero-glow-red {
  text-shadow: 
    0 0 10px rgba(196, 30, 58, 0.8),
    0 0 20px rgba(196, 30, 58, 0.6),
    0 0 30px rgba(196, 30, 58, 0.4),
    0 0 40px rgba(196, 30, 58, 0.2);
  animation: glow-pulse 2s ease-in-out infinite;
}

/* Hero Text Shadow for Better Visibility */
.hero-text-shadow {
  text-shadow: 
    2px 2px 8px rgba(0, 0, 0, 0.9),
    0 0 20px rgba(0, 0, 0, 0.5);
}

/* Radial Gradient for Center Focus */
.bg-radial-gradient {
  background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
}

@keyframes glow-pulse {
  0%, 100% {
    text-shadow: 
      0 0 10px rgba(196, 30, 58, 0.8),
      0 0 20px rgba(196, 30, 58, 0.6),
      0 0 30px rgba(196, 30, 58, 0.4),
      0 0 40px rgba(196, 30, 58, 0.2);
  }
  50% {
    text-shadow: 
      0 0 20px rgba(196, 30, 58, 1),
      0 0 30px rgba(196, 30, 58, 0.8),
      0 0 40px rgba(196, 30, 58, 0.6),
      0 0 50px rgba(196, 30, 58, 0.4);
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #C41E3A;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a01830;
}

/* Hero section overlay */
.hero-overlay {
  position: relative;
  z-index: 1;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #C41E3A 0%, #D4AF37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Card hover effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Button pulse animation */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.btn-pulse:hover {
  animation: pulse 0.5s ease-in-out;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .hero-section {
    min-height: 70vh;
  }
}

/* Loading spinner */
.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid #C41E3A;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Backdrop blur support */
.backdrop-blur {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Print styles */
@media print {
  nav, footer, .no-print {
    display: none;
  }
}

/* Greek Pattern - Meander Pattern */
.greek-pattern {
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 10px,
    rgba(212, 175, 55, 0.3) 10px,
    rgba(212, 175, 55, 0.3) 20px
  );
}

/* Spartan Warrior Silhouette - Left Side */
.spartan-warrior-silhouette {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(196, 30, 58, 0.3) 0%, transparent 100%);
  clip-path: polygon(
    40% 0%, 60% 0%, 65% 10%, 70% 15%, 75% 20%, 
    80% 30%, 75% 40%, 70% 45%, 65% 50%, 
    60% 60%, 55% 70%, 50% 80%, 45% 90%, 40% 100%,
    35% 90%, 30% 80%, 25% 70%, 20% 60%,
    25% 50%, 30% 45%, 35% 40%, 30% 30%,
    25% 20%, 30% 15%, 35% 10%
  );
  animation: warrior-glow 3s ease-in-out infinite;
}

/* Spartan Warrior Silhouette - Right Side */
.spartan-warrior-silhouette-right {
  width: 100%;
  height: 100%;
  background: linear-gradient(225deg, rgba(196, 30, 58, 0.3) 0%, transparent 100%);
  clip-path: polygon(
    40% 0%, 60% 0%, 65% 10%, 70% 15%, 75% 20%, 
    80% 30%, 75% 40%, 70% 45%, 65% 50%, 
    60% 60%, 55% 70%, 50% 80%, 45% 90%, 40% 100%,
    35% 90%, 30% 80%, 25% 70%, 20% 60%,
    25% 50%, 30% 45%, 35% 40%, 30% 30%,
    25% 20%, 30% 15%, 35% 10%
  );
  animation: warrior-glow 3s ease-in-out infinite reverse;
}

@keyframes warrior-glow {
  0%, 100% {
    opacity: 0.1;
  }
  50% {
    opacity: 0.3;
  }
}

/* 3D Floating Button Animations */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 
      0 10px 40px rgba(196, 30, 58, 0.4),
      0 0 20px rgba(212, 175, 55, 0.3),
      0 0 0 0 rgba(196, 30, 58, 0.7);
  }
  50% {
    box-shadow: 
      0 15px 50px rgba(196, 30, 58, 0.6),
      0 0 30px rgba(212, 175, 55, 0.5),
      0 0 0 10px rgba(196, 30, 58, 0);
  }
}

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

.floating-button {
  animation: 
    pulse-glow 2s ease-in-out infinite,
    float-up-down 3s ease-in-out infinite;
  position: relative;
  overflow: visible;
}

.floating-button:before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #C41E3A, #D4AF37, #C41E3A, #D4AF37);
  background-size: 300% 300%;
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  animation: gradient-rotate 3s ease-in-out infinite;
  transition: opacity 0.3s ease;
}

.floating-button:hover:before {
  opacity: 1;
}

@keyframes gradient-rotate {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Sparkle effect removed - cleaner 3D look */

/* ========================================
   SVG 3D Pyramid Styles
   ======================================== */

.pyramid-svg {
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
  animation: pyramid-float 6s ease-in-out infinite;
}

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

.pyramid-layer {
  transition: all 0.3s ease;
  cursor: pointer;
}

.pyramid-layer:hover {
  transform: translateY(-5px);
  filter: brightness(1.1) drop-shadow(0 12px 35px rgba(0, 0, 0, 0.4));
}

.pyramid-face {
  transition: all 0.3s ease;
}

.pyramid-layer:hover .pyramid-face {
  fill-opacity: 0.95;
}

.pyramid-side {
  transition: all 0.3s ease;
}

.pyramid-layer:hover .pyramid-side {
  opacity: 0.8 !important;
}

.pyramid-icon {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  user-select: none;
}

.pyramid-icon-img {
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
  transition: all 0.3s ease;
}

.pyramid-layer:hover .pyramid-icon-img {
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.5));
  transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .pyramid-svg {
    max-width: 320px;
  }
}

/* Pyramid Trapezoid Clip Paths */
.clip-trapezoid-top {
  clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
}

.clip-trapezoid {
  clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
}

.clip-trapezoid-bottom {
  clip-path: polygon(5% 0%, 95% 0%, 100% 100%, 0% 100%);
  border-radius: 0 0 1rem 1rem;
}

.pyramid-container {
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

.pyramid-level {
  position: relative;
}

/* Smooth animations */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.8);
  }
}

.pyramid-lv5:hover {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ========================================
   Left-Right Course Layout - Responsive Design
   ======================================== */

/* Animation for level rows */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Desktop and Large Tablets (1024px and above) */
@media (min-width: 1024px) {
  .level-row-horizontal {
    flex-direction: row;
  }
  
  .connector-arrow {
    display: block !important;
  }
}

/* Tablets and Medium Screens (1024px and below) */
@media (max-width: 1024px) {
  .level-row-horizontal {
    flex-direction: column !important;
    gap: 15px !important;
  }
  
  .level-bar-horizontal,
  .course-card-horizontal {
    min-width: 100% !important;
    width: 100% !important;
  }
  
  .connector-arrow {
    display: none !important;
  }
}

/* Mobile and Small Tablets (768px and below) */
@media (max-width: 768px) {
  .level-bar-horizontal,
  .course-card-horizontal {
    height: auto !important;
    flex-direction: column;
    padding: 20px 15px !important;
    gap: 10px;
    min-width: 100% !important;
  }
  
  .level-bar-horizontal::before,
  .course-card-horizontal::before {
    width: 100% !important;
    height: 6px !important;
    border-radius: 12px 12px 0 0 !important;
    left: 0 !important;
    top: 0 !important;
    bottom: auto !important;
  }
  
  .level-number-horizontal {
    font-size: 2rem !important;
    margin-right: 0 !important;
    min-width: auto !important;
  }
  
  .level-desc-horizontal,
  .course-name-horizontal {
    font-size: 1rem !important;
    text-align: center;
  }
}

/* ========================================
   Old Pyramid Responsive Design (Legacy)
   ======================================== */

/* 1400px以下で縦積みレイアウトに変更 */
@media (max-width: 1400px) {
  .pyramid-display-container {
    flex-direction: column !important;
    gap: 40px !important;
  }
  
  .connector-line-white {
    display: none !important;
  }
  
  .pyramid-wrapper-new {
    width: 100%;
    align-items: center;
  }
  
  .courses-list {
    width: 100%;
    max-width: 600px;
  }
  
  .course-card-custom {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 300px !important;
  }
}

/* タブレット・モバイル対応 */
@media (max-width: 768px) {
  .level-box {
    height: auto !important;
    min-height: 100px;
    padding: 20px 10px !important;
  }
  
  .level-box .text-4xl {
    font-size: 1.75rem !important;
  }
  
  .level-box .text-2xl {
    font-size: 1.25rem !important;
  }
  
  .course-card-custom {
    font-size: 20px !important;
    padding: 0 20px !important;
    min-width: 250px !important;
  }
  
  .course-row-item {
    height: 120px !important;
  }
}
