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

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

body, html {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: #fef4e8;
  color: #222;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Header styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #264653;
  padding: 20px 30px;
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  height: 40px;
  transition: height 0.3s ease;
}

.brand {
  font-size: 1.4rem;
  font-weight: bold;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-menu li {
  position: relative;
}

/* Burger Menu Button Styles */
.burger-menu {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  position: absolute;
  top: 15px;
  right: 20px;
  z-index: 200;
  transition: color 0.3s ease;
}

/* Display Burger Menu Only on Mobile */
@media (max-width: 768px) {
  .burger-menu {
    display: block;
  }

  /* Default - Show Burger Icon */
  .burger-menu .close-icon {
    display: none;
  }

  .burger-menu.active .burger-icon {
    display: none;
  }

  .burger-menu.active .close-icon {
    display: inline-block;
  }
}

/* Change Burger Menu Color on Scroll */
.header.scrolled .burger-menu {
  color: #222 !important; /* Dark color for visibility */
}

.nav-menu a,
.dropbtn {
  color: white;
  font-size: 1rem;
  cursor: pointer;
  padding: 5px;
}

/* Dropdown Content Styles */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: rgba(38, 70, 83, 0.95); /* Slightly translucent dark green */
  min-width: 200px;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  z-index: 5;
  transition: background 0.3s ease;
}

.nav-menu .dropdown-content a {
  color: #ffffff !important; /* Always white text */
  padding: 10px 15px;
  display: block;
  transition: background 0.3s ease;
}

/* Hover Effect for Better Visibility */
.nav-menu .dropdown-content a:hover {
  background-color: rgba(45, 85, 99, 0.8); /* Slightly darker green on hover */
  color: #ffffff;
}

/* Dropdown Text on Scrolled Header - Always White */
.header.scrolled .nav-menu .dropdown-content a {
  color: #ffffff !important;
}

/* Dropdown Background on Scrolled Header */
.header.scrolled .dropdown-content {
  background-color: rgba(38, 70, 83, 0.95); /* Same background for consistency */
}

/* Display on Hover */
.dropdown:hover .dropdown-content,
.dropdown-content:hover {
  display: block;
}


/* Scroll effect */
.header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 10px 30px;
  color: #222;
}

.header.scrolled .nav-menu a,
.header.scrolled .dropbtn {
  color: #222;
}

.header.scrolled .logo {
  height: 30px;
}

/* Hero Section Styles */
.hero {
  background: url("2.jpg") center center/cover no-repeat;
  height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  transition: background-image 0.4s ease;
}

/* Mobile-Specific Image for Hero Section */
@media (max-width: 768px) {
  .hero {
    background-image: url("2.jpg");
    background-size: cover;
    background-position: center;
    height: 60vh; /* Adjust this value if necessary */
  }
}

.overlay {
  background-color: rgba(0,0,0,0.5);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.content {
  z-index: 2;
  padding: 20px;
  max-width: 800px;
}

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

.hero .content p {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Enroll Button Styles */
.enroll-button {
  margin-top: 20px;
  display: inline-block;
  background-color: #fd7e14;
  color: #ffffff;
  padding: 14px 28px; /* Updated Padding */
  border-radius: 6px;
  font-weight: bold;
  font-size: 1.1rem;
  transition: background 0.3s ease, color 0.3s ease;
  text-decoration: none;
  border: 2px solid #fd7e14;
}

.enroll-button:hover {
  background-color: #ffffff;
  color: #fd7e14;
  border: 2px solid #fd7e14;
}

/* Section Styling */
section {
  padding: 40px 20px;
}

.section-box {
  background-color: #dbeffd;
  border-radius: 12px;
  padding: 60px 40px;
  max-width: 1000px;
  margin: 0 auto 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Center the paragraph in the "Why ElectroMinds?" section */
#about.section-box p {
  text-align: center;
  margin: 0 auto;
  max-width: 800px;
}


.section-box h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 30px;
}

.section-box p {
  font-size: 1.3125rem;
}

/* Flex Section for Desktop */
.flex-section {
  display: flex;
  flex-wrap: nowrap; /* Prevent stacking */
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

/* Section Image Styles */
.section-box .image img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Mobile-Specific Image Styles for Section Images */
@media (max-width: 768px) {
  .flex-section .image {
    max-width: 100%;
    width: 100%;
    text-align: center;
  }

  .flex-section .image img {
    width: 100%;
    max-height: 300px; /* Adjust this value if needed */
    object-fit: cover;
  }
}

.flex-section.reverse {
  flex-direction: row-reverse;
}

.flex-section .text {
  flex: 1 1 400px;
}

.flex-section .image {
  flex: 1 1 300px;
  text-align: center;
}

.flex-section .image img {
  max-width: 300px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: block;
}

/* FAQ Section */
.faq-item {
  margin-bottom: 15px;
  border-bottom: 1px solid #ccc;
}

.faq-question {
  background: none;
  border: none;
  width: 100%;
  padding: 16px 0;
  font-size: 1.1rem;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: #222;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background-color: #f5f5f5;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: bold;
  color: #000;
  transition: transform 0.3s ease;
}

.faq-question.open::after {
  content: '−';
}

.faq-answer {
  max-height: none; /* Removes height limit */
  padding: 10px 0 20px 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

.faq-answer.show {
  display: block;
}

/* CTA Section */
.cta {
  background-color: #264653;
  color: white;
  text-align: center;
  padding: 60px 20px;
}

/* CTA Button Styles */
.cta-button {
  background-color: white;
  color: #264653;
  padding: 14px 28px; /* Updated Padding */
  border-radius: 6px;
  font-weight: bold;
  margin-top: 20px;
  display: inline-block;
  transition: background 0.3s ease;
}

.cta-button:hover {
  background-color: #d9e3ea;
}

.email-display {
  margin-top: 15px;
  font-size: 1.2rem;
  color: #ccc;
}

/* Blockquote */
blockquote {
  font-size: 1.2rem;
  font-style: italic;
  margin: 20px 0;
  padding-left: 20px;
  border-left: 4px solid #264653;
  color: #333;
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  background-color: #eaf6ff;
  color: #444;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    flex-direction: column;
    gap: 10px;
  }

  .section-box {
    padding: 40px 20px;
  }

  .flex-section {
    flex-direction: column;
  }

  .flex-section.reverse {
    flex-direction: column;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .content p {
    font-size: 1rem;
  }

  .flex-section .image img {
    max-width: 100%;
  }
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  flex-direction: column;
}

label {
  font-weight: bold;
  margin-bottom: 6px;
  font-size: 1rem;
}

input[type="text"],
input[type="email"],
textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border 0.3s, box-shadow 0.3s;
  background-color: white;
}

input:focus,
textarea:focus {
  border-color: #264653;
  outline: none;
  box-shadow: 0 0 0 3px rgba(38, 70, 83, 0.2);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-button {
  background-color: #264653;
  color: white;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.submit-button:hover {
  background-color: #1e4d5e;
}

/* Smooth Slide Up Animation with Bounce Effect */
.hidden {
  opacity: 0;
  transform: translateY(50px);
  transition: none;
}

.visible {
  opacity: 1;
  transform: translateY(0);
  animation: slideUpBounce 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Keyframe for Slide Up with Bounce Animation */
@keyframes slideUpBounce {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  60% {
    opacity: 1;
    transform: translateY(-10px); /* Slight overshoot for bounce */
  }
  80% {
    transform: translateY(5px); /* Bounce back down slightly */
  }
  100% {
    transform: translateY(0); /* Settle to final position */
  }
}

/* Add spacing below the CTA section */
.cta {
  margin-bottom: 40px; /* Adjust this value for more/less space */
}

/* Responsive Layout for Mobile (Max Width: 768px) */
@media (max-width: 768px) {
  .flex-section {
    flex-direction: row; /* Always row for side-by-side */
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
  }

  /* Only the Build Anything section should stack vertically */
  .flex-section.reverse {
    flex-direction: row-reverse;
  }
}


/* Navigation Menu for Mobile */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: #264653;
    transition: right 0.3s;
    overflow-y: auto; /* Allow scrolling in the menu */
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 150;
  }

  .nav-menu.active {
    right: 0;
  }

  body.nav-open {
    overflow: hidden; /* Lock body scroll only when menu is open */
  }
}



/* Responsive Font Sizes for Mobile (Max Width: 768px) */
@media (max-width: 768px) {
  body {
    font-size: 16px; /* Base font size for mobile */
  }
  
  h1 {
    font-size: 2rem; /* Adjusted heading size */
  }
  
  p {
    font-size: 1rem; /* Smaller paragraph text */
  }
}

/* Responsive Hero Section for Mobile (Max Width: 768px) */
@media (max-width: 768px) {
  .hero {
    height: auto;
    padding: 40px 20px;
    text-align: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .content p {
    font-size: 1rem;
  }
}

/* Burger Menu Button Styles */
.burger-menu {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  position: absolute;
  top: 15px;
  right: 20px;
  z-index: 200;
  transition: color 0.3s ease;
}

/* Display Burger Menu Only on Mobile */
@media (max-width: 768px) {
  .burger-menu {
    display: block;
  }

  /* Default - Show Burger Icon */
  .burger-menu .close-icon {
    display: none;
  }

  .burger-menu.active .burger-icon {
    display: none;
  }

  .burger-menu.active .close-icon {
    display: inline-block;
  }
  

  /* Adjust header style when scrolled */
.header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 10px 30px;
  color: #222;
}

.header.scrolled .nav-menu a,
.header.scrolled .dropbtn {
  color: #222;
}

.header.scrolled .logo {
  height: 30px;
}

  /* Navigation Menu Styles */
  .nav-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: fixed;
    top: 60px; /* Adjust based on your header height */
    right: -100%; /* Hidden off-screen initially */
    width: 80%;
    max-width: 300px;
    background: #264653;
    height: 100vh;
    padding: 20px;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smooth transition */
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 150;
  }

  /* Active - Slide In */
  .nav-menu.active {
    right: 0;
  }
}


/* Flex Section Default (Desktop) */
.flex-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: nowrap;
}

/* Real Electronics Section (Image on Left for Desktop) */
#mission .flex-section {
  flex-direction: row; /* Image left, text right */
}

/* Build Anything Section (Image on Right for Desktop) */
#build .flex-section {
  flex-direction: row-reverse; /* Image right, text left */
}

/* Mobile Layout (Max Width: 768px) */
@media (max-width: 768px) {
  .flex-section {
    flex-direction: column;
  }

  .flex-section.reverse {
    flex-direction: column;
  }

  .flex-section .image {
    order: 0;
    width: 100%;
    max-width: 100%;
    text-align: center;
  }

  .flex-section .text {
    order: 1;
    width: 100%;
  }
}

/* Flex Section Reverse for "Build Anything" Section */
.flex-section.reverse {
  flex-direction: row-reverse;
}

/* Ensure Reverse Layout for Real Electronics Section on Mobile */
@media (max-width: 768px) {
  #mission .flex-section {
    flex-direction: row-reverse;
  }

  #mission .flex-section .image {
    flex: 1 1 40%;
    text-align: center;
  }

  #mission .flex-section .text {
    flex: 1 1 55%;
  }

  #mission .flex-section .image img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
  }
}
/* Specifically Target Real Electronics Section to Reverse */
@media (max-width: 768px) {
  #mission .flex-section {
    flex-direction: row-reverse !important;
  }

  #mission .flex-section .image {
    order: 1 !important;
    flex: 1 1 40% !important;
    text-align: center;
  }

  #mission .flex-section .text {
    order: 0 !important;
    flex: 1 1 55% !important;
  }

  #mission .flex-section .image img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
  }
}

/* Ensure Dropdown Content is Properly Positioned in Mobile Menu */
@media (max-width: 768px) {
  .nav-menu .dropdown {
    position: relative;
  }

  .nav-menu .dropdown-content {
    position: absolute;
    top: 100%; /* Directly below the dropdown button */
    left: 0;
    right: 0;
    display: none;
    background-color: rgba(38, 70, 83, 0.95); /* Slightly translucent dark green */
    padding: 10px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    border-radius: 6px;
  }

  .nav-menu .dropdown-content a {
    display: block;
    padding: 10px 15px;
    color: #ffffff !important;
    text-align: left;
  }

  /* Show dropdown when active */
  .nav-menu .dropdown .dropdown-content.show {
    display: block;
    position: absolute;
  }
}
