/* Mountain Stone & Timber Architecture Studio - Custom Styles */

/* ===== CSS Variables ===== */
:root {
  --primary-color: #2E5266;
  --secondary-color: #8B4513;
  --primary-dark: #1a3340;
  --secondary-dark: #5d2e0d;
  --primary-light: #4a7a95;
  --secondary-light: #a0561a;
  --stone-gray: #6b7280;
  --timber-brown: #9d6b3b;
  --mountain-blue: #3d6d88;
  --snow-white: #f8f9fa;
  --charcoal: #2d3748;
  --transition-base: all 0.3s ease;
  --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Global Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  color: var(--charcoal) !important;
  background-color: var(--snow-white) !important;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6,
.display-3, .display-4, .display-5, .display-6 {
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  color: var(--primary-dark) !important;
  line-height: 1.2 !important;
}

.display-3 {
  font-size: 4.5rem !important;
  font-weight: 800 !important;
}

.display-4 {
  font-size: 3.5rem !important;
}

.display-5 {
  font-size: 2.8rem !important;
}

.display-6 {
  font-size: 2rem !important;
}

.lead {
  font-size: 1.35rem !important;
  font-weight: 400 !important;
  color: var(--stone-gray) !important;
}

.fs-4 {
  font-size: 1.5rem !important;
}

.fs-5 {
  font-size: 1.25rem !important;
}

.text-uppercase {
  letter-spacing: 0.15em !important;
  font-weight: 600 !important;
  color: var(--secondary-color) !important;
}

.text-muted {
  color: var(--stone-gray) !important;
  opacity: 0.85 !important;
}

.text-white {
  color: #ffffff !important;
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* ===== Navigation Bar ===== */
.navbar {
  background: linear-gradient(135deg, rgba(46, 82, 102, 0.98) 0%, rgba(46, 82, 102, 0.95) 100%) !important;
  backdrop-filter: blur(15px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
  z-index: 1030;
}

.navbar.sticky-top {
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.navbar-brand {
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: -0.03em;
  transition: var(--transition-base);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.navbar-brand:hover {
  color: var(--secondary-light) !important;
  transform: translateY(-2px);
}

.navbar-toggler {
  border: 2px solid rgba(255, 255, 255, 0.8) !important;
  padding: 0.5rem 0.75rem !important;
  transition: var(--transition-base);
}

.navbar-toggler:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: #ffffff !important;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.3) !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-nav {
  gap: 1rem !important;
}

.nav-link {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 600 !important;
  font-size: 1.05rem !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: 8px;
  transition: var(--transition-base);
  position: relative;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--secondary-light);
  transition: var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-2px);
}

.nav-link:hover::before,
.nav-link.active::before {
  width: 50%;
}

/* ===== Hero Section ===== */
.hero-section {
  min-height: 100vh !important;
  position: relative !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(46, 82, 102, 0.7) 0%, rgba(139, 69, 19, 0.5) 100%);
  z-index: 1;
}

.hero-section .object-fit-cover {
  object-fit: cover !important;
  filter: brightness(0.7) contrast(1.1);
  animation: slowZoom 30s ease-in-out infinite alternate;
}

@keyframes slowZoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

.hero-section .position-absolute {
  z-index: 2 !important;
}

.hero-section .text-center {
  animation: fadeInUp 1.2s ease-out;
  text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.5);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-section .display-3 {
  color: #ffffff !important;
  margin-bottom: 1.5rem !important;
  animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-section .fs-4 {
  color: rgba(255, 255, 255, 0.95) !important;
  animation: fadeInUp 1s ease-out 0.4s backwards;
  max-width: 800px;
  margin: 0 auto 2rem;
}

/* ===== Buttons ===== */
.btn {
  padding: 0.8rem 2rem !important;
  font-weight: 600 !important;
  font-size: 1.05rem !important;
  border-radius: 10px !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: var(--transition-base) !important;
  border: 2px solid transparent !important;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: transform 0.6s ease;
  z-index: -1;
}

.btn:hover::before {
  transform: translate(-50%, -50%) scale(2.5);
}

.btn-lg {
  padding: 1rem 2.5rem !important;
  font-size: 1.15rem !important;
}

.btn-primary,
.btn.bg-danger {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
  border-color: var(--primary-color) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(46, 82, 102, 0.4);
}

.btn-primary:hover,
.btn.bg-danger:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%) !important;
  border-color: var(--primary-dark) !important;
  color: #ffffff !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(46, 82, 102, 0.5);
}

.btn-secondary,
.btn.bg-secondary {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%) !important;
  border-color: var(--secondary-color) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

.btn-secondary:hover,
.btn.bg-secondary:hover {
  background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary-color) 100%) !important;
  border-color: var(--secondary-dark) !important;
  color: #ffffff !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(139, 69, 19, 0.5);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.9) !important;
  color: #ffffff !important;
  background: transparent !important;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.btn-outline-secondary {
  border-color: var(--secondary-color) !important;
  color: var(--secondary-color) !important;
  background: transparent !important;
}

.btn-outline-secondary:hover {
  background: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: #ffffff !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4);
}

/* ===== Cards ===== */
.card {
  border: none !important;
  border-radius: 16px !important;
  transition: var(--transition-smooth) !important;
  overflow: hidden;
  background: #ffffff !important;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

.card-body {
  padding: 2rem !important;
}

.card-title {
  color: var(--primary-color) !important;
  font-weight: 700 !important;
  font-size: 1.5rem !important;
  margin-bottom: 1rem !important;
}

.card-text {
  color: var(--stone-gray) !important;
  font-size: 1.05rem !important;
  line-height: 1.8 !important;
}

.service-card {
  position: relative;
  padding: 2.5rem !important;
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%) !important;
  border: 1px solid rgba(46, 82, 102, 0.1) !important;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
  transition: height 0.4s ease;
}

.service-card:hover::before {
  height: 100%;
}

.principle-card {
  position: relative;
  min-height: 320px;
  border-radius: 16px !important;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  transition: var(--transition-base);
}

.principle-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
  transition: var(--transition-base);
}

.principle-card:hover::before {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
}

.principle-content {
  position: relative;
  z-index: 2;
  color: #ffffff !important;
}

.principle-content .h4 {
  color: #ffffff !important;
  font-weight: 700 !important;
  margin-bottom: 0.75rem !important;
}

.principle-content p {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* ===== Shadows ===== */
.shadow {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.shadow-sm {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.shadow-lg {
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15) !important;
}

/* ===== Images ===== */
.img-fluid {
  transition: var(--transition-smooth);
}

.img-fluid:hover {
  transform: scale(1.05);
}

.rounded {
  border-radius: 16px !important;
}

.rounded-circle {
  border-radius: 50% !important;
}

/* ===== Backgrounds ===== */
.bg-light {
  background-color: #f8f9fa !important;
}

.bg-white {
  background-color: #ffffff !important;
}

.bg-danger {
  background-color: var(--secondary-color) !important;
}

.bg-secondary {
  background-color: var(--primary-color) !important;
}

/* ===== Sections ===== */
section {
  padding: 6rem 0;
  position: relative;
}

.py-5 {
  padding-top: 4rem !important;
  padding-bottom: 4rem !important;
}

.py-2 {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

.pt-5 {
  padding-top: 4rem !important;
}

.pb-3 {
  padding-top: 2rem !important;
}

.pb-4 {
  padding-bottom: 2.5rem !important;
}

.p-4 {
  padding: 2rem !important;
}

.p-5 {
  padding: 3rem !important;
}

/* ===== Portfolio Grid ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition-base);
  height: 350px;
}

.portfolio-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(46, 82, 102, 0.9) 100%);
  opacity: 0;
  transition: var(--transition-base);
  z-index: 1;
}

.portfolio-item:hover::before {
  opacity: 1;
}

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-base);
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

/* ===== Badges ===== */
.badge {
  padding: 0.5rem 1rem !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  background-color: var(--secondary-color) !important;
  color: #ffffff !important;
}

/* ===== Filter Buttons ===== */
.btn-group {
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: #ffffff !important;
  color: var(--primary-color) !important;
  border: 2px solid var(--primary-color) !important;
  padding: 0.6rem 1.5rem !important;
  font-weight: 600 !important;
  transition: var(--transition-base) !important;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-color) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(46, 82, 102, 0.3);
}

/* ===== Forms ===== */
.form-label {
  font-weight: 600 !important;
  color: var(--primary-dark) !important;
  margin-bottom: 0.6rem !important;
  font-size: 1.05rem !important;
}

.form-control,
.form-select {
  padding: 0.85rem 1.2rem !important;
  border: 2px solid rgba(46, 82, 102, 0.2) !important;
  border-radius: 10px !important;
  font-size: 1.05rem !important;
  transition: var(--transition-base) !important;
  background-color: #ffffff !important;
  color: var(--charcoal) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.25rem rgba(46, 82, 102, 0.15) !important;
  background-color: #ffffff !important;
  color: var(--charcoal) !important;
}

.form-control::placeholder {
  color: var(--stone-gray) !important;
  opacity: 0.6 !important;
}

/* ===== Alerts ===== */
.alert {
  border-radius: 12px !important;
  border: none !important;
  padding: 1.5rem 2rem !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1) !important;
}

.alert-heading {
  font-weight: 700 !important;
  color: var(--primary-color) !important;
}

/* ===== Accordion ===== */
.accordion-item {
  border: 1px solid rgba(46, 82, 102, 0.15) !important;
  border-radius: 12px !important;
  margin-bottom: 1rem !important;
  overflow: hidden;
}

.accordion-button {
  background-color: #f8f9fa !important;
  color: var(--primary-dark) !important;
  font-weight: 600 !important;
  font-size: 1.15rem !important;
  padding: 1.25rem 1.5rem !important;
  transition: var(--transition-base) !important;
}

.accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(46, 82, 102, 0.15) !important;
  border-color: var(--primary-color) !important;
}

.accordion-button::after {
  filter: brightness(0) invert(0);
}

.accordion-button:not(.collapsed)::after {
  filter: brightness(0) invert(1);
}

.accordion-body {
  padding: 1.5rem !important;
  color: var(--stone-gray) !important;
  line-height: 1.8 !important;
  background-color: #ffffff !important;
}

.accordion-collapse.show {
  border-top: 2px solid var(--primary-color) !important;
}

/* ===== Lists ===== */
.list-unstyled {
  padding-left: 0 !important;
  list-style: none !important;
}

.list-unstyled li {
  padding: 0.5rem 0 !important;
  transition: var(--transition-base);
}

.list-unstyled a {
  color: var(--stone-gray) !important;
  text-decoration: none !important;
  transition: var(--transition-base) !important;
  display: inline-block;
}

.list-unstyled a:hover {
  color: var(--primary-color) !important;
  transform: translateX(5px);
}

/* ===== Icons ===== */
.bi {
  font-size: 1.5rem;
  transition: var(--transition-base);
}

.bi-geo-alt,
.bi-geo-alt-fill,
.bi-telephone,
.bi-telephone-fill,
.bi-envelope,
.bi-envelope-fill {
  color: var(--primary-color) !important;
}

.rounded-circle.d-inline-flex {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 20px rgba(46, 82, 102, 0.25);
  transition: var(--transition-base);
}

.rounded-circle.d-inline-flex:hover {
  transform: translateY(-5px) rotate(10deg);
  box-shadow: 0 12px 30px rgba(46, 82, 102, 0.35);
}

.rounded-circle.d-inline-flex .bi {
  font-size: 2rem;
  color: #ffffff !important;
}

/* ===== Utilities ===== */
.opacity-25 {
  opacity: 0.25 !important;
}

.opacity-75 {
  opacity: 0.75 !important;
}

.opacity-90 {
  opacity: 0.9 !important;
}

.overflow-hidden {
  overflow: hidden !important;
}

.position-relative {
  position: relative !important;
}

.position-absolute {
  position: absolute !important;
}

.sticky-top {
  position: sticky !important;
  top: 0 !important;
  z-index: 1020 !important;
}

.vh-100 {
  height: 100vh !important;
}

.w-100 {
  width: 100% !important;
}

.h-100 {
  height: 100% !important;
}

.top-0 {
  top: 0 !important;
}

.start-0 {
  left: 0 !important;
}

.end-0 {
  right: 0 !important;
}

.bottom-0 {
  bottom: 0 !important;
}

.top-50 {
  top: 50% !important;
}

.start-50 {
  left: 50% !important;
}

.translate-middle {
  transform: translate(-50%, -50%) !important;
}

.translate-middle-x {
  transform: translateX(-50%) !important;
}

.object-fit-cover {
  object-fit: cover !important;
}

.text-center {
  text-align: center !important;
}

.text-decoration-none {
  text-decoration: none !important;
}

.fw-bold {
  font-weight: 700 !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

.border-0 {
  border: 0 !important;
}

.border-light {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.border-top {
  border-top: 1px solid rgba(46, 82, 102, 0.15) !important;
}

/* ===== Spacing ===== */
.m-3 {
  margin: 1.5rem !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-1 {
  margin-bottom: 0.5rem !important;
}

.mb-2 {
  margin-bottom: 1rem !important;
}

.mb-3 {
  margin-bottom: 1.5rem !important;
}

.mb-4 {
  margin-bottom: 2rem !important;
}

.mb-5 {
  margin-bottom: 3rem !important;
}

.mb-lg-0 {
  margin-bottom: 0 !important;
}

.mb-md-0 {
  margin-bottom: 0 !important;
}

.mt-3 {
  margin-top: 1.5rem !important;
}

.mt-4 {
  margin-top: 2rem !important;
}

.mt-5 {
  margin-top: 3rem !important;
}

.mt-lg-0 {
  margin-top: 0 !important;
}

.my-4 {
  margin-top: 2rem !important;
  margin-bottom: 2rem !important;
}

.ms-auto {
  margin-left: auto !important;
}

.me-3 {
  margin-right: 1.5rem !important;
}

.mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}

.px-0 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.px-4 {
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

.px-5 {
  padding-left: 3rem !important;
  padding-right: 3rem !important;
}

.pe-lg-5 {
  padding-right: 3rem !important;
}

.ps-lg-5 {
  padding-left: 3rem !important;
}

/* ===== Grid & Layout ===== */
.d-flex {
  display: flex !important;
}

.d-inline-flex {
  display: inline-flex !important;
}

.gap-2 {
  gap: 1rem !important;
}

.gap-3 {
  gap: 1.5rem !important;
}

.gap-4 {
  gap: 2rem !important;
}

.align-items-center {
  align-items: center !important;
}

.align-items-start {
  align-items: flex-start !important;
}

.align-items-end {
  align-items: flex-end !important;
}

.justify-content-center {
  justify-content: center !important;
}

.justify-content-end {
  justify-content: flex-end !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.g-0 {
  --bs-gutter-x: 0 !important;
  --bs-gutter-y: 0 !important;
}

.g-3 {
  --bs-gutter-x: 1.5rem !important;
  --bs-gutter-y: 1.5rem !important;
}

.g-4 {
  --bs-gutter-x: 2rem !important;
  --bs-gutter-y: 2rem !important;
}

/* ===== Responsive Design ===== */
@media (max-width: 1199.98px) {
  .display-3 {
    font-size: 3.5rem !important;
  }
  
  .display-4 {
    font-size: 2.8rem !important;
  }
  
  .display-5 {
    font-size: 2.2rem !important;
  }
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(46, 82, 102, 0.98);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  }
  
  .navbar-nav {
    gap: 0.5rem !important;
  }
  
  .nav-link {
    padding: 0.8rem 1rem !important;
  }
  
  .display-3 {
    font-size: 2.8rem !important;
  }
  
  .display-4 {
    font-size: 2.2rem !important;
  }
  
  .display-5 {
    font-size: 1.8rem !important;
  }
  
  .fs-4 {
    font-size: 1.25rem !important;
  }
  
  .fs-5 {
    font-size: 1.1rem !important;
  }
  
  .btn-lg {
    padding: 0.85rem 2rem !important;
    font-size: 1rem !important;
  }
  
  section {
    padding: 4rem 0;
  }
  
  .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  .portfolio-item {
    height: 280px;
  }
  
  .principle-card {
    min-height: 280px;
  }
  
  .flex-lg-row-reverse {
    flex-direction: column-reverse !important;
  }
  
  .order-lg-1 {
    order: 1 !important;
  }
  
  .order-lg-2 {
    order: 2 !important;
  }
  
  .text-lg-end {
    text-align: left !important;
  }
  
  .pe-lg-5 {
    padding-right: 1rem !important;
  }
  
  .ps-lg-5 {
    padding-left: 1rem !important;
  }
}

@media (max-width: 767.98px) {
  .display-3 {
    font-size: 2.2rem !important;
  }
  
  .display-4 {
    font-size: 1.8rem !important;
  }
  
  .display-5 {
    font-size: 1.5rem !important;
  }
  
  .display-6 {
    font-size: 1.3rem !important;
  }
  
  .lead {
    font-size: 1.15rem !important;
  }
  
  .fs-4 {
    font-size: 1.15rem !important;
  }
  
  .fs-5 {
    font-size: 1rem !important;
  }
  
  .btn {
    padding: 0.7rem 1.5rem !important;
    font-size: 0.95rem !important;
  }
  
  .btn-lg {
    padding: 0.8rem 1.8rem !important;
    font-size: 1rem !important;
  }
  
  .navbar-brand {
    font-size: 1.5rem !important;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .py-5 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  
  .card-body {
    padding: 1.5rem !important;
  }
  
  .p-4 {
    padding: 1.5rem !important;
  }
  
  .p-5 {
    padding: 2rem !important;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  .portfolio-item {
    height: 250px;
  }
  
  .principle-card {
    min-height: 250px;
  }
  
  .text-md-start {
    text-align: center !important;
  }
  
  .text-md-end {
    text-align: center !important;
  }
  
  .col-md-4,
  .col-md-6 {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .display-3 {
    font-size: 1.8rem !important;
  }
  
  .display-4 {
    font-size: 1.5rem !important;
  }
  
  .display-5 {
    font-size: 1.3rem !important;
  }
  
  .px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .px-5 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
  
  .hero-section .d-flex {
    flex-direction: column !important;
  }
  
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  
  .filter-btn {
    width: 100%;
  }
  
  .rounded-circle.d-inline-flex {
    width: 60px;
    height: 60px;
  }
  
  .rounded-circle.d-inline-flex .bi {
    font-size: 1.5rem;
  }
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out;
}

.animate-slide-left {
  animation: slideInLeft 0.8s ease-out;
}

.animate-slide-right {
  animation: slideInRight 0.8s ease-out;
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-dark), var(--secondary-dark));
}

/* ===== Selection ===== */
::selection {
  background-color: var(--primary-color);
  color: #ffffff;
}

::-moz-selection {
  background-color: var(--primary-color);
  color: #ffffff;
}

/* ===== Loading States ===== */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid rgba(46, 82, 102, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ===== Print Styles ===== */
@media print {
  .navbar,
  .btn,
  .filter-btn,
  .navbar-toggler {
    display: none !important;
  }
  
  body {
    background: #ffffff !important;
  }
  
  .hero-section {
    height: auto !important;
    min-height: 0 !important;
  }
}