/* Forest Canvas - Architectural Studio Theme */

:root {
  --primary-color: #2C5530;
  --secondary-color: #E8F4EA;
  --text-dark: #1a1a1a;
  --text-light: #ffffff;
  --accent-green: #4a7c4e;
  --soft-white: #f8f9fa;
  --shadow: rgba(44, 85, 48, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  background-color: #ffffff;
}

/* Typography */
h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary-color);
}

.lead, .fs-3, .fs-4, .fs-5 {
  color: var(--text-dark);
}

/* Navbar Styling */
.navbar {
  background: rgba(44, 85, 48, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px var(--shadow);
  transition: all 0.3s ease;
  padding: 1rem 0;
}

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

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

.navbar-brand {
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em;
  color: var(--text-light) !important;
  transition: transform 0.3s ease;
}

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

.navbar-toggler {
  border: 2px solid var(--secondary-color) !important;
  padding: 0.5rem 0.75rem;
  transition: all 0.3s ease;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(232, 244, 234, 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='%23E8F4EA' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.nav-link {
  color: var(--secondary-color) !important;
  font-weight: 500 !important;
  padding: 0.5rem 1rem !important;
  position: relative;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-light) !important;
  background-color: rgba(232, 244, 234, 0.1) !important;
  border-radius: 0.5rem;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--secondary-color);
  border-radius: 2px;
}

/* Carousel Styling */
.carousel {
  height: 100vh;
  min-height: 600px;
  position: relative;
}

.carousel-inner,
.carousel-item {
  height: 100%;
}

.carousel-item {
  position: relative;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-green) 100%);
}

.carousel-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.carousel-item img {
  object-fit: cover;
  filter: brightness(0.7);
}

.carousel-caption {
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  bottom: auto;
  text-align: center;
  padding: 2rem;
}

.carousel-caption .display-2,
.carousel-caption .display-3 {
  color: var(--text-light) !important;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.8s ease;
  font-weight: 800;
}

.carousel-caption .lead,
.carousel-caption .fs-3,
.carousel-caption .fs-4 {
  color: var(--secondary-color) !important;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease 0.2s both;
  font-weight: 400;
}

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

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--secondary-color) !important;
  opacity: 0.5;
  transition: all 0.3s ease;
  border: 2px solid transparent !important;
}

.carousel-indicators button.active {
  opacity: 1;
  transform: scale(1.2);
  border: 2px solid var(--text-light) !important;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 3rem;
  height: 3rem;
  background-color: rgba(44, 85, 48, 0.7);
  border-radius: 50%;
  transition: all 0.3s ease;
  padding: 0.5rem;
}

.carousel-control-prev-icon:hover,
.carousel-control-next-icon:hover {
  background-color: var(--primary-color);
  transform: scale(1.1);
}

/* Buttons */
.btn {
  font-weight: 600 !important;
  letter-spacing: 0.5px;
  transition: all 0.3s ease !important;
  border-radius: 0.5rem !important;
  text-transform: uppercase;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

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

.btn:hover::before {
  width: 300px;
  height: 300px;
}

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

.btn-primary {
  background-color: var(--primary-color) !important;
  border: 2px solid var(--primary-color) !important;
  color: var(--text-light) !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--accent-green) !important;
  border-color: var(--accent-green) !important;
  color: var(--text-light) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--shadow) !important;
}

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

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

.btn-outline-success {
  border: 2px solid var(--accent-green) !important;
  color: var(--accent-green) !important;
  background-color: transparent !important;
}

.btn-outline-success:hover {
  background-color: var(--accent-green) !important;
  color: var(--text-light) !important;
}

.btn-light {
  background-color: var(--secondary-color) !important;
  border: 2px solid var(--secondary-color) !important;
  color: var(--primary-color) !important;
}

.btn-light:hover {
  background-color: var(--text-light) !important;
  color: var(--primary-color) !important;
}

.btn-outline-light {
  border: 2px solid var(--text-light) !important;
  color: var(--text-light) !important;
}

.btn-outline-light:hover {
  background-color: var(--text-light) !important;
  color: var(--primary-color) !important;
}

.btn-sm {
  padding: 0.5rem 1.25rem !important;
  font-size: 0.85rem !important;
}

.btn-group .filter-btn {
  border: 2px solid var(--primary-color) !important;
  color: var(--primary-color) !important;
  background-color: transparent !important;
  margin: 0.25rem;
}

.btn-group .filter-btn.active,
.btn-group .filter-btn:hover {
  background-color: var(--primary-color) !important;
  color: var(--text-light) !important;
}

/* Cards */
.card {
  border: none !important;
  border-radius: 1rem !important;
  overflow: hidden;
  transition: all 0.4s ease;
  background: var(--text-light);
}

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

.card-body {
  padding: 2rem;
}

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

.card-img,
.card-img-top {
  transition: all 0.4s ease;
  object-fit: cover;
}

.card:hover .card-img,
.card:hover .card-img-top {
  transform: scale(1.05);
}

.shadow-sm {
  box-shadow: 0 0.25rem 1rem var(--shadow) !important;
}

.shadow {
  box-shadow: 0 0.5rem 2rem var(--shadow) !important;
}

.shadow-lg {
  box-shadow: 0 1rem 3rem var(--shadow) !important;
}

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

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  cursor: pointer;
}

.portfolio-card {
  position: relative;
  height: 350px;
  overflow: hidden;
  border-radius: 1rem;
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(44, 85, 48, 0.95) 0%, rgba(44, 85, 48, 0.5) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  color: var(--text-light) !important;
}

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

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

.portfolio-overlay h3,
.portfolio-overlay h4 {
  color: var(--text-light) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Accordion */
.accordion-item {
  border: 1px solid rgba(44, 85, 48, 0.15) !important;
  border-radius: 0.75rem !important;
  overflow: hidden;
  margin-bottom: 1rem;
}

.accordion-button {
  background-color: var(--secondary-color) !important;
  color: var(--primary-color) !important;
  font-weight: 600;
  padding: 1.25rem 1.5rem;
  font-size: 1.1rem;
}

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

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

.accordion-button::after {
  filter: brightness(0) saturate(100%) invert(20%) sepia(38%) saturate(1000%) hue-rotate(86deg);
}

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

.accordion-body {
  padding: 1.5rem;
  background-color: var(--text-light);
  color: var(--text-dark);
}

/* Forms */
.form-control,
.form-select {
  border: 2px solid rgba(44, 85, 48, 0.2) !important;
  border-radius: 0.5rem !important;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: var(--text-light) !important;
  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, 85, 48, 0.15) !important;
  background-color: var(--text-light) !important;
}

.form-label {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-check-input {
  border: 2px solid var(--primary-color) !important;
  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, 85, 48, 0.25) !important;
}

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

.invalid-feedback {
  color: #dc3545 !important;
  font-weight: 500;
  font-size: 0.875rem;
}

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

.was-validated .form-control:valid,
.was-validated .form-select:valid {
  border-color: var(--accent-green) !important;
}

/* Progress Bar */
.progress {
  height: 1.5rem;
  border-radius: 1rem !important;
  background-color: var(--secondary-color) !important;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-green) 100%) !important;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.6s ease;
}

/* Badges */
.badge {
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-radius: 0.5rem !important;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

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

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

/* Bootstrap Icons */
.bi {
  vertical-align: middle;
}

/* Borders */
.border-start {
  border-left-width: 3px !important;
  border-left-color: var(--primary-color) !important;
}

.border-bottom {
  border-bottom-color: rgba(44, 85, 48, 0.2) !important;
}

.border-5 {
  border-width: 5px !important;
  border-color: var(--primary-color) !important;
}

.border-4 {
  border-width: 4px !important;
  border-color: var(--primary-color) !important;
}

/* Rounded Elements */
.rounded {
  border-radius: 0.5rem !important;
}

.rounded-3 {
  border-radius: 0.75rem !important;
}

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

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

/* Background Colors */
.bg-light {
  background-color: var(--secondary-color) !important;
}

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

/* Text Colors */
.text-white {
  color: var(--text-light) !important;
}

.text-muted {
  color: #6c757d !important;
}

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

.text-decoration-none:hover {
  color: var(--accent-green) !important;
}

/* List Styling */
.list-unstyled {
  padding-left: 0;
  list-style: none;
}

.list-unstyled li {
  padding: 0.5rem 0;
}

.list-unstyled a {
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

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

/* Footer */
footer {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a3a1f 100%);
  color: var(--secondary-color) !important;
  padding: 3rem 0 1rem;
  margin-top: 5rem;
}

footer h5,
footer h6 {
  color: var(--text-light) !important;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

footer p,
footer a,
footer li {
  color: var(--secondary-color) !important;
}

footer a:hover {
  color: var(--text-light) !important;
  text-decoration: underline;
}

footer .bi {
  font-size: 1.25rem;
  margin: 0 0.5rem;
  transition: transform 0.3s ease;
}

footer .bi:hover {
  transform: translateY(-3px);
  color: var(--text-light) !important;
}

/* Spacing Utilities */
.py-5 {
  padding-top: 4rem !important;
  padding-bottom: 4rem !important;
}

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

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

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

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

/* Position Utilities */
.position-sticky {
  position: sticky !important;
  top: 100px;
}

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

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

/* Object Fit */
.object-fit-cover {
  object-fit: cover !important;
  width: 100%;
  height: 100%;
}

/* Image Styling */
.img-fluid {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

img {
  transition: all 0.4s ease;
}

/* 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-on-scroll {
  opacity: 0;
  transition: all 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  animation: fadeInUp 0.8s ease forwards;
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow);
}

/* Small Text */
.small {
  font-size: 0.875rem;
  color: #6c757d;
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(44, 85, 48, 0.98);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    box-shadow: 0 10px 30px var(--shadow);
  }
  
  .nav-link {
    padding: 1rem !important;
    margin: 0.25rem 0;
    border-radius: 0.5rem !important;
  }
  
  .nav-link.active::before {
    display: none;
  }
  
  .carousel {
    height: 70vh;
    min-height: 500px;
  }
  
  .carousel-caption .display-2,
  .carousel-caption .display-3 {
    font-size: 2rem !important;
  }
  
  .display-4 {
    font-size: 2rem !important;
  }
  
  .display-5 {
    font-size: 1.75rem !important;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .position-sticky {
    position: relative !important;
    top: 0 !important;
  }
  
  .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
}

@media (max-width: 767.98px) {
  .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .carousel-caption {
    padding: 1rem;
  }
  
  .carousel-caption .lead,
  .carousel-caption .fs-3 {
    font-size: 1rem !important;
  }
  
  .btn-lg {
    padding: 0.75rem 2rem !important;
    font-size: 1rem !important;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  h1, .display-1 {
    font-size: 2.5rem !important;
  }
  
  h2, .display-2 {
    font-size: 2rem !important;
  }
  
  .portfolio-card {
    height: 250px;
  }
}

@media (max-width: 575.98px) {
  .navbar-brand {
    font-size: 1.25rem !important;
  }
  
  .btn-group {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  
  .btn-group .filter-btn {
    width: 100%;
    margin: 0.25rem 0;
  }
  
  .carousel {
    height: 60vh;
    min-height: 400px;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .carousel-control-prev,
  .carousel-control-next,
  .carousel-indicators,
  footer {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .card,
  .shadow,
  .shadow-sm,
  .shadow-lg {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

/* Accessibility */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Focus Styles */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary-color) !important;
  outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
  background: var(--secondary-color);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-green);
}

/* Selection */
::selection {
  background: var(--primary-color);
  color: var(--text-light);
}

::-moz-selection {
  background: var(--primary-color);
  color: var(--text-light);
}

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

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid var(--secondary-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}