:root {
  --primary-gradient: linear-gradient(to right, #4343A4, #4c4cbc);;
  --primary-color: #4343A4;
  --secondary-color: #29ABE2;
  --background-color: #ffffff;
  --light-background: #F9F9FF;
  --accent2: #11262efa;
  --text-color: #333;
  --heading-font: 'Poppins', sans-serif;
  --body-font: 'Poppins', sans-serif;
}

body {
  font-family: var(--body-font);
  color: var(--text-color);
  background-color: var(--background-color);
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
  font-family: var(--heading-font);
  font-weight: 700;
}
h2 { color: var(--primary-color); }

.bg-light-blue { background-color: var(--light-background); }

/* --- LOGO --- */
.navbar-brand img {
  width: 100%;
  max-width: 150px;
}

/* --- Hero Section --- */
.hero-section {
  padding: 100px 0;
  background: var(--accent2);
  position: relative;
  overflow: hidden;
}
.hero-image {
  border-radius: 15px;
  transform: rotate(3deg);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

/* --- Buttons --- */
.btn-primary {
  background: var(--secondary-color);
  border: none;
  padding: 12px 30px;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(41, 171, 226, 0.4);
}
.btn-primary:hover {
  /*transform: translateY(-2px);*/
  /*box-shadow: 0 2px 2px rgba(41, 171, 226, 0.6);*/
}

/* --- Section Shape Divider --- */
.section-with-divider { position: relative; }
.section-with-divider::after { /* Shape divider code remains the same */ }

/* --- Vertical Services Tabs Styling --- */
.services-tabs .nav-pills .nav-link {
  padding: 15px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  background: #ffffff;
  border: 1px solid #eef;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  width: 280px;
}
.services-tabs .nav-pills .nav-link:hover { background: #f0f0ff; }
.services-tabs .nav-pills .nav-link.active {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 10px 20px rgba(67, 67, 164, 0.2);
  border-color: transparent;
}
.tab-pane-content {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.07);
  min-height: 350px;
}

/* --- Testimonials Card --- */
.testimonial-card {
  background: white;
  border: 0;
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.07);
  transition: transform 0.3s, box-shadow 0.3s;
}
.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.testimonial-card img {
  width: 80px;
  height: 80px;
  border: 3px solid var(--secondary-color);
}

/* --- About Us Tabs Styling --- */
.about-tabs .nav-pills .nav-link {
  padding: 10px 25px;
  font-weight: 600;
  color: var(--primary-color);
  background-color: #ffffff;
  border: 2px solid #eef;
  border-radius: 50px;
  margin: 0 5px 10px 5px; /* Add bottom margin for mobile wrapping */
  transition: all 0.3s ease;
}

.about-tabs .nav-pills .nav-link:hover {
  background-color: #f0f0ff;
}

.about-tabs .nav-pills .nav-link.active {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
}

.about-tabs .tab-content .tab-pane-inner {
  background-color: #ffffff;
  border-radius: 15px;
  border: 1px solid #eef;
}

/* --- Article Page Styling --- */
.article-header {
  background-color: var(--light-background);
}

.article-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.article-content p, .article-content li {
  line-height: 1.8;
  color: #555;
}

.article-content ul, .article-content ol {
  padding-left: 1.5rem;
}

.article-content blockquote {
  background-color: var(--light-background);
}

/* --- Sidebar Styling --- */
.sidebar-widget {
  background-color: #ffffff;
  border: 1px solid #eef;
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.05);
}

.sidebar-widget ul li a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.sidebar-widget ul li a:hover {
  color: var(--secondary-color);
}

/* --- Sticky Sidebar on Scroll --- */
@media (min-width: 992px) {
  .sidebar {
    position: sticky;
    /* Adjust this value based on your sticky navbar's height + desired spacing */
    top: 100px;
  }
}

/* --- Responsive Design --- */
@media (max-width: 991px) {
  .hero-section { text-align: center; }
  .services-tabs { flex-direction: column; }
  .services-tabs .nav-pills {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
    margin-right: 0 !important;
    margin-bottom: 1rem;
    width: 100%;
  }
  .services-tabs .nav-pills .nav-link {
    width: auto;
    margin-bottom: 0;
    margin-right: 10px;
    white-space: nowrap;
  }
}

/* --- NEW, MORE EFFECTIVE MOBILE SPACING FIX --- */
@media (max-width: 768px) {
  .hero-section h1.display-4 { font-size: 2.25rem; }

  /* This targets all main sections and reduces their top/bottom padding */
  #about, #services, #testimonials, #contact {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
}

/* --- Form Modern Styles --- */
.bg-gradient-primary {
  background: var(--primary-gradient);
}
.form-modern {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08) !important;
}
.form-modern .card-header {
  position: relative;
}
.form-modern .form-badge {
  width: 36px;
  height: 36px;
  color: #fff;
}
.form-modern .card-body {
  background: #fff;
}
.form-modern .form-control,
.form-modern .form-select {
  border-radius: 12px;
  border-color: #e7e7f3;
}
.form-modern .form-control:focus,
.form-modern .form-select:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 .25rem rgba(41,171,226,.15);
}
.form-modern .form-floating > label {
  color: #888;
}
/* Slightly increase space between floating label and select value */
.form-modern .form-floating > .form-select {
  padding-top: 1.75rem;
}

/* Phone group with country code pill */
.phone-group .code-pill {
  background: #f6f7ff;
  border: 1px solid #e7e7f3;
  border-right: 0;
  min-width: 84px;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}
.phone-group #mobile_code {
  width: 100%;
  max-width: 70px;
  text-align: center;
  font-weight: 600;
  color: var(--primary-color);
}
.phone-group #mobile_code:focus {
  box-shadow: none;
}
.phone-group #mobile_phone {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Error messages */
#error, #errors {
  display: grid;
  gap: .25rem;
}
.error-message {
  background: #fff2f2;
  color: #b42318;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: .5rem .75rem;
  font-size: .9rem;
}

/* Button micro‑interaction */
.form-modern .btn-primary {
  transition: transform .15s ease, box-shadow .3s ease, background-color .2s ease;
}
.form-modern .btn-primary:active {
  transform: translateY(1px);
}

.nowrap {
  white-space: nowrap;
}