/* Main Styles for IFI E-Learning Platform */
:root {
  --primary-color: #2a6d90;
  --secondary-color: #4caf50;
  --accent-color: #f39c12;
  --text-color: #333;
  --light-bg: #f5f5f5;
  --white: #ffffff;
  --shadow: 0 2px 5px rgba(0,0,0,0.1);
  --border-radius: 4px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-bg);
  max-width: 100%;
  overflow-x: hidden;
}

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

header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px;
  margin-right: 15px;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--primary-color);
}

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

nav ul li {
  margin-left: 20px;
}

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

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

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

main {
  padding: 40px 0;
}

.hero {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
  margin-bottom: 40px;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

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

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

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

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

.module-card-header {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 15px;
}

.module-card-body {
  padding: 20px;
}

.module-card h3 {
  margin-bottom: 10px;
}

.module-card p {
  margin-bottom: 15px;
  color: #666;
}

.btn {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-weight: 500;
}

.btn:hover {
  background-color: #3d8b40;
}

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

.btn-primary:hover {
  background-color: #1c5170;
}

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

.btn-accent:hover {
  background-color: #d68910;
}

footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 30px 0;
  text-align: center;
}

/* Module Content Styles */
.module-content {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 30px;
}

.module-content h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--light-bg);
}

.module-content h3 {
  margin: 25px 0 15px;
  color: var(--primary-color);
}

.module-content p {
  margin-bottom: 15px;
}

.module-content ul, .module-content ol {
  margin-bottom: 15px;
  padding-left: 20px;
}

.module-content li {
  margin-bottom: 8px;
}

.module-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--light-bg);
}

/* Assessment Styles */
.assessment {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 30px;
}

.assessment h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
}

.question {
  margin-bottom: 25px;
}

.question p {
  font-weight: 500;
  margin-bottom: 10px;
}

.options {
  margin-bottom: 15px;
}

.option {
  display: block;
  padding: 10px;
  margin-bottom: 10px;
  background-color: var(--light-bg);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.option:hover {
  background-color: #e0e0e0;
}

.option.selected {
  background-color: var(--secondary-color);
  color: var(--white);
}

.feedback {
  padding: 15px;
  margin-top: 10px;
  border-radius: var(--border-radius);
  display: none;
}

.feedback.correct {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.feedback.incorrect {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Case Study Styles */
.case-study {
  background-color: #e8f4f8;
  border-left: 4px solid var(--primary-color);
  padding: 20px;
  margin: 20px 0;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.case-study h4 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* Interactive Elements */
.interactive-element {
  background-color: #f0f8ff;
  border: 1px solid #d1e0e0;
  border-radius: var(--border-radius);
  padding: 20px;
  margin: 20px 0;
}

.drag-drop-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 20px 0;
}

.draggable {
  padding: 10px 15px;
  background-color: #e0e0e0;
  border-radius: var(--border-radius);
  cursor: move;
  user-select: none;
}

.drop-target {
  min-height: 50px;
  border: 2px dashed #ccc;
  border-radius: var(--border-radius);
  padding: 10px;
  margin-bottom: 10px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }
  
  .logo {
    margin-bottom: 15px;
    justify-content: center;
  }
  
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  
  nav ul li {
    margin: 10px 0;
  }
  
  .mobile-menu-btn {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
  }
  
  nav {
    display: none;
  }
  
  nav.active {
    display: block;
  }
  
  .modules-grid {
    grid-template-columns: 1fr;
  }
  
  .module-navigation {
    flex-direction: column;
    gap: 15px;
  }
  
  .module-navigation .btn {
    width: 100%;
    text-align: center;
  }
}

/* Animation Styles */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Progress Indicator */
.progress-container {
  width: 100%;
  background-color: #e0e0e0;
  border-radius: 10px;
  margin: 20px 0;
}

.progress-bar {
  height: 10px;
  background-color: var(--secondary-color);
  border-radius: 10px;
  transition: width 0.3s ease;
}

/* Tooltip Styles */
.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted var(--primary-color);
  cursor: help;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}
