/* ==========================================================================
   Page Specific Styles
   ========================================================================== */

/* ==========================================================================
   1. Top Page (index.html)
   ========================================================================== */
/* Hero Section */
.hero-section {
  position: relative;
  padding: 100px 0 120px 0;
  background: radial-gradient(circle at 90% 10%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 10% 90%, rgba(13, 148, 136, 0.08) 0%, transparent 40%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 24px;
  font-weight: 900;
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
}

@media (max-width: 992px) {
  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-actions {
    flex-direction: column;
  }
}

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

.hero-circle-bg {
  position: absolute;
  width: 320px;
  height: 320px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(13, 148, 136, 0.2));
  border-radius: var(--radius-full);
  filter: blur(40px);
  z-index: 1;
  animation: pulse 8s infinite alternate;
}

.hero-card {
  position: relative;
  z-index: 2;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--card-shadow-hover);
  max-width: 400px;
  width: 100%;
}

.hero-card-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.hero-card-item:last-child {
  margin-bottom: 0;
}

.hero-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.hero-card-info h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.hero-card-info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

@keyframes pulse {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.15) translate(10px, -10px); }
}

/* Features Grid */
.features-section {
  background-color: var(--bg-secondary);
}

.feature-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.feature-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
  font-size: 1.5rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Roadmap/Steps Section */
.roadmap-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.roadmap-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 32px;
  width: 4px;
  background-color: var(--border-color);
}

.roadmap-step {
  position: relative;
  padding-left: 80px;
  margin-bottom: 50px;
}

.roadmap-step:last-child {
  margin-bottom: 0;
}

.roadmap-number {
  position: absolute;
  left: 12px;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-numbers);
  font-size: 1.2rem;
  box-shadow: 0 0 0 6px var(--bg-primary);
  z-index: 2;
}

.roadmap-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.roadmap-content h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.roadmap-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   2. Articles List Page (articles.html)
   ========================================================================== */
.filter-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  justify-content: center;
}

.filter-btn {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ==========================================================================
   3. Compare Page (compare.html)
   ========================================================================== */
.compare-hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
}

.compare-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 24px;
}

.compare-select {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  outline: none;
  cursor: pointer;
}

.compare-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.compare-tag-btn {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.compare-tag-btn:hover, .compare-tag-btn.active {
  background-color: var(--secondary-light);
  border-color: var(--secondary);
  color: var(--secondary);
}

/* ==========================================================================
   4. Contact Page (contact.html)
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  align-items: start;
}

@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.contact-info-panel {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--card-shadow);
}

.contact-info-panel h1,
.contact-info-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.contact-info-panel p {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-method-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.contact-method-text h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.contact-method-text p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.contact-form-panel {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--card-shadow);
}

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-group label .required {
  color: var(--danger);
  margin-left: 4px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-primary);
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

.form-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}

.form-checkbox-group input {
  margin-top: 4px;
}

.form-checkbox-group label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-checkbox-group a {
  text-decoration: underline;
}

.form-status-msg {
  display: none;
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.form-status-msg.success {
  display: block;
  background-color: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
}

.form-status-msg.error {
  display: block;
  background-color: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

body.dark-mode .form-status-msg.success {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
}
body.dark-mode .form-status-msg.error {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* ==========================================================================
   5. Privacy Policy Page (privacy.html)
   ========================================================================== */
.policy-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 50px;
  box-shadow: var(--card-shadow);
}

.policy-container h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
  text-align: center;
}

.policy-date {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.policy-content h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}

.policy-content p {
  margin-bottom: 18px;
  color: var(--text-secondary);
}

.policy-content ul {
  list-style: disc;
  margin-left: 24px;
  margin-bottom: 18px;
  color: var(--text-secondary);
}

.policy-content li {
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .policy-container {
    padding: 30px 20px;
  }
}

/* ==========================================================================
   6. Article Detail Page Layout (articles/*)
   ========================================================================== */
.article-grid {
  display: grid;
  grid-template-columns: 2.3fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 992px) {
  .article-grid {
    grid-template-columns: 1fr;
  }
}

.article-main-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--card-shadow);
}

@media (max-width: 576px) {
  .article-main-container {
    padding: 24px 16px;
  }
}

.article-header {
  margin-bottom: 30px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.article-category {
  color: var(--primary);
  font-weight: 700;
}

.article-title {
  font-size: 2.2rem;
  line-height: 1.3;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .article-title {
    font-size: 1.8rem;
  }
}

.article-eye-catch {
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 32px;
  background-color: var(--bg-tertiary);
}

.article-eye-catch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Table of Contents */
.toc-container {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-bottom: 40px;
}

.toc-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-list {
  list-style: none;
  padding-left: 0;
}

.toc-item-h2 {
  font-weight: 600;
  margin-bottom: 8px;
}

.toc-item-h3 {
  padding-left: 20px;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.toc-link {
  color: var(--text-secondary);
}

.toc-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Article Body Content styling */
.article-body {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-primary);
}

.article-body h2 {
  font-size: 1.6rem;
  margin-top: 48px;
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.article-body h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.article-body h3 {
  font-size: 1.3rem;
  margin-top: 36px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-body h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background-color: var(--secondary);
  border-radius: var(--radius-sm);
}

.article-body p {
  margin-bottom: 24px;
}

.article-body strong {
  font-weight: 700;
  background: linear-gradient(transparent 70%, var(--accent-light) 70%);
}

body.dark-mode .article-body strong {
  background: linear-gradient(transparent 70%, rgba(245, 158, 11, 0.25) 70%);
}

.article-body ul {
  list-style: disc;
  margin-left: 24px;
  margin-bottom: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

/* Alert Boxes in Content */
.content-box {
  padding: 20px;
  border-radius: var(--radius-sm);
  margin: 30px 0;
  border-left: 4px solid;
}

.content-box-point {
  background-color: var(--primary-light);
  border-left-color: var(--primary);
}

.content-box-alert {
  background-color: rgba(239, 68, 68, 0.08);
  border-left-color: var(--danger);
}

.content-box-success {
  background-color: var(--secondary-light);
  border-left-color: var(--secondary);
}

.content-box-title {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 1rem;
}

/* Sidebar Components */
.sidebar {
  display: grid;
  gap: 30px;
}

.sidebar-widget {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--card-shadow);
}

.sidebar-title {
  font-size: 1.15rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.sidebar-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary);
}

/* Author Profile */
.profile-widget {
  text-align: center;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
  margin: 0 auto 16px auto;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 3px;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
  background-color: var(--bg-secondary);
}

.profile-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.profile-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.profile-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: left;
  line-height: 1.6;
}

/* Related/New Posts Widget */
.widget-posts-list {
  display: grid;
  gap: 16px;
}

.widget-post-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.widget-post-thumb {
  width: 70px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background-color: var(--bg-tertiary);
  flex-shrink: 0;
}

.widget-post-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.widget-post-info h4 a {
  color: var(--text-primary);
}

.widget-post-info h4 a:hover {
  color: var(--primary);
}

.widget-post-date {
  font-family: var(--font-numbers);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}
