/* Main Styling for AI/ML Tutorials Website */
:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --dark-color: #2c3e50;
  --light-color: #ecf0f1;
  --danger-color: #e74c3c;
  --warning-color: #f39c12;
  --success-color: #27ae60;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --border-radius: 8px;
  --max-width: 1200px;
}

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

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  background-color: #f8f9fa;
  color: #333;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: #1a6aa8;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  background-color: white;
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 10001;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
}

.logo a {
  color: var(--dark-color);
}

.logo span {
  color: var(--primary-color);
}

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

nav ul li {
  margin-left: 1.5rem;
}

nav ul li a {
  color: var(--dark-color);
  font-weight: 500;
  padding: 0.5rem;
  border-radius: var(--border-radius);
}

nav ul li a:hover {
  background-color: var(--primary-color);
  color: white;
}

.mobile-menu {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color), #9b59b6);
  color: white;
  padding: 4rem 0;
  margin-bottom: 2rem;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  background: var(--dark-color);
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.btn:hover {
  background: #1a252f;
  transform: translateY(-3px);
}

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

.btn-primary:hover {
  background: #217dbb;
}

.btn-secondary {
  background: var(--secondary-color);
}

.btn-secondary:hover {
  background: #25a25a;
}

.hero-image img {
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

/* Main Content Layout */
.main-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

/* Tutorial Cards */
.tutorial-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  margin-bottom: 2rem;
  transition: var(--transition);
}

.tutorial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.tutorial-image {
  height: 200px;
  overflow: hidden;
}

.tutorial-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.tutorial-card:hover .tutorial-image img {
  transform: scale(1.05);
}

.tutorial-content {
  padding: 1.5rem;
}

.tutorial-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.tutorial-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #777;
}

.tutorial-excerpt {
  margin-bottom: 1rem;
}

/* Sidebar */
.sidebar {
  background: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
}

.sidebar h3 {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.popular-posts {
  list-style: none;
}

.popular-posts li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.popular-posts li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.popular-posts a {
  font-weight: 500;
}

.category-list {
  list-style: none;
}

.category-list li {
  margin-bottom: 0.5rem;
}

.category-list a {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.category-list a:hover {
  background: var(--primary-color);
  color: white;
}

/* Ad Spaces */
.ad-container {
  background: #f0f0f0;
  padding: 1rem;
  text-align: center;
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
}

.header-ad {
  height: 90px;
  margin: 1rem 0;
}

.sidebar-ad {
  height: 250px;
  margin-bottom: 2rem;
}

.content-ad {
  height: 120px;
  margin: 2rem 0;
}

.ad-container p {
  margin-bottom: 0.5rem;
  color: #777;
  font-size: 0.8rem;
}

/* Footer */
footer {
  background: var(--dark-color);
  color: white;
  padding: 3rem 0 1.5rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

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

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

.footer-links a {
  color: #ddd;
}

.footer-links a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  color: white;
  font-size: 1.5rem;
}

.copyright {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #3a546c;
  font-size: 0.9rem;
  color: #ddd;
}

/* Newsletter */
.newsletter-form {
  display: flex;
  margin-top: 1rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.8rem;
  border: none;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.newsletter-form button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0 1rem;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .main-content {
    grid-template-columns: 1fr;
  }

  nav ul {
    display: none;
  }

  .mobile-menu {
    display: block;
  }
  
  .header-container {
    padding: 1rem;
  }
}

/* Learning Tracks */
.learning-tracks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.track-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.track-card:hover {
  transform: translateY(-5px);
}

.track-header {
  padding: 1.5rem;
  background: var(--primary-color);
  color: white;
}

.track-header.beginner {
  background: var(--secondary-color);
}

.track-header.intermediate {
  background: var(--primary-color);
}

.track-header.advanced {
  background: var(--danger-color);
}

.track-content {
  padding: 1.5rem;
}

.track-content ul {
  list-style: none;
  margin-top: 1rem;
}

.track-content li {
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
}

.track-content li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

/* Code Blocks */
pre {
  background: var(--dark-color);
  color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin: 1.5rem 0;
}

code {
  font-family: 'Fira Code', monospace;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  cursor: pointer;
  margin-left: 1rem;
  font-size: 1.2rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: #f8f9fa;
}

tr:hover {
  background-color: #f5f5f5;
}
