/* Reset styles for all elements */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base body styles */
body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  line-height: 1.6;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: left; /* Body text remains left-aligned */
}

/* Calculator container styles */
.calculator {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  text-align: center; /* Center text inside calculator */
}

/* Inline form layout */
.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
}

/* Form group container */
.form-group {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; /* Full width on mobile */
}

/* Input group styling */
.input-group {
  display: flex;
  align-items: center;
  background: #f5f7fa;
  border-radius: 8px;
  padding: 5px;
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.1),
              inset -2px -2px 4px rgba(255, 255, 255, 0.9);
  width: 100%; /* Full width on mobile */
}

/* Input group addon styling */
.input-group-addon {
  padding: 8px 12px;
  background: #e4e9f0;
  border-radius: 6px;
  font-size: 14px;
  color: #555;
}

/* Form control input styling */
.form-control {
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 14px;
  color: #333;
  outline: none;
  width: 100%; /* Full width on mobile */
}

/* Quantity input styling */
.quant {
  width: 100%; /* Full width on mobile */
}

/* Equivalence text styling */
.equiv {
  text-align: center;
  margin: 20px 0;
  font-size: 16px;
  color: #666;
}

/* Badge styling */
.badge {
  background: #007bff;
  color: #fff;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 14px;
}

/* Source form styling */
.source-form {
  margin-top: 20px;
  text-align: center;
}

/* Postamble container styling */
.postamble {
  font-size: 18px;
  color: #444;
  text-align: center; /* Center text inside postamble */
  margin: 20px auto;
  max-width: 600px;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

/* Postamble decorative gradient bar */
.postamble::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #007bff, #00ccff);
  animation: gradientAnimation 5s infinite;
}

/* Gradient animation keyframes */
@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Highlight box styling */
.highlight {
  display: inline-block;
  padding: 5px 10px;
  background: linear-gradient(135deg, #e4e9f0, #f5f7fa);
  border-radius: 6px;
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.1),
              inset -2px -2px 4px rgba(255, 255, 255, 0.9);
  margin: 0 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Highlight hover effect */
.highlight:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Strong text styling */
strong {
  color: #007bff;
  font-weight: bold;
}

/* Country selector container */
.country-selector {
  width: 100%;
  max-width: 300px;
  margin: auto;
  text-align: center; /* Center text inside country selector */
}

/* Custom select dropdown styling */
.custom-select {
  width: 100%;
  padding: 12px 40px 12px 16px;
  font-size: 16px;
  color: #333;
  background-color: #ffffff;
  border: 2px solid #e4e9f0;
  border-radius: 8px;
  appearance: none;
  outline: none;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Custom select hover effect */
.custom-select:hover {
  border-color: #007bff;
}

/* Custom select focus effect */
.custom-select:focus {
  border-color: #007bff;
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.3);
}

/* Dropdown arrow styling */
.arrow {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 14px;
  color: #666;
  transition: color 0.3s ease;
}

/* Arrow hover and focus effects */
.custom-select:hover + .arrow,
.custom-select:focus + .arrow {
  color: #007bff;
}

/* Base button styling */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  margin: 10px auto;
  text-align: center;
}

/* Primary button styling */
.btn-primary {
  background: linear-gradient(45deg, #0a0e11 0%, #030505 100%);
  color: white;
}

/* Primary button ripple effect */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

/* Primary button hover effect */
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.5);
}

/* Primary button hover ripple effect */
.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

/* Header container styling */
.header {
  background: #1a365d; /* Navy blue background */
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  top: 0;
  z-index: 1000;
  width: 100%;
  text-align: left;
}

/* Header row layout */
#header-row {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Space between for left/right alignment */
  max-width: 1200px;
  margin: 0 auto;
}

/* Header link styling */
#header a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

/* Header link hover effect */
#header a:hover {
  color: #f1c40f;
  transform: translateY(-2px);
}

/* Main content container */
.main-content {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  /* Body text remains left-aligned */
}

/* First section styling */
.FIRST{
  text-align: left;
}

/* Main content hover effect */
.main-content:hover {
  transform: translateY(-5px);
}

/* Primary heading styling - using pixel values */
h1 {
  color: #1a365d; /* Dark navy blue */
  font-weight: 700;
  margin-bottom: 1.5rem;
  margin-top: 1.5rem;
  text-align: center;
  letter-spacing: 0.05em;
  font-size: 32px; /* Changed to pixels */
}

/* Secondary heading styling - using pixel values */
h2 {
  color: #1a365d; /* Dark navy blue */
  font-size: 24px; /* Changed to pixels */
  font-weight: 700;
  margin-bottom: 1.2rem;
  margin-top: 1.2rem;
  text-align: center;
  letter-spacing: 0.04em;
}

/* Tertiary heading styling - using pixel values */
h3 {
  color: #1a365d; /* Dark navy blue */
  font-size: 28px; /* Changed to pixels */
  font-weight: 700;
  margin-bottom: 1rem;
  margin-top: 1rem;
  text-align: center;
  letter-spacing: 0.03em;
}

/* Paragraph styling */
p {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  color: #333; /* Darker color for better readability */
  text-align: left;
  line-height: 1.8; /* Improved line height */
}

/* Link styling */
a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Link hover effect */
a:hover {
  color: #2ecc71;
  text-decoration: underline;
}

/* Footer styling */
#footer {
  background: #1a365d; /* Navy blue background */
  color: white;
  padding: 2rem 0;
  margin-top: 2rem;
  width: 100%;
  text-align: center;
}

/* Footer container */
#footer .container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

/* NEW: Featured Image Styling */
.featured-image {
    width: 100%; /* Makes image responsive */
    height: auto; /* Maintains aspect ratio */
    border-radius: 12px; /* Rounded corners to match design */
    margin-bottom: 1.5rem; /* Space between image and title */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Subtle shadow */
    object-fit: cover; /* Ensures image covers the area nicely */
}

/* Section container styling */
.section {
  text-align: left;
  margin-left: 20px;
  margin-right: 20px;
  padding: 20px 0; /* Padding for better spacing */
}

/* Section heading alignment */
.section h1,
.section h2,
.section h3,
.section h4 {
  text-align: left; 
}

/* Section content alignment and spacing */
.section p,
.section ul,
.section li {
  text-align: left;
  margin-bottom: 1rem; /* Consistent spacing */
}

/* Section primary heading size */
.section h1 {
  font-size: 36px; /* Changed to pixels */
}

/* Section secondary heading size - desktop */
.section h2 {
  font-size: 30px; /* Using pixel values */
}

/* Section secondary heading size - mobile */
@media (max-width: 767px) {
  .section h2 {
    font-size: 23px; /* Using pixel values for mobile */
  }
}

/* Bullet list styling */
.section ul {
  margin-left: 20px;
  margin-bottom: 1.5rem;
}

/* List item styling */
.section ul li {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: #333;
}

/* Example section styling */
.section .example {
  text-align: left; 
  margin-left: 0; 
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

/* FAQ section styling */
.section .faq {
  text-align: left; 
  margin-bottom: 2rem;
}

/* FAQ heading styling */
.section .faq h4 {
  text-align: left;
  color: #1a365d;
  font-size: 20px; /* Changed to pixels */
  font-weight: 600;
  margin-bottom: 0.8rem;
}

/* Navigation list styling */
.nav {
  list-style: none;
  display: flex;
  justify-content: flex-end; /* Align to right side */
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0;
  background: #1a365d; /* Navy blue background */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Navigation item styling */
.nav-item {
  position: relative;
}

/* Navigation link styling */
.nav-item a {
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

/* Navigation link hover effect - background */
.nav-item a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.1);
  z-index: -1;
  transition: transform 0.3s ease;
  transform: scaleX(0);
  transform-origin: left;
}

/* Navigation link hover animation */
.nav-item a:hover::before {
  transform: scaleX(1);
}

/* Navigation link hover text color */
.nav-item a:hover {
  color: #f1c40f;
}

/* Responsive design for tablets */
@media (max-width: 991px) {
  .main-content {
    padding: 1rem;
  }
}

/* Responsive design for mobile */
@media (max-width: 767px) {
  /* Header layout for mobile */
  #header-row {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  /* Heading sizes for mobile */
  h1 {
    font-size: 28px; /* Changed to pixels for mobile */
  }
  
  h2 {
    font-size: 25px; /* Changed to pixels for mobile */
  }
  
  h3 {
    font-size: 23px; /* Changed to pixels for mobile */
  }

  /* Navigation layout for mobile */
  .nav {
    gap: 1rem;
    justify-content: center; /* Center nav on mobile */
  }

  /* Form layout for mobile */
  .form-inline {
    flex-direction: column;
  }

  /* Form group width for mobile */
  .form-group {
    width: 100%;
  }

  /* Input group width for mobile */
  .input-group {
    width: 100%;
  }

  /* Quantity input width for mobile */
  .quant {
    width: 100%;
  }

  /* Country selector margin for mobile */
  .country-selector {
    margin-left: 0; /* Remove left margin on mobile */
  }
}
