/**
 * DubuAI 통합 스타일시트
 * Spring Boot + Thymeleaf 프로젝트용
 */

/*폰트*/
@font-face {
  font-family: 'Pretendard';
  src: url('../fonts/Pretendard-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Pretendard';
  src: url('../fonts/Pretendard-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Pretendard';
  src: url('../fonts/Pretendard-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Pretendard';
  src: url('../fonts/Pretendard-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}

:root {
  --font-size: 16px
}

/* 전역 스타일 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--font-size);
}

body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  color: #292C33;
  background-color: #ffffff;
  line-height: 1;
  font-weight: 400;
}

button {
  font-family: 'Pretendard', sans-serif;
}

input {
  font-family: 'Pretendard', sans-serif;
  font-weight: 400;
  -webkit-tap-highlight-color: transparent;
}

textarea {
  font-family: 'Pretendard', sans-serif;
}

a {
  text-decoration: none;
}


/* ========================================
   Header Styles
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 1.05em 1.5em;
  border-bottom: 1px solid #f3f4f6;
  background-color: white;
  z-index: 40;
}

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

.header-container-home {
  max-width: 72rem;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.mobile-menu-button {
  padding: 0.25rem;
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-button:hover {
  color: black;
}

@media (min-width: 1024px) {
  .mobile-menu-button {
    display: none;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  width: 160px;
}

@media (max-width: 768px) {
  .logo {
    width: 120px;
  }
}

.header-left .logo img {
  width: 100%;
}

.nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

.nav-link {
  color: #292C33;
  font-size: 1em;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: black;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auth-button {
  color: #292C33;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem 1rem;
  font-size: 1em;
  transition: color 0.2s;
  text-decoration: none;
}

.auth-button:hover {
  color: black;
}

@media (max-width: 768px) {
  .auth-button {
    padding: 0.3em 0.5em;
  }
}

/* ========================================
   Hero Section Styles
   ======================================== */
.hero-section {
  width: 100%;
  padding: 9.8em 1.5em 5em;
  background-color: #96afb810;
}

.hero-container {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

@media (max-width: 768px) {
  .hero-container {
    flex-direction: column;
  }
}

.hero-content {
  flex: 1;
}

.hero-title {
  font-size: 2.5em;
  margin-bottom: 1rem;
  font-weight: 700;
  color: #292C33;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.75rem;
    text-align: center;
  }
}

.hero-description {
  color: #292C33;
  font-size: 1.125rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .hero-description {
    font-size: 1rem;
    text-align: center;
  }
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.character-container {
  position: relative;
  width: 80%;
}

.character-container img {
  width: 100%;
}

.large-cube {
  width: 8rem;
  height: 8rem;
  background-color: white;
  border: 4px solid black;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  position: relative;
  transform: rotate(12deg);
}

.large-cube-eyes {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cube-eyes {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cube-eye {
  width: 0.5rem;
  height: 0.5rem;
  background-color: black;
  border-radius: 50%;
}

.large-cube-mouth {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
}

.cube-mouth {
  width: 1.5rem;
  height: 0.5rem;
  background-color: #f472b6;
  border-radius: 9999px;
}

.small-cube {
  width: 5rem;
  height: 5rem;
  background-color: white;
  border: 4px solid black;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  position: absolute;
  bottom: -1rem;
  right: -2rem;
  transform: rotate(-12deg);
}

.small-cube-eyes {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.small-cube-eyes .cube-eyes {
  gap: 0.25rem;
}

.small-cube-eyes .cube-eye {
  width: 0.375rem;
  height: 0.375rem;
}

.small-cube-mouth {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
}

.small-cube-mouth .cube-mouth {
  width: 1rem;
  height: 0.375rem;
}

/* ========================================
   Who's DubuAI Section Styles
   ======================================== */
.whos-dubuai-section {
  width: 100%;
  padding: 4.1em 1.5rem;
}

.whos-dubuai-container {
  max-width: 72rem;
  margin: 0 auto;
}

.whos-dubuai-title {
  font-size: 1.8em;
  margin-bottom: 3rem;
  font-weight: 700;
}

.features-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.feature-content h3 {
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 1.2em;
}

.feature-description {
  color: #292C33;
  font-size: 1em;
  line-height: 1.4;
}

.feature-icon {
  flex-shrink: 0;
  width: 6.5em;
  height: 6.5em;
  background-color: #fff;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon img {
  width: 100%;
}

/* ========================================
   News Section Styles
   ======================================== */
.news-section {
  width: 100%;
  padding: 4.1em 1.5rem;
}

.news-container {
  max-width: 72rem;
  margin: 0 auto;
}

.news-title {
  font-size: 1.8em;
  margin-bottom: 1rem;
  font-weight: 700;
}

.news-description {
  color: #292C33;
  margin-bottom: 3rem;
  font-size: 1em;
}

/* .news-grid {
  display: grid;
  gap: 1.5rem;
} */

@media (min-width: 768px) {
  /* .news-grid {
    grid-template-columns: repeat(2, 1fr);
  } */
}

@media (min-width: 1024px) {
  /* .news-grid {
    grid-template-columns: repeat(4, 1fr);
  } */
}

.news-item {
  background-color: white;
  border-radius: 10px;
  transition: box-shadow 0.2s;
  border: 1px solid #d9d9d980;
  padding: 12px 15px;
}

.news-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3em;
}

.news-item-header h3 {
  font-weight: 600;
  font-size: 1.2em;
}

.news-item-icon {
  width: 3.5em;
  height: 3.5em;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-item-icon img {
  width: 100%;
}

.news-item-category {
  font-size: 0.875rem;
  color: #292C33;
  display: block;
}

.news-item-description {
  color: #595959;
  font-size: 1em;
  line-height: 1.4;
  white-space: pre-line;
  margin-top: 0.63em;
}

/* ========================================
   Collaboration Section Styles
   ======================================== */
.collaboration-section {
  width: 100%;
  padding: 4.2em 1.5rem;
  background-color: #8BD179;
  display: flex;
  justify-content: center;
}

.collaboration-container {
  max-width: 60rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

@media (max-width: 768px) {
  .collaboration-container {
    flex-direction: column;
  }
}

.collaboration-image-img {
  width: 100%;
  max-width: 20em;
  margin: 0 auto;
  display: block;
  height: auto;
  object-fit: cover;
}

@media (max-width: 768px) {
  .collaboration-image-img {
    max-width: 92%;
  }
}

.collaboration-content {
  flex: 1;
  padding-left: 2rem;
}

@media (max-width: 768px) {
  .collaboration-content {
    padding-left: 0;
    text-align: center;
    display: flex;
    align-items: center;
    flex-direction: column;
  }
}

.collaboration-title {
  font-size: 2em;
  margin-bottom: 0.7em;
  color: #292C33;
  font-weight: 700;
}

@media (max-width: 768px) {
  .collaboration-title {
    font-size: 1.5rem;
    margin-bottom: 1em;
  }
}

.collaboration-text {
  font-size: 1.125rem;
  margin-bottom: 0.5em;
  color: #292C33;
}

@media (max-width: 768px) {
  .collaboration-text {
    font-size: 1rem;
  }
}

.collaboration-text:last-of-type {
  margin-bottom: 2rem;
}

.collaboration-button {
  background-color: white;
  padding: 1em 2em;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1em;
  font-weight: 500;
  color: #292C33;
  transition: all 0.2s ease-in-out;
}

.collaboration-button:hover {
  background-color: #292C33;
  color: white;
}

/* ========================================
   AI Study Section Styles
   ======================================== */
.ai-study-section {
  width: 100%;
  padding: 4rem 1.5rem;
  display: flex;
  justify-content: center;
}

.ai-study-container {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 5em;
}

@media (max-width: 768px) {
  .ai-study-container {
    flex-direction: column-reverse;
    gap: 2rem;
    align-items: center;
  }
}

.ai-study-content {
  flex: 1;
  margin-bottom: 2.3em;
}

@media (max-width: 768px) {
  .ai-study-content {
    text-align: center;
  }
}

.ai-study-title {
  font-size: 2em;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .ai-study-title {
    font-size: 1.5rem;
  }
}

.ai-study-subtitle {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .ai-study-subtitle {
    font-size: 1.125rem;
  }
}

.ai-study-text {
  color: #292C33;
  line-height: 1.4;
  margin-bottom: 0.1em;
  font-size: 1.1em;
}

.ai-study-text:last-of-type {
  margin-bottom: 0;
}

.ai-study-visual {
  flex: 1;
}

.ai-study-image {
  position: relative;
}

.ai-study-image-img {
  width: 100%;
  max-width: 30em;
  margin: 0 auto;
  display: block;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.05), 0 0 10px 0 rgba(0, 0, 0, 0.03);
  object-fit: cover;
}

@media (max-width: 768px) {
  .ai-study-image-img {
    max-width: 20rem;
  }
}

/* ========================================
   Footer Styles
   ======================================== */
.footer {
  width: 100%;
  padding: 2.4em 1.5rem;
  color: white;
  background-color: #292C33;
}

.footer-container {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo-wrap {
  width: 6.5em;
}

@media (max-width: 768px) {
  .footer-logo-wrap {
    width: 4.8em;
  }
}

.footer-logo-wrap img {
  width: 100%;
}

.footer-copyright {
  color: #bebebe;
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .footer-copyright {
    font-size: 0.7em;
  }
}

/* ========================================
   Page Layout Styles (Community, Learning, Project)
   ======================================== */
.page-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 4rem;
}

.page-sidebar {
  width: 16rem;
  background-color: white;
  border-right: 1px solid #e5e7eb;
  position: fixed;
  left: 0;
  top: 4rem;
  bottom: 0;
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 30;
}

@media (max-width: 1023px) {
  .page-sidebar {
    transform: translateX(-100%);
  }

  .page-sidebar.mobile-open {
    transform: translateX(0);
  }
}

@media (min-width: 1024px) {
  .page-sidebar {
    transform: translateX(0);
  }
}

.page-sidebar-nav {
  padding: 1.5rem;
}

.page-sidebar-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.page-sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-sidebar-menu li {
  margin-bottom: 0.25rem;
}

.page-sidebar-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: #6b7280;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.page-sidebar-link:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.page-sidebar-link.active {
  background-color: #f3f4f6;
  color: #111827;
  font-weight: 500;
}

.page-main {
  flex: 1;
  margin-left: 0;
  padding: 2rem 1.5rem;
  max-width: 100%;
}

@media (min-width: 1024px) {
  .page-main {
    margin-left: 16rem;
  }
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: #292C33;
  font-size: 1em;
}

.page-content-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .page-content-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .page-content-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.content-card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: all 0.2s;
}

.content-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.content-card-image {
  width: 100%;
  height: 12rem;
  object-fit: cover;
}

.content-card-body {
  padding: 1.5rem;
}

.content-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.content-card-description {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.content-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #9ca3af;
}

/* ========================================
   Utility Classes
   ======================================== */
.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center {
  text-align: center;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
