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

@keyframes rainbow-text {
  0% { color: #1a73e8; }
  33% { color: #34a853; }
  66% { color: #ea4335; }
  100% { color: #1a73e8; }
}

/* 기본 레이아웃 안정화 */
html {
  overflow-y: scroll; /* 세로 스크롤바 공간을 항상 확보 */
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  background-color: #f8f9fa;
  color: #202124;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

/* 컨테이너 */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  font-weight: 800;
  animation: fadeInUp 0.8s ease-out, rainbow-text 5s infinite linear;
}

#news-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 60px;
}

/* 뉴스 카드 스타일 */
article {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  animation: fadeInUp 0.6s ease-out backwards;
}

article:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.news-image {
  width: 100%;
  height: 200px;
  background-color: #e9ecef;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s;
}

article:hover .news-image {
  transform: scale(1.1);
}

.content-wrapper {
  padding: 20px;
  background: white;
  z-index: 1;
}

article a {
  pointer-events: none;
  color: inherit;
  text-decoration: none;
}

article h2 {
  margin: 0 0 12px 0;
  font-size: 1.2rem;
  line-height: 1.4;
  color: #1a73e8;
  transition: color 0.3s;
}

article:hover h2 {
  color: #d93025;
}

.description-text {
  font-size: 0.95rem;
  color: #5f6368;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 제휴 문의 섹션 스타일 */
.contact-section {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  margin-top: 80px;
  animation: fadeInUp 1s ease-out;
}

.section-title {
  text-align: center;
  font-size: 1.8rem;
  color: #1a73e8;
  margin-bottom: 10px;
}

.section-subtitle {
  text-align: center;
  color: #5f6368;
  margin-bottom: 30px;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #202124;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.submit-button {
  width: 100%;
  padding: 15px;
  background-color: #1a73e8;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.submit-button:hover {
  background-color: #1765cc;
}

.submit-button:active {
  transform: scale(0.98);
}

/* 모달 디자인 */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  backdrop-filter: blur(5px);
  overflow-y: auto;
}

.modal-content {
  position: relative;
  background-color: #fff;
  margin: 2% auto;
  width: 95%;
  height: 90%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 30px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.4s ease-out;
}

.close-button {
  position: absolute;
  right: 20px;
  top: 15px;
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 2100;
  transition: all 0.2s;
}

.close-button:hover {
  transform: rotate(90deg) scale(1.1);
  background: #f8f9fa;
}

#news-frame {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
}
