@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css");

:root {
  /* Core Color Palette */
  --primary: #0F52BA;       /* Sapphire/Royal Blue */
  --primary-hover: #0d46a0;
  --primary-light: #eef4ff;
  --primary-glow: rgba(15, 82, 180, 0.15);
  
  --text-main: #1e293b;     /* Slate 800 */
  --text-sub: #475569;      /* Slate 600 */
  --text-muted: #94a3b8;    /* Slate 400 */
  
  --bg-main: #f8fafc;       /* Slate 50 */
  --bg-card: #ffffff;
  --bg-accent: #f1f5f9;     /* Slate 100 */
  
  --border: #e2e8f0;        /* Slate 200 */
  --border-hover: #cbd5e1;  /* Slate 300 */
  
  --success: #10b981;       /* Emerald 500 */
  --error: #ef4444;         /* Red 500 */
  
  /* Fonts & Radius */
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.03), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#wrap {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & GNB */
.subHeader {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.subHeader .inner {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.subHeader .inner h1 {
  display: flex;
  align-items: center;
}

.subHeader .inner h1 img {
  height: 38px;
  width: auto;
  display: block;
}

.subHeader .inner ul {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
}

.subHeader .inner ul li a {
  text-decoration: none;
  color: var(--text-sub);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 0;
  position: relative;
  transition: color 0.2s ease;
}

.subHeader .inner ul li a:hover {
  color: var(--primary);
}

.subHeader .inner ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.subHeader .inner ul li a:hover::after {
  width: 100%;
}

/* Main Visual & Sub Visual */
.mainVisual, .subVisual {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
}

.mainVisual div, .subVisual div {
  max-width: 1200px;
  width: 90%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
}

.mainVisual img, .subVisual img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

/* Layout Content Area */
#layoutContent {
  max-width: 1000px;
  width: 90%;
  margin: 40px auto 80px;
  flex: 1;
}

#layoutContent .pageHead {
  text-align: left;
  margin-bottom: 30px;
}

#layoutContent .pageHead div {
  padding-bottom: 20px;
  border-bottom: 2px solid var(--primary);
}

#layoutContent .pageHead div h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

#layoutContent .pageHead div p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-sub);
}

#layoutContent .pageHead div p span {
  color: var(--error);
  font-weight: 600;
}

/* Tables (General Board/List) */
.tb01 {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.tb01 th {
  background-color: var(--bg-accent);
  color: var(--text-main);
  font-weight: 600;
  font-size: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.tb01 td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border);
  text-align: center;
  transition: background-color 0.2s ease;
}

.tb01 tr:last-child td {
  border-bottom: none;
}

.tb01 tr:hover td {
  background-color: var(--primary-light);
}

.tb01 td.txt {
  text-align: left;
}

.tb01 td.txt a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.tb01 td.txt a:hover {
  color: var(--primary);
}

/* Details Table (bbsRead) */
.bbsRead {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-top: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.bbsRead th {
  padding: 30px;
  background-color: var(--bg-accent);
  text-align: left;
  border-right: 1px solid var(--border);
  vertical-align: top;
  width: 30%;
}

.bbsRead td {
  padding: 30px;
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}

.bbsRead th p.title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.bbsRead th p.during {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.bbsRead th p.status {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
}

/* Prev/Next Navigation Table (bbs_tb) */
table.bbs_tb {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table.bbs_tb td {
  padding: 12px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

table.bbs_tb tr:last-child td {
  border-bottom: none;
}

table.bbs_tb td.prev, table.bbs_tb td.next {
  font-weight: 600;
  color: var(--text-main);
  width: 100px;
  background-color: var(--bg-accent);
  text-align: center;
}

/* Form Styles (writeForm) */
.writeForm {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  margin-bottom: 30px;
  padding: 30px;
}

.writeForm dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  row-gap: 20px;
  column-gap: 20px;
  align-items: center;
}

.writeForm dl dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-align: right;
}

.writeForm dl dd {
  font-size: 14px;
  color: var(--text-sub);
}

/* Inputs, Selects, Textareas */
input.type-text, select, textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-main);
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input.type-text:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Modern Button System */
.btn, .pagebutton a, .button a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  outline: none;
}

/* Primary Button Styling */
.btn-primary, .button a {
  background-color: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(15, 82, 186, 0.1);
}

.btn-primary:hover, .button a:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 82, 186, 0.2);
}

/* Secondary Button Styling */
.btn-secondary, .pagebutton a {
  background-color: var(--bg-accent);
  color: var(--text-main) !important;
  border: 1px solid var(--border);
}

.btn-secondary:hover, .pagebutton a:hover {
  background-color: var(--border-hover);
  transform: translateY(-1px);
}

/* Page Button Alignment */
.pagebutton {
  margin: 30px 0;
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* Info Messages (Alert styling) */
div.message {
  background-color: var(--bg-accent);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 20px 30px;
  margin: 40px 0;
  box-shadow: var(--shadow-sm);
}

div.message ul {
  list-style: none;
}

div.message ul li {
  font-size: 13px;
  color: var(--text-sub);
  position: relative;
  padding-left: 15px;
  margin-bottom: 8px;
  text-align: left;
}

div.message ul li:last-child {
  margin-bottom: 0;
}

div.message ul li::before {
  content: '•';
  color: var(--primary);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Privacy/Agreement Box */
.agreement {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 30px;
  margin-bottom: 25px;
  text-align: left;
}

.agreement h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 25px;
  margin-bottom: 12px;
}

.agreement h4:first-of-type {
  margin-top: 0;
}

.agreement dl {
  margin-left: 10px;
}

.agreement dl dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 15px;
  margin-bottom: 6px;
}

.agreement dl dd {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

.agree_btn {
  margin: 25px 0;
  padding: 20px;
  background-color: var(--bg-accent);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: center;
  gap: 30px;
  font-weight: 600;
}

.agree_btn label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Main Menu (mainMenu in main.htm) */
.mainMenu {
  max-width: 1200px;
  width: 90%;
  margin: 40px auto;
}

.mainMenu ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  list-style: none;
}

.mainMenu ul li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 30px;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.mainMenu ul li a:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.mainMenu ul li a .menu-icon {
  font-size: 36px;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.mainMenu ul li a:hover .menu-icon {
  transform: scale(1.15);
}

.mainMenu ul li a .menu-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.mainMenu ul li a .menu-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
}

/* Footer styling */
.mainFooter {
  background-color: #0f172a; /* Very Dark Slate */
  padding: 30px 0;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  margin-top: auto;
  border-top: 1px solid #1e293b;
}

.mainFooter img {
  opacity: 0.8;
  filter: brightness(0) invert(1); /* make logo white for dark bg */
}

/* Pagination (bbspgno) */
#bbspgno {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

#bbspgno ul {
  display: flex;
  list-style: none;
  gap: 8px;
}

#bbspgno ul li {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
}

#bbspgno ul li:hover {
  border-color: var(--primary);
  color: var(--primary);
}

#bbspgno ul li strong.sel {
  color: #ffffff;
  background-color: var(--primary);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

/* Media Queries for responsiveness */
@media (max-width: 768px) {
  .subHeader .inner {
    flex-direction: column;
    height: auto;
    padding: 15px 0;
    gap: 15px;
  }
  .subHeader .inner ul {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .writeForm dl {
    grid-template-columns: 1fr;
    row-gap: 8px;
  }
  .writeForm dl dt {
    text-align: left;
  }
  .bbsRead {
    display: block;
  }
  .bbsRead tbody, .bbsRead tr, .bbsRead th, .bbsRead td {
    display: block;
    width: 100% !important;
    border-right: none;
  }
  .bbsRead th {
    border-bottom: 1px solid var(--border);
    padding: 20px;
  }
}