/* ==========================================================================
   CSS Variables & Global Styles
   ========================================================================== */
:root {
  /* Colors */
  --clr-primary: #6BA4D9;
  --clr-primary-dark: #508abc;
  --clr-accent: #DE8642;
  --clr-accent-hover: #c97435;
  
  --clr-bg: #ffffff;
  --clr-bg-light: #f8f9fa;
  --clr-text: #333333;
  --clr-text-light: #666666;
  
  /* Typography */
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Noto Sans KR', sans-serif;
  
  /* Spacing */
  --section-padding: 3vh 0;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--clr-text);
  background-color: var(--clr-bg);
  line-height: 1.5;
  overflow-x: hidden;
  overflow-y: auto; /* Fallback if screen is very small */
  height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  margin-top: 70px; /* Offset for fixed header */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Home page doesn't need margin top since hero takes full height */
body.home-page main {
  margin-top: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-base);
}

ul {
  list-style: none;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-padding {
  padding: var(--section-padding);
}

.page-header {
  background-color: var(--clr-bg-light);
  padding: 15px 0;
  text-align: center;
  border-bottom: 1px solid #eaeaea;
}

.page-header h1 {
  font-size: 2rem;
  color: var(--clr-primary);
  margin-bottom: 5px;
}

.page-header p {
  color: var(--clr-text-light);
  font-size: 0.95rem;
}

.bg-light {
  background-color: var(--clr-bg-light);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  outline: none;
}

.btn-primary {
  background-color: var(--clr-primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--clr-primary-dark);
  color: #fff;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* ==========================================================================
    Header & Navigation
    ========================================================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-base);
  padding: 10px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 40px;
  display: block;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav a {
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  padding-bottom: 5px;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--clr-accent);
  transition: width var(--transition-base);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--clr-primary);
  cursor: pointer;
}

/* ==========================================================================
    Hero Section (Home)
    ========================================================================== */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: #f8fbff;
  overflow: hidden;
  width: 100%;
}

/* Watermark background using provided logo */
.hero-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 800px;
  opacity: 0.05;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 24px;
  line-height: 1.3;
}

.text-gradient {
  background: linear-gradient(120deg, var(--clr-primary), var(--clr-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--clr-text-light);
}

/* ==========================================================================
    About Section
    ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  max-width: 800px;
  margin: 0 auto;
}

.about-text h3 {
  font-size: 1.5rem;
  color: var(--clr-text);
  margin-bottom: 10px;
  text-align: center;
}

.about-text strong {
  color: var(--clr-primary);
}

.about-intro {
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: var(--clr-text-light);
  text-align: center;
}

.core-values {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.value-item {
  background: #fff;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  border-left: 4px solid var(--clr-primary);
}

.value-item h4 {
  font-size: 1.1rem;
  color: var(--clr-primary);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.value-item ul {
  list-style: disc;
  padding-left: 20px;
  color: var(--clr-text-light);
}

.value-item li {
  margin-bottom: 8px;
}

/* ==========================================================================
    Services Section
    ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
}

.service-card {
  background: #fff;
  padding: 20px 15px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.04);
  transition: all var(--transition-base);
  border: 1px solid #f0f0f0;
  text-align: center;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(107, 164, 217, 0.15);
  border-color: var(--clr-primary);
}

.service-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(107, 164, 217, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--clr-primary);
  margin: 0 auto 15px;
  transition: all var(--transition-base);
}

.service-card:hover .service-icon {
  background-color: var(--clr-primary);
  color: #fff;
}

.service-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.service-desc {
  color: var(--clr-text-light);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* ==========================================================================
    Notice Board Section
    ========================================================================== */
.notice-board {
  max-width: 900px;
  margin: 0 auto;
}

.notice-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.admin-only {
  display: none; /* hidden by default */
}

.admin-active .admin-only {
  display: block;
}

.notice-list {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  overflow: hidden;
}

.notice-item {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  transition: background-color var(--transition-fast);
}

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

.notice-item:hover {
  background-color: #fdfdfd;
}

.notice-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 5px;
}

.notice-date {
  font-size: 0.85rem;
  color: #999;
}

.notice-content {
  margin-top: 15px;
  color: var(--clr-text-light);
  font-size: 0.95rem;
  display: none; /* Hidden by default, toggled via JS */
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
}

.notice-item.expanded .notice-content {
  display: block;
}

.notice-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.notice-actions {
  display: flex;
  gap: 10px;
}

.btn-delete {
  background-color: #ff4d4f;
  color: #fff;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}

/* Notice Form Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #fff;
  width: 90%;
  max-width: 500px;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-content h3 {
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ==========================================================================
    Footer
    ========================================================================== */
footer {
  background-color: #1a1a1a;
  color: #fff;
  padding: 15px 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  position: relative;
}

.footer-logo {
  cursor: pointer; /* Changed to pointer to indicate it's clickable */
  user-select: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.footer-logo img {
  height: 40px;
  opacity: 0.6;
}

.footer-info p {
  color: #888;
  font-size: 0.9rem;
}

/* ==========================================================================
    Animations
    ========================================================================== */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUpAnim 0.6s ease forwards;
}

@keyframes fadeUpAnim {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Responsive */
@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    display: none;
  }
  .main-nav.active {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .hero h1 { font-size: 2.2rem; }
}
