* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Oxanium', sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1 {
  margin-top: 60px;
}

/* RTL Support */
html[dir="rtl"] .nav-menu {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .nav-menu li {
  float: right;
}

html[dir="rtl"] .hero-content {
  text-align: right;
}

/* ================================
   Header & Navbar
================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar {
  padding: 1rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
}

.logo-icon img {
  width: 40px;
  height: auto;
  display: block;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
}

.logo-text .cubic {
  font-weight: 600;
}

.logo-text .labs {
  font-weight: 400;
}

/* Language Switcher */
.language-switcher {
  margin-left: 10px;
}


#lang-btn {
  background: #46a24a;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

#lang-btn:hover {
  background: #f44336;
}


/* Nav Links */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  transition: 0.3s;
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: #4CAF50;
  transform: translateY(-2px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #4CAF50;
  transition: width 0.3s;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #333;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-section p {
  font-size: 1.2rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
}

/* Main Content */
.main-content {
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Trending Section */
.trending-section {
  padding: 3rem 0;
}

.trending-section h2 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 2rem;
  font-weight: 700;
}

.trending-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.trend-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
}

.trend-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(76, 175, 80, 0.15);
}

.trend-card.featured {
  grid-row: span 2;
}

.trend-image {
  position: relative;
  overflow: hidden;
}

.trend-card.featured .trend-image {
  height: 300px;
}

.trend-card:not(.featured) .trend-image {
  height: 180px;
}

.trend-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.trend-card:hover .trend-image img {
  transform: scale(1.05);
}

.trend-content {
  padding: 1.5rem;
}

.trend-category {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 1rem;
}

.trend-content h3 {
  font-size: 1.3rem;
  color: #2c3e50;
  margin-bottom: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
}

.trend-card.featured .trend-content h3 {
  font-size: 1.5rem;
}

.trend-content p {
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.trend-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #888;
}

.trend-date {
  font-weight: 500;
}

.trend-read {
  background: #f0f8f0;
  color: #4CAF50;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: 500;
}

/* Insights Grid */
.insights-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

/* Tech News Section */
.tech-news-section h2 {
  font-size: 1.8rem;
  color: #2c3e50;
  margin-bottom: 2rem;
  font-weight: 700;
}

.news-grid {
  display: grid;
  gap: 1.5rem;
}

.news-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  display: grid;
  grid-template-columns: 200px 1fr;
  transition: all 0.3s ease;
  cursor: pointer;
}

.news-card:hover {
  transform: translateX(5px);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.12);
}

.news-image {
  position: relative;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
  transform: scale(1.1);
}

.news-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-category {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 0.8rem;
  width: fit-content;
}

.news-content h3 {
  font-size: 1.1rem;
  color: #2c3e50;
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.4;
}

.news-content p {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* Sidebar */
.insights-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Hamburger visibility & Mobile Nav */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 240px;
    height: calc(100vh - 70px);
    background: white;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1000;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-container {
    /* flex-direction: column;
    align-items: flex-start; */
    gap: 1rem;
    padding: 0 1rem;
  }

  .container {
    padding: 0 1rem;
  }

  .hero-section {
    padding: 3rem 1rem;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .trending-grid {
    grid-template-columns: 1fr;
  }

  .trend-card.featured {
    grid-column: span 1;
  }

  .insights-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .news-card {
    grid-template-columns: 1fr;
  }

  .news-image {
    height: 180px;
  }

  .stack-item {
    grid-template-columns: 1fr;
    /* text-align: center; */
    gap: 0.5rem;
  }

  .modal-content {
    width: 95%;
    margin: 5% auto;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .article-title {
    font-size: 1.6rem;
  }

  .article-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Extra small screens ≤480px */
@media (max-width: 480px) {
  .hero-section {
    padding: 2rem 1rem;
  }

  .hero-section h1 {
    font-size: 1.6rem;
  }

  .hero-section p {
    font-size: 0.95rem;
  }

  .trending-section {
    padding: 2rem 1rem;
  }

  .trend-card .trend-image {
    height: 150px;
  }

  .news-image {
    height: 150px;
  }

  .stack-item {
    grid-template-columns: 1fr;
    /* text-align: center; */
    gap: 0.3rem;
  }

  .article-title {
    font-size: 1.4rem;
  }

  .article-content {
    font-size: 1rem;
    line-height: 1.6;
  }

  .modal-content {
    max-height: 85vh;
  }

  .modal-body {
    padding: 0.8rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.trend-card,
.news-card,
.sidebar-widget {
  animation: fadeInUp 0.6s ease-out;
}

.trend-card:nth-child(1) {
  animation-delay: 0.1s;
}

.trend-card:nth-child(2) {
  animation-delay: 0.2s;
}

.trend-card:nth-child(3) {
  animation-delay: 0.3s;
}

.news-card:nth-child(1) {
  animation-delay: 0.1s;
}

.news-card:nth-child(2) {
  animation-delay: 0.2s;
}

.news-card:nth-child(3) {
  animation-delay: 0.3s;
}

.news-card:nth-child(4) {
  animation-delay: 0.4s;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #4CAF50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
