/**
 * IQ Test - 메인 페이지 스타일 (index.php)
 */

/* 헤더 스타일 */
.header {
  background: var(--background-white);
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #e2e8f0;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-title {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.8em;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.2;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 30px;
}

.nav-menu a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1em;
  transition: color 0.3s ease;
  position: relative;
}

.nav-menu a:hover {
  color: var(--accent-color);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

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

.trust-badges {
  display: flex;
  gap: 15px;
  align-items: center;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85em;
  color: var(--success-color);
  font-weight: 500;
}

.trust-badge::before {
  content: '✓';
  font-weight: bold;
}

/* 모바일 햄버거 메뉴 */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
  gap: 4px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--background-white);
  box-shadow: var(--box-shadow);
  border-top: 1px solid #e2e8f0;
  z-index: 999;
}

.mobile-nav.active {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 20px;
}

.mobile-nav li {
  margin-bottom: 15px;
}

.mobile-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1em;
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.mobile-nav a:hover {
  color: var(--accent-color);
}

/* 히어로 섹션 스타일 */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: white;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-content h1 {
  font-size: 3.5em;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-content .subtitle {
  font-size: 1.3em;
  margin-bottom: 20px;
  opacity: 0.9;
  font-weight: 300;
}

.hero-icon {
  margin: 20px 0;
  text-align: center;
  display: none;
}

.hero-icon img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.hero-content .description {
  font-size: 1.1em;
  margin-bottom: 40px;
  opacity: 0.8;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
}

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

.stat-number {
  font-size: 2.5em;
  font-weight: 700;
  display: block;
  color: #fbbf24;
}

.stat-label {
  font-size: 0.9em;
  opacity: 0.8;
  margin-top: 5px;
}

.cta-button {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  border: none;
  padding: 18px 80px;
  font-size: 1.3em;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  min-width: 280px;
  text-align: center;
}

.cta-button:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.cta-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.5);
}

/* 테스트 시작 안내 섹션 */
.test-intro-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.test-intro-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  z-index: 1;
}

.test-intro-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.test-intro-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.test-intro-left {
  text-align: center;
}

.test-intro-left img {
  max-width: 100%;
  height: auto;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.test-intro-left img:hover {
  transform: scale(1.02);
}

.test-intro-right {
  text-align: center;
}

.test-intro-right h2 {
  font-size: 1.5em;
  font-weight: 700;
  color: #1e293b;
  margin: 10px 0 16px 0;
  line-height: 1.25;
  text-align: center;
}

.test-precautions-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 18px 0;
  text-align: left;
  display: inline-block;
}

.test-precautions-list li {
  padding: 8px 0;
  font-size: 0.95em;
  color: #475569;
  position: relative;
  padding-left: 28px;
  border-bottom: 1px solid #e5e7eb;
  transition: color 0.2s ease;
}

.test-precautions-list li:before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65em;
  font-weight: 700;
}

.test-precautions-list li:last-child {
  border-bottom: none;
}

.test-precautions-list li:hover {
  color: #2d3748;
}

.test-start-button {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  padding: 15px 35px;
  font-size: 1.2em;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
  width: 100%;
  max-width: 250px;
  text-align: center;
}

.test-start-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(59, 130, 246, 0.35);
  background: linear-gradient(135deg, #2563eb, #1e40af);
}

.test-start-button:active {
  transform: translateY(0);
}

/* 히어로 오른쪽 컬럼 */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-visual img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.hero-visual img:hover {
  transform: scale(1.02);
}

/* 특징 섹션 스타일 */
.features-section {
  padding: 80px 0;
}

.features-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 2.5em;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.section-title p {
  font-size: 1.2em;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.feature-card {
  background: var(--background-white);
  padding: 40px 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid #f1f5f9;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-hover);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

.feature-card h3 {
  font-size: 1.4em;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1em;
}

/* 푸터 스타일 */
.footer {
  background: var(--secondary-color);
  color: white;
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-result-lookup {
  display: inline-flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 24px;
}

.footer-result-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 14px 20px;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.footer-result-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.28);
}

.footer-section h4 {
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 20px;
  color: #fbbf24;
}

.footer-section p,
.footer-section li {
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 10px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #fbbf24;
}

.footer-business-info {
  border-top: 1px solid #374151;
  padding-top: 20px;
  margin-bottom: 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 0.85em;
  line-height: 1.8;
}

.footer-business-info p {
  margin: 0;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 30px;
  text-align: center;
  color: #9ca3af;
  font-size: 0.9em;
}

/* 반응형 - 태블릿 */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    position: relative;
  }
  .nav-menu {
    display: none;
  }
  .trust-badges {
    display: none;
  }
  .logo-subtitle {
    display: none;
  }
  .logo-title {
    font-size: 1.2em;
  }
  .logo-icon {
    width: 40px;
    height: 40px;
  }
  .mobile-menu-toggle {
    display: flex;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.5em;
  }

  .hero-content .subtitle {
    font-size: 1.1em;
  }

  .hero-content .description {
    font-size: 1em;
  }

  .hero-stats {
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
  }

  .stat-number {
    font-size: 2em;
  }

  .cta-button {
    padding: 15px 30px;
    font-size: 1.1em;
    width: 100%;
    max-width: 280px;
  }

  .test-intro-section {
    min-height: auto;
    padding: 40px 0;
  }

  .test-intro-container {
    padding: 40px 15px;
  }

  .test-intro-content {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 30px;
  }

  .test-intro-right h2 {
    font-size: 2.2em;
  }

  .test-start-button {
    padding: 18px 40px;
    font-size: 1.2em;
  }

  .hero-icon {
    display: block;
  }

  .hero-image {
    display: none;
  }

  .hero-visual img {
    max-width: 80%;
  }

  .features-section {
    padding: 60px 0;
  }

  .section-title h2 {
    font-size: 2em;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .feature-card {
    padding: 30px 20px;
  }

  .footer {
    padding: 40px 0 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-result-lookup {
    justify-content: center;
  }

  .footer-result-button {
    min-width: 0;
    max-width: calc(100vw - 32px);
    padding: 13px 18px;
    font-size: 0.92rem;
  }
}

/* 반응형 - 모바일 */
@media (max-width: 480px) {
  .hero-section {
    padding: 40px 0;
  }

  .hero-content h1 {
    font-size: 2em;
  }

  .hero-stats {
    flex-direction: column;
    gap: 10px;
  }

  .stat-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  .stat-number {
    font-size: 1.8em;
  }

  .stat-label {
    font-size: 1em;
  }

  .section-title h2 {
    font-size: 1.8em;
  }

  .feature-card {
    padding: 25px 15px;
  }

  .feature-card h3 {
    font-size: 1.2em;
  }

  .test-intro-content {
    padding: 30px 20px;
  }

  .test-intro-right h2 {
    font-size: 1.8em;
  }

  .test-start-button {
    padding: 15px 25px;
    font-size: 1.1em;
  }

  .hero-icon {
    display: block;
  }

  .hero-image {
    display: none;
  }
}

/* --- 블로그 섹션 --- */
.blog-section { padding: 60px 20px; background: #f8fafc; }
.blog-section-container { max-width: 1100px; margin: 0 auto; }
.blog-section .section-title { text-align: center; margin-bottom: 36px; }
.blog-section .section-title h2 { font-size: 28px; font-weight: 700; color: #1e293b; margin-bottom: 8px; }
.blog-section .section-title p { color: #64748b; font-size: 15px; }
.blog-section-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-section-card { background: #fff; border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 1px 4px rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s; }
.blog-section-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.blog-section-card-img { height: 120px; background-size: cover; background-position: center; }
.blog-section-card-img.cat-score { background: linear-gradient(135deg, rgba(30,64,175,0.45), rgba(96,165,250,0.45)), url('../img/blog/cat-score.jpg') center/cover no-repeat; }
.blog-section-card-img.cat-test { background: linear-gradient(135deg, rgba(109,40,217,0.45), rgba(167,139,250,0.45)), url('../img/blog/cat-test.jpg') center/cover no-repeat; }
.blog-section-card-img.cat-viral { background: linear-gradient(135deg, rgba(194,65,12,0.45), rgba(251,146,60,0.45)), url('../img/blog/cat-viral.jpg') center/cover no-repeat; }
.blog-section-card-img.cat-mensa { background: linear-gradient(135deg, rgba(146,64,14,0.45), rgba(251,191,36,0.45)), url('../img/blog/cat-mensa.jpg') center/cover no-repeat; }
.blog-section-card-img.cat-improve { background: linear-gradient(135deg, rgba(22,101,52,0.45), rgba(74,222,128,0.45)), url('../img/blog/cat-improve.jpg') center/cover no-repeat; }
.blog-section-card-img.cat-type { background: linear-gradient(135deg, rgba(21,94,117,0.45), rgba(34,211,238,0.45)), url('../img/blog/cat-type.jpg') center/cover no-repeat; }
.blog-section-card-img.cat-practical { background: linear-gradient(135deg, rgba(55,48,163,0.45), rgba(129,140,248,0.45)), url('../img/blog/cat-practical.jpg') center/cover no-repeat; }
.blog-section-card-body { padding: 14px 16px 18px; }
.blog-section-cat { font-size: 11px; font-weight: 600; color: #6366f1; background: #eef2ff; padding: 2px 8px; border-radius: 4px; }
.blog-section-card-body h3 { font-size: 15px; font-weight: 600; color: #1e293b; margin: 8px 0 6px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-section-card-body p { font-size: 13px; color: #64748b; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-section-more { text-align: center; margin-top: 28px; }
.blog-section-more-btn { display: inline-block; padding: 12px 32px; background: #4f46e5; color: #fff; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 15px; transition: background 0.2s; }
.blog-section-more-btn:hover { background: #4338ca; }

@media (max-width: 768px) {
  .blog-section-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .blog-section { padding: 40px 16px; }
  .blog-section .section-title h2 { font-size: 22px; }
  .blog-section-card-img { height: 90px; }
  .blog-section-card-body h3 { font-size: 14px; }
}

@media (max-width: 480px) {
  .blog-section-grid { grid-template-columns: 1fr; }
}
