@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;600;700&display=swap');

:root {
  --primary-color: #0066cc;
  --secondary-color: #e84c3d;
  --text-color: #1a1a1a;
  --text-muted: #666;
  --bg-color: #f4f7f9;
  --card-bg: #ffffff;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  --header-height: 70px;
  --container-max-width: 1200px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

/* Layout */
.main-wrapper {
  max-width: var(--container-max-width);
  margin: 0 auto;
  background: var(--card-bg);
  min-height: 100vh;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.05);
}

/* Header */
.site-header {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: var(--transition);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  padding: 4rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
}

/* Content Sections */
.section-container {
  padding: 3rem 2rem;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.section-title h2 {
  font-size: 1.5rem;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Carousel */
.carousel-wrapper {
  position: relative;
  overflow: hidden;
  margin: 0 -1rem;
  padding: 1rem;
}

.carousel-inner {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.5s ease-out;
  scroll-behavior: smooth;
  overflow-x: auto;
  scrollbar-width: none;
  /* Firefox */
}

.carousel-inner::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.card {
  min-width: 280px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  flex: 0 0 auto;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background-color: #eee;
}

.card-content {
  padding: 1.25rem;
}

.card-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 102, 204, 0.1);
  color: var(--primary-color);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card-title a {
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
}

.card-title a:hover {
  color: var(--primary-color);
}

/* Footer */
.site-footer {
  padding: 4rem 2rem;
  background: #1a1a1a;
  color: white;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  max-width: var(--container-max-width);
  margin: 0 auto;
}

.footer-col h3 {
  margin-bottom: 1.5rem;
  color: white;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #aaa;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-color);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--secondary-color);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(232, 76, 61, 0.4);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

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

.back-to-top:hover {
  transform: scale(1.1);
  background: #d33c2d;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Social Links Styling */
.social-links.horizontal {
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
}

.social-link-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.social-link-item em {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-style: normal;
  transition: transform 0.2s ease;
}

.social-link-item em:hover {
  transform: scale(1.1);
}

.social-link-item svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Social Icons Styling */
.social-links.horizontal {
  display: flex;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
}

.social-link-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.social-link-item em {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-style: normal;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.social-link-item em:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.social-link-item svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.icon-medium em {
  width: 42px;
  height: 42px;
}

.icon-medium svg {
  width: 22px;
  height: 22px;
}

/* Official Logo Styling */
.site-logo-img {
  height: 40px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

.logo:hover .site-logo-img {
  transform: scale(1.05);
}

/* Post Tags Styling */
.post-tag {
  font-size: 0.8rem;
  background: #f0f0f0;
  color: var(--text-muted);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-weight: 600;
  transition: var(--transition);
}

.post-tag:hover {
  background: var(--secondary-color);
  color: white;
  transform: translateY(-2px);
}

/* Card Hover Effects */
.card-img-link {
  display: block;
  width: 100%;
}

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

.card:hover .card-title a {
  color: var(--secondary-color);
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-overlay.active {
  display: flex;
  opacity: 1;
}

.search-box {
  position: relative;
  width: 90%;
  max-width: 700px;
}

.search-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
}

.search-input {
  width: 100%;
  padding: 1.5rem;
  font-size: 1.5rem;
  border: none;
  border-radius: 8px;
  background: white;
  color: var(--text-color);
}

.search-input:focus {
  outline: 3px solid var(--primary-color);
}

.search-results {
  margin-top: 1rem;
  max-height: 400px;
  overflow-y: auto;
}

.search-result-item {
  padding: 1rem;
  background: white;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  color: var(--text-color);
  text-decoration: none;
  display: block;
  transition: var(--transition);
}

.search-result-item:hover {
  background: var(--bg-color);
  transform: translateX(5px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background: var(--text-color);
  transition: var(--transition);
}

/* Responsive Menu */
@media (max-width: 768px) {
  .site-header {
    padding: 0 1rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - var(--header-height));
    background: white;
    padding: 2rem;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }

  .main-nav.active {
    left: 0;
  }

  .nav-links {
    flex-direction: column;
    gap: 1.5rem;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .header-actions {
    margin-left: auto;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .carousel-container {
    padding: 2rem 1rem;
  }

  .carousel-nav {
    bottom: -40px;
  }
}

/* Carousel Navigation Buttons */
.carousel-nav {
  display: flex;
  gap: 0.5rem;
  position: absolute;
  bottom: -50px;
  right: 0;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  background: white;
  color: var(--primary-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.carousel-btn:hover {
  background: var(--primary-color);
  color: white;
}

.carousel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Tag Filter */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0;
  padding: 0 1rem;
}

.tag-filter-btn {
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 25px;
  background: white;
  color: var(--primary-color);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  font-size: 0.9rem;
}

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

/* Category Section */
.category-section {
  padding: 3rem 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.category-title {
  font-size: 1.8rem;
  color: var(--text-color);
}

.carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.carousel-inner {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 1rem 0;
}

.carousel-inner::-webkit-scrollbar {
  display: none;
}

.carousel-inner .card {
  flex: 0 0 300px;
  min-width: 280px;
}