/* Reset default margins and paddings */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  font-size: 16px;
  background-color: #dcdcdc; /* neutral grey background */
  color: #333; /* neutral grey text */
  min-height: 100vh;
  display: grid;
  grid-template-areas:
    "header"
    "main"
    "footer";
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 1fr;
  margin: 0;
  padding-top: 70px; 
  padding-bottom: 45px;
}

.container {
  display: grid;
  grid-template-areas:
    "header"
    "main"
    "footer";
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

/* Header styling */
header {
  grid-area: header;
  background-color: #1e4da1; /* deep blue */
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
   position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999; 
}

.logo{
    height: 50px;
}

header h1 {
  font-size: 1.8rem;
  font-weight: bold;
  margin-right: 20px;
}

/* Navigation menu */
nav[aria-label="Primary"] ul.menu {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.menu > li {
  position: relative;
}

.menu a {
  display: block;
  padding: 0.6rem 0.9rem;
  text-decoration: none;
  color: white;
  font-weight: bold;
  border-radius: 0.4rem;
  transition: background-color 0.3s ease;
}

.menu a:hover,
.menu a:focus {
  text-decoration: underline;
  background-color: #ffffffcc; /* white with some transparency */
  color: #1e4da1; /* deep blue text on hover */
  outline: none;
}

/* Sub-menu styles */
.sub-menu {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 12rem;
  background: white;
  border: 1px solid #ccc;
  padding: 0.5rem 0;
  display: none;
  z-index: 1000;
}

.menu > li.has-sub:hover > .sub-menu,
.menu > li.has-sub:focus-within > .sub-menu {
  display: block;
}

.sub-menu li a {
  padding: 0.5rem 0.9rem;
  white-space: nowrap;
  color: #1e4da1;
  font-weight: normal;
}

.sub-menu li a:hover,
.sub-menu li a:focus {
  background-color: #1e4da1;
  color: white;
  text-decoration: none;
}

/*Lohan Home page*/
#mainhome {
  grid-area: main;
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;

}

/* Section spacing */
.homesection {
  margin-bottom: 3rem;
}

#mainhome h2 {
  color: #1e4da1;
  margin-bottom: 1rem;
}

#mainhome p {
  margin-bottom: 1rem;
  line-height: 1.5;
}

#mainhome ul {
  list-style-type: disc;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
}

#mainhome ul li {
  margin-bottom: 0.5rem;
}

/* Links inside main */
#mainhome a {
  color: #1e4da1;
  text-decoration: none;
  font-weight: bold;
}

#mainhome a:hover,
#mainhome a:focus {
  text-decoration: underline;
  outline: none;
}

/* Layout for sections with text and image side by side */
.content-with-image {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

/* Reverse order for variety */
.content-with-image.reverse{
  flex-direction: row-reverse;
}

/* Text container */
.content-with-image .text {
  flex: 1;
  font-size: 1rem;
  color: #333;
  line-height: 1.6;
}

/* Image container */
.content-with-image .image-placeholder img {
  max-width: 300px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

/*Lohan lesson page*/

.lessonPre {
  background-color: #f4f4f4;
  padding: 1rem;
  border-radius: 5px;
  overflow-x: auto;
  font-family: Consolas, monospace;
  font-size: 16px;
  color: #333;
  margin-bottom: 1rem;
}

#mainlesson {
  grid-area: main;
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
}

#mainlesson h2 {
  color: #1e4da1;
  margin-bottom: 1rem;
}

#mainlesson p, #mainlesson ul {
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Dropdown styling */
#lesson-select {
  display: block;
  width: 220px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-bottom: 2rem;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

/*Lee contact page*/

#maincontact h2 {
  color: #1e4da1;
  margin-bottom: 1rem;
}

#maincontact p {
  margin-bottom: 1rem;
  line-height: 1.5;
}

#maincontact {
  grid-area: main;
  padding: 30px;
  width: 1000px; 
  margin: 0 auto;
  background-color: white;
  border-radius: 0.4rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Form styling */
#maincontact form {
  width: 100%;
  max-width: 750px; 
  margin: 0 auto;
}

#maincontact fieldset {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 20px;
  width: 100%;
  background-color: #fafafa;
}

#maincontact legend {
  font-weight: bold;
  font-size: 1.4rem;
  padding: 0 10px;
  color: #1e4da1;
}

#maincontact label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #333;
}

#maincontact input[type="text"],
#maincontact input[type="email"],
#maincontact input[type="tel"],
#maincontact textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 38px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: Arial, sans-serif;
  resize: vertical;
  min-height: 40px;
}

#maincontact textarea {
  min-height: 100px;
}

#maincontact p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 20px;
}

/* Buttons */
#maincontact button{
  background-color: #1e4da1;
  color: white;
  border: none;
  padding: 12px 25px;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  margin-right: 10px;
  transition: background-color 0.3s ease;
}

#maincontact button:hover,
#maincontact button:focus {
  background-color: #163a7a;
  outline-style: solid;
  outline-color: black;
  outline-width: 2px;
}

#maincontact .reset-btn {
  background-color: #777;
}

#maincontact button.reset-btn:hover,
#maincontact button.reset-btn:focus {
  background-color: #555;
}

/*masego resourses*/
/*Reuseable colour scheme*/
:root{
  --background-main:lightgrey ;
  --main-link-color:#ccc;

}

/* Implemeted smooth scroll */
html{
  scroll-behavior: smooth;
}

body{
  background-color: var(--background-main); 
  margin: 0;
  
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

/*hero section*/
#hero{
  height: 60vh;
  display: flex;
  align-items: center;
}

.hero-content{
  display: flex;
  align-items: center;  
  gap: 40px;            
  max-width: 1200px;   
  margin: 0 auto;       
  padding: 20px;
  flex-direction: row-reverse;
}

.hero-content img{
  width: 300px;
  height: auto;
}

.hero-text{
max-width: 500px;
}

.hero-text h2{
  margin-bottom: 10px;
  font-size: 2rem;
}

.hero-text p{
  margin-bottom: 20px;
  line-height: 1.5;
}

.btn{
  display:inline-block;
  padding: 10px 20px;
  border: 2px solid blue;
  border-radius: 5px;
  margin-left: -30;
 text-decoration: none;

}

.btn:hover{
  background-color: #011b4a;
  color:white
}

/*Resources*/
#resources{
  min-height: 80vh;
  display: flex;
  align-items: center; 
  justify-content: space-between; 
  padding: 60px 10%; 
}

/*STUDY MATERIAL - RESOURCES PAGE*/
#study-material {
 display: flex; 
 flex-direction: column;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 50px;
  text-align: center;
}

.study-text h2{
  margin-bottom:10px;
  font-size: 2rem;
  max-width: 600px; 
  margin: 0 auto;    
  text-align: center;
  padding: 20px;
}

.study-text p{
  margin-bottom: 20px;
  line-height: 1.0;
  text-align: center;
}

.card-container{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  text-align: center;
  flex-direction: row;

}
.card-container article {
  margin: 50px;
  text-align: center;
  flex-direction: row;
  width: 250px;             
  height: 350px;
  background-color: #c8c8c8;
  border-radius: 10px;
}
  
.card-container img{
  max-width: 70%;
  max-height: 80%;
  border-radius:5px;
}

.card-container h3{
  font-size: 1.5rem;
  margin: 10px;

}

.card-container a{
  display: inline-block;
  padding: 10px 20px;
  background-color: #1e4da1;
  color: white;
  border-radius: 5px;
  margin-top: 10px;
}

.card-container a:hover {
  background-color: #0056b3;
}

/*Online Resources - RESOURCES PAGE*/
#online-resources{
text-align: center;
}

.resource-text h2{
  margin-bottom:10px;
  font-size: 2rem;
  max-width: 600px; 
  margin: 0 auto;    
  text-align: center;
  padding: 20px;

}

.resource-text p{
  margin-bottom: 20px;
  line-height: 1.5;
  text-align: center;
}

/*VIDEO - RESOURCES PAGE*/
.video-container { 
  display: flex; 
  flex-direction: row; 
  align-items: center; 
  gap: 60px; 
  margin: 20px; 
  justify-content: center; 
}

.video-text h2{
  margin-bottom:10px;
  font-size: 2rem;
  max-width: 600px; 
  margin: 0 auto;    
  text-align: center;
  padding: 20px;
}

.video-text p{
  margin-bottom: 20px;
  line-height: 1.5;
  text-align: center;
}

/*masego Quizzes*/
.hero-gif-page .hero-content img {
  width: 300px;           
  height: auto;
  border-radius: 50% / 20%; 
  border: #ccc; 
  box-shadow: 0 10px 20px rgba(0,0,0,0.3); 
}

#quiz-questions{
  min-height: 35vh;
  display: flex;
  align-items: center; 
  justify-content: center; 
  padding: 60px 10%; 
}

.quiz-text {
  margin-bottom:10px;
  font-size: 2rem;
  max-width: 600px; 
  margin: 0 auto;    
  text-align: center;
  padding: 20px;

}

/*break section*/
#break{
  height: 50vh;
  display: flex;
  align-items: center;

}

.break-content{
  display: flex;
  align-items: center;  
  gap: 40px;            
  max-width: 1200px;   
  margin: 0 auto;       
  padding: 20px;
  
}

.break-content img{
  width: 300px;           
  height: auto;
  border-radius: 50% / 20%; 
  border: #ccc; 
  box-shadow: 0 10px 20px rgba(0,0,0,0.3); 
}

.break-text{
max-width: 500px;
}

.break-text h2{
  margin-bottom: 10px;
  font-size: 2rem;
}

.break-text p{
  margin-bottom: 20px;
  line-height: 1.5;
}

#quiz-results{
  min-height: 35vh;
  display: flex;
  align-items: center; 
  justify-content: center; 
  padding: 60px 10%; 
}

/* Footer styling */
footer {
  grid-area: footer;
  background-color: #1e4da1;
  color: white;
  text-align: center;
  padding: 10px 20px;
  font-weight: bold;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}
