/* Professional FencePro Website Styles */

:root {
  /* Beige-centric palette */
  --primary-color: #d8cbb0; /* soft beige */
  --secondary-color: #b69a76; /* warm tan */
  --accent-color: #8b6b49; /* deeper brown accent */
  --dark-color: #2b2b2b; /* for text and footer */
  --light-color: #f6f3ef; /* page background */
  --gray-color: #bdb3a2; /* neutral gray */
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --border-radius: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--dark-color);
  line-height: 1.6;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.hero {
  background: linear-gradient(
      135deg,
      rgba(44, 62, 80, 0.7) 0%,
      rgba(139, 69, 19, 0.6) 100%
    ),
    url("https://via.placeholder.com/1920x600/228B22/FFFFFF?text=Professional+Fencing+Services")
      no-repeat center center;
  background-size: cover;
  background-attachment: scroll;
  padding: 60px 0;
  min-height: 90vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.5px;
  animation: fadeInDarken 4.5s ease-in forwards;
}

.hero p {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  font-size: 1.15rem;
}

.navbar {
  background: rgba(44, 62, 80, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--accent-color) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.navbar-brand:hover {
  color: #fff !important;
  transform: scale(1.05);
}

.nav-link {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9) !important;
  margin: 0 10px;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-color) !important;
  transform: translateY(-2px);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: var(--transition);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.btn {
  border-radius: var(--border-radius);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: var(--transition);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #a0522d);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #a0522d, var(--primary-color));
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  background: white;
  overflow: hidden;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  opacity: 0;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  opacity: 1;
}

.card-img-top {
  transition: var(--transition);
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 20px;
  margin: 20px 0;
  font-style: italic;
  position: relative;
  background: rgba(218, 165, 32, 0.1);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  padding: 20px 20px 20px 25px;
}

.introduction {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 40px;
  margin: 40px 0;
}

.fencing-types {
  background: linear-gradient(135deg, #f5f3f0, #ede9e3);
  padding: 60px 0;
  position: relative;
  z-index: 2;
}

.fencing-types::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(139,69,19,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(34,139,34,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.testimonials {
  background: linear-gradient(135deg, #3d4d5c, #5a6c7d);
  color: white;
  padding: 60px 0;
  position: relative;
  z-index: 2;
}

.testimonials .blockquote {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: var(--accent-color);
  backdrop-filter: blur(10px);
}

footer {
  background: var(--dark-color);
  color: var(--light-color);
  padding: 40px 0 20px;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color),
    var(--accent-color)
  );
}

/* Form Styles */
.form-control {
  border: 2px solid var(--gray-color);
  border-radius: var(--border-radius);
  padding: 12px 16px;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
  background: white;
}

.form-select {
  border: 2px solid var(--gray-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.9);
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
  background: white;
}

/* Accordion Styles */
.accordion-button {
  background: rgba(139, 69, 19, 0.1);
  border: none;
  font-weight: 600;
  transition: var(--transition);
}

.accordion-button:not(.collapsed) {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow);
}

.accordion-button:focus {
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.25);
}

@keyframes fadeInDarken {
  0% {
    opacity: 0;
    color: #ffffff;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transform: scale(0.85);
  }
  25% {
    opacity: 1;
    color: #ffffff;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
  }
  50% {
    opacity: 1;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transform: scale(1);
  }
  75% {
    opacity: 1;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.65);
    transform: scale(1);
  }
  100% {
    opacity: 1;
    color: rgba(255, 255, 255, 0.65);
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.8);
    transform: scale(1);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .flowchart-container {
    min-height: 500px;
  }

  .flowchart-svg {
    max-width: 100%;
  }
}

@media (max-width: 992px) {
  .hero {
    padding: 60px 0;
    min-height: 70vh;
  }

  .hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .navbar-brand {
    font-size: 1.5rem;
  }

  .card {
    margin-bottom: 1rem;
  }

  .card:hover {
    transform: translateY(-5px);
  }

  .introduction {
    padding: 20px;
    margin: 20px 0;
  }

  .flowchart-container {
    min-height: 400px;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .hero {
    padding: 40px 0;
    min-height: 60vh;
  }

  .hero h1 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
  }

  .hero p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .hero .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .navbar {
    padding: 0.5rem 0;
  }

  .navbar-brand {
    font-size: 1.3rem;
  }

  .nav-link {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.9rem;
    margin: 0 5px !important;
  }

  .navbar .d-flex {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .navbar .btn {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  .introduction {
    padding: 15px;
    margin: 15px 0;
  }

  .introduction p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .introduction h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
  }

  .row.g-4 > div {
    margin-bottom: 1rem;
  }

  .card {
    border-radius: 10px;
    margin-bottom: 1rem;
  }

  .card:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .card-body {
    padding: 1.25rem;
  }

  .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  .card-text {
    font-size: 0.9rem;
  }

  .feature-card {
    min-height: auto !important;
  }

  .fencing-types {
    padding: 30px 0;
  }

  .fencing-types h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }

  .testimonials {
    padding: 30px 0;
  }

  .testimonials h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }

  .blockquote {
    padding: 1rem 1rem 1rem 1.5rem;
    font-size: 0.95rem;
  }

  .faq {
    padding: 30px 0;
  }

  .faq h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }

  .accordion-button {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
  }

  .accordion-body {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .text-center h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .text-center p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .text-center .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    display: inline-block;
    margin: 0.5rem;
  }

  footer {
    padding: 30px 0 15px;
  }

  footer h5 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  footer p {
    font-size: 0.9rem;
  }

  footer .list-unstyled li {
    margin-bottom: 0.8rem;
  }

  footer a {
    font-size: 0.9rem;
  }

  .flowchart-container {
    min-height: 300px;
    margin-bottom: 15px;
    padding: 10px 0;
  }

  .flowchart-svg {
    max-width: 100%;
    height: auto;
  }

  .flow-step-text {
    font-size: 14px;
  }

  .flow-arrow {
    stroke-width: 2;
  }
}

@media (max-width: 576px) {
  * {
    -webkit-tap-highlight-color: transparent;
  }

  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  body {
    font-size: 14px;
    padding: 0;
    margin: 0;
  }

  .container {
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero {
    padding: 50px 15px;
    min-height: 70vh;
    background-attachment: scroll;
    background-size: cover;
    background-position: center;
  }

  .hero h1 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  }

  .hero .display-4 {
    font-size: 1.6rem;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  }

  .hero .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    margin-right: 0.5rem;
    display: inline-block;
    min-width: 140px;
    border-radius: 5px;
  }

  .d-flex.justify-content-center.gap-3.flex-wrap {
    flex-direction: column;
    gap: 1rem !important;
  }

  .d-flex.justify-content-center.gap-3.flex-wrap .btn {
    width: 100%;
  }

  .navbar {
    padding: 0.75rem 0;
  }

  .navbar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    margin-right: auto;
  }

  .navbar-toggler {
    padding: 0.25rem 0.5rem;
    border: none;
  }

  .navbar-toggler:focus {
    box-shadow: none;
    outline: 2px solid rgba(255,255,255,0.5);
  }

  .nav-link {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.9rem;
    margin: 0.2rem 0 !important;
  }

  .navbar .d-flex {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    width: 100%;
  }

  .navbar .btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
    margin: 0 !important;
  }

  .navbar .btn-outline-light {
    border-color: rgba(255,255,255,0.5);
  }

  .introduction {
    padding: 20px 15px;
    margin: 15px 0;
  }

  .introduction p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-family: 'Times New Roman', Times, serif;
  }

  .introduction h4 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
  }

  .row.g-4 {
    gap: 1rem !important;
  }

  .row.g-4 > div {
    margin-bottom: 1rem;
  }

  .col-lg-4, .col-md-6 {
    width: 100% !important;
  }

  .card {
    border-radius: 10px;
    margin-bottom: 1rem;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .card-body {
    padding: 1.25rem;
  }

  .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
  }

  .card-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
  }

  .feature-card {
    min-height: 180px;
  }

  .feature-card .card-body {
    padding: 1.25rem !important;
  }

  .feature-card h3 {
    font-size: 1.05rem !important;
    margin-bottom: 0.75rem !important;
  }

  .feature-card p {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
  }

  .feature-card i {
    font-size: 2.2rem !important;
    margin-bottom: 0.75rem !important;
  }

  .fencing-types,
  .testimonials,
  .faq {
    padding: 30px 0;
  }

  .fencing-types h2,
  .testimonials h2,
  .faq h2 {
    font-size: 1.6rem;
    margin-bottom: 2rem;
    font-weight: 700;
  }

  .blockquote {
    padding: 1rem 1rem 1rem 1.25rem;
    font-size: 0.95rem;
    margin: 1rem 0;
    border-left: 4px solid var(--primary-color);
    background: #f9f9f9;
    border-radius: 5px;
  }

  .accordion-button {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    font-weight: 600;
  }

  .accordion-body {
    padding: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .text-center h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .text-center p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }

  .text-center .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    display: inline-block;
  }

  footer {
    padding: 25px 0 15px;
  }

  footer h5 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 700;
  }

  footer p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }

  footer .list-unstyled li {
    margin-bottom: 0.75rem;
  }

  footer a {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
  }

  footer a:hover {
    color: var(--accent-color);
    text-decoration: underline;
  }

  .flowchart-container {
    min-height: 250px;
    margin-bottom: 20px;
    padding: 10px 0;
  }

  .flowchart-svg {
    width: 100%;
    max-width: 100%;
  }

  .flow-step-text {
    font-size: 12px;
  }

  .flow-arrow {
    stroke-width: 2;
  }

  .btn-group,
  .d-flex.gap-3 {
    flex-direction: column;
    gap: 0.75rem !important;
  }

  .btn-group .btn,
  .d-flex.gap-3 .btn {
    width: 100%;
    margin-bottom: 0;
    padding: 0.75rem 1rem;
  }

  h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
  }

  h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 700;
  }

  h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
  }

  h4 {
    font-size: 1.1rem;
    font-weight: 600;
  }

  .lead {
    font-size: 1rem;
    line-height: 1.6;
  }

  .mb-5 {
    margin-bottom: 1.5rem !important;
  }

  .py-5 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  table {
    font-size: 0.9rem;
    width: 100%;
  }

  table th, table td {
    padding: 0.75rem;
  }

  .list-group-item {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  .card-img-top {
    height: 200px;
    object-fit: cover;
  }

  form {
    margin: 0;
  }

  .form-control, .form-select {
    font-size: 16px;
    padding: 0.75rem;
    border-radius: 5px;
    min-height: 44px;
  }

  .form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(216, 203, 176, 0.25);
  }

  textarea.form-control {
    min-height: 120px;
  }

  .btn {
    min-height: 44px;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .btn:active {
    transform: scale(0.98);
  }
}

@media (max-width: 480px) {
  * {
    -webkit-tap-highlight-color: transparent;
  }

  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  body {
    font-size: 13px;
    padding: 0;
    margin: 0;
  }

  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero {
    padding: 40px 12px;
    min-height: 60vh;
    background-size: cover;
    background-position: center;
  }

  .hero h1 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  }

  .hero p {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  }

  .hero .btn {
    padding: 0.7rem 1.3rem;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    display: inline-block;
    min-width: 120px;
  }

  .navbar {
    padding: 0.5rem 0;
  }

  .navbar-brand {
    font-size: 1.2rem;
    font-weight: 700;
  }

  .navbar-toggler {
    padding: 0.25rem 0.5rem;
  }

  .nav-link {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem !important;
  }

  .navbar .d-flex {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .navbar .btn {
    width: 100%;
    padding: 0.7rem !important;
    font-size: 0.9rem;
  }

  .introduction {
    padding: 15px 12px;
    margin: 10px 0;
  }

  .introduction p {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    font-family: 'Times New Roman', Times, serif;
  }

  .introduction h4 {
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
  }

  .col-lg-4, .col-md-6 {
    width: 100% !important;
  }

  .card {
    margin-bottom: 0.85rem;
    border-radius: 10px;
  }

  .card-body {
    padding: 1rem;
  }

  .card-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
  }

  .card-text {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .feature-card {
    min-height: 160px;
  }

  .feature-card .card-body {
    padding: 1rem !important;
  }

  .feature-card p {
    font-size: 0.9rem !important;
  }

  .feature-card i {
    font-size: 2rem !important;
    margin-bottom: 0.5rem !important;
  }

  .fencing-types h2,
  .testimonials h2,
  .faq h2 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
  }

  .blockquote {
    padding: 0.9rem 0.9rem 0.9rem 1.1rem;
    font-size: 0.9rem;
    margin: 0.8rem 0;
    border-left: 4px solid var(--primary-color);
  }

  .accordion-button {
    font-size: 0.9rem;
    padding: 0.7rem 0.9rem;
    font-weight: 600;
  }

  .accordion-body {
    padding: 0.9rem;
    font-size: 0.9rem;
  }

  footer {
    padding: 20px 0 10px;
  }

  footer h5 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
  }

  footer p {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }

  footer a {
    font-size: 0.85rem;
    color: var(--primary-color);
  }

  .flowchart-container {
    min-height: 220px;
    margin-bottom: 15px;
  }

  .flow-step-text {
    font-size: 11px;
  }

  h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
  }

  h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
  }

  h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
  }

  h4 {
    font-size: 1rem;
    font-weight: 600;
  }

  .lead {
    font-size: 0.95rem;
  }

  .btn {
    padding: 0.7rem 1.2rem !important;
    font-size: 0.9rem;
    min-height: 44px;
  }

  .form-control, .form-select {
    font-size: 16px;
    padding: 0.7rem;
    min-height: 44px;
  }

  textarea.form-control {
    min-height: 110px;
  }

  .card-img-top {
    height: 180px;
    object-fit: cover;
  }

  .table {
    font-size: 0.85rem;
  }
}

/* Extra small phones and landscape support */
@media (max-width: 360px) {
  body {
    font-size: 12px;
  }

  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .hero {
    padding: 35px 10px;
    min-height: 55vh;
  }

  .hero h1 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .hero p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .hero .btn {
    padding: 0.65rem 1.1rem;
    font-size: 0.85rem;
    min-width: 110px;
  }

  .navbar-brand {
    font-size: 1rem;
  }

  .nav-link {
    font-size: 0.85rem;
  }

  h1 {
    font-size: 1.25rem;
  }

  h2 {
    font-size: 1.15rem;
  }

  h3 {
    font-size: 1rem;
  }

  .introduction p {
    font-size: 1rem;
  }

  .card {
    margin-bottom: 0.75rem;
  }

  .feature-card {
    min-height: 150px;
  }

  .feature-card p {
    font-size: 0.85rem !important;
  }

  .feature-card i {
    font-size: 1.8rem !important;
  }
}

/* Landscape mode optimizations */
@media (max-height: 500px) {
  .hero {
    min-height: 100%;
    padding: 20px 0;
  }

  .hero h1 {
    font-size: 1.3rem;
  }

  .hero p {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }

  .flowchart-container {
    min-height: 300px;
  }
}

/* Very small phones */
@media (max-width: 320px) {
  .hero .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .navbar .btn {
    font-size: 0.8rem;
  }
}

/* Loading Animation */
.loading {
  opacity: 0;
  animation: fadeIn 1s ease-out 0.2s forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-color);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a0522d;
}

/* Flowchart styles */
.flowchart-container {
  max-width: 100%;
  margin: 0 auto 40px;
  padding: 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 600px;
}

.flowchart-svg {
  width: 100%;
  height: auto;
  max-width: 1200px;
  overflow: visible;
}

.flowchart svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.flow-step {
  fill: #fff;
  stroke: var(--secondary-color);
  stroke-width: 2;
  rx: 10px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.06));
  transition: var(--transition);
}

.flow-step-text {
  font-family: "Segoe UI", sans-serif;
  font-size: 18px;
  fill: var(--dark-color);
  font-weight: 700;
}

.flow-arrow {
  stroke: var(--accent-color);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
}

.flow-step.active {
  transform-origin: center center;
  animation: stepPop 0.5s ease forwards;
}

@keyframes stepPop {
  0% {
    transform: scale(0.96);
  }
  60% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

.flow-arrow.animate {
  stroke-dashoffset: 0;
  animation: drawLine 0.9s ease forwards;
}

/* small pulse for highlighted step */
.pulse {
  animation: pulse 1.6s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.02);
    opacity: 0.95;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Enhanced form styling for mobile */
.form-control,
.form-select {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  padding: 0.75rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(216, 203, 176, 0.25);
}

.form-control::placeholder {
  color: #999;
  opacity: 0.7;
}

/* Improved contact section spacing */
.contact-info {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.contact-info:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.contact-info h4 {
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.contact-info p {
  margin-bottom: 0;
  font-size: 1rem;
}

.contact-info a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* Responsive contact grid */
@media (max-width: 768px) {
  .contact-info {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
  }

  .contact-info h4 {
    font-size: 1rem;
  }

  .contact-info p {
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  .form-control,
  .form-select {
    font-size: 16px; /* Prevents iOS auto-zoom */
    min-height: 44px;
  }

  textarea.form-control {
    min-height: 120px;
  }

  .contact-info {
    margin-bottom: 1.5rem;
  }

  .contact-info h4 {
    font-size: 0.95rem;
  }

  .contact-info p {
    font-size: 0.9rem;
  }
}

/* Smooth transitions for all interactive elements */
.touch-friendly {
  -webkit-tap-highlight-color: transparent;
}

.btn,
.nav-link,
.form-control,
a {
  -webkit-tap-highlight-color: transparent;
}

/* Prevent font scaling on orientation change */
html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Better spacing for touch areas */
@media (max-width: 768px) {
  .btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn-group .btn {
    width: 100%;
  }

  .d-flex.gap-2 {
    gap: 0.5rem !important;
    flex-direction: column;
  }

  .d-flex.gap-2 > * {
    width: 100%;
  }

  .d-flex.gap-3 {
    gap: 0.75rem !important;
    flex-direction: column;
  }

  .d-flex.gap-3 > * {
    width: 100%;
  }
}

/* Image responsiveness across all screens */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.img-fluid {
  max-width: 100%;
  height: auto;
}

.img-responsive {
  max-width: 100%;
  height: auto;
}

/* Improved table responsiveness */
table {
  width: 100%;
  overflow-x: auto;
}

@media (max-width: 576px) {
  table {
    font-size: 0.85rem;
  }

  th,
  td {
    padding: 0.5rem;
  }
}

/* Touch device support for dropdowns and menus */
@media (hover: none) {
  .dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    margin: 0;
    padding: 0.5rem 0;
    border: none;
    box-shadow: none;
  }

  .dropdown-item {
    padding: 0.75rem 1.5rem;
  }
}

/* Improved accessibility for mobile */
a:focus,
button:focus,
.btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Safe area support for notched devices */
@supports (padding: max(0px)) {
  body {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .navbar {
    padding-left: max(0.5rem, env(safe-area-inset-left));
    padding-right: max(0.5rem, env(safe-area-inset-right));
  }

  footer {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}

/* Touch device improvements */
.touch-friendly {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Improved focus states */
:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Better button states on mobile */
@media (hover: none) {
  .btn:active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
  }

  .btn-primary:active {
    background-color: #9d7a54;
    border-color: #9d7a54;
  }
}
