/* CSS Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', -apple-system, sans-serif;
  background: #f5f5f5;
  color: #222;
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
}

body.dark-mode {
  background: #121212;
  color: #e0e0e0;
}

a {
  color: #1a73e8;
  text-decoration: none;
}

body.dark-mode a {
  color: #8ab4f8;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* Header */
header {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #fff;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

body.dark-mode header {
  background: linear-gradient(135deg, #0d0d1a, #1a1a2e);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(45deg, #f7971e, #ffd200);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

nav a {
  color: #fff;
  font-size: 0.95rem;
  transition: color 0.3s;
}

nav a:hover {
  color: #ffd200;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

.dark-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s;
}

.dark-toggle:hover {
  background: rgba(255,255,255,0.1);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: #fff;
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

body.dark-mode .hero {
  background: linear-gradient(135deg, #0a0a1a, #1a1a3e, #0d0d1a);
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  background: linear-gradient(45deg, #f7971e, #ffd200);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 30px;
  opacity: 0.9;
}

.hero .btn {
  display: inline-block;
  background: linear-gradient(45deg, #f7971e, #ffd200);
  color: #1a1a2e;
  padding: 14px 40px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.hero .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(247,151,30,0.4);
}

/* Banner Slider */
.banner-slider {
  position: relative;
  width: 100%;
  height: 300px;
  margin: 40px auto;
  max-width: 1000px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.banner-slide.active {
  opacity: 1;
}

.banner-slide:nth-child(1) { background: linear-gradient(135deg, #667eea, #764ba2); }
.banner-slide:nth-child(2) { background: linear-gradient(135deg, #f093fb, #f5576c); }
.banner-slide:nth-child(3) { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.banner-slide:nth-child(4) { background: linear-gradient(135deg, #43e97b, #38f9d7); }

/* Section Title */
.section-title {
  font-size: 2rem;
  text-align: center;
  margin: 60px 0 40px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(45deg, #f7971e, #ffd200);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* Grids */
.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: 30px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Cards */
.card {
  background: #fff;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.1);
}

body.dark-mode .card {
  background: #1e1e1e;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 50px rgba(0,0,0,0.15);
}

.card-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.card p {
  color: #555;
  font-size: 0.95rem;
}

body.dark-mode .card p {
  color: #aaa;
}

/* Statistics */
.stat-item {
  text-align: center;
  padding: 20px;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(45deg, #f7971e, #ffd200);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 1rem;
  color: #666;
  margin-top: 8px;
}

body.dark-mode .stat-label {
  color: #aaa;
}

/* Case Cards */
.case-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.case-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.case-card .case-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 15px;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid #e0e0e0;
  padding: 18px 0;
  cursor: pointer;
}

body.dark-mode .faq-item {
  border-color: #333;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.1rem;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
  color: #555;
}

body.dark-mode .faq-answer {
  color: #aaa;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding-top: 12px;
}

.faq-icon {
  transition: transform 0.3s;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* HowTo */
.howto-step {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  align-items: flex-start;
}

.step-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(45deg, #f7971e, #ffd200);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #1a1a2e;
  flex-shrink: 0;
}

/* Contact */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.contact-item {
  text-align: center;
  padding: 20px;
}

/* Footer */
footer {
  background: #1a1a2e;
  color: #ccc;
  padding: 50px 0 20px;
  margin-top: 60px;
}

body.dark-mode footer {
  background: #0d0d1a;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.footer-grid h4 {
  color: #fff;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.footer-grid ul {
  list-style: none;
}

.footer-grid li {
  margin-bottom: 8px;
}

.footer-grid a {
  color: #aaa;
  font-size: 0.9rem;
}

.footer-grid a:hover {
  color: #ffd200;
}

.footer-bottom {
  border-top: 1px solid #333;
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(45deg, #f7971e, #ffd200);
  border: none;
  border-radius: 50%;
  color: #1a1a2e;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* Search Entry */
.search-entry {
  display: flex;
  max-width: 500px;
  margin: 20px auto;
}

.search-entry input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid #ddd;
  border-radius: 30px 0 0 30px;
  font-size: 1rem;
  outline: none;
  background: #fff;
}

body.dark-mode .search-entry input {
  background: #333;
  border-color: #444;
  color: #fff;
}

.search-entry button {
  padding: 12px 25px;
  background: linear-gradient(45deg, #f7971e, #ffd200);
  border: none;
  border-radius: 0 30px 30px 0;
  color: #1a1a2e;
  font-weight: 600;
  cursor: pointer;
}

/* Breadcrumb */
.breadcrumb {
  padding: 15px 0;
  font-size: 0.9rem;
  color: #888;
}

.breadcrumb a {
  color: #1a73e8;
}

body.dark-mode .breadcrumb a {
  color: #8ab4f8;
}

/* Responsive */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  nav ul {
    display: none;
    flex-direction: column;
    background: #1a1a2e;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    padding: 20px;
  }
  nav ul.show {
    display: flex;
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .banner-slider {
    height: 200px;
  }
}

/* Scroll Animation */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Glass Effect */
.glass {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

body.dark-mode .glass {
  background: rgba(0,0,0,0.3);
  border-color: rgba(255,255,255,0.05);
}

/* Tags */
.tag {
  display: inline-block;
  background: linear-gradient(45deg, #f7971e, #ffd200);
  color: #1a1a2e;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* News Card */
.news-card {
  padding: 20px;
}

.news-card .date {
  color: #888;
  font-size: 0.85rem;
}

body.dark-mode .news-card .date {
  color: #aaa;
}

.news-card h4 {
  margin: 8px 0;
}

.news-card p {
  font-size: 0.9rem;
}

/* Related Articles */
.related-articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 40px 0;
}

.pagination a {
  padding: 8px 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

body.dark-mode .pagination a {
  background: #1e1e1e;
  color: #e0e0e0;
}

.pagination .active {
  background: linear-gradient(45deg, #f7971e, #ffd200);
  color: #1a1a2e;
}

/* Prev Next */
.prev-next {
  display: flex;
  justify-content: space-between;
  margin: 30px 0;
}

.prev-next a {
  padding: 10px 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

body.dark-mode .prev-next a {
  background: #1e1e1e;
}

/* Search Result */
.search-result {
  display: none;
}

.search-result.show {
  display: block;
}