/* Forest & Ember - Architectural Studio Theme */
/* Primary Color: #2C5F41 (Forest Green) */
/* Secondary Color: #D4A574 (Ember Gold) */

/* ===== ROOT VARIABLES ===== */
:root {
  --primary-color: #2C5F41;
  --primary-dark: #1a3827;
  --primary-light: #3d7a56;
  --secondary-color: #D4A574;
  --secondary-dark: #b8925f;
  --secondary-light: #e6c49a;
  --accent-color: #8B4513;
  --text-dark: #1a1a1a;
  --text-light: #f8f9fa;
  --text-muted: #6c757d;
  --white: #ffffff;
  --black: #000000;
  --bg-light: #f5f5f0;
  --shadow-sm: 0 2px 4px rgba(44, 95, 65, 0.1);
  --shadow-md: 0 4px 12px rgba(44, 95, 65, 0.15);
  --shadow-lg: 0 8px 24px rgba(44, 95, 65, 0.2);
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s ease;
  --transition-slow: all 0.5s ease;
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
  color: var(--text-dark) !important;
  background-color: var(--white);
  overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-color) !important;
  margin-bottom: 1rem;
}

.display-1 { font-size: clamp(3rem, 8vw, 6rem) !important; }
.display-2 { font-size: clamp(2.5rem, 6vw, 5rem) !important; }
.display-3 { font-size: clamp(2rem, 5vw, 4rem) !important; }
.display-4 { font-size: clamp(1.75rem, 4vw, 3rem) !important; }
.display-5 { font-size: clamp(1.5rem, 3vw, 2.5rem) !important; }
.display-6 { font-size: clamp(1.25rem, 2.5vw, 2rem) !important; }

.h4, h4 { font-size: 1.5rem !important; }
.h5, h5 { font-size: 1.25rem !important; }

.lead {
  font-size: 1.25rem !important;
  font-weight: 400;
  color: var(--text-muted) !important;
  line-height: 1.8;
}

.fs-5 {
  font-size: 1.125rem !important;
  line-height: 1.8;
  color: var(--text-muted) !important;
}

.fs-6 {
  font-size: 1rem !important;
}

.small {
  font-size: 0.875rem !important;
  color: var(--text-muted) !important;
}

.text-white, .text-white * {
  color: var(--white) !important;
}

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

.text-muted {
  color: var(--text-muted) !important;
}

.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.fst-italic { font-style: italic !important; }

/* ===== BUTTONS ===== */
.btn {
  padding: 0.625rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  transition: var(--transition-base);
  border: 2px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  line-height: 1.5;
  cursor: pointer;
}

.btn-lg {
  padding: 1rem 2.5rem !important;
  font-size: 1.125rem !important;
  border-radius: 10px;
}

.btn-sm {
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  border-radius: 6px;
}

.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: var(--white) !important;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  color: var(--white) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: var(--white) !important;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
  background-color: var(--secondary-dark) !important;
  border-color: var(--secondary-dark) !important;
  color: var(--white) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: var(--white) !important;
  transform: translateY(-2px);
}

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

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: var(--white) !important;
  transform: translateY(-2px);
}

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

.btn-outline-light:hover,
.btn-outline-light:focus,
.btn-outline-light:active {
  background-color: var(--white) !important;
  border-color: var(--white) !important;
  color: var(--primary-color) !important;
  transform: translateY(-2px);
}

.btn-group {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  background-color: var(--white) !important;
  border: 2px solid var(--primary-color) !important;
  color: var(--primary-color) !important;
  border-radius: 25px;
  transition: var(--transition-base);
  font-weight: 600;
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary-color) !important;
  color: var(--white) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===== NAVIGATION ===== */
.navbar {
  background-color: transparent !important;
  transition: var(--transition-base);
  padding: 1.5rem 0;
  z-index: 1000;
}

.navbar.sticky-top {
  position: sticky;
  top: 0;
}

.navbar.scrolled,
.navbar-dark {
  background-color: rgba(44, 95, 65, 0.98) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  padding: 1rem 0;
}

.navbar-brand {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  color: var(--white) !important;
  text-decoration: none;
  transition: var(--transition-base);
  letter-spacing: -0.5px;
}

.navbar-brand:hover {
  color: var(--secondary-color) !important;
  transform: scale(1.05);
}

.navbar-nav {
  gap: 0.5rem;
}

.nav-link {
  color: var(--white) !important;
  font-weight: 600 !important;
  padding: 0.5rem 1rem !important;
  border-radius: 6px;
  transition: var(--transition-base);
  position: relative;
  text-decoration: none;
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--secondary-color) !important;
  background-color: rgba(212, 165, 116, 0.1) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

.navbar-toggler {
  border: 2px solid var(--white) !important;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(212, 165, 116, 0.25) !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' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ===== HERO SECTION ===== */
.hero-wrapper {
  position: relative !important;
  min-height: 100vh;
  overflow: hidden !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.hero-image {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  z-index: 1;
}

.hero-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(44, 95, 65, 0.85) 0%, rgba(139, 69, 19, 0.7) 100%);
  z-index: 2;
}

.hero-wrapper .position-absolute {
  z-index: 3;
}

.hero-wrapper .text-center {
  text-align: center !important;
  color: var(--white) !important;
  max-width: 900px;
  padding: 2rem;
}

.hero-wrapper .display-2 {
  color: var(--white) !important;
  text-shadow: 2px 4px 12px rgba(0, 0, 0, 0.3);
  margin-bottom: 1.5rem !important;
  animation: fadeInUp 1s ease-out;
}

.hero-wrapper .lead {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 1px 2px 8px rgba(0, 0, 0, 0.2);
  font-size: 1.5rem !important;
  animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-wrapper .d-flex {
  animation: fadeInUp 1s ease-out 0.4s backwards;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--white) !important;
  z-index: 3;
  animation: bounce 2s infinite;
  cursor: pointer;
  text-decoration: none;
}

.scroll-indicator:hover {
  color: var(--secondary-color) !important;
}

.scroll-indicator::after {
  content: '';
  width: 2px;
  height: 30px;
  background: linear-gradient(to bottom, var(--white), transparent);
  border-radius: 2px;
}

/* ===== SECTIONS ===== */
section {
  padding: 5rem 0;
  position: relative;
}

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

.py-0 {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.pt-3 { padding-top: 1.5rem !important; }
.pt-5 { padding-top: 4rem !important; }
.pb-3 { padding-bottom: 1.5rem !important; }
.pb-4 { padding-bottom: 2rem !important; }
.p-3 { padding: 1.5rem !important; }
.p-4 { padding: 2rem !important; }
.p-5 { padding: 3rem !important; }

.mt-2 { margin-top: 0.75rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 0.75rem !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; }
.my-4 { margin-top: 2rem !important; margin-bottom: 2rem !important; }
.my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; }

.ms-auto { margin-left: auto !important; }
.ms-3 { margin-left: 1.5rem !important; }
.ms-4 { margin-left: 2rem !important; }
.me-2 { margin-right: 0.75rem !important; }
.me-3 { margin-right: 1.5rem !important; }
.me-4 { margin-right: 2rem !important; }

.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-3 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.px-4 { padding-left: 2rem !important; padding-right: 2rem !important; }
.px-5 { padding-left: 3rem !important; padding-right: 3rem !important; }
.ps-lg-5 { padding-left: 3rem !important; }
.pe-lg-5 { padding-right: 3rem !important; }

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

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

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

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

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1;
  color: var(--white) !important;
  background-color: var(--secondary-color) !important;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rounded-pill {
  border-radius: 50rem !important;
}

/* ===== CARDS ===== */
.card {
  border: none !important;
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition-base);
  height: 100%;
  background-color: var(--white);
}

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

.card.shadow {
  box-shadow: var(--shadow-md) !important;
}

.card.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.card.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg) !important;
}

.card-body {
  padding: 2rem;
}

.card-body.flex-column {
  display: flex;
  flex-direction: column;
}

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

.card h5,
.card .h5 {
  color: var(--primary-color) !important;
  margin-bottom: 0.75rem;
  font-size: 1.25rem !important;
}

/* ===== IMAGES ===== */
.img-fluid {
  max-width: 100% !important;
  height: auto !important;
  display: block;
}

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

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

.shadow {
  box-shadow: var(--shadow-md) !important;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

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

/* ===== PORTFOLIO MASONRY ===== */
.portfolio-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  height: 350px;
  background-color: var(--primary-color);
}

.portfolio-item.tall {
  grid-row: span 2;
  height: 720px;
}

.portfolio-item.wide {
  grid-column: span 2;
}

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

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(44, 95, 65, 0.95) 100%);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: var(--transition-base);
}

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

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

.portfolio-content {
  color: var(--white) !important;
  transform: translateY(20px);
  transition: var(--transition-base);
}

.portfolio-item:hover .portfolio-content {
  transform: translateY(0);
}

.portfolio-content h4 {
  color: var(--white) !important;
  margin-bottom: 0.5rem;
}

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

/* ===== TIMELINE SECTION ===== */
.timeline-section {
  position: relative;
}

.timeline-section .border-bottom {
  border-bottom: 2px solid var(--secondary-color) !important;
}

.timeline-section .align-items-start {
  display: flex;
  gap: 1.5rem;
}

.timeline-section .flex-shrink-0 {
  flex-shrink: 0;
}

.timeline-section .rounded-circle {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: var(--white) !important;
}

/* ===== ACCORDION ===== */
.accordion {
  border-radius: 12px;
  overflow: hidden;
}

.accordion-item {
  border: 1px solid rgba(44, 95, 65, 0.2) !important;
  margin-bottom: 1rem;
  border-radius: 8px !important;
  overflow: hidden;
}

.accordion-item:last-child {
  margin-bottom: 0;
}

.accordion-header {
  margin: 0;
}

.accordion-button {
  background-color: var(--white) !important;
  color: var(--primary-color) !important;
  font-weight: 600 !important;
  padding: 1.25rem 1.5rem;
  font-size: 1.125rem;
  border: none;
  transition: var(--transition-base);
}

.accordion-button:not(.collapsed) {
  background-color: var(--primary-color) !important;
  color: var(--white) !important;
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(44, 95, 65, 0.25) !important;
  border-color: var(--primary-color) !important;
}

.accordion-button::after {
  filter: brightness(0) saturate(100%) invert(25%) sepia(18%) saturate(1547%) hue-rotate(107deg) brightness(95%) contrast(91%);
}

.accordion-button:not(.collapsed)::after {
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(7500%) hue-rotate(324deg) brightness(104%) contrast(104%);
}

.accordion-collapse {
  border-top: 1px solid rgba(44, 95, 65, 0.2);
}

.accordion-body {
  padding: 1.5rem;
  background-color: var(--white);
  color: var(--text-dark) !important;
  line-height: 1.8;
}

/* ===== FORMS ===== */
.form-label {
  font-weight: 600;
  color: var(--primary-color) !important;
  margin-bottom: 0.5rem;
  display: block;
}

.form-control,
.form-select {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid rgba(44, 95, 65, 0.2);
  border-radius: 8px;
  transition: var(--transition-base);
  background-color: var(--white);
  color: var(--text-dark) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.25rem rgba(44, 95, 65, 0.15) !important;
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-check {
  padding-left: 1.75rem;
  margin-bottom: 0.5rem;
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  border: 2px solid rgba(44, 95, 65, 0.3);
  border-radius: 4px;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(44, 95, 65, 0.15) !important;
  border-color: var(--primary-color) !important;
}

.form-check-label {
  color: var(--text-dark) !important;
  cursor: pointer;
}

.needs-validation .invalid-feedback {
  color: #dc3545 !important;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.needs-validation .was-validated .form-control:invalid {
  border-color: #dc3545 !important;
}

.needs-validation .was-validated .form-control:valid {
  border-color: var(--primary-color) !important;
}

/* ===== PROGRESS BAR ===== */
.progress {
  height: 10px;
  border-radius: 50px;
  background-color: rgba(44, 95, 65, 0.1);
  overflow: hidden;
}

.progress-bar {
  background-color: var(--primary-color) !important;
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-size: 1rem 1rem;
  animation: progress-bar-stripes 1s linear infinite;
  transition: width 0.6s ease;
}

/* ===== ICONS ===== */
.fas,
.fab,
.bi {
  color: var(--primary-color);
}

.fa-2x {
  font-size: 2rem;
}

.fa-lg {
  font-size: 1.5rem;
}

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

.bi-lightning-charge-fill,
.bi-droplet-fill,
.bi-tree-fill,
.bi-recycle,
.bi-award-fill,
.bi-patch-check-fill,
.bi-stars,
.bi-building-check,
.bi-house-fill,
.bi-bricks,
.bi-gear-fill,
.bi-clock-history,
.bi-check-circle-fill,
.bi-geo-alt-fill,
.bi-telephone-fill,
.bi-envelope-fill,
.bi-facebook,
.bi-instagram,
.bi-linkedin,
.bi-chat-dots-fill,
.bi-cash-coin,
.bi-people-fill,
.fa-leaf,
.fa-users,
.fa-history,
.fa-hands-helping,
.fa-map-marker-alt,
.fa-phone,
.fa-envelope,
.fa-linkedin,
.fa-instagram,
.fa-facebook {
  color: var(--primary-color) !important;
}

.text-white .fas,
.text-white .fab,
.text-white .bi,
.bg-primary .fas,
.bg-primary .fab,
.bg-primary .bi {
  color: var(--white) !important;
}

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

/* ===== UTILITIES ===== */
.position-relative {
  position: relative !important;
}

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

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

.top-0 { top: 0 !important; }
.top-50 { top: 50% !important; }
.start-0 { left: 0 !important; }
.start-50 { left: 50% !important; }
.end-0 { right: 0 !important; }
.bottom-0 { bottom: 0 !important; }

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

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

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

.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.flex-grow-1 { flex-grow: 1 !important; }

.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-stretch { align-items: stretch !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }

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

.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-md-start { text-align: left !important; }
.text-md-end { text-align: right !important; }
.text-lg-end { text-align: right !important; }

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

.list-unstyled {
  padding-left: 0 !important;
  list-style: none !important;
}

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

.border-0 { border: none !important; }
.border-top { border-top: 1px solid rgba(44, 95, 65, 0.2) !important; }
.border-bottom { border-bottom: 1px solid rgba(44, 95, 65, 0.2) !important; }
.border-secondary { border-color: var(--secondary-color) !important; }

/* ===== GRID SYSTEM ===== */
.container {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto;
}

.container-fluid {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.75rem;
  margin-left: -0.75rem;
}

.g-0 { --bs-gutter-x: 0; --bs-gutter-y: 0; }
.g-3 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }
.g-4 { --bs-gutter-x: 2rem; --bs-gutter-y: 2rem; }

[class*="col-"] {
  padding-right: calc(var(--bs-gutter-x, 1.5rem) / 2);
  padding-left: calc(var(--bs-gutter-x, 1.5rem) / 2);
  margin-bottom: var(--bs-gutter-y, 0);
}

.col { flex: 1 0 0%; }
.col-12 { flex: 0 0 auto; width: 100%; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@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);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-10px) translateX(-50%);
  }
  60% {
    transform: translateY(-5px) translateX(-50%);
  }
}

@keyframes progress-bar-stripes {
  0% { background-position: 1rem 0; }
  100% { background-position: 0 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

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

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

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

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  .container { max-width: 540px; }
  
  .col-sm-6 { flex: 0 0 auto; width: 50%; }
  
  .flex-sm-row {
    flex-direction: row !important;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .container { max-width: 720px; }
  
  .col-md-3 { flex: 0 0 auto; width: 25%; }
  .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-md-6 { flex: 0 0 auto; width: 50%; }
  .col-md-8 { flex: 0 0 auto; width: 66.666667%; }
  
  .text-md-start { text-align: left !important; }
  .text-md-end { text-align: right !important; }
  
  .mb-md-0 { margin-bottom: 0 !important; }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .container { max-width: 960px; }
  
  .col-lg-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-lg-3 { flex: 0 0 auto; width: 25%; }
  .col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-lg-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-lg-6 { flex: 0 0 auto; width: 50%; }
  .col-lg-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-lg-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-lg-9 { flex: 0 0 auto; width: 75%; }
  .col-lg-10 { flex: 0 0 auto; width: 83.333333%; }
  
  .navbar-expand-lg .navbar-nav {
    flex-direction: row;
  }
  
  .navbar-expand-lg .navbar-collapse {
    display: flex !important;
  }
  
  .navbar-expand-lg .navbar-toggler {
    display: none;
  }
  
  .gap-lg-4 { gap: 2rem !important; }
  
  .mb-lg-0 { margin-bottom: 0 !important; }
  
  .px-lg-5 { padding-left: 3rem !important; padding-right: 3rem !important; }
  .ps-lg-5 { padding-left: 3rem !important; }
  .pe-lg-5 { padding-right: 3rem !important; }
  
  .text-lg-end { text-align: right !important; }
  
  .order-lg-1 { order: 1 !important; }
  .order-lg-2 { order: 2 !important; }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container { max-width: 1140px; }
}

/* XXL devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
  .container { max-width: 1320px; }
}

/* Mobile optimizations */
@media (max-width: 767px) {
  .hero-wrapper .display-2 {
    font-size: 2.5rem !important;
  }
  
  .hero-wrapper .lead {
    font-size: 1.125rem !important;
  }
  
  .btn-lg {
    padding: 0.875rem 2rem !important;
    font-size: 1rem !important;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  .portfolio-masonry {
    grid-template-columns: 1fr;
  }
  
  .portfolio-item.tall,
  .portfolio-item.wide {
    grid-row: span 1;
    grid-column: span 1;
    height: 300px;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .navbar-nav {
    padding: 1rem 0;
    gap: 0.25rem;
  }
  
  .nav-link {
    padding: 0.75rem 1rem !important;
  }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===== SELECTION ===== */
::selection {
  background-color: var(--secondary-color);
  color: var(--white);
}

::-moz-selection {
  background-color: var(--secondary-color);
  color: var(--white);
}

/* ===== FOCUS STYLES ===== */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
  .navbar,
  .scroll-indicator,
  .btn,
  footer {
    display: none !important;
  }
}