/* 동네소년단 홈페이지 - Custom Styles */

/* ===== Base Styles ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  background-color: #2D2D2D;
  color: white;
  overflow-x: hidden;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #2D2D2D;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #00D9FF, #39FF14);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #00D9FF;
}

/* ===== Header Styles ===== */
#header {
  background: rgba(45, 45, 45, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#header.scrolled {
  background: rgba(45, 45, 45, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, #00D9FF, #39FF14);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ===== Animation Utilities ===== */
.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-float.delay-500 {
  animation-delay: 0.5s;
}

.animate-float.delay-700 {
  animation-delay: 0.7s;
}

.animate-float.delay-1000 {
  animation-delay: 1s;
}

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

/* ===== Glassmorphism Cards ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
}

/* ===== Gradient Text ===== */
.gradient-text {
  background: linear-gradient(to right, #00D9FF, #39FF14);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Button Styles ===== */
.btn-primary {
  background: linear-gradient(to right, #00D9FF, #39FF14);
  color: #2D2D2D;
  font-weight: 700;
  padding: 1rem 2rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 40px rgba(0, 217, 255, 0.3);
}

.btn-outline {
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #00D9FF;
}

/* ===== Counter Animation ===== */
.counter {
  display: inline-block;
}

/* ===== FAQ Styles ===== */
.faq-toggle[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
}

.faq-content.show {
  display: block !important;
}

/* ===== Gallery Grid ===== */
#gallery-grid {
  display: grid;
  gap: 1rem;
}

/* ===== Loading Animation ===== */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #00D9FF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Line Clamp ===== */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Mobile Menu Animation ===== */
#mobile-menu.show {
  display: block !important;
  animation: slideDown 0.3s ease-out;
}

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

/* ===== Form Styles ===== */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #00D9FF;
  box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.5em 1.5em;
  padding-right: 3rem;
}

/* ===== Success/Error Messages ===== */
.form-success {
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.3);
  color: #39FF14;
}

.form-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #EF4444;
}

/* ===== Page Transition ===== */
.page-enter {
  opacity: 0;
  transform: translateY(20px);
}

.page-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
}

/* ===== Custom Selection ===== */
::selection {
  background: rgba(0, 217, 255, 0.3);
  color: white;
}

/* ===== Hover Card Effect ===== */
.hover-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ===== Image Placeholder ===== */
.img-placeholder {
  background: linear-gradient(135deg, #374151 0%, #1F2937 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Timeline Connector ===== */
.timeline-connector {
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #00D9FF, #39FF14, #A855F7);
}

/* ===== Pulse Animation ===== */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.8);
  }
}

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

/* ===== Tooltip ===== */
.tooltip {
  position: relative;
}

.tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  background: #1F2937;
  color: white;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.tooltip:hover::before {
  opacity: 1;
  visibility: visible;
}

/* ===== Backdrop Filter Support ===== */
@supports not (backdrop-filter: blur(10px)) {
  .glass-card,
  #header {
    background: rgba(45, 45, 45, 0.95);
  }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Visible */
:focus-visible {
  outline: 2px solid #00D9FF;
  outline-offset: 2px;
}

/* ===== Print Styles ===== */
@media print {
  body {
    background: white;
    color: black;
  }
  
  #header,
  footer,
  .btn-primary,
  .btn-outline {
    display: none;
  }
}
