/* Main stylesheet for Business Information Systems website */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  --text-color: #333;
  --text-light: #fff;
  --font-main: 'Open Sans', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-color);
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
header {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-light);
}

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

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

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

nav ul li a {
  color: var(--text-light);
  font-weight: 500;
}

nav ul li a:hover {
  color: var(--secondary-color);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero section */
.hero {
  background-color: var(--secondary-color);
  color: var(--text-light);
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

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

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  transition: var(--transition);
}

.btn:hover {
  background-color: var(--dark-color);
  color: var(--text-light);
  transform: translateY(-2px);
}

/* Topic cards */
.topics {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.card-img {
  height: 200px;
  overflow: hidden;
}

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

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

.card-content {
  padding: 1.5rem;
}

.card-content h3 {
  margin-bottom: 0.5rem;
}

/* Content section */
.content-section {
  padding: 4rem 0;
  background-color: #fff;
}

.content-container {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 2rem;
}

.sidebar {
  background-color: var(--light-color);
  padding: 1.5rem;
  border-radius: 8px;
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar ul {
  list-style: none;
}

.sidebar ul li {
  margin-bottom: 0.5rem;
}

.sidebar ul li a {
  display: block;
  padding: 0.5rem;
  border-radius: 4px;
  transition: var(--transition);
}

.sidebar ul li a:hover, .sidebar ul li a.active {
  background-color: var(--secondary-color);
  color: var(--text-light);
}

.main-content {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.main-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 4px;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 3rem 0;
}

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

.footer-section h3 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

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

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--light-color);
}

.footer-section ul li a:hover {
  color: var(--secondary-color);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive styles */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  nav {
    width: 100%;
    margin-top: 1rem;
  }
  
  nav ul {
    flex-direction: column;
  }
  
  nav ul li {
    margin: 0;
    margin-bottom: 0.5rem;
  }
  
  .mobile-menu-btn {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }
  
  .nav-menu {
    display: none;
  }
  
  .nav-menu.active {
    display: block;
  }
  
  .content-container {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
    margin-bottom: 2rem;
  }
}

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

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
