/* ===== CSS VARIABLES ===== */
:root {
  --primary: #1a73e8;
  --secondary: #174ea6;
  --accent: #fbbc04;
  --bg: #f8f9fa;
  --text: #202124;
  --card-bg: #ffffff;
  --border: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { color: var(--secondary); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 5%;
  max-width: 1400px;
  margin: 0 auto;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.site-logo img { height: 40px; width: auto; border-radius: 8px; }
.site-logo:hover { color: var(--accent); }

/* Navigation */
.nav-menu { display: flex; gap: 4px; }
.nav-menu a {
  color: rgba(255,255,255,0.9);
  padding: 8px 18px;
  border-radius: 25px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}
.nav-menu a:hover, .nav-menu a.active {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 5px;
}

/* ===== AD CONTAINER ===== */
.ad-container {
  text-align: center;
  padding: 12px 0;
  min-height: 50px;
  overflow: hidden;
}
.ad-container-header {
  background: rgba(0,0,0,0.03);
  border-bottom: 1px solid var(--border);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 5%;
}

/* ===== HERO SECTION ===== */
.hero {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, #0d47a1 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: float 20s linear infinite;
}
@keyframes float {
  0% { transform: translate(0, 0); }
  100% { transform: translate(30px, 30px); }
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 15px;
  position: relative;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

/* ===== 3D CARD ANIMATION ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  padding: 20px 0;
}
.article-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  transform-style: preserve-3d;
  perspective: 1000px;
  position: relative;
}
.article-card:hover {
  transform: translateY(-8px) rotateX(2deg);
  box-shadow: var(--shadow-lg);
}
.article-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, transparent 60%, rgba(26,115,232,0.05));
  pointer-events: none;
}
.card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  position: relative;
  overflow: hidden;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.article-card:hover .card-image img { transform: scale(1.08); }
.card-image .card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}
.card-body {
  padding: 22px;
}
.card-body h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-body p {
  font-size: 0.9rem;
  color: #5f6368;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 15px;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #999;
}
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 0;
}
.read-more:hover { gap: 10px; }
.read-more::after { content: '→'; transition: var(--transition); }

/* ===== ARTICLE PAGE ===== */
.article-page {
  max-width: 820px;
  margin: 0 auto;
}
.article-header {
  margin-bottom: 30px;
}
.article-header h1 {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 12px;
}
.article-meta {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  color: #5f6368;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.article-description {
  font-size: 1.15rem;
  color: #444;
  line-height: 1.8;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  font-style: italic;
}

/* Split images container - vertical stack (top/bottom) with zero margin */
.split-images {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  line-height: 0;
  overflow: hidden;
  border-radius: 0;
}
.split-images .split-img {
  width: 100%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: block;
  margin: 0;
  padding: 0;
}
.split-images .split-img img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  margin: 0;
  padding: 0;
  transition: transform 0.3s;
}
/* Split stack: 100 real sliced images stacked vertically - zero gap */
.split-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  line-height: 0;
  font-size: 0;
}
.split-stack .sp {
  display: block;
  margin: 0;
  padding: 0;
  line-height: 0;
  font-size: 0;
  border: none;
}
.split-stack .sp img {
  width: 100%;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
}
.split-images .split-img:hover img { transform: scale(1.02); }

/* Article content styling */
.article-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: #333;
  padding: 30px 0;
}
.article-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 35px 0 15px;
  color: var(--text);
  position: relative;
  padding-left: 15px;
}
.article-content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
}
.article-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 25px 0 12px;
  color: var(--secondary);
}
.article-content p { margin-bottom: 18px; }
.article-content ul, .article-content ol {
  margin: 15px 0 20px 25px;
  list-style: disc;
}
.article-content li { margin-bottom: 8px; }
.article-content blockquote {
  border-left: 4px solid var(--primary);
  margin: 25px 0;
  padding: 15px 25px;
  background: rgba(26,115,232,0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.article-content th, .article-content td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.article-content th { background: var(--primary); color: #fff; font-weight: 600; }
.article-content tr:hover td { background: rgba(26,115,232,0.03); }

/* ===== RELATED ARTICLES ===== */
.related-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid var(--border);
}
.related-section h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* ===== FOOTER ===== */
.site-footer {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: rgba(255,255,255,0.8);
  padding: 50px 5% 20px;
  margin-top: 60px;
}
.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-section h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 15px;
  font-weight: 700;
}
.footer-section a {
  display: block;
  color: rgba(255,255,255,0.7);
  padding: 5px 0;
  transition: var(--transition);
}
.footer-section a:hover { color: var(--accent); padding-left: 8px; }
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 0.85rem;
  opacity: 0.6;
  max-width: 1400px;
  margin: 0 auto;
}

/* ===== STATIC PAGE ===== */
.page-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 0;
}
.page-content h1 {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 25px;
  color: var(--text);
}
.page-body {
  font-size: 1.05rem;
  line-height: 1.9;
  color: #333;
}
.page-body p { margin-bottom: 18px; }
.page-body h2 { font-size: 1.5rem; font-weight: 700; margin: 30px 0 15px; color: var(--text); }
.page-body h3 { font-size: 1.2rem; font-weight: 600; margin: 20px 0 10px; }
.page-body ul { margin: 15px 0 15px 25px; list-style: disc; }
.page-body li { margin-bottom: 8px; }

/* ===== 404 PAGE ===== */
.error-page {
  text-align: center;
  padding: 80px 20px;
}
.error-page h1 { font-size: 6rem; color: var(--primary); font-weight: 900; }
.error-page p { font-size: 1.3rem; color: #666; margin: 20px 0; }
.error-page a {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  transition: var(--transition);
}
.error-page a:hover { background: var(--secondary); transform: translateY(-2px); color: #fff; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
.animate-in {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}
.article-card:nth-child(1) { animation-delay: 0.05s; }
.article-card:nth-child(2) { animation-delay: 0.1s; }
.article-card:nth-child(3) { animation-delay: 0.15s; }
.article-card:nth-child(4) { animation-delay: 0.2s; }
.article-card:nth-child(5) { animation-delay: 0.25s; }
.article-card:nth-child(6) { animation-delay: 0.3s; }

/* 3D Floating shapes background */
.bg-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.bg-shapes .shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.03;
  animation: floatShape 15s ease-in-out infinite;
}
.shape-1 { width: 300px; height: 300px; background: var(--primary); top: 10%; left: -5%; animation-delay: 0s; }
.shape-2 { width: 200px; height: 200px; background: var(--accent); top: 60%; right: -3%; animation-delay: -5s; }
.shape-3 { width: 150px; height: 150px; background: var(--secondary); bottom: 20%; left: 30%; animation-delay: -10s; }
@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .hero { padding: 40px 15px; }
  .hero p { font-size: 1rem; }
  .articles-grid { grid-template-columns: 1fr; gap: 20px; }
  .article-header h1 { font-size: 1.6rem; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--secondary);
    flex-direction: column;
    padding: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  }
  .nav-menu.active { display: flex; }
  .nav-menu a { padding: 12px 20px; border-radius: 8px; }
  .mobile-toggle { display: block; }
  .header-top { position: relative; }
  .footer-content { grid-template-columns: 1fr; gap: 25px; }
  .main-content { padding: 20px 4%; }
  .page-content h1 { font-size: 1.6rem; }
  .article-content h2 { font-size: 1.3rem; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .related-grid { grid-template-columns: 1fr; }
  .card-image { height: 180px; }
  html { font-size: 15px; }
}

/* ===== LOADING ANIMATION ===== */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s;
}
.page-loader.hidden { opacity: 0; pointer-events: none; }
.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== SCROLL TO TOP ===== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(26,115,232,0.3);
  z-index: 100;
}
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover { background: var(--secondary); transform: translateY(-3px); }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  color: #999;
  padding: 15px 0;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb span { color: #ccc; }
