/* --- Hero Section --- */
.hero-image {
  width: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  animation: fadeIn 2.5s ease-out forwards;
  position: relative;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 151px;
  background: linear-gradient(to top, var(--primary-bg), transparent);
}

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

/* --- Container & Layout --- */
.container {
  padding: 40px 80px 100px 80px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  font-family: var(--serif-font);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text-white);
  margin: 50px 0 40px 0;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.subtitle {
  font-family: var(--serif-font);
  font-size: 1.1rem;
  color: var(--accent-gold);
  letter-spacing: 0.2em;
  margin-top: 10px;
}

.subtitle a {
  color: var(--accent-gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.subtitle a:hover {
  border-color: var(--accent-gold);
}

/* --- Dividers --- */
.wing-divider {
  width: 100%;
  height: 50px;
  position: relative;
  margin: 50px 0 80px 0;
  overflow: hidden;
}

.wing-divider::before {
  content: '';
  position: absolute;
  top: 80%;
  left: 0;
  width: 100%;
  height: 50px;
  background: linear-gradient(90deg, #1e3c72 0%, #2a5298 25%, #4a90e2 50%, #87ceeb 75%, #ffffff 100%);
  transform: translateY(-50%);
  clip-path: polygon(0% 0%, 15% 80%, 100% 80%);
  animation: waveFlow 3s ease-in-out infinite;
}

.wing-divider::after {
  content: '';
  position: absolute;
  top: 80%;
  left: 0;
  width: 100%;
  height: 50px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
  transform: translateY(-50%);
  clip-path: polygon(0% 30%, 15% 80%, 70% 40%, 100% 30%, 100% 70%, 70% 20%, 15% 60%, 0% 70%);
  animation: waveShine 2s ease-in-out infinite;
}

@keyframes waveFlow {
  0% { transform: translateY(-50%); opacity: 0.8; }
  50% { transform: translateY(-50%); opacity: 1; }
  100% { transform: translateY(-50%); opacity: 0.8; }
}

@keyframes waveShine {
  0% { transform: translateY(-50%) scaleX(0.8); opacity: 0; }
  50% { transform: translateY(-50%) scaleX(1.2); opacity: 1; }
  100% { transform: translateY(-50%) scaleX(0.8); opacity: 0; }
}

@keyframes slideInFromLeft {
  0% { transform: translateX(-50px); opacity: 0; }
  100% { transform: translateX(0px); opacity: 1; }
}

.wing-divider img {
  display: block;
  margin-left: auto;
  animation: slideInFromLeft 2s ease-out;
}

/* --- Notice Section --- */
.notice-section {
  background: #130b5a;
  border: 1px solid var(--card-border);
  padding: 30px;
  margin-bottom: 80px;
  border-radius: 2px;
}

.notice-section h2 {
  color: var(--accent-gold);
  font-family: var(--serif-font);
  font-size: 1.4rem;
  text-align: left;
  margin-bottom: 30px;
  letter-spacing: 0.2em;
  display: flex;
  align-items: center;
}

.notice-section h2::before {
  content: '✨';
  margin-right: 12px;
  font-size: 1.2rem;
  animation: twinkle 4s infinite;
  display: inline-block;
}

.notice-item {
  font-size: 0.95rem;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
  color: var(--text-gray);
}

.notice-item:last-child {
  border-bottom: none;
}

.notice-item strong {
  color: var(--accent-gold-light);
}

.notice-item a {
  color: var(--text-white);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --- Course Grid --- */
h2 {
  font-family: var(--serif-font);
  font-size: 1.4rem;
  color: var(--text-white);
  margin-bottom: 50px;
  text-align: left;
  letter-spacing: 0.2em;
  position: relative;
  display: block;
}

h2::after {
  content: '';
  display: block;
  height: 1px;
  background-color: var(--accent-gold);
  margin: 15px 0 0;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 100px;
}

.course-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 0;
  transition: all 0.4s ease;
  overflow: hidden;
  position: relative;
}

.course-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent-gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.course-icon {
  font-size: 1.5rem;
  padding: 20px 20px 10px;
  color: var(--accent-gold);
  display: flex;
  justify-content: center;
  align-items: center;
}

.course-icon img {
  margin: 0 auto;
}

.course-title {
  font-family: var(--serif-font);
  font-size: 1.1rem;
  padding: 0 20px 15px;
  text-align: center;
  letter-spacing: 0.05em;
}

.course-title a {
  color: var(--text-white);
  text-decoration: none;
  transition: color 0.3s;
}

.course-item:hover .course-title a {
  color: var(--accent-gold-light);
}

.course-description {
  font-size: 0.85rem;
  padding: 0 25px 20px;
  color: var(--text-gray);
  line-height: 1.6;
}

.course-description p {
  margin: 15px 0 0;
}

.course-description img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Profile Section --- */
.profile-section {
  background: var(--secondary-bg);
  padding: 80px 100px;
  margin: 0 -80px 0 -80px;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.profile-section h2 {
  color: var(--accent-gold);
  margin-bottom: 40px;
}

.profile-image {
  width: 50%;
  height: auto;
  margin-bottom: 30px;
  border: 1px solid var(--card-border);
  padding: 10px;
  display: block;
}

.profile-name {
  font-family: var(--serif-font);
  font-size: 1.4rem;
  color: var(--text-white);
  margin-bottom: 30px;
  letter-spacing: 0.1em;
}

.profile-text {
  font-size: 0.8rem;
  color: var(--text-gray);
  margin-bottom: 20px;
  max-width: 800px;
}

.profile-text a {
  color: var(--accent-gold-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(197, 160, 89, 0.3);
}

/* --- Features Section --- */
.features-section {
  padding: 40px 80px;
  background: #f4f6f8;
  color: #333333;
  margin: 60px -80px 0 -80px;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.features-section h2 {
  color: var(--secondary-bg);
  margin-bottom: 30px;
}

.features-section h2::after {
  background-color: var(--accent-gold);
}

.feature-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 800px;
  margin: 0 auto;
}

.feature-list li {
  padding: 4px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  color: #1b0c54;
  display: flex;
  align-items: center;
}

.feature-list li::before {
  content: "✧";
  color: var(--accent-gold);
  margin-right: 20px;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* --- Sparkle & Animations --- */
@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.2); }
}

.title-animated {
  font-family: 'Kaisei Tokumin', serif;
  font-weight: 200;
  display: inline-block;
  background: linear-gradient(90deg, #fff, #c5a059, #fff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: 
    shine 5s linear infinite,
    fadeDropDown 3.5s ease-out forwards;
}

@keyframes shine {
  to { background-position: 200% center; }
}

@keyframes fadeDropDown {
  0% { opacity: 0; transform: translateY(-80px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .container {
    padding: 20px 20px 60px 20px;
    width: 100%;
    overflow-x: hidden;
  }
  
  h1 { font-size: 2rem; }
  
  .profile-section {
    padding: 60px 20px;
    margin-left: -20px;
    margin-right: -20px;
    width: auto;
  }

  .features-section {
    padding: 40px 20px;
    margin-left: -20px;
    margin-right: -20px;
    width: auto;
  }

  .subtitle {
    font-size: 1rem;
    letter-spacing: 0.15em;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 20px 15px 40px 15px;
    width: 100%;
    overflow-x: hidden;
  }

  h1 { font-size: 1.6rem; letter-spacing: 0.2em; }
  .subtitle { font-size: 0.85rem; letter-spacing: 0.1em; }
  .course-grid { grid-template-columns: 1fr; gap: 20px; }
  .profile-section { padding: 40px 15px; margin-left: -15px; margin-right: -15px; width: auto; }
  .features-section { padding: 30px 15px; margin-left: -15px; margin-right: -15px; width: auto; }
  .social-links { padding: 0; grid-template-columns: 1fr; gap: 10px; }
  .profile-image { width: 100% !important; padding: 5px; }
}

/* --- Index Gallery Section --- */
.index-gallery-section {
  padding: 80px 0 40px; /* Reduced bottom padding */
  margin-bottom: 20px; /* Narrowed space below MORE */
}

.gallery-intro {
  padding: 0 0px;
  margin-bottom: 30px;
  font-family: var(--serif-font);
  font-size: 0.95rem;
  color: var(--text-gray);
  line-height: 1.8;
  letter-spacing: 0.05em;
}

.index-gallery-single {
  margin: 20px 0 40px;
  text-align: center;
}

.index-gallery-single img {
  width: 100%;
  max-width: 1000px;
  height: auto;
  border: 1px solid var(--card-border);
  transition: opacity 0.3s ease;
}

.index-gallery-single a:hover img {
  opacity: 0.8;
}


@media (max-width: 768px) {
  .gallery-intro {
    padding: 0 20px;
  }
}
